9 ms·
One fateful day, VMWare and OS/X conspired to trash my shared filesystem, losing several days of uncommitted code in the process. Several days of uncommitt
by raganwald 15y ago
One fateful day, VMWare and OS/X conspired to trash my
shared filesystem, losing several days of uncommitted
code in the process.
Several days of uncommitted code? We need to have a heart to heart talk about your process.
- moconnor 15y agoThis is really true. Back then we were still using CVS, and I was writing a feature that I thought wasn't quite big enough to branch and remerge for, but turned out to be a bit more involved to get right than I'd thought. Now we're on Mercurial and life is better. Edit: A nice win with the Linode is that they back it up for me for $5 a month. Sure, there are solutions for the desktop too, but somehow I never got around to using one of those.
- raganwald 15y agoThere are two kinds of programmers: Those who’ve earned their experience the hard way, and insufferable know-it-alls who parrot whatever was in the last witty blog post they read. There’s zero shame in being the first kind :-)
- marxidad 15y agoAnd one shame in being the other : P
- zachleat 15y agoWhat's the URL to the blog post where you read this? :)
- raganwald 15y agohttp://twitter.com/#!/raganwald/status/131738600931995648 http://twitter.com/#!/raganwald/status/131738600931995648 :-P
- pferdefleisch 15y agoi think i'm in a wormhole!
- AbyCodes 15y agoRecursion abuse!
- jerf 15y agoI would observe that with DVCS, if your hard drive crashes you can still lose several days of unpushed code, too. I recommend and use cron jobs to push and/or rysnc things around on a more frequent basis for my really important stuff.
- deleted 15y ago[deleted]
- gujk 15y agoYou could buy a second hard drive and put it behind your other drive and occasionally copy important files from your front drive up to your back drive.
- BonoboBoner 15y agoOr use TimeMachine if you are on a Mac.
- wizard_2 15y agoNo, if TimeMachine screws up a file it stays screwed up for ever after every backup, there's no integrity checking. It also completly barfs on large files that change little by little. The best example of that is the entourage mail store, but any single file db will do. I've seen clients bit bad by these problems. Don't get me started on the time capsule...
- scott_s 15y agoIt's more difficult to setup, but it's wonderful to have a dedicated development cluster. Put everyone's home directory on a dedicated file server, which uses NSF to be global to the cluster. Then you can do automated backups on the file server - hourly, nightly, monthly, whatever. There are file server appliances which are configured for this sort of thing. When you do this, much less important data is stored locally, on developer's actual machines.
- j45 15y agoThanks for sharing. Did you consider switching to a smaller laptop like a Macbook Air / Netbook?
- moconnor 15y agoNo, I wanted to try something radical and crazy and new. Frankly, I expected to be back on my MacBook by now. This has been as much a surprise to me as anyone!
- j45 15y agoI tried out an iPad app called Koder, it was nice but still lacked some things. Your post has got me wondering about Vim again.. :) Making the switch to Sublime Text has got me appreciating a more shell-like interface for some things. Have you ever found yourself wanting to code and not have an internet connection? I think that's a pretty rare scenario, I'm rarely offline.
- moconnor 15y agoI haven't wanted to code offline for months. Maybe if I flew for more than two hours I'd miss it. Even the trains have wifi in Germany. The few times I have wanted to code offline, I've also wanted to look something up >.<
- j45 15y agoHaha, that's really true. I rarely code offline, maybe it's just another umbilical cord that we should be examining. Between having tethering and generally ubiquitous tethering, we should be good. I think I want to try getting into VIM again. Is there a good resource site you like, where I can find a decent guide and some pointers on where to find some language dictionaries? Totally off topic but I'd appreciate it.
- danneu 15y agoI recommend just running "vimtutor" in terminal once you've installed Vim. It's the best introduction. Far better than the online tutorials that sometimes pop up on HN. Once I got the basics down (15 minutes in vimtutor), I noticed enough productivity gains to use it immediately for note taking and scripting. Then I just decided to jump in and use it for a real project. I learn new hotkeys, plugins, and config tricks every week and I just feel my productivity inch its way up and up.
- jfoutz 15y agoSo, this is something i worry about. I'm using time machine for backups, so i don't think i'll lose much ... but i'm sorta hazy about how i should be using svn for all these little incremental steps. I'm uncomfortable with committing code that's going to break the whole system. Should i be creating a branch for projects longer than an afternoon, and just committing that fairly often? I feel like eclipse's history is working okay but i have a vague paranoia i'm doing something dumb when i see comments like this.
- deleted 15y ago[deleted]
- vegashacker 15y agoWith SVN, probably, but the branching just feels heavyweight so sometimes it's hard to motivate. Git with the "git flow" addon seems like it'd be a better fit for you. Being able to checkin in "to your feature", as opposed to waiting till it's done and ready, feels great. It's also not just about avoiding data loss. If your feature starts going off-course or has a bug, you can look at previous revisions to get fixed up.
- jdludlow 15y agoThe major workflow shift that involves the skies parting and mana floating down from heaven when you switch to a DVCS (git, hg) is the ease and lightweight nature of branching. Having used git for four years, I now feel absolutely filthy if I'm not coding on a branch. If I start coding anything, I make a branch first, because the overhead is nearly zero, if I screw something up I can easily revert, and the downside of being scared to push code is too great. Example: Yesterday I started a new feature. Step 1 was to branch from our develop branch. A bit into the coding I realized that this feature was going to take longer than expected. I committed what I had on my branch and pushed it to the remote repository (github in this case). This affects no one else, because the code is on a branch. What really makes this possible is that merging is so easy. Branching and merging in svn was scary. I was never sure if something horrible was about to happen. With git (and hg) branching and merging is the expected behavior, and it's easy. Always being on a branch also makes it easier to deal with interruptions. "Hey, there's an emergency, can you fix Foo?" No problem, commit what you have on your branch (or use `git stash` which is amazing) and jump back to the branch that has the code you need to fix. Need that fix in your branch as well? You can merge or simply `git cherry-pick` a single commit across branches. You no longer have to worry about the dreaded "Did I already merge this? What if I merge it again, what will happen?"
- dpapathanasiou 15y agoInsightful, and so close to a haiku as well... Here's an attempt: Mac lost my data Many days of work gone Cloud to the rescue
- Tyrannosaurs 15y agoMac lost my data Many day of work gone Learn to commit more
- moconnor 15y agoCan I get this on a t-shirt?
- deleted 15y ago[deleted]
- Legion 15y agoIt's the poor craftsman Who points the blame at his tools Y U NO COMMIT?
- ajross 15y agowinner
- podperson 15y agoSo this is why Even if you are u63r 733t Time Machine still rocks
- tjr 15y agoThere once was some data I lost: Days worth of work just got tossed! So I decided to write code On an iPad plus Linode Getting backups for minimal cost.
- catshirt 15y agoyours is not quite a haiku either. you say its haiku but you missed a syllable in your second line
- sliverstorm 15y agoHow about if he is using Git? It is normal to work out of your local repository and only sync with the master occassionally, no? At least on projects that can tolerate such methods.
- eropple 15y agoI push to a personal remote at least twice a day. Not doing so is asking for trouble.
- sliverstorm 15y agoAnd I agree- I am a veritable slave to keeping my data syncronized- but I recall many people lifted up the local repo idea, and being able to sync twice a week, as the herald of the future.
- eropple 15y agoWell, you can pull from upstream twice a week. And you can keep a master on a computer in the next room. (I'm also not terribly worried about my Air or my Hackintosh giving up the ghost, so...)
- rhizome 15y agoI highly recommend upping this closer to twice an hour.
- eropple 15y agoI said "at least". ;) It's really more like "oh hey, I just committed and it works, might as well push while I'm here." Usually every 3-4 file changes or so.
- danssig 15y agoProbably using SVN or CVS. Everyone I know used those systems that way but moving to a modern RCS usually gets people checking in a lot.
- mst 15y agoEven back on svn I tended to use svk (not in offline mode, just for workable merging) and branch for everything - keeping to a rule of "it compiles? commit it" and then only caring about everything working when you merge saves data loss and has the advantage of keeping your thought process, even when that process turned out to be wrong. CVS? I think I've forgotten how I used that, thankfully.
- nicklovescode 15y agoThere once was a man with a Mac One day his VMWare went wack So he picked up his code, went to Linode Which now handles all of his stack
- tripzilch 15y agoAs I read the article I knew something like this would be the top comment on HN ... :-/ Apparently lots of people make this mistake. Is it stupid? Maybe. Probably. Do we need to have a lengthy discussion about it every time it is a minor part of a story or article? I'd rather not.