Ask HN: What do you do during compilation?
I'm currently working on a project that takes ~3 minutes to compile. Slightly too long to stare into space, but if I start reading an article then I invariably lose focus on the work I'm doing. Does anyone have any good solutions to this problem?
10 comments
[ 4.4 ms ] story [ 12.3 ms ] threadhttp://www.codinghorror.com/blog/2008/12/hardware-is-cheap-p...
http://stackoverflow.com/questions/1539347/what-are-ways-of-...
http://stackoverflow.com/questions/1073384/what-strategies-h...
I have seen huge compilation time improvement on C++ projects using different tips :
- use SSD to reduce link time
- distributed compilation on several hosts
- reduce amount of template to avoid world recompilation at each change
- ...
Write a program or script during those 3 minute breaks, just keep the project open in another window and switch to it whenever you're compiling, write a few lines and then go back to your work.
The program could query the YouTube API for short videos {duration: 'short'}, make a playlist sorted by popularity, remove the videos you've already seen and then auto-play them in an overlay/lightbox on your screen. The playlist should continue until the compile has finished, when it will notify you and return you to your work after the current video has ended. It would also need some way to return you to your work immediately if you don't want to watch (a key and mouse click), or perhaps a way to stop the script from launching in the first place.
And definitely open source it ;)
But you could also spend every three minutes to try to speed up the build. Dependencies, compiling unchanged source, tests, etc. There are so many ways to speed this up. If that's not possible, maybe you can step back and think of something more creative.
When I do need a full build, I make sure it is a single step run from the command line so I can go get a coffee while it runs.
Sure, actually speeding up the build would be better, but sometimes that isn't an option.