Hacker News new | ask | show | jobs
by TeMPOraL 600 days ago
Isn't tutorial-level code exactly the best practices that everyone recommends these days? You know, don't write clever code, make things obvious to juniors, don't be a primadonna but instead make sure you can be replaced by any recently hired fresh undergrad, etc.? :)
1 comments

Not really. For example, tutorial code will often leave out edge cases so as to avoid confusing the reader: if you're teaching a new programmer how to open a file, you might avoid mentioning how to handle escaping special characters in the filename.
Don't forget about Little Bobby Tables! These types of tutorials probably killed the most databases over time.