Every now and again I see glimpses of myself in ‘younger’ programmers as they struggle with the same concepts I did, fall into the same mental traps and generally make similar mistakes. Writing the 4 wrong ways post made me wonder how common these phases really are and whether we could categorize them.

You too? Well wonder no longer, for I have completed this herculean task! I’ve found myself in each of these traps at least once – some of them several times – and have seen them in others too. Are there more out there?

The Enthusiastic Newbie

The newbie is full of passion and excitement for her one and only language, which is undoubtedly VB, PHP or actionscript. Having finally got to grips with the syntax of said language she feels she’s completely mastered it in all its forms. The newbie writes astonishingly quickly, but everything ends up in one big file full of global variables. This is a very productive stage, if little worm games and random utilities / replacement shells are what you want produced.

Distinguishing code features: Each program is exactly one file, containing a hundred global variables, none of which has more than four letters in the name.

Mistaken belief: Programming’s pretty easy, really.

Most endearing quality: Her little shiver of excitement every time she opens her IDE and gazes at a blank project, full of potential.

Reads: Firefly fanfics.

Most likely to say: “Come and look at this cool flash game I just finished!”

The Budding Genius

Having programmed for a few years and learnt a second language, the budding genius is firmly convinced that he is the Messiah of the programming world. He reinforces this world view with his conviction that anything he doesn’t understand (i.e. almost everything) is pointless, old-fashioned and a waste of time.

Distinguishing code features: Uses his own vector class implementation. Always starts class names with his own initial.

Mistaken belief: The programming world has more to learn from him than he does from it.

Most endearing quality: How easy it is to make him defensive and huffy by mentioning anything outside his cabbage patch of experience.

Reads: His own blog.

Most likely to say: “Huh, yeah well everyone knows functional languages are no use for *real* programming *anyhow*”

The Abstraction Freak

After a while all new programmers being to realize they start each new flash game by copying 90% of the old one. Suddenly it occurs to them that they could write one ‘super’ game engine to make writing a new game as simple as finding the sprites and writing a config file containing the rules! Flushed with this success, the wannabe abstraction freak begins to believe all programs should be generalized, generalized, generalized… unfortunately, holding on to this belief too long turns them into the Abstraction Freak.

Distinguishing code features: Adds five new classes every time he implements a new feature, all of which are named after design patterns and give no clue whatsoever as to the feature they’re supposed to implement. Any actual business logic is hidden in an xml-based config file somewhere else in the repository.

Mistaken belief: Writing a program to interpret a set of config files containing an awkwardly-phrased, buggy description of the program he wants to write is better than writing the program he wants to write.

Most endearing quality: The expression of painful concentration on his face while battling his analysis paralysis before starting to reimplement the login feature for the fourth time that month.

Reads: Design Patterns, cover to cover, during his lunch break every day.

Most likely to say: “So I think we should start the new time scheduling project by writing a generic application framework…”

The Veteran

Any programmer exposed to the bitter realities of working in a soulless commercial software company, shuffling bits on a hard disk for the same salary every month eventually develops a certain protective shell. Neither speed nor genius are rewarded, so often a professional developer begin to develop a very careful, measured style that ensures he’s never caught out by either bugs or management, which he considers to be pretty much the same thing.

Distinguishing code features: The first ten lines of any function, even an accessor, are all assert statements. All the error conditions for each function are dutifully checked and handled and comments are liberally scattered throughout.

Mistaken belief: Doing things ‘properly’ is the same as getting things done, but better.

Most endearing quality: His aura of measured, unflappable calm that makes it clear that even the direst emergency won’t make him work any faster, leaving one with the impression he might be better suited to a career in the bonsai industry.

Reads: joelonsoftware.com (yes, even though Joel’s stopped posting)

Most likely to say: “Well, I won’t be able to say until doing a proper estimate next week, but it’s going to be at least *sucks air in through pursed lips* at least four man-months to add a print preview, plus testing and documentation of course.”

The ‘Guru’

After a decade or so of bouncing from one stereotype to the next, our newbie is all grown up, yet she feels like a hollow shell of the enthusiast she once was. One morning, she wakes up and realizes that the unwieldy crust of unit tests, assertions, error-checking and class-design that have built up around her programming style are just crutches, crutches that are dragging her down and that she no longer needs! She casts them off and begins writing the simplest, barest code she can think of to do what she needs! Free the features! Free the code! Freedom!

Distinguishing code features: Only writes in dynamically-typed languages with a strong functional component. At first glance her code looks remarkably similar to the newbie’s, except there’s less of it and the variable names make sense.

Mistaken belief: That her enlightenment makes her a guru without the quotation marks.

Most endearing quality: Her little shiver of excitement every time she sees an interesting problem she could solve with ‘just half a dozen lines’ of code.

Reads: news.ycombinator.com/newest

Most likely to say: “You know, polymorphic inheritance is really just a poor-man’s substitute for first-class functions and dynamic typing…”

And…

So there you have it, my career as a programmer laid bare. I’m curious; does everyone go through these phases?

If I’ve missed any great ones, add your own in the comments and I’ll either update the article or collect them for a Part II…

Note: Yield Thought has moved to http://yieldthought.com – check there for the latest posts!