Read my book

I wrote books about Webpack and React. Check them out!

Wednesday, October 13, 2010

Coding Flows - Ways to Think About How You Are Coding

As probably every coder knows coding is really mood dependent. Sometimes just typing that single line of code may feel like impossible thing to do. On the other hand there are times when you might feel like you can do pretty much anything. Now the question is, is there anything that can be done about it?

I think, yes. In this post I'm going present some coding flows to help to understand how to tap into the current mood and perhaps turn it better. Sometimes just starting to do something is enough to break the creative block.

Usually it's a good idea to start out doing some warm up so I'm going present that kind of flow first. After that I'm moving on the flows of Janitor, Zombie and finally Master of the Universe. There's also a little conclusion.

Warming Up

Usually when I start to code something I do it by performing some simple, almost trivial, tasks first. If I start from scratch, I just might whip up some simple code and make sure it works adequately.

If I'm working with already established codebase, I might just tweak some little bit (ie. application style or so) that happens to annoy me.

The purpose of warming up is just to get into the mood for doing something more serious. It's good to set up your music player etc. during this phase and make sure you aren't going to have any further distractions later on. It's going to pay off.

The Janitor

My warming up phase might evolve into some janitoring. There's almost always something to clean up. As Uncle Bob says "Leave the campground cleaner than you found it" (boy scout rule).

In general the basic point of being a janitor for a while is just to remove possible annoyances you find in the code. This will make it easier to spend more time in the valuable Master of the Universe kind of flow.

The Zombie

I guess "The Zombie" is a special case of "The Janitor". Sometimes there are things that are brain-numbingly simple yet tedious to do. You can actually avoid this sort of flow by doing enough janitoring and keeping things clean. The less technical debt you have, the better. :)

The Master of the Universe

Now this is the flow every coder dreams of. The Master of the Universe flow presents the pinnacle of thought. You become part of the machine, or the machine becomes a part of you, whatever, and everything feels possible. You are truly a master of your domain and nothing cannot stop you. At least it feels like that while it lasts. :)

Some people refer to this as "the flow" or as the zen. Simply put it's just the highest form of consciousness I'm aware of. Highly recommended.

Reaching this flow isn't easy. It takes certain kind of mastery, environment and perhaps discipline, to be able to do that. I can guarantee it's well worth it, though. :)


I'm quite certain there are a lot of other types of flows out there. The ones introduced here are just happened to pop into my mind. I guess the kind of flows one uses depend heavily on personality and other factors. They are just one way to think about coding work anyway. :)

I picked the illustration used from Scott Hampson's Flick stream. The images I used are available under this Creative Commons license. I really enjoy his works. There is some nice social commentary going on there.