Cofounder of CodeCombat and Skritter, experimenter of self, student of rationality, hacker of motivation. One summer I wrote a book, learned to skateboard and throw knives and lucid dream, trained for a marathon and other feats, learned a ton of Chinese.

Last week I set out to see how many hours of programming work I could do in one week on CodeCombat, our multiplayer programming game for learning how to code. I clocked in at 120.75 hours. Here's the epic time-lapse video I generated from Telepath (watch in 1440p if you can):

So what did I learn from this experiment?

Adjustable height desks are amazing.

I bought one from Ergo Depot a few days before. I must have switched between sitting and standing fifty times last week. I would never have survived otherwise.

Viking metal is stronger than sleep.

I usually sleep for 8.5 hours a night. I thought that for this week I could be tricky, starting at 04:00 and sleeping later and later so I'd only have to sleep six times for maybe eight hours a pop. Not only did it totally work, but my wake times didn't advance as fast as my bedtimes, so I only lost 6.38 hours per day to sleep.

I thought this would make me tired and unable to concentrate on difficult programming, but energy and focus were actually really good except for one hour early Sunday night. I blame it on epic Viking metal and other super-energizing music, plus maybe the seven bars of 90% dark chocolate I ate. I had one or two cups of tea but no other caffeine, and I woke without an alarm every morning.

It's euphoric to never have to stop coding.

I hadn't realized I how much more I enjoy coding when I don't have to answer emails for a week. (Note the unread emails climb to 402 by the end.) Even fixing bugs, supporting Internet Explorer, and struggling with algorithms I don't understand are all fun when I know I'm going to win--that I'll solve the thing before anything can distract me. And listening to music is one of my favorite things, so having a week filled with just code and music? Wonderful!

I speed up the longer I go.

Normally, I work a focused-but-relaxed 60 hours in a week. I doubled that last week, but I feel like I was perhaps three times as productive. I could keep the problems in my head without cache eviction due to memory pressure. (I mean, there wasn't anything else to think about.) With ever-deepening focus, I felt unstoppable. It was like getting 4.5 40-hour weeks' worth of work done in one.

How much did you actually get done?

It's hard to compare, but here are the major projects I did:

Moved all game Systems out of the codebase and into the database with live-coding System editing from within the level editor

Completely redesigned and rewrote the spell editor, in the process solving 31 Trello tasks that depended on a new editor architecture

With Scott, wrote a parser for vector sprite assets that allows us to use vector art directly in our game engine instead of exporting raster sprite sheets

Most nights last week I programmed in my dreams, with vivid Tetris effect one night of doing CSS tweaks. (One night I had a nightmare of watching a YouTube video and then panicking upon realizing I wasn't working.) Being that deep into my CoffeeScript, I found myself writing terser and terser code, since why do in five lines what you can obviously do in one? But as I coded, I didn't realize until too late that "obvious" is different between just-spent-120-hours-coding me and just-went-skateboarding me, let alone people are not me and may not even know CoffeeScript if you can believe that. Here's an example from spell_view.coffee:

I don't even want to show you what the old code was, because it was uglier than a cowbear. But it was three times this long and did half as much. To me, this new code is luscious. But can a sane coder really understand this? Where are all the commas and braces and parentheses clarifying the operator and method call and array precedence?

Processor speed changes everything.

I had the idea to do this week a few months ago, but I wanted to wait until I could buy a freshly updated MacBook Pro to do it, since the old one was three years old and, though capable, pretty slow. After the laptop upgrade, I was surprised by how much more I wanted to work. The simple friction of slow builds and poor CodeCombat level simulation performance had been weighing down my enjoyment and efficiency this whole time. I'm never waiting three years to upgrade my gear again.

This was a weird thing to do.

Man barely moves for a week, staring at patterns of light on a flat object and trying to make the patterns change. Every 2-4 hours, a stimulus is presented and he records how happy he is. He eats and sleeps as fast as he can so he can go back to looking at the lights.

It is the happiest week he has ever recorded by a wide margin.

(I have been tracking happiness for over three years, and this week's average of 7.03 / 10 is a full 0.22 points higher than the week I first started writing my book and learned to skateboard. Now, probably the best weeks are weeks when I wasn't at my computer consistently recording happiness pings, like the week I got married which was pretty much the best ever.)

Overall, it was surprisingly easy.

I think it would be much harder if I was under any stress (like deadlines), but this was just fun, and there were never any points when I wanted to stop working. I don't think I could hit these kind of hours without trying to set a personal record, though. (My previous record was only 87.3 hours.) I doubt I could have focused on only coding, rejecting all other activities, if I wasn't making a public precommitment and time lapse video of it.

I talked about my preparations and planning in the previous post, which is exactly how it went down except that I kept waking up early. I asked for predictions as to how much I could do; friends guessed I'd do anywhere from 87.3 - 113 hours, with an average of 99.4. My wife Chloe wins the competition by guessing 113 (which was even higher than my own secret prediction of 112). So getting to 120.75 feels like an epic victory to me. Although my workweek offcially ended at 03:59, I couldn't go to sleep until 04:45 because I was so excited.

Oh, and if you're wondering about the videos showing while I'm sleeping: it's just my screensaver. I extracted still frames from some other YouTube videos with ffmpeg at 705 frames per second so that when played back in real time at three frames every seven seconds split across three screens, the main screen would produce a thirty-frame-per-second rerendering of the videos in time-lapse time.

Follow nickwinter.net

Do Something

Get new posts sent to you. If you change your mind later, unfollow with one click.

You're a member of this community! Use the buttons on the right to like this post or share it. Or leave a reply below.

What, are you an idiot? My goal this week is to see if I can go five days without urinating. What kind of sense does this make? There are surely better things you can do than see if you can work yourself to death, no?

As a manager of a software team with different focus, Business Development, Product Strategy, Customer Management, Reporting etc etc, this was a really interesting read (passed from one of my team) i think the message i take away and i see in my own world. cut the "crap out" and you can get more done, and the stuff you get done, is better quality... same methodolgy to my discipline as to your coding one. Really appreciate the effort to write it up.. (of course, the other thing i could take away from it is that my team want to do 120hr working weeks......)

I did this quite a lot when I was still young (been coding on and off for >20 years, so "young" in this sense means ~20yrs old). Just before the Y2K scare I usually worked 18h/day on weekdays (I was living in a 1-room apartment 500m from the office on weekdays and in me and my wifes apartment 400km away on the weekends, so I couldn't work on the weekends). I didn't do it every week, though, but I don't think the workload ever went below 60h/week.

Having two kids I don't think I could accomplish something like that now.

Fully agree on the adjustable-height desks. Started using one of these 10 yrs back, and I've never looked back.

Also agree on the speeding up the longer you go, and the Tetris effect you get after doing it for a while. Enjoy that while it lasts, because in my experience it becomes less and less prevalent the older you get (although that could be because of all the other distractions you tend to accumulate).

Cofounder of CodeCombat and Skritter, experimenter of self, student of rationality, hacker of motivation. One summer I wrote a book, learned to skateboard and throw knives and lucid dream, trained for a marathon and other feats, learned a ton of Chinese.

Cofounder of CodeCombat and Skritter, experimenter of self, student of rationality, hacker of motivation. One summer I wrote a book, learned to skateboard and throw knives and lucid dream, trained for a marathon and other feats, learned a ton of Chinese.

Great, video. . .out of curiosity what screen recorder, that you used for this time-lapse. I am trying to possibly make a video like this but none of the screen-recorders, can speed up a video. Thanks.

Cofounder of CodeCombat and Skritter, experimenter of self, student of rationality, hacker of motivation. One summer I wrote a book, learned to skateboard and throw knives and lucid dream, trained for a marathon and other feats, learned a ton of Chinese.

Hey nick, I noticed that you have a full 2560x1600 resolution, and everything is tiny. I'm typing this on a 13" MBP retina, and I really don't understand how you can handle this resolution. I've just used SwitchResX to try out full 2560x1600 on my MBP, but this is ridiculous.

Do you have some sort-of external display, or is this actually running on your MacBook Pro?

Cofounder of CodeCombat and Skritter, experimenter of self, student of rationality, hacker of motivation. One summer I wrote a book, learned to skateboard and throw knives and lucid dream, trained for a marathon and other feats, learned a ton of Chinese.

I have a 15.4" MBP and do use 2560x1600 resolution on it (it is tiny but I am still young), but the screen in question was one of my two 30" Dell monitors (also 2560x1600) to which I confined the action for this experiment.

I have a question though regarding your average happiness level. In the book I read that your happiness level is a logarithmic scale. When you average over your observed happiness levels wouldn't you underestimate your happiness (Jensen's inequality and all that)?

Cofounder of CodeCombat and Skritter, experimenter of self, student of rationality, hacker of motivation. One summer I wrote a book, learned to skateboard and throw knives and lucid dream, trained for a marathon and other feats, learned a ton of Chinese.

The log of the averages might be more meaningful than the average of the logs.

More geekily, let h be your happiness and hl(h) = log(h) your happiness level. Instead of taking the average of n happiness levels 1/n * sum_n(log(h)) I would take the log of the average happiness log(1/n *sum_n(h)).

(I think your hl function is more like hl(h)=5 + log(h) so the above would look a bit different.)

Cofounder of CodeCombat and Skritter, experimenter of self, student of rationality, hacker of motivation. One summer I wrote a book, learned to skateboard and throw knives and lucid dream, trained for a marathon and other feats, learned a ton of Chinese.

Read Next

Starting Monday morning at 04:00, and ending the next Monday at 03:59, I'm going to see how many hours of CodeCombat development I can do in one week. Not "hours at the office" (I work from home), not "hours on the computer doing productive things", but "hours on the computer developing CodeCombat". So I'll count things like writing code, building levels, writing documentation for said code and levels, etc., but not things like responding to CodeCombat emails or planning the business or meetings. I just won't do those things this week.

I spontaneously did a how-much-can-I-work week last year when I was deep into the Skritter iOS app and got 87.3 hours of general Skritter work. It was extremely fun, so I thought I'd do it again, but this time I've prepared for it. I've planned my meals, laid out my clothes, started waking up early, blocked email, bought an adjustable height sitting/standing desk, and readied other ridiculous preparations such as a stack of twenty bars of 90% dark chocolate.

I'm going to make a time lapse video of the whole week with no post-processing except for adding a music track. So if you're at all interested in seeing what it looks like to code this much, look for the video next Monday (or maybe Tuesday if I'm that tired afterward.) I adapted some open-source self-tracking software I wrote to serve as a time lapse heads-up-display dashboard thing that'll be more interesting to look at during the video than just my screen.

The time lapse will be fun for me and help keep me honest, since presumably at least a few people will watch the whole six minutes and would heckle me if I counted beastskills.com as work. I find it exhilarating to think about focusing deeply on code for a week with no distractions and overdosing on motivation to push deeper into the zone than I've ever gone before. (I hope that's what will happen.)

Got a good question from a reader about sleep. One of my goals is to sleep less than 8 hours/night

Hello, and thanks for inviting your blog visitors to email you directly. I just came across your site today, and got some good reading out of your "top stories" list. What compelled me to write, though, was a trend I noticed on some of your "goals" posts: sleeping less than 8 hours per night.

It caught my attention, because at first glance it looks counter-intuitive. Yet I understand exactly what you mean.