Hacker News new | ask | show | jobs
by cks 5446 days ago
For me, long compilation times puts me out of "the zone". If compilation takes too long I'll start reading e-mails or web browsing. When compilation is done my mind is elsewhere and I have to get into the problem solving "zone" again.
2 comments

This is very true; that's why I hate the Scala compiler and when working with Java I take special care to have a lean and mean compilation strategy.

For example with Java I use manually written Rakefiles (I prefer it over Ant since I have more control), I make sure it doesn't compile unless files have actually changed and in case the project is getting big I start separating functionality in multiple projects, having multiple JARs as a result.

Then, I'm using Emacs and in Emacs I can start a build whenever I'm hitting "Save" on a file. And in case of compilation errors, Emacs even highlights the errors for me.

You have to work on it a little and you lose time on the actual build process, but you can achieve a lean and mean setup (unless the compiler really sucks).

Of course, this is the advantage of an IDE - it takes care of annoying details for you; but then you have to put up with all the bloat that brings. And for humongous projects, your IDE will choke anyway, even if you have the latest state-of-the-art hardware; try loading the Firefox codebase in Eclipse CDT or in Visual Studio sometimes.

In the 'old days', compile time was a chance to print out your code on fanfold paper and do a top down thoughtful code review, refreshing the map of the whole project in your mind.

It's quite rare these days for developers to literally see their whole program's code at once, and I think we're the worse for it.

In the 'old days', you must have been writing small programs. Printing a 1K-line program on paper might give you a nice perspective on your code. Printing a 10K-line program on paper is a waste of paper. Printing a 100K-line program on paper is ridiculous. Beyond that it just gets worse.
> In the 'old days', you must have been writing small programs.

On the contrary, 10,000 lines is still only 150 pages at 66 lines per page, and fanfold paper flips through easily.

I've read through several projects that took at least three reams of fanfold paper. I'm not saying that was fun. Fortunately one didn't generally have to read through the whole project, only the module one was working on.

I don't think it's useful to attempt to hold 150 pages of code in my head. Even with a long compile time, it's not possible to do more than just barely skim that much code.

I have printed code and reviewed it before. Sometimes it's useful for small programs or classes. I don't think it's useful to waste 150 (or more) pages to print an entire large program, though.

> I don't think it's useful to attempt to hold 150 pages of code in my head

Not sure it was about holding the actual code in one's head so much as the structure, flow, or shall we say, "plot".

The Chronicles of Thomas Covenant runs 4948 pages, Song of Ice and Fire is 4195 pages so far, and even LotR is 2144 pages.

This is one of the reasons I think there's a high correlation between great developers and developers who love history -- leveraging the ability to envision and hold a complex sequence of interlocking details in mind.

I feel like you're really reaching for a comparison here. You're not reading LotR in the 10 minutes it takes your code to compile. You're not even skimming it. The fact that your code is shorter than LotR isn't really meaningful. You also aren't reading 150 pages of code while your code compiles, and if all you want is to review the high-level flow, skimming the code is going to miss a lot.

I just can't see the value in printing 150 pages of code to barely skim it. Especially since those 150 pages will be increasingly out of date as time goes on. It's just such a waste of paper.

I'm not sure where you get your "great developers" and "developers who love history" link, either. Liking history has nothing to do with coding. Nor does it have anything to do with reading fantasy novels. And none of the history buffs I know are even coders. This is such a random tangent.