6

This is not a "why should I use version control" question :-)

I have always used version control from the first line of code of every project I've written so far. However yesterday I came up with a question (maybe a stupid one) to which I find no answer: when should version control really start during the software development process? Should it start from the first line of code, as I've been doing all of my life, or should it start when you really have an operational version of your code? Put in other words: should version control be used before the first version of your software? (I mean version control, not source backup, of course!).

Claudi
  • 5,224
  • 17
  • 30
  • 3
    Why not using version control before even writing a line of code? For requisite documents and any documentation generated before starting to write code. – Pablo Oct 17 '12 at 07:13
  • 1
    Is your question really about using version control, or more about "when should I commit/when should I branch/when should I tag"? – Burhan Khalid Oct 17 '12 at 07:32
  • @Burhan Khalid: it's about using version control as a whole. I'm not referring to the particular operations involved in version control. My question is when should I put my projects under control of a CVS. – Claudi Oct 17 '12 at 09:33

3 Answers3

2

Pre-development you don't need version control; but what you do need is some form of collaboration mechanism to keep track of changes to the specifications and documentation.

Some teams deploy version control at this stage. Personally I don't find the value of it here, a wiki/trello or similar is more valuable and makes more sense; as you are tracking a lot of abstract ideas.

As soon as you start writing code - you should start the version control process; and through out the development phase before you have deployed you continue to use version control; this is where you start getting value out of it. Especially if you are developing with others. If you are a solo developer, version control may seem like extra work for no use; this is debatable, but when you are working in a team it is essential.

Once the project has deployed; revision control is critical and mandatory. You simply cannot afford to not have it - version control offers you lots of benefits for the type of work you undertake after deployment. Bugfixes, automated testing, deployment - these can easily be automated from your version control system. If you didn't use version control during development; now is the best time to deploy it since you have a solid codebase as your reference point.

Version control is so simple these days with mercurial/git and their online hosting services that it is costs nothing to get started; and the benefits far outweigh any drawbacks.

Burhan Khalid
  • 169,990
  • 18
  • 245
  • 284
1

The question is quite abstract. So, an equally abstract answer.

I think you should use version control on a specific project as soon as it starts to add value.

If you can distinguish between two phases - proof of concept/prototype etc., and product code, I think you should separate the code bases for the two. And you can use version control tools for both (source backup first, then real version control), just avoiding cluttering the production repository with early stuff.

full.stack.ex
  • 1,747
  • 2
  • 11
  • 13
  • Good answer despite the abstractness ;-) So, is there any universal convention to draw a line between what is concept/prototype and what is production? Maybe a threshold in the number of coded lines? :D – Claudi Oct 17 '12 at 09:43
  • I'm sure there isn't any. It's a gut call. One just feels that :). Seriously, for example, you may proceed from "elaboration" to "deliveries" - be they demonstrations to customers/investors, especially if there are chances to have multiple interactions ("Yeah, nice, if only you had..."), any publishing of alphas/betas, or getting an "essential" number of team members on board. Then you will feel the need for any of this: collaboration, branching, reproducibility. That's the moment to get version controlled. It's abstract, but on the real project, you will know when. – full.stack.ex Oct 17 '12 at 10:42
0

If you are using version control just for the code, you could ask that question.
But ideally, version control should help you reproduce a build, which means the configuration files and other settings can be as important as your first line of code.

See for instance ".classpath and .project - check into version control or not?.

That is the kind of data which will facilitate collaboration, as other developers will be up and running (ie able to build your program) very quickly.

Community
  • 1
  • 1
VonC
  • 1,262,500
  • 529
  • 4,410
  • 5,250
  • Agree, but I was rather asking not about what to put under control of VCS but when should I start doing it. – Claudi Oct 17 '12 at 09:40
  • @Claudix my point was that, as soon as you start needing to setup a project (for a poc of the actual dev), you should start versioning. – VonC Oct 17 '12 at 10:23