• Welcome to Valhalla Legends Archive.
 

Booleans

Started by brew, May 06, 2007, 10:24 AM

Previous topic - Next topic
|

l2k-Shadow

Quote from: brew on May 06, 2007, 01:36 PM
Quote from: Banana fanna fo fanna on May 06, 2007, 01:14 PM
Checking to see if a boolean is equal to True makes you look like a big n00b. This is important. People looking at code you write may be evaluating you for a job or something. Just stick with If SomeBoolean Then.

Besides, I feel like the efficiency gained from this is very negligible.
It may seem noobish, but really we should be laughing at the people who think it is. In theory, comparing the value to a constant would be much more efficient then having it be evaluated first, like.... "If X then" Sure it sounds simpler, it may look easier, but is it really better? In order to check if "X" is true or false, it would have to be CBool()'d then re-evaluated before finally passing the If.

Look at my assembly screens, there is no CBooling(), it just compares it to something in both cases.
Quote from: replaced on November 04, 2006, 11:54 AM
I dunno wat it means, someone tell me whats ix86 and pmac?
Can someone send me a working bot source (with bnls support) to my email?  Then help me copy and paste it to my bot? ;D
Já jsem byl určenej abych tady žil,
Dával si ovar, křen a k tomu pivo pil.
Tam by ses povídaj jak prase v žitě měl,
Já nechci před nikym sednout si na prdel.

Já nejsem z USA, já nejsem z USA, já vážně nejsem z USA... a snad se proto na mě nezloběj.

tumeria


Banana fanna fo fanna

The point is, the compiler should be generating identical code anyway. Checking if True==True is redundant.

Barabajagal

If X = True Then is 7 extra characters you don't need, as I said before. " =True". Useless characters in your source code, just like comments.

l2k-Shadow

Quote from: RεalityRipplε on May 06, 2007, 06:02 PM
If X = True Then is 7 extra characters you don't need, as I said before. " =True". Useless characters in your source code, just like comments.

Comments are extremely helpful when trying to figure out someone else's code, especially if it's not coded in a shitty BASIC language.
Quote from: replaced on November 04, 2006, 11:54 AM
I dunno wat it means, someone tell me whats ix86 and pmac?
Can someone send me a working bot source (with bnls support) to my email?  Then help me copy and paste it to my bot? ;D
Já jsem byl určenej abych tady žil,
Dával si ovar, křen a k tomu pivo pil.
Tam by ses povídaj jak prase v žitě měl,
Já nechci před nikym sednout si na prdel.

Já nejsem z USA, já nejsem z USA, já vážně nejsem z USA... a snad se proto na mě nezloběj.

Barabajagal

If you know how to use a language well enough, you should be able to find out what it does. I can read Java and C just fine, despite never taking C, and only taking a year of Java. It's not that hard.

l2k-Shadow

On the contrary try reading large source codes (30+ files), with numerous user-defined types and structs and other user-defined code calling functions accross files and such things. It does get confusing.
Quote from: replaced on November 04, 2006, 11:54 AM
I dunno wat it means, someone tell me whats ix86 and pmac?
Can someone send me a working bot source (with bnls support) to my email?  Then help me copy and paste it to my bot? ;D
Já jsem byl určenej abych tady žil,
Dával si ovar, křen a k tomu pivo pil.
Tam by ses povídaj jak prase v žitě měl,
Já nechci před nikym sednout si na prdel.

Já nejsem z USA, já nejsem z USA, já vážně nejsem z USA... a snad se proto na mě nezloběj.

Barabajagal

If you can't figure it out, you shouldn't mess with it. The only things that should be documented in coding are how to call subs and functions in DLLs. As the quote goes "Document my code? Why do you think they call it code?"

Mystical

 I think the real question here should be; which way is the most efficient way?
I believe in my opinion, somtimes that; the shortest way isn't always the most efficient way including in/a big project(s).



there was more to my story but i decided to go do somthing else, haha! argue over it n i'll come back inawhile..

l2k-Shadow

Quote from: MyStiCaL on May 06, 2007, 10:55 PM
I think the real question here should be; which way is the most efficient way?
I believe in my opinion, somtimes that; the shortest way isn't always the most efficient way including in/a big project(s).



there was more to my story but i decided to go do somthing else, haha! argue over it n i'll come back inawhile..


According to the assembly of 2 programs, each using the other way, it's shown that both ways do the same thing, so your question is already answered.
Quote from: replaced on November 04, 2006, 11:54 AM
I dunno wat it means, someone tell me whats ix86 and pmac?
Can someone send me a working bot source (with bnls support) to my email?  Then help me copy and paste it to my bot? ;D
Já jsem byl určenej abych tady žil,
Dával si ovar, křen a k tomu pivo pil.
Tam by ses povídaj jak prase v žitě měl,
Já nechci před nikym sednout si na prdel.

Já nejsem z USA, já nejsem z USA, já vážně nejsem z USA... a snad se proto na mě nezloběj.

Skywing

Quote from: RεalityRipplε on May 06, 2007, 09:15 PM
If you can't figure it out, you shouldn't mess with it. The only things that should be documented in coding are how to call subs and functions in DLLs. As the quote goes "Document my code? Why do you think they call it code?"

Not true at all.  Especially in large projects where you have multiple maintainers (e.g. most paid programming positions), where not everyone is familiar with all the code (or at least, not the original author, or perhaps someone has modified it since they wrote it), comments are quite important.

Barabajagal

Any project where every developer doesn't know how it work is a poorly made project indeed. Sort of like the Windows Operating Systems... hum...

warz

Quote from: RεalityRipplε on May 07, 2007, 12:31 AM
Any project where every developer doesn't know how it work is a poorly made project indeed. Sort of like the Windows Operating Systems... hum...

Another not true at all statement.

Banana fanna fo fanna

Quote from: R?alityRippl? on May 07, 2007, 12:31 AM
Any project where every developer doesn't know how it work is a poorly made project indeed. Sort of like the Windows Operating Systems... hum...

You are being absolutely ridiculous.

Skywing

Quote from: RεalityRipplε on May 07, 2007, 12:31 AM
Any project where every developer doesn't know how it work is a poorly made project indeed. Sort of like the Windows Operating Systems... hum...
Actually, the people behind Windows have a fairly good idea of what they're doing.  I've met more than a few of them personally, for various discussions.

Commented code takes less time to understand, and is less-prone to errors in the person trying to understand it.  Both of those are important when it comes to real-world work.

|