News for hackers. Stuff that matters.
Re:Atom by gavinpc on Wednesday February 26, 2014 @11:54PM (#7310461)
> Sometimes I get so confused that I erase entire files

OT, but just this week my wife did something that really got me thinking about how far computers haven't come in terms of usability.

I heard her say "O crap" from behind her macbook, and out of habit I came to assist.

For some reason unknown to both of us, she had pasted the text of an email into a document called "thesis.docx", and then saved it.

The text was completely unrelated to "thesis.docx", which of course was not backed up.

Now, I love my wife deeply. And she is no fool. On the contrary, she is a graduate student.

Moreover, I completely understand how something like this can happen. We have two small children, and it was the end of the day. It is just too much to expect of the human mind that one should not say something one doesn't mean.

I felt guilty on behalf of my profession that this was the best we had to offer. Microsoft word on a macbook, and your penultimate version of a file is not backed up. It truly is intolerable.

So, while I have had some of my greatest highs using emacs macros, I somehow feel that the brilliant tooling made by developers for developers never quite percolates into userland.

Re:Atom by hrktb on Thursday February 27, 2014 @06:17AM (#7311554)
Sometimes I am boiling a stew, and while I am preparing another dish on the side, for some unknown reason I put the raw eggs on the stew instead of the fry pan.

Pans have been there for centuries, and there is nothing preventing me from throwing stuff in the wrong place, nor undo the eggs in the stew. It's so intolerable, and I feel so ashamed and guilty on behalf of all the pan makers.

Not. We are in a field where we can prevent a lot more stuff to happen than in the real world (and the real world is soooo broken...). We should try our best to make the state of usability and fool-proofness advance as much as we can, and surely there must already be something that would help your wife's case. But we should also be more realistic when voicing expectations.

Re:Atom by mturmon on Thursday February 27, 2014 @10:57PM (#7317161)
No, no, no. This is why reasoning by analogy can lead you astray. We have enough control over the world of software that the problem described above should not exist. This control does not exist in the real world, but it does in software.
Re:Atom by baddox on Friday February 28, 2014 @05:51AM (#7318051)
Do we have enough control over software to make it impossible for someone to delete something and make it unrecoverable when they will later realize they should not have done so?
Re:Atom by thenonsequitur on Monday March 03, 2014 @03:20PM (#7336173)
Not impossible, no. But we absolutely have enough control over software to make it highly improbable for someone to accidentally delete something important and make it unrecoverable.
Re:Atom by doorhammer on Thursday February 27, 2014 @07:26PM (#7316429)
I don't think he's voicing an expectation so much as lamenting a pervasive and realistically solvable, or at the very least approachable problem.
Re:Atom by hrktb on Friday February 28, 2014 @06:08AM (#7318107)
His problem (or his wife's) is solvable, even right now. She could use time machine, dropbox works as well, using a versionning system would also work, she could switch to an editor that supports infinte undos, dozens of other solutions exist.

But all these require preparation, settings and some care. It could get better, even 'magical', but it would be an achievement that should not be taken for granted.

Btw we could make a pan for stew that checks if you are adding eggs to it, but no one would want the tradeoffs IMO.

Re:Atom by jsilence on Thursday February 27, 2014 @11:03AM (#7312873)
> "thesis.docx", which of course was not backed up.

Something I find hard to belive from a woman whose husband is reading hacker news.

'thesis' and 'not backed up' are forbidden to appear in the same sentense by "the Universe(tm)". This law is enforced by _always_ deleting the contents of 'thesis'.

Re:Atom by cli on Thursday February 27, 2014 @04:31PM (#7315245)
> Microsoft word on a macbook, and your penultimate version of a file is not backed up.

From that sentence, I interpreted it as the latest version of the thesis was not backed up, and that she may have lost several days' work.

Re:Atom by jvm on Thursday February 27, 2014 @01:16AM (#7310676)
Vim persistent undo solves this problem:

http://vimdoc.sourceforge.net/htmldoc/undo.html#undo-persist...

...I'm sure Word will catch up eventually.

Re:Atom by wtbob on Thursday February 27, 2014 @11:31AM (#7313067)
Emacs autobackups (which are on by default) would have also helped here.
Re:Atom by njharman on Thursday February 27, 2014 @03:40PM (#7314876)
Exactly, and the fact that previous / older editors (and operating systems) have solved this "problem" supports the Zen Master parable.
Re:Atom by exclipy on Thursday February 27, 2014 @07:43AM (#7311787)
Not in this case. If you accidentally `:w! thesis.txt`, persistent undo isn't going to help you.
Re:Atom by klibertp on Thursday February 27, 2014 @08:03AM (#7311867)
Clipboard manager. Set to record X selections too. That does it for me. Every bit of text I select is copied to clipboard, just below the value currently held there. In this case I'd have the full content of the docx file as a second item in my clipboard manager list with an email as a first one. I set the size of the clipboard items list to 500, just in case.

I couldn't live without some kind of clipboard manager. It was Ditto on Windows and klipper now on Linux. Dunno about Mac OS, but I bet there is something with similar functionality. It adds another layer of protection to Ctrl-Z everywhere and undo-tree-mode in Emacs. As a programmer I deal with text all the time and I need to be able to recover as much as possible if I make a mistake and this (clipboard manager + undo-tree + version control + normal undo) is the most robust system I could find.

Re:Atom by tksb on Thursday February 27, 2014 @03:44PM (#7314905)
Re: OS X clipboard/pasteboard manager.

I've used ClipMenu [1] for years after using Jumpcut [2] as far back as 2003.

[1: http://www.clipmenu.com ] [2: http://jumpcut.sourceforge.net ]

Re:Atom by colanderman on Thursday February 27, 2014 @10:47AM (#7312764)
I actually have some scripts which take textual snapshots of all my open non-idle terminal windows every 10 seconds.

This has saved my butt a number of times.

Re:Atom by klibertp on Thursday February 27, 2014 @03:36PM (#7314850)
For this purpose I set very large history in tmux and I almost never use terminal outside tmux anyway. The panes and windows in my tmux are very long-lived, but when I decide to close one I need to go through it's history and manually extract interesting/important bits. It's annoying and automating this would be really nice though.
Re:Atom by GrinningFool on Thursday February 27, 2014 @09:16PM (#7316850)
Seems to me that a clipboard manager as a solution is indicative of how this type of a problem comes up in the first place...
Re:Atom by ppurka on Thursday February 27, 2014 @09:06AM (#7312184)
Works for me. Across multiple vim sessions. Unless, you mean a new file thesis.txt, in which case the old file is untouched.
Re:Atom by avoutthere on Thursday February 27, 2014 @12:19AM (#7310523)
Time Machine is perhaps the most elegant, least intrusive backup software ever. And it's free with OS X. I can't recommend it highly enough, especially for someone in your wife's position.
Re:Atom by jbellis on Thursday February 27, 2014 @12:48AM (#7310600)
To belabor the obvious: Time Machine saves old versions for you even if you don't have a separate backup disk, subject to available disk space.
Re:Atom by cobookman on Thursday February 27, 2014 @09:59AM (#7312485)
I literally just discovered this when using a terminal and navigating to /Volumes and seeing the /Volumes/MobileBackup.

Hopefully I never have to use it, but pretty cool none the less.

Re:Atom by fhars on Thursday February 27, 2014 @01:25AM (#7310699)
VMS file versions solved that problem in the late 70ies. We are not learning anything from out history as a profession.
Re:Atom by hoggle on Thursday February 27, 2014 @05:21AM (#7311378)
I'm a loyal unix guy but as a millenial without much actual hands-on experience with VMS I always love to hear anecdotes like that :) The first time I read about it was in Clifford Stoll's Cuckoo's Egg where it seemed as if there was constant competition between UNIX/VMS folks over which was the more sophisticated/elegant operating system - mostly good hearted competition of a more civilized age of course ;) I vividly remember the one encounter I had with it's weird shell where I had to re-configure an application running on an Alpha machine which had a consecutive uptime of something like 12 years...

One of humanity's biggest enemies to progress are "Not invented here" and the cult of youth. It's often better to start with a blank slate ("being ignorant") because amongst other things like simply having a different perspective (worth 100 IQ points ~Alan Key) it helps with actually starting to build something. Eventually though we should still be aware of what we as a collective have learned already.

To be fair I think Github folks should know their history so this project might be one of the exceptions - looking forward to it! <3

Re:Atom by dfc on Thursday February 27, 2014 @08:25AM (#7311955)
How do you differentiate "the cult of youth" from "it is better to start from a blank slate"?

Side note: Neither of the two issues you mentioned are "one of humanity's biggest enemies to progress."

Re:Atom by hoggle on Thursday February 27, 2014 @08:41AM (#7312036)
I guess it boils down to respect - for both sides, young and old. Thanks for the compiler error ;)
Re:Atom by rytis on Friday February 28, 2014 @11:16AM (#7319611)
being ignorant

"Ignorance is Strength" (1984)

Re:Atom by baddox on Friday February 28, 2014 @05:54AM (#7318062)
Only in the same sense that public-key cryptography in the 1990s solved the problem of secure electronic communication between two parties. Creating the technology is on big hurdle; getting enough people to adopt it so that it's actually useful is sometimes a bigger hurdle.
Re:Atom by dudleyf on Thursday February 27, 2014 @11:41AM (#7313139)
I wouldn't say "solved", as it's still pretty easy to accidentally overwrite old versions, but it was a step in the right direction. VMS is full of good ideas that never went anywhere.
Re:Atom by testrun on Thursday February 27, 2014 @05:25AM (#7311387)
Netware too, but that was in the eighties.
Re:Atom by lelf on Saturday March 01, 2014 @08:20AM (#7324129)
I like DragonflyBSD. It versions everything by default. (But no one uses DragonflyBSD of course.)
Re:Atom by jefecoon on Saturday March 01, 2014 @12:04PM (#7325020)
+1 for VMS.... so good, but so proprietary & doomed to extinction... so unfortunate.
Re:Atom by gordonguthrie on Thursday February 27, 2014 @12:58PM (#7313705)
Amen brother. Tragic that we haven't even good back to the 80s
Re:Atom by anon4 on Friday February 28, 2014 @08:20AM (#7318537)
Btrfs and ZFS would have helped, too.
Re:Atom by sergeykish on Thursday February 27, 2014 @01:35AM (#7310714)
It's not her fault. One should be able to undo file system changes. Bell Labs solved this long ago by storing every file version forever http://en.wikipedia.org/wiki/Fossil_(file_system) Storage is cheap
Re:Atom by userulluipeste on Thursday February 27, 2014 @05:46AM (#7311463)
No, storage is not cheap! It may be if you're only counting files like "thesis.docx" that involves directly the user, but in reality we have a lot of programs that do automatic file operations and that would be nothing but storage trashing not to count the performance handicap.
Re:Atom by sergeykish on Thursday February 27, 2014 @07:12AM (#7311720)
Sure I'm talking about user generated data. Other bits are just cache or temp, easy to recreate.
Re:Atom by userulluipeste on Thursday February 27, 2014 @06:08AM (#7311530)
"Microsoft word on a macbook, and your penultimate version of a file is not backed up."

Your comments makes me think that neither you nor your wife knew about tracking changes in office documents: http://office.microsoft.com/en-us/word-help/track-changes-wh...

But then considering that the unfortunate loss of data happened after an already lengthy sequence of manual actions, I wouldn't be surprised if the "o crap" would come after a longer sequence that involves disabling whatever should have been prevented the unpleasant events. I'm sorry for the loss, but I don't find my profession responsible more than I would find a car designer/engineer responsible for a car accident caused by driver's deficient attention.

Re:Atom by tim333 on Thursday February 27, 2014 @06:33AM (#7311598)
Although really software should be idiot friendly and default to not letting you delete stuff by accident. As an aside I've managed to delete my code more than once in a similar manner in PyScripter which makes me feel rather silly but is quite easily done.
Re:Atom by benlarcey on Thursday February 27, 2014 @12:30AM (#7310554)
As mentioned time machine is a great feature, but doesn't OS X auto save files you're working on with its versions? You might want to double check that it hasn't got past versions saved.
Re:Atom by prehkugler on Thursday February 27, 2014 @12:45AM (#7310589)
The file revision history is - to the best of my knowledge - an OS X API that applications have to use (opt in). I don't think it comes "for free" with an OS upgrade, unless you mean Time Machine.
Re:Atom by eevilspock on Thursday February 27, 2014 @03:34AM (#7311054)
Except that Microsoft Mac software neither follows OS X conventions (e.g. putting Office system files in the user's doc dir) nor implements many of the important features (e.g. leveraging the automatic file versioning introduced three years ago in OS X Lion).
Re:Atom by tzs on Thursday February 27, 2014 @09:50AM (#7312441)
The current version of Office Mac predates Lion, which is probably why it doesn't use Lion features.
Re:Atom by acqq on Thursday February 27, 2014 @02:47AM (#7310911)
How exactly can he check it? As a user of another OS, I'm asking to learn how this feature actually works.
Re:Atom by eevilspock on Thursday February 27, 2014 @03:44AM (#7311093)
It's easy. Right there in the File menu near the Save command is Revert To, which leads to a submenu with Previous Save and Browse All Versions... options. The latter uses the slick Time Machine UI (http://support.apple.com/kb/ht4753).

Except, per my other comment, Microsoft doesn't bother writing Mac software that works like Mac software. It's kind of like running Java desktop software (actually worse)... neither native feel nor integrated with the OS like other Mac apps.

Re:Atom by acqq on Thursday February 27, 2014 @04:13AM (#7311190)
As you say "Microsoft doesn't bother writing" and his girlfriend uses MS Word on OS X if I understood. Can she then use that feature to recover her work after she had done the "Save" from the MS Word or not?
Re:Atom by lylejohnson on Thursday February 27, 2014 @06:55AM (#7311676)
No, she's probably not going to be able to recover her lost work. What OP and others are trying to point out is that OS X has support for saving revisions to documents if application developers (like Microsoft) would just take advantage of it.
Re:Atom by gameshot911 on Thursday February 27, 2014 @12:23PM (#7313446)
What did you do? Was her whole thesis gone??
Re:Atom by beernutz on Friday February 28, 2014 @12:25AM (#7317383)
I would like to recommend http://crashplan.com. It is set and forget online backup that keeps versions!

Inexpensive and truly unlimited storage. Windows, OSX, and Linux too!

Re:Atom by goldenkey on Saturday March 01, 2014 @04:12AM (#7323718)
It's a daily backup, so no it doesn't keep versions. Nice try crashplan employee...
Re:Atom by bahman2000 on Saturday March 01, 2014 @05:54AM (#7323893)
I believe the default crashplan setting is 15-minutely. It saved me and my from the described situation many times.
Re:Atom by theonewolf on Thursday February 27, 2014 @11:32AM (#7313073)
You'd need something like ElephantFS whose presmise was precisely this. Modern file systems still don't protect user's data the way they should.

http://shiftleft.com/mirrors/www.hpl.hp.com/personal/Alistai...

Why even give users control of the data? No, that should rest squarely with the file system and ait should never delete things unless it is running out of space.

Re:Atom by ams6110 on Thursday February 27, 2014 @08:26AM (#7311959)
Even worse, Mac apps are trending towars the "save as you go" model of Google Docs, which has the one advantage of you don't lose your work if an app crashes but if you started editing the wrong document, or make some changes and then change your mind and want to revert back to the last saved version you are tearing your hair out. The latter happens to me much more often.
Re:Atom by andrewingram on Thursday February 27, 2014 @08:56AM (#7312117)
Assuming the app has implemented the new saving model correctly, it will also keep a history of every version:

File > Revert To > Browse all versions

Re:Atom by comex on Thursday February 27, 2014 @01:56PM (#7314134)
Indeed - the OS X model fixes (to some extent) the problem in question, not exacerbates it.
Re:Atom by tammer on Thursday February 27, 2014 @05:07PM (#7315523)
As evident from the comments above, one of OS X's biggest weak points is feature discoverability.

I love how OS X stays out of your way, but most regular users never get to take advantage of greater complexity. You have to be in the mindset of one of 'us' (reading every update to Apple's PR) to get a handle on everything OS X can do.

Re:Atom by hobbes300 on Tuesday March 04, 2014 @08:44AM (#7340076)
Hardly, it was well advertised when Lion came out.
Re:Atom by tammer on Monday March 10, 2014 @02:39PM (#7374838)
Exactly. If you got your first Mac post 10.7 (and you're the average user) you've got no idea you have such a feature.

Maybe you find it one day trolling through the menubar. Maybe you don't.

Re:Atom by alwillis on Thursday February 27, 2014 @08:46AM (#7312065)
My 6-year old version of Word 2008 has an option to always make a backup of the previous version when saving, which (unfortunately in this case) is off by default.
Re:Atom by johw on Friday February 28, 2014 @04:11AM (#7317802)
I'm using dropbox for document backups. Just edit your files inside your dropbox folder and your documents will be versioned.
Re:Atom by shovel on Friday February 28, 2014 @08:50AM (#7318666)
Same here. As well as Time Machine. Just in case Dropbox ever breaks.
Re:Atom by vickytnz on Saturday March 01, 2014 @07:47AM (#7324064)
When I started working on my thesis, I immediately set up my entire document directory for it to be in Dropbox. At the time I paid extra for versioning but now I think it'd built into even the basic model. This also saved my friend when she was in writeup and someone stole her Macbook.
Re:Atom by tracker1 on Thursday February 27, 2014 @03:15PM (#7314708)
Not sure if this will help regarding change tracking in MS Word...

http://office.microsoft.com/en-us/word-help/track-changes-wh...

Re:Atom by hobbes300 on Tuesday March 04, 2014 @08:41AM (#7340058)
Why wasn't she using versions?

http://support.apple.com/kb/PH14378

Re:Atom by userbinator on Thursday February 27, 2014 @07:00AM (#7311690)
> It is just too much to expect of the human mind that one should not say something one doesn't mean.

Careful, that is quite a slippery slope...

Re:Atom by nhangen on Thursday February 27, 2014 @12:17AM (#7310514)
Cmd z?
Re:Atom by greyskull on Thursday February 27, 2014 @12:31AM (#7310557)
She probably had closed the file before the "o crap". Undo does no good there.
Re:Atom by unfunco on Thursday February 27, 2014 @01:09AM (#7310658)
Then this really isn't a usability issue, if you replace the entire contents of a document with the clipboard, then click or shortcut to save, then click or shortcut to quit the application, that's really a human issue. It's too many steps to be labelled as a usability problem.

⌘-Z should have been adequate.

Re:Atom by callum85 on Thursday February 27, 2014 @05:02AM (#7311332)
> "that's really a human issue ... ⌘-Z should have been adequate."

I hope you don't work in usability.

I've made exactly the mistake described, several times. When making small changes to a bunch of files, it's common to go through the whole open-edit-save-close sequence in a few seconds, and if you've got a few things open and someone's talking to you, it's easy to fuck up.

Re:Atom by dkasper on Thursday February 27, 2014 @01:34AM (#7310712)
Whether it's a human issue or a software issue it could still be solved by better software.
Re:Atom by Ygg2 on Thursday February 27, 2014 @03:48AM (#7311107)
In other words, always blame the software.

I get it, but the convenience of things like ZFS and Time Machine have a cost. It takes time to implement such things and they take resources. And even then a failure is possible.

E.g. you decide to do some kind of Garbage Collect on a HD, because you lack disk space and you don't want to buy a disk, but you forgot to backup a file you deleted a month ago.

Re:Atom by cturner on Friday February 28, 2014 @03:22AM (#7317692)
I'd break it into two categories. There's software that expects you to be an expert.

Then there's software that's designed to allow lay-people to get stuff done with the promise that it will hide the nasty things of the world from them.

Microsoft Word really is the perfect example of this. The main use-case it's built around is being a lovely place for a new user to write and print a small document. It captures users from this simple use-case, and then tries to upsell them to large document and multi-user scenarios with madness like mail-merge wizards and sharepoint.

The promise of Microsoft Word is to bring functionality to users while shielding them from the nasty realities of the world. It's reasonable to be vicious about it when it fails to protect the user from themselves.

Re:Atom by eevilspock on Thursday February 27, 2014 @04:00AM (#7311154)
> In other words, always blame the software.

> I get it, but the convenience of things like ZFS and Time Machine have a cost. It takes time to implement such things and they take resources. And even then a failure is possible.

You need to weigh the development cost of a feature against the cost to the user of not having it times the number of users. It is usually cheaper to make the software do the tricky stuff than to make your users do it.

Re:Atom by sillysaurus3 on Thursday February 27, 2014 @01:28AM (#7310704)
If the computer remembered every modification of every document, then users would be protected from incidents like this.
Re:Atom by asdfaoeu on Thursday February 27, 2014 @02:59AM (#7310948)
What about when they accidently release private information because the information was at some point in the software. I'd rather a single backup system like time machine than every application reinventing the wheel with all the bugs that entails.
Re:Atom by fauigerzigerk on Thursday February 27, 2014 @02:42AM (#7310892)
Yes, but in that case we would be talking about yet another privacy issue here.
Re:Atom by wtbob on Thursday February 27, 2014 @12:29PM (#7313477)
That's why it should be the file system storing backups, not the document itself.

One should also consider a logarithmic decrease in backups: while I'm writing, a backup of the state a few seconds ago is useful, but I don't need every second from weeks ago. Say the system keeps a backup of every few seconds for the last few minutes, every few minutes for the last few hours, every few hours for the last few days, every few days for the last few weeks, every few weeks for the last few months, every few months for the last few years--the odds are then pretty good that I'd be able to revert to a version I find useful, but not requiring an awful lot of versions.

Back of the envelope: 5 versions/minute for 5 minutes = 25 versions; 4 versions/hour for 8 hours = 24 versions; 3 versions/day for seven days = 21 versions; 4 versions/week for four weeks = 16 versions; 1 version/month for 4 years = 48 versions, so a grand total of 134 previous versions of a document, which really isn't that much space, particularly assuming efficient differencing algorithms.

Re:Atom by lifeformed on Thursday February 27, 2014 @02:19AM (#7310832)
Dropbox!
Re:Atom by Ygg2 on Thursday February 27, 2014 @03:49AM (#7311118)
Still a privacy issue.
Re:Atom by wehadfun on Thursday February 27, 2014 @10:57AM (#7312824)
I wrote software to handle this a long time ago never got off the ground www.foldertrack.com
Re:Atom by m_eiman on Thursday February 27, 2014 @03:28AM (#7311033)
Doesn't Word store old data in the .docx, for things like revision diffs and to make saving quicker? Unless the filesize is really small, there might be a way to extract the previous data... Maybe that was only in the old .doc format, though.
Re:Atom by novaleaf on Saturday March 01, 2014 @05:01AM (#7323808)
ummm.. if you didn't do it then, i suppose it's already too late, but ctrl-z (i guess that's option-z on a mac?)
Re:Atom by NIL8 on Friday February 28, 2014 @11:47AM (#7319857)
"Now, I love my wife deeply. And she is no fool. On the contrary, she is a graduate student."

No offense, to you or your wife, but this statement is hilarious for several reasons!