Monday, August 28, 2006

Code annoyances

The problem I have with working on other people's code sometimes is that I find certain things that hurt my eyes so bad that I need to fix them all. For example, today I was looking at code where this guy for some reason decided he needed to tack on "? true : false" onto everything. I really felt like emailing him (and others) something like:

Just one thing folks. Before you go and write expressions like:


<boolean expression> ? true : false


Just take a minute or two to think about that to yourself. Just a little bit of quiet time. Thanks.


Any thing else you guys have to add?

BTW, Don't you just hate people that write:
if (strcmp(string1, string2) != 0)
instead of:
if (strcmp(string1, string2))

I just can't stand those people! ;)

2 Comments:

At 8/28/2006 4:15 PM, Blogger Skawaii said...

Haha. I love it when I come across that strcmp statement...Tamara seemed to like it a lot.

The stupid programming habit I'm hating the most right now is the following:

<_Insert_PeopleCode_Here_>

+) <- That's my smiling cyclops, btw.

 
At 8/30/2006 7:53 PM, Blogger Ryan said...

James is too busy cleaning out the "? true : false" statements out of his code to comment on this one.

 

Post a Comment

<< Home