News for hackers. Stuff that matters.

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 | 6 points | on HN )
Re:Ask HN: What do you do while code is compiling? by trafficlight on Thursday June 30, 2011 @12:13AM (#2712525)
I usually sword fight in the hallway with coworkers while riding on office chairs.
Re:Ask HN: What do you do while code is compiling? by fleitz on Wednesday June 29, 2011 @09:31PM (#2712110)
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.

Re:Ask HN: What do you do while code is compiling? by cperciva on Wednesday June 29, 2011 @07:57PM (#2711880)
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?

Re:Ask HN: What do you do while code is compiling? by veyron on Wednesday June 29, 2011 @08:27PM (#2711954)
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.

Re:Ask HN: What do you do while code is compiling? by wladh on Thursday June 30, 2011 @04:07AM (#2713085)
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.
Re:Ask HN: What do you do while code is compiling? by urorbit on Wednesday June 29, 2011 @07:36PM (#2711813)
looking from a window , you wll see a life
Re:Ask HN: What do you do while code is compiling? by sixtofour on Wednesday June 29, 2011 @10:52PM (#2712316)
Today I saw poetry on HN.
Re:Ask HN: What do you do while code is compiling? by LarryA on Wednesday June 29, 2011 @11:00PM (#2712335)
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.

Re:Ask HN: What do you do while code is compiling? by pktm on Wednesday June 29, 2011 @08:12PM (#2711922)
Usually, read another post on HN.
Re:Ask HN: What do you do while code is compiling? by OnesimusUnbound on Thursday June 30, 2011 @06:46AM (#2713422)
research more on how to make the build process efficient :-)
Re:Ask HN: What do you do while code is compiling? by Detrus on Wednesday June 29, 2011 @07:45PM (#2711849)
try out Golang
Re:Ask HN: What do you do while code is compiling? by whiterabbit on Wednesday June 29, 2011 @07:36PM (#2711814)
This.
Re:Ask HN: What do you do while code is compiling? by merlins_hack on Thursday June 30, 2011 @07:39AM (#2713577)
Echo.
Re:Ask HN: What do you do while code is compiling? by damoncali on Wednesday June 29, 2011 @09:14PM (#2712068)
Write some more ruby.
Re:Ask HN: What do you do while code is compiling? by chosenone1907 on Wednesday June 29, 2011 @07:40PM (#2711832)
pray and wish it compiles without err