Fog Creek Software
Discussion Board




Keeping track of code

I am a one-man team, and have really only programmed minor macros and the likes sincegraduating university.

Can you recommend any solutiosn for keeping track of versions etc.

For my major project at the end of uni I kept all my code in one folder (or subfolders under that folder), and after reaching important points would copy it all, dub the old folder 'stage X' and continue.
Still it was messy, relied on me remembering what changes I had made in various stages. (ie if I found errors and needed to refer to previous stage, perhaps at stage5 I copied a class from stage 3, and made changes, stage 4 now has an class that is out of date....

I like things organised, and I work so much better when things are organised well.

Does anyone know of any tools, have suggestions etc.

An Aussie Chick
Tuesday, September 23, 2003

What you want is a version control system.  There are many to choose from:  CVS, RCS, SCCS, Visual Source Safe, and numerous others.  Do a google on "version control" or "source control" and you'll find many web pages devoted to this topic.

anon
Tuesday, September 23, 2003

Don't you mean to say that you're a one-woman team?

I second the previous recommendation: use CVS for the following reasons:

1. It's used in the "real world" regularly.  Even if you never learn CVS, knowing some sort of version control adds to your employability.
2. It's free.
3. TortoiseCVS is a great front-end for Windows.

Alyosha`
Wednesday, September 24, 2003

Perforce offers a free two user version of their software that works very well, integrates into Visual Studio, and apparently scales well to massive projects.

Like you, though, I mainly work on projects by myself and I am extremely grateful to have this extra safety net. 

Michael Joyner
Wednesday, September 24, 2003

hur hur....a one man team ....named *aussie-chick* hur hur...

is there anything as sexy as a female geek?

never going to admit to this one..
Wednesday, September 24, 2003

Yeah, use CVS. This way you shall learn a very cryptic, unproductive command-line interface, and gain yourself a place among weird *NIX geeks who use vi and some command-line compiler.

If you use a powerful Windows IDE, you know what real productivity is.

How can you stop your IDE, and waste time issuing cryptic commands? That's a real loss of productivity.

So, either you can get an integrated version manager, which will enable you to work quickly within an IDE, or you can accept the large productivity hit associated with command-line version control like CVS.

Useless
Wednesday, September 24, 2003

Useless... what a nice description of your advice.

CVS is a server and a protocol and a client.

There are other clients which work on top of it. Like TortoiseCVS. Which is really easy to use, integrated with the OS. WinCVS, which is a custom UI kind of like VSS' UI. And probably some tools integrated with various IDEs. (There apparently was one for VS6, but of course Microsoft changed all the interfaces or something in VS.NET)

CVSNt is a server. It is controlled through a control panel. Don't think it even has any command-line options.

Try it sometime. Also investigate Subversion, Perforce, and SourceGear vault... they have a good rep here, though I haven't used them.

mb
Wednesday, September 24, 2003

cvs for one person? Why bother? cvs is total overkill for one person, not to mention it is a pain to set up.

Use Visual SourceSafe and just make sure to get up to 6.0c or 6.0d and you'll be good to go. You can have your VSS database on your local machine or on a network drive.

dmooney
Wednesday, September 24, 2003

Visual Source Safe is a bad product than encourages bad practices (of branching, tagging, and locking), and somewhat of an overkill for one person.

TortoiseCVS sets up local repositories for you (no need to a set up a server or anything), and is, by far, the friendliest user interface I've used for version control.

[ http://www.tortoisecvs.org ]. Try it, and stop spreading FUD.

Ori Berger
Wednesday, September 24, 2003

p.s, useless: If "issuing cryptic command lines" hurts your productivity you should check what exactly you are spending your time on.

Version control interaction is something that happens a small number of times a day (3-4) in every place I know, and you shouldn't be checking in changes that you haven't thoroughly tested.

Once you have tested them, though, I agree that issuing "cvs commit" or "cvs update" at the command line is cryptic enough to stop your creative process with the IDE.

Ori Berger
Wednesday, September 24, 2003

If you can find a simplified version of CVS a single man operation could still benefit from it. Mainly to accomodate contractors. Say you are a web shop, you might dish out translations and graphics arts/HTML sub contracts and in turn have to deal with file synchronization.

Li-fan Chen
Wednesday, September 24, 2003

This list is quite comprehensive:

http://www.thefreecountry.com/programming/versioncontrol.shtml

Ged Byrne
Wednesday, September 24, 2003

CVS makes perfect sense for a one person shop:
1) Want to work on your laptop? Connect, do an update, and you've got the latest code.
2) Oops, maybe this code path was a bad idea? Roll back to your latest stable version before you started.
3) IDE munged your code then auto-saved? Rollback
4) Client wants a quick bugfix but you've got the insides of the code all over the floor? Check out the latest version, make the fix, build, deploy. (integrate bug into your current version)

Philo

Philo
Wednesday, September 24, 2003

Like people here said, a version control system is your friend in this case. Many people here recommended CVS. Joel uses it, too, and I used to use it. However, I would recommend Subversion instead as it is much nicer than CVS.

http://subversion.tigris.org/

Don't get me wrong: CVS is a useful skill as many projects out there still use it. However, CVS and Subversion are similar enough to make learning both easy.

Shlomi Fish
Wednesday, September 24, 2003

> is there anything as sexy as a female geek?

Apparently it's a great way to get advice as well. :)

With a moniker like that, all I can think of is "Tank Girl"!

This post has nothing whatsoever to do with version control - shoot me!

Portabella
Wednesday, September 24, 2003

Ged thanks for the URI

Li-fan Chen
Wednesday, September 24, 2003

I strongly second all the comments about using a proper version control system. If you're a software developer, you should be familiar with at least one professional version control system. The term "professional", by the way, implicitly excludes VSS.

It's always handy to have some level of familarity with CVS since it is very widely used. WinCVS or one of the other windows clients for CVS make it reasonably painless to use.

That said, if I were setting up a new project, I would seriously consider using Subversion (side note for subversion users out there: how stable is it anyway? Is it ready for prime-time yet?).

Once you've got the hang of using version control systems, you will wonder how you manged to do without one for so long!

Burninator
Wednesday, September 24, 2003

As a free option, I'd cast another vote for CVS using the TortoiseCVS interface.  Very nice and unobtrusive.

If you're willing to shell out for a commercial product, I think that Code Co-op by Reliable Software ( http://www.relisoft.com ) is worth a look.  It offers some interesting features such as e-mail synchronization with a "master" repository that I haven't seen elsewhere (good for automated off-site backups) and can also be just used by a single developer with a local repository...

Tim Lara
Wednesday, September 24, 2003

I will second the suggestion for Code Co-op. I am basically a one man shop and have been using it for three years now. Very reliable.  Also, have used it with others who were off-site.

DJ
Wednesday, September 24, 2003

"""issuing "cvs commit" or "cvs update" at the command line is cryptic enough to stop your creative process with the IDE"""

...which is why you'll spend two minutes configuring hotkeys for these operations in your IDE or text editor, so that you can do them with a single button push from then on.  :)  Really, if you can't whip up CVS support for your IDE in just a few minutes, you have a really sucky IDE!  Even as "dirt-simple" a Windows editor as PFE makes this trivial to set up; a big macho IDE ought to practically do it for you.

(Hell, who besides Microsoft even *makes* a major language IDE without built-in or pluggable support for CVS, anyway??)

I'd also add to Philo's list:

5) Start deep work on something, get interrupted, and come back not being sure what bits you did or didn't do?  Run "cvs diff -u" to review the changes you made since the last commit. 

6) Not sure why you did something in a particular way?  Run "cvs log" and review your checkin notes.  (And then add comments to the source, of course.)

Phillip J. Eby
Wednesday, September 24, 2003

Guys, many thanks, I haven't yet begun to check out your suggestions in depth, but am looking forward to it after work.

with regards to the other comments popping up:

> is there anything as sexy as a female geek?
>Apparently it's a great way to get advice as well. :)

You have no idea how true it is, nor how handy.

Aussie Chick
Wednesday, September 24, 2003

Just to be clear, when I was saying " issuing "cvs commit" or "cvs update" at the command line is cryptic enough to stop your creative process with the IDE." earlier, I was being sarcastic.

I forgot the SDNWOTN rule. Apologies.

(That's "Sarcasm Does Not Work On The Net")

Ori Berger
Wednesday, September 24, 2003

I've had only one bug with Subversion (playing it single-player on one machine), which was easily fixed by getting a new checkout.  I rolled back to a file's older versions, and I had a hard time rolling it back or commiting changes; so I rechecked out.

It has very good docs, tortoise-svn (like tortoise-cvs, integrates into mswindows), and I've had it installed on freebsd and mswindows.  On the downside is it hasn't yet had a huge army of testers as cvs has, so don't forget backups.  Another downside is that people say cvs/subversion are primitive compared to Bitkeeper/arch/etc but I haven't investigated.

Tayssir John Gabbour
Wednesday, September 24, 2003

Beyond Compare and PKZip - Seriously

I have used source control systems in the past, and understand their usefulness.  But I have a low-tech way of achieving their goals that works pretty well for me.

I work on smallish projects, with maybe one or two other people. I also need to keep my home machine in sync with the ones on site.  When I need to check in some code I just run a batch file that zips the source files and puts them in a directory named for the version number. These directories are accessible via ftp.

Using Beyond Compare, I can compare local files to this zip file, and pull the changes to any machine - the ftp aspect is transparent.  Also, if two people have been working on the same file, they can use Beyond Compare to merge changes.

Advantages to this scheme are: Beyond Compare costs next to nothing, new people can be brought up to speed in a few minutes, there is no server process to go down, and there is no  proprietary change format or db (just zipped source files.)     

The original poster should go with this: it is simple, cheap and bulletproof, and the directory and file and compare facilities in Beyond Compare are more powerfull and easier to use than what you will find in the average version control system (VSS, say). 

Won't Say
Wednesday, September 24, 2003

Okay, based on the recommended advise I am going to take a look at  TortioseCVs, Perforce, and Subversion

(Thanks 'wont say' but I do like the idea of gaining new skills while I am playing with code, learning a version control system seems to be a very good idea).

Thankyou.

Aussie Chick
Wednesday, September 24, 2003

*  Recent Topics

*  Fog Creek Home