Upgrade to Pro — share decks privately, control downloads, hide ads and more …

unBreakABLE: Better Software Through Semantic Versioning

Dusty Burwell
September 01, 2018

unBreakABLE: Better Software Through Semantic Versioning

When Kimmy first poked her head out of that bunker a lot had changed in the world around her. Armed with only the finest cultural memes of the late 90's, she stepped out of the bunker and into her new life. Lucky for Kimmy, people are adaptable and are able to absorb a few cultural version changes pretty easily. Despite the prefix, software is rarely so flexible.

Semantic versioning has introduced a whole new way to think about what version numbers mean. Properly practiced, semantic version numbers communicate a lot about what's going on in a given software release. When consuming a library or framework, what can you learn from their version number? On the flip side, how can you properly release semantically versioned code? What is a breaking change? What is a deprecation? Leaving this talk you'll have a solid understanding of what it means to establish public contracts for your code, how to go about properly versioning those contracts, and even test to be sure you're adhering to them. As a library consumer, you should walk away from this talk better suited to deal with changes to your dependencies and poised to make your applications unBreakABLE.

Dusty Burwell

September 01, 2018
Tweet

More Decks by Dusty Burwell

Other Decks in Technology

Transcript

  1. MAJOR BIG FEATURES WHEN MARKETING SAYS .REVISION .HOT FIXES .BUILD

    .EVERY BUILD .MINOR .SMALL FEATURES .LITERALLY ALWAYS ZERO .EVERY BUILD .WHEN THE LEAD DEVELOPER SAYS
  2. public class Calculator { // Subtracts b from a public

    int sub(int a, int b) { return b - a; } }
  3. public class Calculator { // Subtracts b from a public

    int sub(int a, int b) { return a - b; } }
  4. public class Calculator { public int add(int a, int b)

    { return a + b; } public int sub(int a, int b) { return a - b; } }
  5. public class Calculator { public int add(int a, int b)

    { return a + b; } public int sub(int a, int b) { return a - b; } public int div(int a, int b) // New Function! { return a / b; } }
  6. public class Person { public FirstName { get; set; }

    public MiddleName { get; set; } // New Property! public LastName { get; set; } }
  7. var add = function(a, b) { return a + b;

    } var sub = function(a, b) { return a - b; } module.exports = { add: add, sub: sub }
  8. var add = function(a, b, c) { if (!c) {

    c = 0; } return a + b + c; } var sub = function(a, b) { return a - b; } module.exports = { add: add, sub: sub }
  9. public class Calculator { public int add(int a, int b)

    { return a + b; } [System.Obsolete("Just use `-`")] public int sub(int a, int b) { return a - b; } }
  10. public class Person { public FirstName { get; set; }

    [System.Obsolete("I hate my middle name")] public MiddleName { get; set; } public LastName { get; set; } }
  11. var add = function(a, b) { return a + b;

    } var sub = function(a, b) { return a - b; } module.exports = { add: add, sub: util.deprecate(sub, "Just use `-`") }
  12. var add = function(a, b, c) { if (!c) {

    Console.warn("Two addend `add` is deprecated"); c = 0; } return a + b + c; } var sub = function(a, b) { return a - b; } module.exports = { add: add, sub: sub }
  13. var b1 = Buffer.from(“test”); var b2 = Buffer.from([1,2,3]); var b3

    = Buffer.alloc(16); var b4 = Buffer.allocUnsafe(16);