loading...

Discussion on: Cargo Cult Programming!

Collapse
darkwiiplayer profile image
DarkWiiPlayer

I've seen it a lot, when helping people with programming, that at some point they face an issue that can be solved by adding some sort of keyword, like local in Lua for example. Even though I always explain why this is necessary, it happens all too often that, later on, they face a different issue and, when asked how they'd go about fixing it, the first thing they try is just adding the same keyword again.

This showcases a very common but harmful mentality of just repeating the same steps that helped in a similar situation. No doubt a valuable mental tool for the longest time during human evolution, but sadly one that backfires more often than not in programming.

I think this mentality, when applied to a larger scale is what leads to cargo cult programming, and on an even larger scale to the overuse of patterns where they aren't really apropriate.

It's good to use mental shortcuts and save energy for your actual development process, but when you have the time and energy, always ask yourself: How does this problem work and how does this change fix it?

Collapse
designpuddle profile image
Chris Bertrand Author

Couldn't have said it better myself.