mikeash.com: just this guy, you know?

Posted at 2007-12-31 05:51 | RSS feed (Full text feed) | Blog Index
Next article: Performance Comparisons of Common Operations, Leopard Edition
Previous article: Leopard: First Impressions
Tags: humor programming rant
The Cults of Programming
by Mike Ash  

In my experience with various programmers over the years, I've realized that most of them fall into one of several cults which describe their behavior. I've compiled a list of cults and brief descriptions you can use to identify them. (Note: if you're easily offended and think you might fall into one of these categories, please forego reading the rest of the article.)

Experience Cult
Members of the Experience Cult believe that it is impossible for any person to do anything they haven't already done before. They can be identified by their characteristic refusal to solicit advice from anyone who hasn't already worked with the exact problem at hand, by their horrified reaction when presented with any APIs they haven't used before, and by constant requests for ridiculously specific sample code.
Prognosis: may be led toward greater independence if shown that doing new things is actually possible.

Optimization Cult
Members of the Optimization Cult value fast code over all other virtues. They are often found asking questions of the form, "What's the fastest way to...?" They are horrified when presented with any suggestion which doesn't fit with their view of what is fast, but also have a hilariously wrong view of just which operations are fast and which aren't.
Prognosis: may eventually become productive with education on the actual capabilities of modern hardware, the true speeds of various operations, and the need to properly optimize programmer time.

Ease Cult
Ease Cultists value ease of implementation over all other virtues. They are often found asking questions of the form, "What's the easiest way to...?" They tend to assume that the frameworks have built-in facilities for everything they want to do and the major problem is simply finding them. They are horrified when it is suggested that they implement some functionality of their own.
Prognosis: if persistent enough, may outgrow these tendencies after finishing a reasonably sized project.

Fastness Cult
Although superficially similar to the Optimization Cult and the Ease Cult, Fastness Cult members value speed of implementation over all else. They do not have a characteristic question but can often be identified by their habit of trying to identify as many different ways as possible of accomplishing their goal so that they may choose the one which takes the least time to implement. They frequently scoff at any suggestion to experiment, research, or invest time into learning tools.
Prognosis: may be rehabilitated with frequent examples of the utility of experimentation, research, and tools, but often hopeless.

Uncertainty Cult
Members of the Uncertainty Cult believe that nothing is truly known, and it is best to be as sure as possible before proceeding. They are characterized by repeatedly soliciting advice for the same problem even after a good solution has already been proposed in great detail. Frequently seeks other venues for advice after exhausting the first one, or posts the same message to multiple mailing lists or web sites simultaneously.
Prognosis: when starved of information, may realize that it's possible to begin a trip without knowing the location of every footfall in advance.

Perfection Cult
Perfection Cultists know that perfect code exists with mathematical certainty and devote themselves to finding it. They are frequently seen endlessly refining code of no practical value. They occasionally solicit advice on how to choose between esoteric alternatives which to non-cultists appear to be equivalent and irrelevant. Their code would be absolutely masterful if it weren't for the fact that it is never finished.
Prognosis: graduation and employment are often cures, although active Perfection Cultism may continue in free time.

Cargo Cult
The Cargo Cult is the classic cult of pseudoscience which goes far beyond programming. Programmer Cargo Cultists do not grasp the need for deeper understanding and frequently don't even grasp that it exists, working entirely by imitation. They tend to write code which looks correct when skimmed but which barely makes sense when examined more thoroughly. When flaws are pointed out they make corrections which fit the letter of the suggestion but which miss the point entirely. They can often be identified by frequent arguments on strange topics with experts in which they refuse to admit that they don't know what the heck they're talking about.
Prognosis: hopeless.

What's your cult?

Did you enjoy this article? I'm selling a whole book full of them. It's available for iBooks and Kindle, plus a direct download in PDF and ePub format. It's also available in paper for the old-fashioned. Click here for more information.


Patrick at 2007-12-31 14:30:04:
Ease, Fastness and a little bit of Uncertainty.

Ralphh at 2007-12-31 14:50:19:

I always want to rewrite my own code because I'm unsatisfied with organization or speed. I usually wind up with virtually the same code again.

Daniel Jalkut at 2007-12-31 15:21:43:
You forgot the Objective C Cult... that is ... the occult :)

Michael Barber at 2007-12-31 15:48:20:
I think you missed the cult I lean towards: Generality. That is, the code should be able to handle all possible situations, with the right parameters provided.

Perhaps this is a subset of the Perfectionist, because, much like the Perfectionist, you can't ever finish such programs. Deadlines may be the cure, not unassociated with graduation and employment.

Ian Baird (RTMFD) at 2007-12-31 15:55:27:
Cargo cult.

Jeff Nichols at 2007-12-31 19:35:12:
Perfection with a healthy dose of Uncertainty. I'm also a card carrying member of the Simplicity Cult, whose members have their own take on Occam's razor... the simplest implementation is almost certainly the best.

Jens Alfke at 2008-01-01 00:58:24:
An excellent taxonomy! This really takes me back to the days when I used to hang out on comp.sys.mac.programmer.

My cults would be Ease and Optimization; also a bit of Perfection when I rewrite code to make it marginally faster and easier to use.

There's a subset of the Ease cult worth pointing out in the context of Cocoa programming: we could call it the Single-API Cult. These people only want to use a single API for their entire program and are horrified to find that there are facilities only available using lower-level APIs. They can be heard complaining "what do you MEAN there isn't an NSUDPSocket?" or "I want to do vector operations but vecLib doesn't support NSArrays". There's a bit of he Experience Cult there too, in that they believe CoreFoundation APIs can only be learned by subterranean Morlocks, and POSIX/BSD APIs by bearded gurus.

mikeash at 2008-01-01 01:04:22:
My classification was somewhat arbitrary and not intended to be complete, but these are some good suggestions. Generality Cult and Simplicity Cults are both probably sects of Perfection Cult, but the same could be said of Optimization Cult. They just have different ideas of what perfection is. Actually, Perfection Cult can cover quite a lot of interesting programmer difficulties.

raveman at 2008-01-01 05:23:00:
i hate "Optimization Cult", i was twice asked on job interview if I had optimized SQL (I hope they didnt mean execution plans, im weird and believe that it should be dba's job). When I get asked what is faster itarating over array or list I know that im dealing with same cult. However im guilt of sometimes doing some useless code optimization, but not often.

Ease Cult is the best since we worry about code working and doing what it should and if performance are bad we fix it then and dont have nightmares about bad performance.

Perfection Cult is also good option since I lately saw methods that have 3-5 full screens and that was scary. I got bad habbit from my java teacher about formatting code and now i have to unlearn it since that kills svn annotations.

You forgot about code coverage cult, i lately did some code coverage and that thing is addicting, i dont care now about the code, i only want to get as much % as possible.

scott guelich at 2008-01-01 05:48:47:
Still a fan of the Laziness, Impatience, & Hubris cults (or would that be a single cult?)

Mike Lee at 2008-01-01 05:57:54:
I'm in the Kevlar cult, which is to say, I expect my code to be bulletproof. I'm known to spend days on a two-hour problem making sure that there are no bugs, no unhandled exceptions, no edge cases. The only known cure is project management.

Penguin Pete at 2008-01-01 08:08:02:
Wow, this is dead on! I myself am only a casual programmer, and rarely do it professionally. I'm just a programmer by way of being a power-user, so I guess I'd fall into the Fastness Cult - it's a means to an end to solve a problem, nothing more.

One glaring omission I must point out: the Hype Cult. This is the one that automatically adopts whatever the Hot New Thing is this year and tries to convert everybody else to it. I confess I follow the Hype Cult around from time to time when I'm in the mood to explore.

Josh Volz at 2008-01-01 14:59:41:
I think I am in the "Ease" and "Fastness" cults, with a follow up of "Optimization." The first way that always comes to mind is the brute force method, after which I try to find a second way that's more elegant. Then, I just go for it with whatever I've decided on. If the code is then too slow, I try to optimize with a profiler.

I think we might want to think about adding a "match the way the code does it" cult. If you work on a big project you are always stuck trying to decide to do it the "good" way, or the way that is like how the code already does something similar elsewhere. Yes, you could refactor, but I usually work in corporate settings, where you would have to refactor 50-60% of the time to make a dent, and nobody is willing to pay.

dominic at 2008-01-01 22:14:22:
What a load of bollocks! This is like horoscopes that are so general they apply at least a little bit to everyone, but sum up completely no one.

_ex_ at 2008-01-01 23:14:47:
+ 1 to scott guelich
"fan of the Laziness, Impatience, & Hubris cults"

John Frum at 2008-01-02 01:40:46:
I'm in the Cargo Cult.

octo at 2008-01-02 04:45:23:
you are the guy from efnet's #everlast irc channel?

mikeash at 2008-01-02 05:57:41:
Lots more good responses. Dominic, congratulations on completely missing the point. Octo, I have no idea what #everlast is, and you'll know me if you find me on IRC because I use the same nickname as I do here.

I'm not sure which cult I'd fall into but I probably tend toward Perfection Cult over the others.

Gabriel U. at 2008-01-02 13:21:51:
Haa! I love this. I've hired many programmers and i've gotten plenty of "Cargo Cult" members. They just don't get "it"!

Sanjay Samani at 2008-01-02 17:24:07:
I'm a member of the "Layout Cult", all the code has to be indented nicely, let the editor do the word wrapping, braces on a new line. If I get third party code, if I ever have to edit one line, I'll reformat the whole file to my layout preferences.

Bret Yates at 2008-01-03 20:13:55:
XP cult, Scrum cult and HashMap cult.

All programming problems can be reduced to HashMaps.

With XP comes ligthweight documentation, the use of spikes to reduce technical risk, test driven design and automated functional and unit tests.

With Scrum comes sprint demos, which are demos staged for the users so that corrections can be made during the project.

Nick Werth at 2008-01-03 20:22:09:
One way to get out of the cargo cult is to use tests for everything.

One way to get out of the optimization cult is to use XP rule "make it work, make it right, make it fast". Then when you have to make it fast, make sure you have all tests in place and that you don't change the functinal code, but the libraries or abstraction layers by using cache proxies or some of the same sort, so that functionally you can't see any difference, but it performs faster.

Five at 2008-01-03 21:42:31:
I'll flatter my ego and say that Mike was thinking about me when he wrote the Ease cult entry. A quick look back at the #macdev logs has me asking "Is there an easy way to do X", and Mike often grumbling "write it yourself, it's only n lines long" :-)

One (or two) subcults of the Perfectionist cult: the Refactoring cult and the Design Pattern cult - this may be one and the same cult, as most of the Refactorers I've worked with like to refactor to design patterns.

A Tanaka at 2008-01-04 19:50:35:
A lot of Japanese Slash dotter's are having fun to discuss on this entry.

I may be an cargo Cult.

chuck at 2008-01-04 22:02:40:

Part of my ease-ness though is, if it isn't easy already, I should try to write something to make it that way. That's where the perfection and sometimes the uncertainty end up coming in...

Skorgu at 2008-01-05 00:08:55:
Quibble: Doesn't trying to identify as many different ways as possible of accomplishing their goal map pretty closely to 'research' in Fastness?

I've been guilty of all of these at one point or another.

mikeash at 2008-01-05 11:19:49:
Cool, my first slashdotting. Nearly 700 slashdot referers, wooo!

Skorgu, you are correct that that is research, but a Fastness Cultist takes it too far. A true cultist will find a perfectly workable solution with no downsides but will keep looking for alternatives far beyond the point of diminishing returns. A fanatic can end up with a two-line solution and will still keep searching in case there's a better way.

wflmn at 2008-01-08 09:29:03:
Perhaps you're mislabeling uneducated or unmotivated programmers as Cargo Cultists.

Cargoman at 2008-01-08 20:29:38:
Doesn't trying to identify as many different ways as possible of accomplishing their goal map pretty Fastness? I've been guilty a perfectly workable solution with no downsides but will keep looking for alternatives far beyond the point of diminishing fanatics can end up with a two-line solution and will still keep searching in case there's a better way as Cargo Cultists.

- Cargo

Bruce Chapman at 2008-01-09 06:31:39:
You missed my cult - "maintainability"

Damien Sorresso at 2008-01-12 08:49:04:
I'm definitely in the generalist / perfectionist cult, specifically a subset involving the "no duplicated code EV4R" mentality. I've destroyed many perfectly workable "if" blocks because of this.

Daniel Luz at 2008-01-15 04:59:48:
Perfection Cult. If you let me, I'll spend hours trying to make my code at the same time more concise, more efficient on resources (all of the involved resources), more bulletproof and easier to read.

quasi at 2008-01-24 23:33:24:
you missed the the lisp cult :)
We believe that whatever you can/want to do, you can do it better if you do it in lisp. Also a member of generalist/simplicity/lazyness/hubris cults is our lisper.

James at 2009-08-14 02:59:59:
"First make it work, then make it better."

If you follow the first half of this truism but not the second, you're not a member of the Perfectionist Cult and you should be.

If you follow the second half and not the first, you need to resign from the Perfectionist Cult because your premature enhancements are crippling your getting something done.

As you can see, I'm in the Truism Self-Reminder Cult. "Keep it simple, stupid." "Don't prematurely optimize." Etc., etc. That little voice in my head has to keep stomping on temptation.

Pickman at 2009-09-28 08:19:07:
If you want it to work make it better. This always works. Making software better is a matter of how you think it. This makes me often an optimization junkie but in fact a perfectionist. As long as a program is faster and lighter who cares about clarity. Comments are out there for it (and reverse engineers DO want some headaches).
In fact all those cults have their proper application. If I need an application badly I don't give a f*** to what is the problem. It should work. Now. So fastness cult (for me strictly related to defaults setted to recursive solutions).

If I have all the time of the world I'll very likely create a study on how much ram would be allocated at runtime, which CPU is more likely to run the program for the end-user etc.
Everything in order of the hands-on imperative. Control over the machine and no god-damned skynets in my computer is what I always repeat myself (just think, skynet would be a product of bad, bad, bad programming, creating a program that doesn't what it should and has a switch to kill-all-humans mode).

Ameya at 2014-12-13 08:10:20:
Cargo FTW!!!

Yes i am reading this in Dec 2014....Thanks Mike for the great articles.

Comments RSS feed for this page

Add your thoughts, post a comment:

Spam and off-topic posts will be deleted without notice. Culprits may be publicly humiliated at my sole discretion.

Web site:
Formatting: <i> <b> <blockquote> <code>. URLs are automatically hyperlinked.
Hosted at DigitalOcean.