Timothy Fitz

In the Lair of the Cycle-Eaters

Posted in Uncategorized by timothyfitz on February 11, 2009

Programmers are losing serious amounts of productivity to hidden work every day.

It’s time to stop that, but wait, I’m getting ahead of myself.

In a different day and age, x86 assembler genius Michael Abrash coined the phrase  Cycle Eater to describe how x86 assembly would have non-obvious slow downs. For instance an addition that should’ve executed in 2 cycles actually ran for an extra 6 cycles spent fetching the operands from memory. You’d assume you had optimal assembly when you’d be missing that your assembly was actually kinda slow. Had you known about your cycle eater, you could’ve re-ordered prior operations to optimize for memory fetching, regaining the optimal 2-cycle performance.

The phrase Cycle Eater perfectly describes much higher level problems that plagues software development. Cycle Eaters are everywhere. Cycle Eaters can be as simple as requiring an engineer to manually switch marketing promotions on and off. They can also be as complex as the time, knowledge and effort it takes to set up a new local sandbox or build environment.

The fundamental problem with Cycle Eaters is that you don’t realize how often they’re wasting your time.

Ever joined a new company only to spend a week getting your build environment up and get a build that actually runs? That cost has to be paid for every engineer, for every machine and for every reformat, for every reinstall. Not only does that cost add up, but the drive to avoid setting up a build environment causes cascading cycle eaters. Countless times I’ve seen engineers sitting there waiting while tests run or a build compiles while their laptop goes unused for development. They’re avoiding the pain and headache caused by the build setup Cycle Eater.

Luckily Cycle Eaters are surprisingly easy to deal with. When I started contributing features to TIGdb, the commit and deploy process was entirely manual. It was easy to screw up and annoying manual work. My first deploy was by hand. I then resolved to never do that again. I automated away some of the work. My second deploy was by running a couple commands, and then a shell script to do the final deploy. Again I automated away some of the work. My third deploy was SSHing into the server and running a shell script. My fourth deploy was running a local shell script. My fifth deploy automated database migrations.

My example incrementally removed the Cycle Eater, and that’s critically important. I’m not advocating that you go out and try to start a mammoth project to automate away everything that’s slowing you down. That would be a severe violation of the you-aren’t-going-to-need-it principle. Process automation is an interesting thing, because once you automate away a Cycle Eater, you may find your behavior dramatically changing. If it’s free to deploy, you’ll deploy more often. If it’s free to set up sandboxes, everyone in marketing gets one!

Here’s where something magical happens.

When you fix a Cycle Eater, you don’t just get back the time you were losing to the Cycle Eater. There are often unpredictable emergent properties from this type of waste reduction. When you have free sandboxes, marketing starts using the same development tools that engineering uses. Marketing suddenly doesn’t need to pull an engineer out of flow to get promotional material deployed.

Client software build and release processes are often extremely manual, often involving “that one guy who builds the installer.” Once fully automated, releases can be cut daily with minimal cost. Daily releases result in dramatically better feedback, such as specifically which revisions caused regressions or improvements. That knowledge feeds back into the process, causing progressively higher quality client releases.

All this from simple incremental automation.

This isn’t just my theory. It’s an IMVU culture of removing Cycle Eaters. It’s allowed an extremely aggressive policy for new hires: on the day that they start working, they will commit a fix to the website. It’ll probably be a typo, but it will be a real fix pushed into production and live for every customer. On their first day. All thanks to slaying Cycle Eaters.

So start today. The next time you notice that your time is being eaten up by one of those little things you wouldn’t normally fix, think about it. Just think about the solution to the problem, and then implement a step in that direction. It doesn’t have to be a big step and you don’t have to know how to completely fix the Cycle Eater. Just make a single incremental improvement.

That first step will be the hardest. You’ll have to force yourself to overcome your natural tendency to ignore the Cycle Eater, but the results… I can’t just tell you what it’s like to push a button and have a full deploy just happen. It’s a rush. There is something fundamentally pleasing about automating away wasteful work; you must experience it for yourself.

Go, and slay your Cycle Eaters.

8 Responses

Subscribe to comments with RSS.

  1. TJIC from SmartFlix said, on February 11, 2009 at 7:06 am

    This is an excellent essay, but the key bit which should be in H1 font is the par that starts “Here’s where something magical happens”.

    Incremental improvements result in incremental benefits. … up to a point. Past a certain point, you don’t get a mere evolution, you get a revolution.

  2. Anders S said, on February 11, 2009 at 7:19 am

    Excellent post. These wasters are always under estimated, and especially the psychological side of it. If something is easy to do people will do it more, and that is usually a good thing when it comes to stuff like this. :)

    One that I have been trying to elimintate is the usual manual routines surrounding databases. You seem to have been succsessful in removing them, but sadly infrastructure and company policies often block removal. See http://blog.f12.no/wp/2009/01/03/agile-databases/ for some of the stuff I’ve been trying to do with databases.

  3. Jesse Andrews said, on February 11, 2009 at 1:22 pm

    Ok, I’m convinced.

    I’ve been using capistrano for years, and since using git I’ve made a practice that any push to master is always follow that by cap deploy. I should kill the manual deploy. Hopefully someone else has done this before and I don’t have to write my own code to do this (deploy vs. deploy:migrations)

  4. Top Posts « WordPress.com said, on February 12, 2009 at 4:04 pm

    [...] In the Lair of the Cycle-Eaters Programmers are losing serious amounts of productivity to hidden work every day. It’s time to stop that, but [...] [...]

  5. Nivi said, on February 13, 2009 at 7:29 pm

    Waste begets waste. Taiichi Ohno calls it secondary waste. The waste of setting up a sandbox, yields secondary waste for marketers, who must ask engineers for help when they want to make changes.

    What is the economincally optimal way to eliminate these wastes? In real-time, a little-bit-at-a-time, as you suggest? Prioiritizing opportunities for continuous improvement at weekly retrospectives? How did you think about this?

    Thanks for a great new blog.

  6. Worthy of Praise - Push cx said, on February 22, 2009 at 8:30 am

    [...] enjoyed Timothy Fitz’s new blog, he’s sold me on Continuous Deployment, named the benefits automation I never put my finger on, and [...]

  7. Continuous Development Mode « Dave Q said, on March 31, 2009 at 5:59 pm

    [...] is written for an application is immediately deployed into production. The result is a dramatic lowering of cycle time and freeing up of individual initiative. It has enabled companies I’ve worked with to deploy new [...]

  8. Kris G said, on June 5, 2009 at 6:42 am

    Interesting post. Maybe you could do a post on your experience automating db migration. That’s something I would be very interested in. Thanks!


Leave a Reply