Version Numbering Scheme – Yet another approach

Version numbering schemes are probably one of the few things we software engineers have more than sort algorithms. However, there’s always room for one more.datecode

While the classic approach of MAJOR.MINOR.PATCH (e.g. 1.8.2) works quite well for libraries or products which are distributed in a broad manner, it is still not as easy as it seems.What is a major change? What a minor? What comes after 1.9? 2.0 or 1.10? There are tons of examples where this classic approach fails, Java being one of the most prominent examples.

One the other hand, this approach is almost perfectly suited for libraries, as the rules are quite obvious here:

  • increment minor version for every release (2.4 -> 2.5)
  • increment major version when a backward incompatible change was made (2.4 -> 3.0)
  • increment the patch level for each update, which only fixed bugs but didn’t add functionality (2.4 -> 2.4.1)

However, for software which runs in the cloud or is only delivered to a number of customers, the distinction is not always this clear. As we do not distinguish between minor or major updates ( ask our sales guys, each release is a major step forward), we ended up using the build numbers of our
Jenkins build server as version number.

Although this approach works quite well, there are two problems with it:

  1. You need a build server which issues consecutive build numbers
  2. Without looking at the build server, you cannot tell the age of a release (How much older is BUILD-51 compared to BUILD-52?)

Therefore we now started to switch to another approch for our SIRIUS based products: Inspired by date code placed on ICs, we started to use the same codes for our releases. A date code consists of four digits, the first two being the year and the second two being the week number. So this blog post would have 1406 as version.

As we don’t perform more than one release per week, a version number is always unique. Furthermore these numbers are quite short and easy to remember (compared to full dates like foo-20130527). Still they provide a rough information concerning the release date.

Now as I said, this scheme is not superior over others. It’s just a good solution for our problem. Use it if you like it, ignore it otherwise!
 

Do you want to know how to develop your skillset to become a Java Rockstar?

Subscribe to our newsletter to start Rocking right now!

To get you started we give you two of our best selling eBooks for FREE!

JPA Mini Book

Learn how to leverage the power of JPA in order to create robust and flexible Java applications. With this Mini Book, you will get introduced to JPA and smoothly transition to more advanced concepts.

JVM Troubleshooting Guide

The Java virtual machine is really the foundation of any Java EE platform. Learn how to master it with this advanced guide!

Given email address is already subscribed, thank you!
Oops. Something went wrong. Please try again later.
Please provide a valid email address.
Thank you, your sign-up request was successful! Please check your e-mail inbox.
Please complete the CAPTCHA.
Please fill in the required fields.

3 Responses to "Version Numbering Scheme – Yet another approach"

  1. Kny says:

    This requires that there is no “release” vs “patch”. E.g:
    1. A new release is built, and sent to testing with 20140209
    2. A quick bugfix on the current working code is sent to production with 20140210.

    Then one will assume that the bugfix is the newer version. But actually the “new release” is built the day before.
    This scheme does not handle this well :-(

    PS: I agree that major and minor number usually is misused, and therefore I prefer to only use ..

    -kny

  2. ZeGuru says:

    If so… why then dont you just use the modification date ?

  3. Hi Kny,

    that’s right, but as we’re not a that large company – we only have one “update” in the pipeline for each product or customer. Living the “release early, release often” approach, this is always a release and patch at the same time (neither we nor the customer distinguishes them).

    We’re not using the whole mod. date, as a for digit block is easier to remember – basically it IS a modification date with a resolution of one week…

    As I’ve said, that won’t work for all projects and teams out there – The X.Y version has its own benefits.

    But thanks for reading and providing feedback :-)

Leave a Reply


5 + = ten



Java Code Geeks and all content copyright © 2010-2014, Exelixis Media Ltd | Terms of Use | Privacy Policy | Contact
All trademarks and registered trademarks appearing on Java Code Geeks are the property of their respective owners.
Java is a trademark or registered trademark of Oracle Corporation in the United States and other countries.
Java Code Geeks is not connected to Oracle Corporation and is not sponsored by Oracle Corporation.
Do you want to know how to develop your skillset and become a ...
Java Rockstar?

Subscribe to our newsletter to start Rocking right now!

To get you started we give you two of our best selling eBooks for FREE!

Get ready to Rock!
You can download the complementary eBooks using the links below:
Close