Posted: February 13, 2015
On Friday April 17, 2015 I will give a workshop called "How invariants help writing loops" at ProgSCon 2015 in London.
Here is the abstract of my presentation:
Software craftsmen must have many skills. If it comes to writing correct code, Test-Driven Development has received a lot of attention lately. In this talk an old technique for writing correct code is presented: invariants. Invariants can be used to prove the correctness of a loop after the loop has been written. It can also help writing a loop from scratch. Sander explains how starting from some idea an invariant can be formulated and how this invariant then helps writing the guard and the body of the loop. The explanation will not be formal or mathematical, but practical. It turns out that algorithms like Binary Search and Quicksort can be written down easily when starting from invariants. Invariants are a tool every software craftsman should know.
Bring your own laptop with your favorite IDE to this workshop so you can practice this technique yourself. Not planning to bring your laptop to the workshop? Then bring paper and pen instead!