There's something that has been bugging me for quite some time. I dont mean like a little nagging annoyance, Im talking about an inch long splinter in the bottom of your foot and having to walk around all day on it kind of bugging!
Code formatting. There I said it. Now call me OC or what have you but yes I admit Im quite anal when it comes to code formatting. There is nothing I hate more about coding than to open up someone's code and see poorly formatted code. Is there a reason to try and cram as much crap on one line as humanly possible when coding? What is it about some CF coders that makes them code this way?
I try to make my code as readable as possible. This includes breaking at a reasonable column so as not to run too far off the side of the screen. But why do some people code so that it takes a 30" widescreen monitor to read the whole line?
And whats with code like this:
<table width="90%"><tr><td><span class="label">Username: </span></td><td><input type="text" name="username" size="20" value="#error.username#"></td></tr>
</table>
Im not sure if BlogCFC will wrap that code or not but Im looking at an application right now that has that very code in it, and its all on one line with the exception of the closing table tag. Now is that really necessary?
Isnt this much more readable?
<table width="90%">
<tr>
<td><span class="label">Username: </span></td>
<td><input type="text" name="username" size="20" value="#error.username#"></td>
</tr>
</table>
Sorry for ranting but its just been that kind of day!! What are your thoughts on code formatting? Do you see alot of this sort of thing? Are you guilty of it yourself? If so, why? Im really curious.