Sam Ritchie

Share

Chief Codesplicer at Codesplice, Organiser of Perth iOS Developers
 samritchie.net
 @FakeSamRitchie

Sam has a background in .NET enterprise development, but now works mainly on mobile apps & cloud services. He’s been an Apple fanboy since the 80s, and was coding Objective-C before it was cool. He mainly develops in Swift & F# these days, and actively tries to avoid writing any JavaScript.

Sam runs the Perth-based software consulting company codesplice, and organises the Perth iOS developers meetup group.

YOW! West 2016 Perth

Quickly Checking your Code for Fun & Profit

TALK –  VIEW SLIDES WATCH VIDEO

Laziness is one of Larry Wall’s “three great virtues of a programmer”, but most people probably don’t consider it a virtue when writing tests! Wouldn’t it be great though, if we could write a program that generates our tests for us? As it turns out, we can and should do this using property-based testing.

I’ll go through some example testing scenarios in a few popular programming languages, aiming to demonstrate:

  • What property-based testing is and why EVERYONE should be using it (not just people coding in functional languages!)
  • How generators can quickly & easily come up with more thorough test inputs than a programmer typing in magic numbers
  • How to (and how not to) define properties to specify program behaviour
  • The genius of shrinkers and why they can save you hours of tedious debugging and questioning your life choices

Attendees will gain a solid & practical understanding of how they can apply property-based testing to their own code, in fashion that is both enjoyable and lucrative.