Re:Confessions of a terrible programmer
by nostrademons on Sunday March 15, 2009 @02:03AM
(#516661)
"I could 'fake it' for the rest of my career, or I could invest more effort in learning how to write better code faster in the first place."
Uh, the techniques he describes are how you write better code faster in the first place.
There's no magic "better code" fairy that comes along and instantly makes you a master programmer. You get better by deliberately seeking out ways in which you're failing, and then correcting them. And you use the techniques the article describes - code reviews, assertion, unit tests, and static typing - to do that.
Eventually, those techniques become internalized, so that you still do them even when you take away the crutch of language and programming environment.
Notice how studies of master Smalltalk and Erlang programmers found that they just don't make type errors, and that when you add a static type checker to those languages, existing programs pass unmodified? A lot of people have taken this as evidence that static typing isn't necessary. But there's another interpretation: master programmers write their programs as if they were statically-typed, even if the language itself does not require or enforce this. The reason they can get away with fast-and-loose programming languages is because they've already disciplined themselves into automatically doing what the strict programming languages enforce.
And anecdotally, the vast body of crappy PHP and JavaScript code seems to support this interpretation.
Uh, the techniques he describes are how you write better code faster in the first place.
There's no magic "better code" fairy that comes along and instantly makes you a master programmer. You get better by deliberately seeking out ways in which you're failing, and then correcting them. And you use the techniques the article describes - code reviews, assertion, unit tests, and static typing - to do that.
Eventually, those techniques become internalized, so that you still do them even when you take away the crutch of language and programming environment.
Notice how studies of master Smalltalk and Erlang programmers found that they just don't make type errors, and that when you add a static type checker to those languages, existing programs pass unmodified? A lot of people have taken this as evidence that static typing isn't necessary. But there's another interpretation: master programmers write their programs as if they were statically-typed, even if the language itself does not require or enforce this. The reason they can get away with fast-and-loose programming languages is because they've already disciplined themselves into automatically doing what the strict programming languages enforce.
And anecdotally, the vast body of crappy PHP and JavaScript code seems to support this interpretation.