stupid optional coding conventions

i am a stickler for coding conventions. part of making code readable is to adhere to some set of standard coding conventions. i’ve been using the same set of conventions for a long time now, which means that at least when i look at my own code it looks properly formatted. what pisses me off is when i have to deal with code that has tabs all over the place inconsistently. it’s ugly, it’s awful, and it pisses me off.

i’m working with code where the code is a mess. there are no regular conventions used, it almost looks like people used whitespace on a whim. it’s like writing english sentences and using punctuation whenever you feel like it. now, i know that i never capitalize when i write emails or blog entries, and i’m sure that there are those of you out there where it’s a big pet peeve and it grates on you. fine, i get that. sorry. but at least the meaning of the content is clear. at least, you know, in my head it all makes sense. but i just spent 10 minutes looking at a block of code trying to figure out why something isn’t working when it should be and i finally found out why. it’s because the previous programmer decided that the use of braces and whitespace isn’t very important to them.

in some places code looks like:

if ($variable==true) {
// do this
// and do this
} else {
// do that
}

in other places code looks like:

if ($variable==true) // do this

and in other places it looks like:

if ($variable==true) {
// do this
} else // do that

and in other places it looks like:

if ($variable==true) { // do this } else { // do this; //do that; //do this too; }

it kills me. i’m glad that i enforced a coding convention when we had multiple programmers here. all of our new code looks beautiful.

prepping for vegas

there’s a big volleyball tournament (well, it used to be enormous, but it seems like it is getting smaller and smaller every year) in vegas this weekend. it’s been tradition to go to the volleyball tournament, play some games, and then have some fun while at vegas.

the funny thing is that i thought the tournament was months away and so there’s been a lot of chatter about where to stay and i was just thinking to myself that these people i’m playing with are crazy. it’s months away, we don’t need to worry! it turns out that it is this weekend and until last week, we had no place to stay while we were there!

that just goes to show you that my memory is still bad as ever.

still, i’m looking forward to vegas. i need to go find my throwaway camera. i wonder where i put that thing…i haven’t seen it in months…i hope i didn’t really throw it away.