The Art of Semantic Versioning

The Art of Semantic Versioning

Versioning means giving things, like software or documents, special labels to keep track of changes and updates. These labels are usually numbers or letters, helping us understand which version is the latest or how something has changed over time.

Versioning is a common practice in various aspects of technology and everyday life, like when your phone apps or computer programs get updates. Each time there's a change, they give it a new version number, like Chrome 97 or Instagram 6.2.1. This number shows what's new and helps everyone understand what's happening.

Think about your phone, laptop, or router - they have special software in them. These devices receive firmware updates to enhance performance, and security, or add new features. Firmware versions, like iOS 15.2 for iPhones or Android 12 for some other phones, are used to distinguish between different software releases for the device's internal components. These names show what's new in the software inside your devices.

Semantic versioning is a versioning scheme used in software development to make meaning about the underlying changes in a piece of software or guidelines for what is happening in a release. A semantic version number has three core parts, written in the form of x.y.z, where x, y, and z are numbers:

Major Version: When we increase the major version, it signifies that there are significant changes in this release that might not work with previous versions(Backward-incompatible). The way the software functions has been altered, and it could cause issues for users of the software.

After increasing the major number, we reset both the minor and patch versions to zero. For example, if we were upgrading from version 1.23.11, it would become version 2.0.0. This change indicates that the software has undergone major updates and might not be compatible with the older version.

Minor Version: We increase the minor version when introducing new features or improvements that don't disrupt or alter the current way the software works(Backward compatible). When we increase the minor version, we set the patch version back to zero.

This is done when you're making changes that don't break things and aren't related to fixing bugs. For example, if we were updating from version 1.23.11, it would become version 1.24.0. This indicates that new features or improvements have been added without causing issues or changing how it works.

Patch Version: We increment the patch version when making updates or fixes that correct issues and don't change or add new features. Raising the patch version signifies that we've resolved bugs without affecting the existing functionality(Backward compatible).

This is used for minor, non-disruptive fixes. For instance, if we were updating from version 1.23.11 to 1.23.12, it would mean that we've made small updates or bug fixes without introducing any new features or altering how the software operates.

In summary, versioning is crucial in tech to manage changes and features. Major versions bring big shifts, minor versions introduce non-disruptive improvements, and patch versions fix minor issues. Embracing versioning keeps us updated and secure in our tech-driven world.