The Artima Developer Community
Sponsored Link

Let's Reconsider That
I'm Tired Of Saving!
by Michael Feathers
November 21, 2005
Summary
Isn't it wonderful to complain about something minor? Something so nit picky<Ctrl-S> that most people wouldn't care about it? Well, here's something in that vein.<Ctrl-S>

Advertisement

I recently downloaded Google Desktop and I really like it. It gives you a sidebar with some very useful features. You can have a continual weather feed, news, a rotating set of photographs.. the list goes on, but the thing I love the most is the Scratch Pad. It's just a simple pane of text that is always up. I constantly write notes to myself and this pane just hovers there ready for inspection. I can read it, I can type into it, and I never have to save!<Ctrl-S>

There. I said it. I'm tired of saving. Yes, we all have our story.. our story about how we first learned that we need to save frequently. Mine involves losing a whole afternoon's worth of work in a school computer lab because of a vacuum cleaner.. Yes! Someone vacuuming in a computer lab when people were working! I can't imagine anyone vacuuming in while people are reading in a library but then there would be no power cords for the vacuum to knock out in a library, would there? Better to vacuum in a computer lab while people are working, right? So, I lost an entire afternoon's work because of a vacuum cleaner, and because.. I didn't save. It's a lesson that we all learn early<Ctrl-S>. But still... I resent it a little, moreso now because I've seen alternatives.<Ctrl-S>

Jonathan Edwards has a very forward thinking programming environment called Subtext that he demoed at OOPSLA 2005. It has more interesting ideas than I can get into here, but one of them <Ctrl-S>is that the environment is active. As you change a program it's constantly executing and showing you the results on example values<Ctrl-S> you specify.<Ctrl-S>

For anyone who has been doing Test Driven Development for a while,<Ctrl-S> the connection should be clear. <Ctrl-S>Running our tests gives us immediate feedback. It makes the feedback cycle very small and very tight. When your editing actually triggers computation, you don't have to do anything special to get feedback, it's right there.<Ctrl-S>

Personally, I think that this is the way things are going to go. The trend is already there in most IDEs. Nearly every IDE worth its download is active to some degree. When you type, your IDE parses and colors keywords; it prompts you with suggestions when you type a dot after an identifier. So, why not do other things? Why not save automatically? Some IDEs will save automatically when you compile but why not continuously?

I guess there are a couple of reasons why manual save has persisted. One reason is because having a sandbox gives us a feeling of security. And then, there's the question of undo.. Undoing character by character is tedious. Manual save is like a single breadcrumb that we can leave behind us, it helps us get back to a known point. But how often do we really use it? Maybe we'd program better if we typed every keystroke like we meant it? :-)

Fortunately, in programming environments we have something else we can use as breadcrumbs: successful test runs. This is an idea quite a few people have investigated, but I want an environment like that in front of me. I want an IDE with a switch that puts it into continuous save mode and triggers test execution on each keystroke.<Ctrl-S> If we want to undo, we can undo to each previous successful test execution. That would be an undo that really means something.

David Saff has been doing research in an area he calls Continuous Testing for the past few years. He's built an Eclipse plugin which runs your tests continuously in the background but the tool still preserves a bi-modal environment. You type in one mode and the tests run in another. You have to save.<Ctrl-S> He did some research with an earlier tool, one that tried to trigger execution on each keystroke but found that many users didn't want that much feedback, but I wonder.. is there more to this? Is the idea of an active environment flawed or do we need to find another way?

Triggering tests on every keystroke would be great, but at this point, I wonder whether the ability to save manually really is useful. Maybe it is just an evolutionary artifact.. an appendix we can just discard.

Do you think you would ever give up saving if an environment allowed you to?<Ctrl-S>

Talk Back!

Have an opinion? Readers have already posted 15 comments about this weblog entry. Why not add yours?

RSS Feed

If you'd like to be notified whenever Michael Feathers adds a new entry to his weblog, subscribe to his RSS feed.

About the Blogger

Michael has been active in the XP community for the past five years, balancing his time between working with, training, and coaching various teams around the world. Prior to joining Object Mentor, Michael designed a proprietary programming language and wrote a compiler for it, he also designed a large multi-platform class library and a framework for instrumentation control. When he isn't engaged with a team, he spends most of this time investigating ways of altering design over time in codebases.

This weblog entry is Copyright © 2005 Michael Feathers. All rights reserved.

Sponsored Links



Google
  Web Artima.com   

Copyright © 1996-2019 Artima, Inc. All Rights Reserved. - Privacy Policy - Terms of Use