• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

"Version Control"

 
Dick Summerfield
Ranch Hand
Posts: 90
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi all,

I'm only on Java-1b and already I'm having trouble with "Source Management", "Version Control", call it what you will it doesn't matter much at this stage.

The point is I want to save each attempt I submit (of say: Java-1b (Hundred)) for reference purposes and start each new attempt from whichever of the previous sources is most suitable. (This will most often be the previous source but may be an earlier one if I went off on a wrong tack).

I've taken to saving versions named: Hundred_Java_1b_1.java (first attempt at Java 1b), Hundred_Java_1b_2.java, Hundred_Java_1b_3.java and so on while the version I'm working on, to submit next, is called simply Hundred.java.

It's a solution of sorts but prone to mistakes (in particular inadvertent overwriting which can be very frustrating - guess how I know that!).

I was wondering what methods others use to preserve old versions of the CD programs? Any clever tricks out there?

Dick Summerfield
 
Katrina Owen
Sheriff
Posts: 1367
18
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I've tried various methods of keeping track of things, and what has worked best for me is this:

I create a folder for each assignment.
I have one working copy of the current assignment, and at various intervals, I copy this into the folder, giving it a version number.
If I decide to discard a version, it still goes into the folder with a version number.

I don't think I've ever actually gone back to a previous version entirely, but I have consulted previous versions (sometimes extensively).

Ironically, I've had more trouble copying and pasting to the email program than keeping control of versions (nitpicker: "these two blocks are identical". Me: D'oh. That's because I copied it twice. Or, nitpicker: "This should go on a new line". Me. D'oh. It certainly should. Nitpicker: "This program doesn't compile". Me. D'oh. That's because it is missing some lines in the middle.).
 
Marilyn de Queiroz
Sheriff
Posts: 9064
12
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Here is a link to a very old thread, but I thought some might find it interesting.

Personally, I always kept (and still keep) my emails, both the ones I sent and the nitpicks I received. Then I could refer to my past attempts at will just by looking in my email client.

Some people installed (or had previously installed) an actual version control system like CVS. I never found that to be necessary for these assignments.
 
Katrina Owen
Sheriff
Posts: 1367
18
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I also keep all my emails - didn't even think of that as any sort of version control, but it certainly is!
 
Pauline McNamara
Sheriff
Posts: 4012
6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I keep my emails too. Way back when I was doing the assignments, I even printed out all the nitpicked versions I got back.

Meanwhile I changed internet providers and that email account has long been cyberdust. If I made a backup of the emails, and I very well might have, I have no idea where that file is today (or what application could read it).

In the end, those print-outs are around here somewhere, and I can read them directly. I could probably even find them.

No, I don't have a paper-free office (but I do reuse those flattened-out trees a lot, really!)
 
Evan Reisman
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Just wanted to add my two cents on version control.

There's a Window's verstion of Subversion called TortoiseSVN. It's pretty easy to use and very good at version control.

It's located here: http://tortoisesvn.tigris.org
 
Dick Summerfield
Ranch Hand
Posts: 90
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by Evan Reisman:
Just wanted to add my two cents on version control.

There's a Window's verstion of Subversion called TortoiseSVN. It's pretty easy to use and very good at version control.


Thanks for the tip, Evan. I've had a look but I see so many terms I don't understand... (only a greenhorn grandad, don't forget )... that I think I'd better stick with my corn-cob system (basically adding version numbers to the file names (it's just a pain in the anatomy that Java requires the class name to match)).

In addition to that, filing the e-mails from our highly esteemed nitpickers gives a documented history of changes.
 
Steve Fahlbusch
Bartender
Posts: 605
7
Mac OS X Python
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
And if you use ant, you could easily create a simple operation that would zip the contents of your source directoy - add a timestamp with the name and copy to the zips directory - you could do this every time you had a clean build (one that cleared the tests).

Later you could clean the zips directory and move to auxillary storage.
 
John Abong
Ranch Hand
Posts: 79
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I also save all emails (gmail is wonderful in this regard). But don't forget handy-dandy notepad.exe. You can save versions as text files then just change the extension as needed.

When you are ready to give up, you are almost there - anon

J. Abong
 
Dick Summerfield
Ranch Hand
Posts: 90
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by Steve Fahlbusch:
And if you use ant, you could easily create a simple operation that would zip the contents of your source directoy - add a timestamp with the name and copy to the zips directory - you could do this every time you had a clean build (one that cleared the tests).

Later you could clean the zips directory and move to auxillary storage.

Thanks Steve,
Sounds great, and I'll store it for future reference. Maybe one day I'll get to grips with "proper" version control but for now it seems too complicated. It's enough just trying to write working Java code for the time being
 
Dick Summerfield
Ranch Hand
Posts: 90
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by john abong:
I also save all emails (gmail is wonderful in this regard). But don't forget handy-dandy notepad.exe. You can save versions as text files then just change the extension as needed.


J. Abong

This is pretty much what I do too, John. (Though I use plain old Eudora - also good at saving and organizing old mail judging by the amount I have) and a text editor called SciTE - which has the added advantage of being able to compile and run the code (results in a separate output pane).
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic