I recently wrote an article for Nettuts+, “Cargo-Culting in JavaScript“. In it I cover the concept of cargo-cult programming and specific techniques that seem to be cargo-culted off quite frequently in JavaScript.

I found that writing the article took a great deal longer than I’d anticipated. Writing an opinionated piece is always a little risky and making the prose itself measured and reasonable is hard work.

Rereading it I realise it seems a little preachy. I think that may just be the nature of the principle behind the article though.

What’s quite funny is that regular tutorials and code samples inject the same amount of opinion and subjective preference but it is under the guise of code and so you don’t feel manipulated or provoked. Instead you feel appreciative and subdued. This is in contrast to prose… it only takes a bit and you’ll feel preached-to.

Code, on the other hand, seems factual and robotic. You can hardly debate a piece of code (if you try you’re either a “nitpicker” or “troll”). But shared code is far more pervasive a manipulator than we’d like to think. If it wasn’t then cargo-cult-programming wouldn’t exist. Techniques, both good and bad, spread like wildfire.

Thanks for reading! Please share your thoughts with me on Twitter. Have a great day!