File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Developer Certification (SCJD/OCMJD) and the fly likes Version Control Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Certification » Developer Certification (SCJD/OCMJD)
Bookmark "Version Control" Watch "Version Control" New topic
Author

Version Control

Sean Keane
Ranch Hand

Joined: Nov 03, 2010
Posts: 581

Hi,

Just wondering what approach people took with regards source\version control?

1. Didn't use any?
2. Used a local repository on the same machine as developing?
3. Used a remote repository?

Cheers,

Sean.

SCJP (1.4 | 5.0), OCJP (6.0), OCMJD
Roel De Nijs
Bartender

Joined: Jul 19, 2004
Posts: 5206
    
  12

local history only on same machine + using an usb stick to make a backup each day


SCJA, SCJP (1.4 | 5.0 | 6.0), SCJD
http://www.javaroe.be/
Sean Keane
Ranch Hand

Joined: Nov 03, 2010
Posts: 581

Thanks Roel. Out of interest, what did you use for your local history? e.g. CVS, Subversion etc?
Sean Keane
Ranch Hand

Joined: Nov 03, 2010
Posts: 581

Interesting post here on using SubVersion locally.
Roel De Nijs
Bartender

Joined: Jul 19, 2004
Posts: 5206
    
  12

local history that comes with my IDE (eclipse), so no cvs, svn or git.
Elchin Asgarli
Ranch Hand

Joined: Mar 08, 2010
Posts: 222

I did the same as Roel, used USVCS = USB Stick Version Control System

I think there is no point on using SVN or anything like that on local machine, cause if your machine is down, your code will be gone.


Personal page, SCJP 6 with 91%, SCWCD 5 with 84%, OCMJD
Sean Keane
Ranch Hand

Joined: Nov 03, 2010
Posts: 581

Interesting point about the use of local history in Eclipse Roel. I've never used this feature in the past - I must read up on it. I'd be interested to know where the history is stored and what it is associated with? If it is stored with the project, or the workspace, or somewhere else? Is the history kept if I import the project into another version of Eclipse?

Using source control locally may seem like a pointless exercise on the face of it. As Elchine mentioned, especially since your repository and checkout are on the same machine ! But there are some benefits.

  • You can tag milestones in your project - this allows you to roll-back the entire state of your project to known working points.
  • You can branch if you wanted to try out some idea and leave the head stable with your working version.
  • You can easily diff between version of the file, you can easily roll back a single file to any of its' previous states.
  • You can easily move the project and all of its' history to another machine.


  • Regards storing the repository locally, I've been playing around with SVN and a remote project hosting site that supports SVN called Assembla . It's pretty cool! I had it setup within a few minutes - this included setting up my account, integrating with Eclipse, and integrating with TortoiseSVN.

    I also took a look at Google Code and it looks very nice! But it doesn't allow private projects like Assembla. All projects seem to have to be open source.

    All possibly overkill for a "small" project. But another way of looking at it is it is much easier to get a handle on such techniques, setups, processes etc. on a very small project than trying to learn it all on a large project. So there's benefits in treating a small project as if it were some larger development project. So when it comes to a larger project you'll be already accustomed these things.

    Roel De Nijs
    Bartender

    Joined: Jul 19, 2004
    Posts: 5206
        
      12

    More info about Eclipse's local history can be found here.

    For the assignment you don't need a real version control system, like you would use in your daily job when being part of a development team. Because you are the only one who makes code changes, so no conflicts, no synchronizing with changes made by other developers,... The local history comes just in handy when you have tried something out, is not what you want, so you can really easy undo your changes. For this reason I sometimes use the local history feature during work time.

    And because I would be when I'm almost finished but due to some virus or crash on my laptop I had to start the assignment all over again, I made every day a backup to an usb stick and I also uploaded the zip file to my web space.
    David Byron
    Rancher

    Joined: Jan 20, 2009
    Posts: 172

    Dreamhost, which I use for hosting, has a one-click installer for Subversion. So I just set up an SVN repos.


    SCJD 6, OCPJP7, Baroque Potion, G+
    Robert Benson
    Ranch Hand

    Joined: Apr 04, 2010
    Posts: 56
    Just in case of a system failure e.g. hard drive crash, I back up my code regularly and store off-site. I use ant to zip my source code, add a timestamp to the zip file name and store off-site/external hard drive /usb stick.

    SCJP 6 , OCMJD 6 ,
    http://www.robertbenson.ie/
    Roel De Nijs
    Bartender

    Joined: Jul 19, 2004
    Posts: 5206
        
      12

    For the websites I made personally (and professionally) I created a svn repository here. If you just need one, it's free.
    Sean Keane
    Ranch Hand

    Joined: Nov 03, 2010
    Posts: 581

    Thanks for the recommendations guys. I will check them out.
     
    I agree. Here's the link: http://aspose.com/file-tools
     
    subject: Version Control