Are you saying that the places you work have no concern for coding standards and code maintainability? At least that's what it sounds like you're saying. If so, I wouldn't want to work there. I've had me share of dealing with 20 different code formatting styles.
Joe Klemmer
Posts
-
What are your curly-bracing style? -
What are your curly-bracing style?True enough. But I prefer to put braces around every statement block, even if it is just one line. e.g.
if (a == 0)
{
x += 1;
}This keeps me from doing this -
if (a == 0)
x += 1;
return 1;when I mean -
if (a == 0)
{
x += 1;
return 1;
}if changes need to be made.
-
What are your curly-bracing style?> Thus, the most important thing for me is CONSISTENCY. Amen, to that, brother. One thing I find strange is that coding standards aren't as ubiquitous or enforced as they should be. It's like they are suggestions rather than mandatory.
-
What are your curly-bracing style?> I always use braces, even with a single line. I'm with you there. The only time I end up having something like -
if (a == b)
printf("a is equal to b");Is when I'm copying/using someone elses code and forget to add the braces. Usually due to laziness.
-
What are your curly-bracing style?For me, this is the easiest way to determine functional blocks. But, for the example of if..else, I seem to vacillate on the else part. Lately I have been using this style -
if (a > b)
{
print "b is less than or equal to a";
print "it means a is greater than b";
}
else
{
print "a is greater than b";
}But, sometimes, I find myself typing this -
if (a > b)
{
print "b is less than or equal to a";
print "it means a is greater than b";
} else {
print "a is greater than b";
}No idea why.
-
[Blog entry] Android vs WP7 for developers - a case studyYou'll likely be waiting a long time, then. Here's my purely speculative, uninformed, wild-ass-guess as to how these platforms will play out. * Android will be on the most units and hold close to 40% of the market. * iOS will still be the "standard" which which everything else is measured and have around 35% of the market. * Win 7 will take up the rest. None of them will have more than 50% of the market or less than 20%. No matter what you choose today, there will still be plenty of people to use your apps. And, remember, you heard it here first. :wtf: :cool: