Save Big on Coursera Plus. 7,000+ courses at $160 off. Limited Time Only!
Explore the power of contracts in programming through this 37-minute conference talk from Strange Loop. Learn how contracts allow for expressing preconditions, postconditions, and internal invariants as code, enhancing documentation and runtime checks. Discover the complementary nature of contracts to types and their ability to express complex conditions. Compare contracts to dependent types and unit testing, and understand their value in teaching correct programming across paradigms. Examine the Java Modelling Language (JML) and C0, a simplified version for introductory data structures. Gain insights into using contracts to improve algorithm writing and test development. Witness a real-world application of JML in diagnosing and fixing a bug in java.utils.Collection.sort(). Follow along as Rob Simmons covers topics including the Leap, the Gap, contracts in functional languages, Fibonacci implementation, loop invariants, compile-time guarantees, and Timsort.