Which brings me to my next problem... Braces, more accurately, brace styles. The standard, or at least what I often see from other programmers looks like this:
Function(arg, arg){
code;
if(arg){
code;
code;
}
code;
}
I HATE this style, it makes it so damn easy to misplace a brace, put the a line of code in the wrong block, and in general is a pain in the ass to read. I much prefer this method:
Function(arg, arg)
{
code;
if(arg)
{
code;
code;
}
code;
}
This looks so much better, easier to read, if you misplace a brace, it will glare out at you, you can easily see what code belongs to what function or what code belongs to what conditional or loop statement. I realize it takes up an extra line every time, but I'd easily be willing to pay that for code that isn't so infuriating to look at.
Well, style is always a matter of opinion and the way you are used to program.
ReplyDeleteMany experienced programmers do it in different ways, and they are happy with their own way.
I believe as long as you are not sloppy, follow your own style and stick to it, you are Ok!, But if you are programming in a team, then what you like is irrelevant and then, it is team's decision to which style and standards to use.
So I am just letting you know that the "Bloody" braces that you happen to dislike has been my way of programming for many years and I am very happy with it :)