'As You Type'
When I began using Eclipse, I found that I hated its on the fly compilation which seemed to me to waste a lot of time flagging incomplete code with errors and thus slowing me down from completing it. That was years ago, and after learning to use Xcode, I threw away Eclipse and never really looked back.
More recently, I've enabled the "Check Spelling While Typing"1 option in Safari2, as I find it makes it much easier to avoid posting stupid spelling mistakes onto websites.
These two facts were brought together in my mind when I read an article by Jeff Atwood in which he argued that these two on-the-fly processing tools are really analogous3. I realized that I had not considered this, and wondered if my previous beliefs about these tools were conflicting. However, I decided that they are not, because at least form my perspective as a user, these tools are not all that similar after all.
Foremost, I don't dislike the idea of background compilation in general so much as I dislike Eclipse's implementation, for the reason that it was excruciatingly slow, like almost everything else about Eclipse (at least as of the versions I last used). If this feature could work as rapidly as Apple's implementation of on-the-fly spellchecking, then I might have a use for it. If it's slow enough to interfere with my (admittedly not very speedy) typing, then there's a real problem, because making typing harder will naturally interfere with my ability to concentrate on what I'm writing.
Secondly, there is a subtle difference, which, although mainly a detail of implementations of these tools, appears to me to have a fundamental component. The difference is like this: When I type words into my text area here in Safari, the spellchecker only checks words when my cursor leaves them. This is fantastic because4 most words when only partially typed are not yet any valid word, but 99% of the time when I type and nonexistent word it's because I'm about to go on adding characters until it becomes a valid word. With source code being compiled the smallest valid unit of text is often fairly long and it's not easy to tell when the programmer is done adding to it. There are workarounds, such as waiting for two seconds without keyboard activity, but that's really just relying on guesswork that will only be right some of the time. Furthermore, by only checking words when I'm done working on them the spellchecker can be more efficient by running less often. The compiler will suffer here in that it can't be quite as good at running only when it needs to, and if this is combined with the tool itself running slowly, the problem gets significantly worse.
Having considered these points, I'm more convinced than ever of my position, and I'm actually quite happy to have understood the logic behind what had previously been just gut feelings.
-
In previous versions I believe that this option was named "Check Spelling As You Type", thus the post title. ↩
-
I haven't really felt a need to activate this option in any of the other applications I use to edit text except Mail; I think the reason is that when I write in Safari or Mail it's to create something that I'll edit just once and then post permanently or send irretrievably, whereas in other applications I'm often writing a document that won't be finished in a single session and will undergo multiple passes of refinement. Thus, in non-web-related writing situations I like better to remove even the small bit of distraction from the background spellchecking in favor of manually running a spellcheck periodically when I'm in a revising mode rather than a creating mode. ↩
-
Mr. Atwood actually makes two arguments, namely that background spellchecking and compilation are much the same and that these are not merely tools for beginners or incompetents. While I disagree with the former point, I very much agree with the latter, which I think was his primary one. ↩
-
I misspelled because ('becasue') while typing at this point, but I noticed it before I finished the word, so I went back and fixed it without needing the spellchecker to intervene at all. ↩