Ask HN: What do you do while code is compiling?

6 points by orky56 ↗ HN
Compiling code takes an annoying amount of time. Not enough time to do something worthwhile yet too much time to just sit around and idly wait. If we add up all the time we sit around waiting for code to compile, it would be a depressing number.

So what do people currently do while waiting? Any good ideas on what to do?

15 comments

[ 3.3 ms ] story [ 44.6 ms ] thread
looking from a window , you wll see a life
Compiling code takes an annoying amount of time.

Really? Unless I'm doing a complete build, I never wait more than a few seconds for a build to complete.

What build system are you using?

Usually, read another post on HN.
You can be developing other tools.

My builds oftentimes take a long time because there are a lot of cross-language stuff (libraries include some boost stuff, which always takes a long time to process) and cross-compiling (e.g. targeting tools for osx and for linux -- why they changed the syscall numbers is beyond me)

You probably have a laundry list of scripts that should exist (e.g. launch scripts, cron jobs, etc) but are low-priority. It's easy to work a little bit on a script when building.

What language do you use? / What kind of project are you working on? embedded, kernel, iphone, web, etc?

There are usually tricks to speed up your compile process, copy the code to a RAM drive before compiling, etc, also try using testing and create a small program that monitors your src dir and will recompile and test automatically. That way as soon as you save it's automatically recompiling and testing, then you just look over at the terminal window and see the results.

Also, split your code into libraries so that only a single lib needs to be recompiled, etc.

The drive to speed up iterations usually pays off in spades and you end up doing stuff you really should have been doing anyway, like writing tests, modularizing code, etc.

If it absolutely can't be sped up, document your code while its compiling, Doxygen, etc.

Think of errors I had probably missed before I started compilation. Just about any long process I think of the stuff I forgot to check before I initiated it. :-D

Other than that I get up, take a break, I deserve it.

I usually sword fight in the hallway with coworkers while riding on office chairs.
The incremental builds are taking about 5 minutes, which is not really long enough for me to do any big work, but I usually look if there are any new issues in the queue, look at code reviews (not the ones I'm reviewing, but what others reviewed) or try to do code review for smaller chunks of code.
research more on how to make the build process efficient :-)