Cargo Cult Coding and Abject-Oriented Programming
I stumbled across a really nice article the other day:
Judging by the comments posted, only about 50% of people even realize it’s a joke – it’s worth reading through them for a second laugh.
Some notable quotes:
“Programs that use inheritance are characterized by similar blocks of code with small differences appearing throughout the source.”
“Abject-oriented programming lends itself to using plug-in components — bits of code found in books or on the Internet.”
“A virtual class or function is code that the application will eventually need, but it isn’t written yet.”
Which brings me onto cargo-cult programming. If you haven’t heard that term before, it usually refers to pacific islands, visited during the second war by much more technologically-advanced societies (e.g., the US), generally to establish military bases. Of course, after the war, the ships of the more advanced civilization stopped visiting the islands. A cargo-cult religion, not understanding the wider picture, tries to bring back the visitors by the use of rituals and making replicas of the technologial artifacts the covet. (More info on Wikipedia).
Anyway. Enough sounding like a lecturer. Cargo-cult programming is a similar sort of thing, where the “programmer” wants to achieve a particular effect, but can’t or won’t work out the details for themselves. Unfortunately the rise of the search-engine has exacerbated this problem – it’s just too easy to type in a few keywords, find a snippet of code, and paste it into the project you’re working on.
It’s an easy trap to fall into – as an example, my JavaScript skills are pretty weak at the moment, but the project I’m working on at the moment needs a fair amount off client-side coding. It’s so tempting just to paste in functions that seem to work. Given that I’ve been using JavaScript for less than a couple of months, learning it (and the DOM) sometimes feels like an insurmountable hill.
In the end of course, if you want to be able to call yourself a programmer, you have to understand what you’re doing, even if that means the project takes longer. It pays dividends in the end of course, but it takes discipline and an amount of short-term pain.
If you’re still pasting in code and not understanding it, well, you’re not a programmer in my book.

Cargo Cult Coding and Abject-Oriented Programming great article thank you.
Cargo Cult Coding and Abject-Oriented Programminggreat article thank you