1. an ide/language with really good static analysis
2. aggressively minimize codebase complexity<p>done. when my code doesn't work the first time, and i'm writing in a static-typed language, it's usually due to high accidental complexity in my code or code i interface, requiring me to keep too much context in my head, causing logical problems and problem states to be non-obvious.<p>stupid errors like writing an if statement wrong, is sophomoric. "most common errors" really means avoiding mutable state & leaky abstractions[1]. i do think the OP gets this, it just doesn't come across too clearly.<p>[1] nostrademons of HN, "how to become an expert swegr" <a href="http://news.ycombinator.com/item?id=185153" rel="nofollow">http://news.ycombinator.com/item?id=185153</a>
Should generate some debates, depending on if you're from the static/dynamic typing, IDE vs. wetware, TDD or not, etc camps.<p>3. If you use IDE's or vim/textmate/emacs and a decent language plugin, you'll argue the IDE should match braces and insert skeletal control structures.<p>5. Self-contained function, so no side effects, isn't that part of the definition of functional purity in them "academic languages" (heh)?<p>6. How do you define edge and corner cases? Is there something like QuickCheck for your dev environment?
I think it would be great if there was a way to easily capture my "most common error categories".<p>Years ago I got bit a couple of times by assignment instead of comparison errors (i.e. if(x = 1) instead of if(x == 1))<p>I noticed a pattern and made a conscious to always put the variable last in comparisons, so for years I have written if(1==x) so that the compile would fail if I wrote if(1=x).<p>Having a way to see my most common errors would give the opportunity to look for similar error-proofing measures.
I'm far more interested in code that works when it ships than code that works the first time it's run.<p>Code that works the first time it's run is magical, and therein lies the problem: Magic code is untested and unproven code. It offers a false sense of security, which is why it fills experienced developers with a sense of dread.<p>Until you prove that code's correctness (such as with tests), it is almost certain that it has nasty bugs in it that your initial successful run haven't uncovered. So what does having it work the first time give you? Bragging rights, maybe, but nothing of any real value to shipping code.