Page 1 of 1

Blessing in disguise

Posted: Mon Mar 26, 2007 11:48 pm
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 :)

Posted: Tue Mar 27, 2007 12:50 am
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?

Posted: Tue Mar 27, 2007 1:04 am
by feyd
mm bloggy.

Posted: Tue Mar 27, 2007 3:03 am
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 ;).

Posted: Tue Mar 27, 2007 6:28 am
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.

Posted: Tue Mar 27, 2007 12:15 pm
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.