The Seven Deadly Sins of JavaScript Implementation
Summary:
[list=1][]Not Playing Nice With Other Scripts
[]Believing Instead Of Testing
[]Using The Wrong Technology For The Job
[]Depending On JavaScript And Certain Input Devices
[]Making Maintenance Unnecessarily Hard
[]Not Documenting Your Code
[*]Optimizing For Machines, Not People[/list]
The full article makes for a surprisingly good read.
And that’s the nature of the beast. You maintain your own code. I suspect that Chris may his advice at situations where multiple people will be working with the code.
Even despite that though, I’ve come across code that I wrote a few years ago and thought WTF? Comments from back then would have been helpful now.
And that’s the nature of the beast. You maintain your own code. I suspect that Chris may his advice at situations where multiple people will be working with the code.
As someone (Gary?) likes to say, even if your code is crystal clear (to you), write it (and any comments) as if the maintainer who comes after you is a psychopathic serial killer who knows where you live. Even if it’s you.