Background Compilation and Background Spell Checking

If you really don’t find background compilation as a tool then perhaps you aren’t thinking hard enough about what really matters, the architecture or perhaps you are coding an absurdly small project? For me these things are a godsend, especially in larger products where remembering names of classes starts to become quit difficult and you have to guess and wait for it to underline. I don’t use VB.NET I user c# but I use resharper and it has a somewhat identical feature to background compilation in C# where it will underline something that it thinks is incorrect, while it’s not always right and you have to tell it to ignore it(alt+enter, select ignore) it’s very helpful more often than not.

I think these people who say programmers shouldn’t use intellisense or background compilation are stuck in the past, and they need a kick in the ass to get them in the future. For instance when I have to write Javascript my production decreases substantially due to the fact that for the majority I don’t have intellisense anymore, and while there is some it’s not nearly as good as the C# equivalent.

Just my two cents…

I don’t like background compiling, because builds take up to one minute or more on my development machine. They also cause significant hard disk accesses, which slows down the accesses that count–to the spellchecking database! I write Java in Netbeans, and it has the squiggle “oh no you made an error” style of correction. It allows me to quickly notice the syntax errors I’ve made without slowing down code completion and documentation references that occur in the background. By only using compiles when I need to test or clean-builds when I need to look for any far-reaching consequences of changes, I save a lot of time. I like my Netbeans spell check, but I’d never want background compiling.

but you’ll also probably never come up with a good reason why it’s a problem other than it annoys you

Remarkably, I’ve never actually criticized the tools themselves. Neither have I said that it, or similar features, “annoy” me.

All of this is really a great study in how defensiveness clouds perception, making people knee-jerk respond to something never said.

What I’ve actually criticized is the -reliance- on the tools, to the point that people feel naked and abandoned without their continuous automatic compilation at their side. After they’ve used it as their crutch to lean on, suddenly they’re left helpless when their random code-dump yields hundreds of errors on a real compile (I’ll point back to Jeff’s comment that without continuous compilation he’s forced the endlessly hit compile, which implies that the code that he’s generating has devolved to the point that he needs hand-holding from line to line. I marvel if anyone doesn’t see how that is a problem).

To go back to the terrible spelling analogy, while many professional writers might occasionally find themselves assisted by squiggly spelling warnings, I find it doubtful that there’s a writer out there who depends upon the assistance to ply their craft that we’ve witnessed here.

Well, I’ve got mixed feelings about wiggly-I-know-what-you-mean tools. IMO it boils down to: If it serves your purpose, use it.
(This also means if i.e. IntelliSense prevented someone from learning to type properly, because he’s switching back to the cursor keys all the time (or worse: the mouse) to scroll down a list of suggestions, burn it!)
Unfortunately I don’t know any reliable statistics on how IntelliSense disrupts a proficient programmers train of thought and I myself, don’t know any better either.

I’ve long since been using emacs almost exclusively for coding, although I find emacs to be a crappy editor, but I just love my Escape-Meta-Alt-Control-Shift key-combos and keyboard shortcuts for other editors usually don’t support complex multi-key assignments. On the other hand I’d really like to benefit from IntelliSense features when using unknown complex APIs - what should I do?

I’m not yet convinced that background compilation is a good thing. I sort of feel a tendency against it, but there’s the one case where I regularly use it:
There is a nice emacs plugin (whizzytex) for writing LaTeX code, which does background compilation and turns LaTeX into a nice realtime WYSIWYG experience. This compilation is usually restricted to the current page or section or subsection, depending on the size of what you’re writing. And exactly this is not possible with background compiling i.e. C/C++ code. The process of compiling is in general NP-hard and as such very time consuming and I hate it if your IDE gets slower and more unresponsive by every line you enter.

The Matlab editor has the tendency to notify the programmer of programming constructs Mathworks thinks should be implemented in a different manner.
So I write my code in emacs and if I need to debug something there’s no way around using the, for this purpose very powerful, Matlab editor. A couple of times I inspected the suggestions Matlab made on my code and found quite a number of them very useful. On some of them I totally disagree and I find myself getting frustrated with the editor if it underlines those constructs.

So my advice is: try it. Learning to handle a new tool has complexity O(1) and if it doesn’t fit you, try again later, opinions change.

“I’m actually an excellent speller” who cannot spell “plough”.

“Yes, you could throw emacs and volumes 1-5 of The Art of Programming at your development team. Or you can buy them the best, most advanced development tools on the market. Which approach do you think will be more effective?”

If I had seen that quote in any other context, I would be wondering why two identical choices were being presented as alternatives.

We’re not actually talking about development tools here–we’re talking specifically about code editors. Development tools have for many decades had the ability to do partial builds and analyze code for errors. This capability is not new–what is new is to have, or even to expect, these analysis capabilities built into your code editor, which therefore makes it distinct from other kinds of text editor.

I don’t mind developers who prefer to use analysis-rich editors. What I can’t tolerate is developers who can’t use any other kind (or, perhaps more precisely, the managers who hire them). This is kind of like hiring cooks who can’t chop onions with a knife, but insist that because they can use a cheap plastic onion chopper (like the ones so many of us have gathering dust in our cupboards) is a substitute for basic culinary competency. Chefs spend years of their lives doing little more than chopping vegetables. I’ve often found myself wanting to say (and once or twice, actually saying), “look, if you can’t write code in this language without Visual Studio or something else prompting you every third line, I need you to go somewhere else and not bother me until you can.”

Feature-rich code editors tend to warp the developers that use them, often in ways they are not aware of. I’ve known a number of people who were unable to use useful language features simply because they were not supported by their code editor. In C++, you can’t look up method names on a function parameter of unknown template argument type in any code editor because the parameter type is unknown–yet, it is precisely because the parameter type is unknown that templates are so useful and important in C++. I’ve seen developers who come across one of these and just go blank because their IDE suddenly stops telling them what the type of every pointer variable is, and they have no other way to cope.

Personally I find syntax checkers and similar code-criticizing tools useless because they are not helping me synthesize code, they are just analyzing its flaws–and all too often, this analysis takes so much CPU and RAM out of the machine that the editor stops being able to keep up with me, which is the point where I stop using the editor at all. This problem is huge on very context-sensitive grammars like C++, where a template declaration in a header file you’ve never heard of can subtly change the meaning of statements throughout your entire program. vi, for all its flaws, never has that problem–it never gets an order of magnitude slower because a single line was added to a different file.

If an editor is going to help me, it’s going to fill in automatically the close parentheses, the “else” branch of the “if” statement, the names of the arguments of the function whose name I just typed, the set of identifier names whose prefix I typed before pressing TAB, in the context of a partially typed expression around the mouse cursor. At least those operations don’t use system resources until I explicitly ask for them, or save my poor tendons from some typing.

A helpful editor won’t sit there saying “nope, the function’s not named f…nope, the function’s not named fo…ok, the function’s named foo, but something’s missing…you’re missing a close parenthesis…you’re still missing a close parenthesis…”. That’s just replacing the Clippy The Paperclip with Gilles The Digital Git.

The last huge complaint I have about such tools is that they are utterly useless outside of an extremely narrow context. A syntax highlighter, for example, I would find to be a quite useful and valuable tool, except that most syntax highlighters are useless when editing code that generates other code–which makes them useless for code that talks to an SQL database, or that generates HTML or Javascript. An editor that can look up C++ method names when clicking on an identifier is fine, but I want the same editor to do this lookup in all six of the object-oriented languages I use, not just one or two.

I turn off syntax highlighting in VI cause it’s distracting,
yet I loved using ‘ddd’ for debugging way back when. The nuance is how frequently the background process updates the page (and how MUCH of the page gets updated). Give a 2-3 second delay and I think a happy medium could be struck.

Meanwhile, I find ‘perl -d’ cumbersome, mainly because it’s not GUI
enough… but I hear there are products out there that let me see into a running script pretty easily. Being able to glance at a runtime variable value without having to insert a print statement actually does go a long way to increasing my productivity.

“Remarkably, I’ve never actually criticized the tools themselves. Neither have I said that it, or similar features, “annoy” me.”

So you can only envision these tools as “the hand-holding of beginners, and the crutch of hacks,” yet you have no criticisms of them? Interesting.

I don’t think your comparison holds true. If you were writing a novel, would you want Word constantly telling you “that character doesn’t exist” or “this character doesn’t own a car”? Spell check only checks if a particular string happens to occur in its table of known words. It doesn’t check your entire document for self-consistency. Nor does grammar check. I’m perfectly fine getting every little bit of help I can from the compiler (that’s one reason I love the const keyword), but when I’ve been forced to use VB, I found the constant reformatting and “checking” of my code a hindrance, rather than any help. I don’t mind if other people like it, just let me turn it off so it doesn’t hinder me.

Also, regarding the monkeys, I really dislike the idea that one would simply accept that he is a monkey and not aspire to Linus like greatness.

All these people against background compilation, let me ask you if you also believe:

All shoes should be handcrafted like 150 years ago;
The automobile assembly line is a bad idea;
Using matches/lighters to make fire is for wimps;
etc. etc.

If you are skilled and knowledgeable programming tools will NOT harm you. There is a reason programming has evolved the way it has. Get with the program.

I just use Zeus - http://www.zeusedit.com

It does Brief emulation, has many IDE like features, but still feels like an editor.

I think that hardware is definitely relevant here. Back in my VB3 days (1994-1995), I avoided auto-completion because as soon as I pressed Alt+Space my whole PC would freeze up for a few seconds, grinding away to figure out what the rest of the word should be. By contrast, background compilation has negligible impact on my current computer, so it’s not actually slowing me down.

It can be annoying at times, e.g. if I declare a variable and then I immediately get a warning message because I haven’t used it yet. However, the situation where I’ve found it most useful is when I’ve converted old VB6 programs into VB.NET; it’s not so much that it instantly detects errors, but rather that it instantly detects corrections. It’s a happy time when the number of outstanding errors drops below 102, so that I can actually see everything that’s left!

Are you sure about the popularity of background spellchecking? It’s the feature I always turn off and the reason I don’t use Firefox any more. I’ve always been a good speller, though, so I could be in the minority here. (Also, my name is never recognized by those damn things, and I know I’m in the minority there.)

You stopped using Firefox because, what, unchecking “Check my spelling as I type” was too difficult for you?

The lengths people will go to to avoid certain things baffles me.

Ken, the reason why I (and others) don’t like background compilation is because it interrupts me when I am trying to code - especially when the project is large and takes over a minute to fully compile. When I am ready to compile I do so by pressing the compile button. I don’t work on an assembly line, nor do I wish to.

There is a simple difference. Background compilers like in VB generate a lot more false negatives the a spell checker.

For a spell checker a word is a complete thought, and it can check the last word you typed as you enter the next word.

For code the whole line (or two, or three) is a single thought when taken as anything but a whole will fail. If you try to background compile as I type you will be distracting me with noise that is USELESS until I finish the line of code.

The different is the scope of the problem and how it’s handled. The noise is the problem, which is something that a spell checker doesn’t worry about. A word is correct or not, code isn’t so forgiving.

Just to inject a little humor into all this:

I have a spelling checker It came with my PC; It plainly marks four my revue Mistakes I cannot sea. I’ve run this poem threw it, I’m sure your pleased too no, Its letter perfect in it’s weigh, My checker tolled me sew. - Janet Minor

Spell check all you want, but sometimes it will come back to bite you.

As someone who’s never used Visual Anything, my biggest take-away is that subtle UI differences make a huge difference. I mainly use Eclipse (with a smattering of vi, plus jEdit as an Emacs-replacement.)

In Eclipse, there’s a configurable half-second delay after you stop typing and before it marks any errors. I rarely have a half-second hesitation unless I’ve finished a line of code. And most of the time it knows the right fix for the problem.

I haven’t experienced slowdown due to compiling a big project, although there are occasional annoying pauses for garbage collection.

Arg, automatic spell-checkers bother me to no end. Their vocabulary sucks, their grammar sucks, the wiggly red lines look stupid. THEY ARE FOR STUPID PEOPLE AND PISS ME OFF

Quothe Zygo:
Feature-rich code editors tend to warp the developers that use them, often in ways they are not aware of. … I’ve seen developers who come across one of these and just go blank because their IDE suddenly stops telling them what the type of every pointer variable is, and they have no other way to cope.

THE crux of the issue. We’re happily turning ourselves into Framework Programmers. Hirers now want to know which, and insist that one use, particular IDE/framework one is currently using. In a sense (not a good one in my estimation), we’ve raised the semantic level of low-ish level java and .net, but by default without thinking too much about it. Sad. Especially for java, which coulda been a contenda.