2015-06-10

Minimizing Coupling, Brittleness, and Breakage Between Systems

I have found myself in several conversations recently with other technologists and portfolio companies regarding how to minimize coupling, brittleness, and breakage with software.  Typically I find the start of the answer in realizing where your "implementation contracts" exist.  These are usually at development seams, between:
  • internal components and/or systems
  • internal development teams
  • external and internal development teams
  • you and your customers
  • you and your vendors
  • you and your partners 

Kill Them With Clarity

Start with being precise and clear.  It is your responsibility to document your software, especially when someone else is using, let alone depending on, it.  If someone is consuming what your producing, picking up what you're laying down, then be clear with the expectations.

 Follow A System, Any System

Some kind of consistency, a standard if you will, goes a long way.  I'm (relatively) agnostic to which one you pick, just be sure it's (relatively) obvious and not arcane.

Don't Reinvent the Wheel

It's likely that your business involves building something that isn't versoining or implementation contracts - those are just necessary byproducts.  If this is the case, and just a means to a bigger end, then I'd like to suggest using Semantic Versioning (semver to the cool kids).  I find it to be very well thought-out, and addresses most concerns eloquently.

If you're willing to jump on the semver bus, then this might be a good place to start.

Semantic Versioning

The Spec. 

Authored by Tom Preston-Werner (ever use GitHub?), this is a quick read.  Be sure to read all sections, especially "Why Use Semantic Versioning?"  To his point, you are probably doing something "close to this already".  But this isn't horseshoes, nor hand-grenades - close isn't good enough.  You need compliance to some standard.
http://semver.org

The ~ and ^

Shift-Backtick and Shift-6 are confusing enough to find, you want to be clear with the differences before you start using them.  A great explanation between the tilde and caret operators here:
http://www.jakobm.com/semver-in-nodejs-and-npm

Pattern Examples

Check the "Commonly Seen semver Range Patterns" section here.
http://developer.telerik.com/featured/mystical-magical-semver-ranges-used-npm-bower/

MAJOR 0 = MAJORly Different

Be mindful of the MAJOR 0 (0.y.z) caveat with semver. Lot's of people bitch about this, but I think it's brilliant.  The point is that any zero-dot release has NO contract and may (should?) change at anytime.
https://nodesource.com/blog/semver-tilde-and-caret


Go Forward and Version

Try it.  For any dependency management I find this to be a very lightweight, easy to understand set of concepts and rules that work on systems, documents, software, hardware, recipes - you name it.

No comments: