What do java programmers version control?
I am a member of the pragmatic programmer mailing list. One of our list members, Joe Van Dyk, sparked off a discussion titled “What goes into version control?”. It was a great question that I had to find an answer for myself over the years, because there were no actual rules.
I personally recommend that you put into your version control all of the things that will allow you to jump from one machine onto to another, checkout your project, and start your work. This recommendation comes in particularly handy when your primary machine is on the blink.
In this vein, items that get placed into my version control include documentation from the customer, library documentation, library binaries, keystores, and even IDE project files. I do not include class files, or jars that get created by my “build” or “dist” target.
You might also consider placing into your version control other types of files that should be safely stored in case you become unhinged and start eating your laptop while yelling “melted butter”. Believe me, if you have ever programmed in EJB 2.x or even 1.x, you have, at one time or another, thought about eating a laptop.
This particular scenario has forced me to put into my version control items like customer invoices, RFPs, copies of emails, agreements, electronic receipts, etc. It is a sound insurance policy to do so. This rule falls in line with a blog entry that I read a long time ago by Joey Hess, who likes to keep his life in subversion. Joey's blog entry is the main reason for my transformation into the digital packrat that I am today.
Lastly, I highly recommend that your version control be somewhere other than your office. In fact, it should be in a completely different building, unless you have a very good emergency plan. I currently pay $200+ a month to kattare.com for them to host my dedicated server. The dedicated server contains my web site and blog, my version control, my build automation tool, and whatever else I can put into it. The cost may seem high to you, but if your career is as a self-employed programmer, or even an overzealous company programmer, this option is a no-brainer. Plus, it's a nice business write-off.
Let me know what you, as a Java programmer, put into your version control. If you are part of a company development team, what are you allowed or not allowed to put into your version control?
Wed, 12 Jul 2006 07:13 PM PDT
IMO keeping the generated binaries as well as the source and IDE files can save you from the dilemma of "melted butter" and maple syrup. A totally different angle: How would you suggest a webapp containing an applet is managed and setup as part of a continuous integration strategy without creating too many revision controlled files? Cheers
Thu, 13 Jul 2006 03:11 AM PDT
What we do is storing all application sources and the Maven (as we use it) build files. This is quite enough to build not only the application , but also th eproject files for Intelij IDEA and Eclipse which is enough. For all the rest - we have a web based project tracking and communication system that takes care of mails, documents, forums, tasks deskriptioins etc. This is perfect and I'd suggest you to use one (like www.coreproject.biz)
Tue, 16 Jan 2007 10:08 AM PST
Use version control? Then you could probably use a laugh:
http://www.youtube.com/watch?v=msDuQoKqysw
Tue, 11 Jul 2006 05:13 AM PDT
I personally take a slightly different approach. I store all source code + IDE files (for that project) + build system in subversion. This allows you to pick up a project on another machine with minimal effort. Besides that I store the basic things, like bashrc and files as such in subversion.
However mail, documentation and other such files I put on a non-version controlled fileshare, ok ok.. an external hdd, but still ;)... this allows access to this data if my main machine fails.
Once a month I make a DVD of the projects and other documentation, which is my hardcopy.
I would think you would also want some maple syrup on that laptop if you are going to eat it :)