views:

622

answers:

6

After reading some posts here on the advantages of using source control for a single developer, it seems to me that the main advantage is that I will have backups of all changes to the source files. Delphi has a built-in history function that does this by default.

Is this really the same or should I use a "real" source control tool instead?

A: 

Does delphi history have physical backups of your source code?

Are you certain that you will never have other team members working on the same code?

Does Delphi history show you who made the changes to the code?

These are just a few questions I could come up with. If you answered yes to them, then perhaps delphi history is enough for you.

GregD
+4  A: 

The Delphi history is limited (I think to 10 or 25 copies?). So what happens when you want to go back further?

Version control also lets you have change sets, for example in SVN you can see what other files were checked in at the same time.

Also, all the other advantages of source control are missing: branching, merging, labeling, etc.

Ray
You can set it as high as 90.
Nick Hodges
+21  A: 

The history function does not maintain history indefinitely, and you may delete the __history directory one day, whether it's because you consider it cruft, or because you're archiving the project, etc.

If you ever release your source code - i.e. send it to third parties - you'll want to be able to keep track of what you actually released. Labeling can help with this in a source control system; branching can then let you apply patches to a previously released version, without doing contortions such as maintaining multiple directories with the same source code in various degrees of advancement.

Barry Kelly
+1 to this, especially the labeling. I'm a single developer too (most of the time) and over the last few years it's been incredibly helpful to be able to locate/recreate exactly the files/code that went into a particular release. (I use Team Coherence, it fits quite well with Delphi)
robsoft
+3  A: 

You should keep your source in a source control system, the delphi history function is too limited and does not protect against catastrophic hardware failure.

However, the delphi history function is still VERY useful. While you keep larger changes in source control you can keep a short history of the most recent changes in delphis history. I've set delphi to keep 90 history entries for each file and this usually gives me a 90 minute history of my latest work if I'm editing a single file. You can use this to compare what you've done recently, restore old code you decide you shouldn't really have deleted but you wrote after your last check-in, restore a very recent copy if your pas/dfm is corrupted and so on.

So, keep your code in a source control system (on another computer, in another physical location preferably) but don't forget the delphi history as it can be useful.

PetriW
+3  A: 

I'm single developer and have been using Tortoise SVN for awhile now and have found it useful. I do my development on a laptop and have the repository on a different computer, thus I have backups of my code on a different computer (I backup my laptop from time to time as well). I also find it comforting that I can check out my code onto a different computer and it compiles (after installing a few third party bits and pieces).

The other obvious advantage is the source history within the repository, but mostly I've been using the _History, as I usually want to reverse only minor changes - I haven't done anything really incompetent as yet - but it's only a matter of time ;-)

I haven't got into branching/forking my code as yet, but I guess I'll probably start investigating this as the need arises (and I have the confidence).

Alister
+7  A: 

I have a series of posts on version control starting at http://sourceitsoftware.blogspot.com/2008/07/starting-out-with-delphi-and-subversion.html. I don't answer your question, but it may help when it comes to setting up version control later.

Off the top of my head, the main advantages for a solo developer using a vcs (I am one of these) are:

  • Offsite backups (I use a web hosting facility)
  • I can easily see the entire change history (delphi is file by file which doesn't help when finding a bug introduced between build 125 and 126)
  • The ability to maintain different versions of an application and easily merge changes between them (ie I am working on v4 in one branch, but I can easily merge bug fixes I did for v3 in a different branch)
  • Makes it easier to do speculative programming. Ie I can try something out, and if it doesn't work out I can easily revert my changes to get back to a working version
  • Provides an audit log/change history. When I do a new release, I can copy/paste the change history into the readme

It's a bit like unit testing. It takes a bit of time to get into, but once you do, it makes life a lot easier.

AFAIC it's about being professional. I wouldn't work for a company that didn't use a vcs, and I would think carefully before hiring a programmer who didn't.

SeanX
@SeanX: Nice intro in that blog post: "I am always disturbed by the number of programmers I run into who don't use version control". Couldn't agree more. Delphi editor history seems to me a totally misguided effort.
mghie
But the term "speculative programming" in your answer is somewhat worrying for me, too.
mghie