ID:40957
 

Poll: Have you also overlooked this?

Yes 41% (10)
No 58% (14)

Login to vote.

Well, today while coding I realized that I had been doing things slightly harder.... You see, in the past(before today) when I needed to pause(a.k.a. in DM as sleep/spawn) for say, 5 minutes. I would go to my little pc calculater(or in my head) and multiply 600 by 5. Well, just now I realized. Instead of putting in sleep(3000) I can just put in sleep(600*5)!!! I've always known you can do this, I've just overlooked it. Isn't that soooo stupid ^_^?
Uh...that doesn't make you more or less intelligent. In fact, the former will take up fewer CPU cycles.
Popisfizzy wrote:
Uh...that doesn't make you more or less intelligent. In fact, the former will take up fewer CPU cycles.

Yeah, I realized that(or atleast thought) while making the post. But, im more conserned with how to make things easier. Personally, I feel if we take shortcut on the easier things, it will help us find shortcuts on the harder things. Odds are my theory will just home a generation of slobs. However, I can't help but still support it. Pluss, I hadn't post anything in awhile =).
I think that's about the least important aspect of programming you could possibly ever be concerned about.
Think about it this way. 600*5 takes up 5 spaces of code, while 3000 only takes up 4.
To your hobby programmers like most of BYOND, that extra space isn't going to make a difference. I do a lot of hacky work-a-rounds just to get things to work the way I want them to, I mean sure it may not be the proper way but atleast it does what I want.
I never thought of it that way. Could've saved me quite a bit of time doing calculations. (I'm known to make alot of really long sleep timers. 10-50 minute long sleep timers.)
Yeah, I find it easier to tweek stuff when writing like that. And as for saving CPU cycles? I tend to put efficiency over maintainability only in the inner loops.
I just appreciate being able to do most simple math in my head and, if that fails, use the calculator sitting next to me.
Can you help me code admin and faster log training for my naruto games ^^

Its Shannon
Contact me by sending me e-mails to [email protected] or My user Playstation2
Playstation2 wrote:
Can you help me code admin and faster log training for my naruto games ^^

Its Shannon
Contact me by sending me e-mails to [email protected] or My user Playstation2

Well, sorry man. I would however uh.. I don't help out with rips.. Just keep up the good work and one day you won't need anyone's help..