News for hackers. Stuff that matters.
Re:I laugh at your puny human 'objects' by gdp on Tuesday August 25, 2009 @11:21AM (#785016)
That's quite a nice idea! I certainly hadn't thought of that. I would upvote this several million times if I could.

Another thing that sometimes makes sense is Model-Based Testing (I was involved in the ModelJUnit project - http://www.cs.waikato.ac.nz/~marku/mbt/modeljunit/ - for example). It can sometimes catch these kinds of subtle API misuse issues.

Finally, I did some work on a tool that will statically analyse a program and that will attempt to ensure that action a() never occurs before action b(), for example. I wrote a blog post about it a few days ago:

http://www.plsadventures.com/2009/08/prototype-static-analys...

So it's not like it's an insurmountable problem (people manage to produce software!), but I definitely like your suggestion of using explicit state machines whenever you insist on using mutable state.

There are no comments on this comment yet.