What constitutes good code?
Robert McLaws posted an article titled Why Are Many Coders Mediocre? I think his standards are just the start of what makes a coder a good coder. In my view, a good coder has a deeper understanding of the language they are working in than just the syntax. Syntax is easy, anyone can learn the syntax of any given language. I can read and understand code for seven different languages(VB, C, C++, C#, Perl, PHP, Java) but my understanding of the compiler for each language is different. The code that I write in Java, in my mind, is much worse than the code I’d write in VB. Why? I don’t know how the Java compiler interprets my code and what it outputs so I don’t know the tricks and idiosyncrasies of the language and the compiler. It’s the difference between this:Dim conn as New ADODB.Connectionand this:Dim conn as ADODB.Connectionset conn = new ADODB.Connectionin VB6. It’s knowing that if you delcare the var conn “as New”, the compiler puts in an “If conn exists” type statement around every statement that uses conn in your code when you compile it. (I’m pretty sure that’s the case but it’s been about 2 years since I’ve written any VB6 code).I’m writing mainly C# and VB.NET code now and I’m already worried and a little embarrassed about the quality of my code because I don’t really know what’s going on “under the hood” in the IL.To me, knowing what the compiler is doing with the symbols you give it, in a lot of cases the order you give it the symbols is important too(see: inlining), is the mark of a good coder. The way the program is structured, the formatting, the quality of the comments, and the list that Robert mentions in his article. That I can see when I look at the code and when I talk to the coder.


