Blessing in disguise

Ye' old general discussion board. Basically, for everything that isn't covered elsewhere. Come here to shoot the breeze, shoot your mouth off, or whatever suits your fancy.
This forum is not for asking programming related questions.

Moderator: General Moderators

Post Reply
alex.barylski
DevNet Evangelist
Posts: 6267
Joined: Tue Dec 21, 2004 5:00 pm
Location: Winnipeg

Blessing in disguise

Post by alex.barylski »

I've yet to implement any kind of SVN into my daily development bump and grind...yes I occassionally loose work, but honestly in my 10 or so years of professional experience I've maybe only had a dozen accidents which burned. :)

I can still tolerate that I guess :P

Anyways (short of setting up a SVN) I had this problem today, when one of the apps I work on decided to go astray and recursively delete everything in my 'htdocs'. Usually I have daily backups but because I had several hours in before the brainfart (on behalf of my computer) I lost alot of work and became mildly enraged. :roll: :twisted: :evil: :roll: 8)

I just finished piecing togather my personal project (which suffered this biggest hit) and ironically it was a blessing in diguise. Why?

Well it was reaching a point where I was beginning to questions it's architecture. Code smell if you will. Usually when we feel funny about a design it's because we know it could be better, personal projects are no exception. Although I had plans on refactoring, I wasn't looking forward to it and was thinking this next weekend I'd get on it.

Loosing the codebase and having to resort to a backup which was a day or two old, I started from a milestone in which I considered stable and solid - no stinky!!!

Having taken what I learned over the weekend about my system and re-applied that to get the system back to where it was, I am now confident my system is as good as it can get architecturally speaking - considering my requirements.

This got me thinking, I wonder if I could use SVN and say every 2-3 days commit a "milestone" in which I feel the codebase is stable and architectually sound. After a couple more days when I think the code stinks, but I have a better insight into the design of the problem I could scrap my work and start fresh implementing using practical insight instead of best practice. I truely think this catastrophe was a blessing indisguise as my system is more solid and actually more efficient, better organzied, etc...

I could accomplish this using backups with a detailed notes.txt explaing what should be done, but I'm wondering would SVN have any facilities which would enhance this experience? Make it smoother?

It took me about 2-3 days to get the system where it was before trashing...it's taken me all of about an hour or so to bring it back to the spot it was in but without the code smell...

Cheers :)
User avatar
Kieran Huggins
DevNet Master
Posts: 3635
Joined: Wed Dec 06, 2006 4:14 pm
Location: Toronto, Canada
Contact:

Post by Kieran Huggins »

I've started using my dreamhost account's SVN server and tortoise SVN on my machine to commit my "milestones" - makes me feel much safer :-) And it was dead easy to set up!

Maybe it would work for you too?
User avatar
feyd
Neighborhood Spidermoddy
Posts: 31559
Joined: Mon Mar 29, 2004 3:24 pm
Location: Bothell, Washington, USA

Post by feyd »

mm bloggy.
User avatar
Maugrim_The_Reaper
DevNet Master
Posts: 2704
Joined: Tue Nov 02, 2004 5:43 am
Location: Ireland

Post by Maugrim_The_Reaper »

This got me thinking, I wonder if I could use SVN and say every 2-3 days commit a "milestone" in which I feel the codebase is stable and architectually sound. After a couple more days when I think the code stinks, but I have a better insight into the design of the problem I could scrap my work and start fresh implementing using practical insight instead of best practice. I truely think this catastrophe was a blessing indisguise as my system is more solid and actually more efficient, better organzied, etc...
The reason why SVN is so useful for this purpose is the branching model - you can commit initial code to the "trunk", then immediately pull a copy into a "branch". Not sure of your SVN familiarity, but these are just directories in subversion which form a common convention. You can then develop the branch towards a new milestone. If it sucks feel free to delete it - trunk still exists in it's original state to start over. Or you can selectively merge bits of the branch into the trunk and discard the remainder. Either way what you want is very possible. To backup milestones in the trunk, you can also either record the revision number or copy the trunk into a tag (another root directory) for a more visible record.

The main problem with a 2-3 day gap between commits is that you lose subversions fine grained approach - you won't be able to extract any version within those 3 days, and you'll lose the detailed logs that can be surprisingly useful when tracking exactly what you did in those three days. Still, if you only need primarily as a backup tool that's a non-issue ;).
User avatar
Jenk
DevNet Master
Posts: 3587
Joined: Mon Sep 19, 2005 6:24 am
Location: London

Post by Jenk »

SVN is indeed an awesome tool. Though having said that, to really appreciate it a good bug tracking tool must be used - such as Mantis.
User avatar
RobertGonzalez
Site Administrator
Posts: 14293
Joined: Tue Sep 09, 2003 6:04 pm
Location: Fremont, CA, USA

Post by RobertGonzalez »

Hockey, I run a dedicated server. If you want, I can set you up with a domain and a blog for your very own. :wink:

Code control is a great tool. It is now a standard at my place of business and will soon be used as part of the code review and development standard I am developing.
Post Reply