One minute
Bad examples
I came across a short rant from chromatic. Although short, the main statement is a long-standing problem: there are many bad examples and wrong tutorials afloat. Not just that most of them are outdated, one too easily finds bad programming practices melted into how-to and code snippets. The problem with this is that most readers won’t check the quality before absorbing the information. Thus, shortcuts (mostly bad design) are propagated instead of the programming gems everyone preaches. Of course, there should be a purifying effect through community review, but since code snippets are mostly just copied, who reads the comments at the bottom? So not only the inexperienced programmers get trapped within bad code, but even seasoned programmers deal with code that is much worse than their own standard. Since I don’t believe that this article will change the world, with every programmer strive to their best on every line of code, I have a compromise to offer: containment. Separate as much of the “borrowed” code as possible. Morale will raise since the own good code is not tainted and there is also an incentive to refactor / redesign / rethink the external code before it goes to the “inner circle”.