Tuesday, September 11, 2012

Dataflow scheduling for ordinary software - providing error messages as early as possible

I just ran a rather slow tool that ran for a long time to produce an error message that it could have figured out immediately.

Oh, heck, I might as well say what it was:

I just typed in
hg revert -r default
instead of
hg revert -r default .hgrc
Mercurial went and scanned my home directory repository, which is rather large, taking 10+ minutes to scan, before it gave me the error message
abort: no files or directories specified
It would have been nice if it had reported the error message immediately, instead of scanning the repo.

This isn't just Mercurial specific: other tools have the same problem.  Some of them my tools.

It is nice if interactive tools report error messages as soon as possible.

Aspect oriented program might help.  Create an aspect for "command line checking", and reorder code that is related to command line checking earlier.

Dataflow analysis might also help.  In an ideal world, sans ambiguous points, etc., it would be evident that the error check depended only on the command line, and could be moved up earlier.

--

This is just part of my not-so-hidden agenda, to apply dataflow everywhere.


1 comment:

  1. I have to agree it would be great if it just showed the error message immediately that would eliminate a lot of frustration

    ReplyDelete