{"id":322,"date":"2004-12-21T17:23:30","date_gmt":"2004-12-21T07:23:30","guid":{"rendered":"http:\/\/www.erisian.com.au\/wordpress\/?p=322"},"modified":"2004-12-21T17:23:30","modified_gmt":"2004-12-21T07:23:30","slug":"worth-repeating","status":"publish","type":"post","link":"https:\/\/www.erisian.com.au\/wordpress\/2004\/12\/21\/worth-repeating","title":{"rendered":"Worth Repeating"},"content":{"rendered":"<p>In his epic battle with Adrian over exceptions, Ben <a href=\"http:\/\/members.optusnet.com.au\/benjamincarlyle\/benjamin\/blog\/2004\/12\/20#exceptionsreply2\">mentioned<\/a>:<\/p>\n<blockquote>\n<p>Save your work? That&#8217;s for sissys. Use a journalling file-saving model. Save everything the user does immediately. You can support the traditional file save\/load facility using checkpoints or other niceties but I fail to see why any application in this modern age of fast hard drives should ever lose data the user has entered more than a few hundred milliseconds ago.<\/p>\n<\/blockquote>\n<p>That&#8217;s really very true. Certainly there are caching issues &#8212; memory is much faster than disk, and you don&#8217;t want to store intermediate state all the time, and likewise you probably want to keep some history, but certainly don&#8217;t want to keep all of it. But generally, disk is fast enough (compared to user interaction and network speeds) that there really isn&#8217;t any excuse for losing data.<\/p>\n<p>If my battery and power shorted out right now, I&#8217;d lose: (a) this entry; (b) the fact I&#8217;ve got Planet Humbug open to read Ben&#8217;s blog and my Back-button history; (c) the fact I&#8217;ve got three terminals open, and their history (both scrollback and command invocations); (d) what email I&#8217;m currently reading.<\/p>\n<p>Saving this blog entry takes at most half a second, mostly because to do so I have to hit some keys and a menu gets highlighted. Saving all my scrollback from scratch seems to take under 5 seconds, mostly because I have to cut and paste it into another application first. And the other two items are fairly trivial annotation issues.<\/p>\n<p>This isn&#8217;t even that hard an issue to solve: it&#8217;s only relevant for long-running apps with user interfaces &#8212; so xterm and bash, but not sed or ls. It requires somewhere for apps to dump their status ($TMPDIR or a dotfile in $HOME). And it requires some code to do recovery, possibly with a user interface in order to choose which point in history you want to recover. And given those issues, for many apps, there&#8217;s no reason not to then just automatically recover after a crash, at least as long as you give the user an easy way of avoiding getting into a &#8220;recover to a point where you always crash; always recover when you crash&#8221; loop (or at least an easy way of getting out of it).<\/p>\n","protected":false},"excerpt":{"rendered":"<p>In his epic battle with Adrian over exceptions, Ben mentioned: Save your work? That&#8217;s for sissys. Use a journalling file-saving model. Save everything the user does immediately. You can support the traditional file save\/load facility using checkpoints or other niceties but I fail to see why any application in this modern age of fast hard [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[16],"tags":[],"_links":{"self":[{"href":"https:\/\/www.erisian.com.au\/wordpress\/wp-json\/wp\/v2\/posts\/322"}],"collection":[{"href":"https:\/\/www.erisian.com.au\/wordpress\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.erisian.com.au\/wordpress\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.erisian.com.au\/wordpress\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.erisian.com.au\/wordpress\/wp-json\/wp\/v2\/comments?post=322"}],"version-history":[{"count":0,"href":"https:\/\/www.erisian.com.au\/wordpress\/wp-json\/wp\/v2\/posts\/322\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.erisian.com.au\/wordpress\/wp-json\/wp\/v2\/media?parent=322"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.erisian.com.au\/wordpress\/wp-json\/wp\/v2\/categories?post=322"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.erisian.com.au\/wordpress\/wp-json\/wp\/v2\/tags?post=322"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}