Ask HN: What do you do while code is compiling?
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 ] threadReally? 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?
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.
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.
Other than that I get up, take a break, I deserve it.