Dave Burke - Freelance .NET Developer specializing in Online Communities

A freelance .NET Developer

Compile less. Code more

A would suspect a lot of developers compile their apps too often.  Its easier to sit there, watch a compile, and confirm a code update works correctly, than to keep banging out code and staying on message.  The longer a guy writes code the less they need to confirm that something works.  At least I'm finding that I'm compiling less often and being more productive as a result.  And there's room for improvement, as I'm more conscious of it.

If I were a manager I'd probably watch a developer code for a while and would no doubt interject,

“Why did you compile just then?“

“To check my updates.“

“You changed the text of a LABEL, for Christ's sake!“

Another reason I wouldn't make a very good manager....

 

 

Comments

Julie Lerman said:

I'm sitting here write now doing stuff in C# and have to keep compiling just to make sure I have stupid things like casing right...But i'm having fun anyway. Too darned windy for cycling today unless you can assure it always being at your back!
# April 24, 2004 3:16 PM

Dave Burke said:

Julie, that's funny! I should have mentioned the exception to the frequent-compile rule: VB.NETters learning C#. HEY, WHAT ARE YOU DOING WRITING C# CODE?????
# April 24, 2004 3:24 PM

Greg Pyatt said:

I had a manager who got his panties in a bunch at me because I kept flipping back and forth between Visual Interdev and my browser (a "recompile" of sorts). He was a dick who had no reason to be, other than taking advantage of his position to dump on people.
# April 24, 2004 4:23 PM

Jerry Pisk said:

Just use Java IDEs, the good ones (Eclipse, IntelliJ) compile in the background on resource change and alert you about errors on the fly. No need to sit there watching a minute long compile as with Microsoft's tools.
# April 24, 2004 4:56 PM

Udi Dahan - The Software Simplist said:

"How does TDD fit into this picture ?", asked the devil's advocate :)
# April 24, 2004 5:35 PM

Dave Burke said:

Sorry, Udi. I don't know the acronym. I don't know what that tells you about me, but there it is. What is TDD?
# April 24, 2004 6:15 PM

Steve Steiner said:

TDD is test driven development. Tests are written first, and code is written second. It is popular with the Agile Programming crowd, and is a good practice in general. The typical pattern with TDD is to code a little, compile, run tests, and repeat. Refactoring is a complimentary techinque where you alter the structure of your code without changing its behavior. It is typical to recompile and test after every non-trivial refactoring. As long as the recompile+test process doesn't take too long it is worthwhile to catch an error sooner rather than wade through many accumulated errors later.
# April 24, 2004 8:30 PM

Jon Galloway said:

While it can be taken to absurd lengths (compiling after a lable change), my code/compile cycles have gotten a lot shorter over the years. As Steve pointed out, the benefit is that you're not wading through accumulated errors and if you've just written some buggy code, it's best to debug it while the context and requirements are fresh in your mind.
Maybe I'm writing much simpler code than you, or you're running on a much slower maching, but my compiles take a few seconds. Or maybe I just write buggier code? ;-)
# April 24, 2004 11:38 PM

Dave Burke said:

Jon, No. The bottom line is most probably that I myself hit [CTRL][Alt]-B more often than I need to. Thx!
# April 25, 2004 12:40 AM

Brad said:

I suspect the manager who is questioning how many times a developer compiles isn't a very good manager either. The bigger (and better) question is what is the quantity and quality of work that the developer creates over time? Is that metric being "disrupted" or impacted by [CTRL][ALT]-B? If the answer is "yes" than there might be an issues, but I think in about 99% of cases the answer is a resounding no; There are many many factors that can far more severely impact a developers productivity than a re-compile...at least in this framework :-)
# April 25, 2004 12:41 PM

Dave Burke said:

Brad, Good points. The issue is productivity, after all. I guess I made this post primarily because I'm realizing that I am coding for longer periods before feeling the itch to hit [CTRL][ALT]-B.

I also know there are times I do it unnecessarily, just because I WANT to. "I like to look at things." Call it a combination of Chauncey Gardener in Being There "I like to watch" and the Paklids in the ST:TNG Samaritan Snare episode saying "We look for things. Things to make us go." The issue for me personally is to, well, compile less. Code more. I came across more authoritative in the original post than I should have, as its more a personal directive to myself. Thanks for your good input.


# April 25, 2004 1:03 PM
Leave a Comment

(required) 

(required) 

(optional)

(required)