Reading 6: Specifications
Specifications are the linchpin of teamwork. It’s impossible to delegate responsibility for implementing a function without a specification. The specification acts as a contract: the implementer is responsible for meeting the contract, and a client that uses the function can rely on the contract. In fact, we’ll see that like real legal contracts, specifications place demands on both parties: when the specification has a precondition, the client has responsibilities too.
Reading 6: Specifications Reading 6: Specifications Software in 6.031 Safe from bugs Easy to understand Ready for change Correct today and correct in the unknown future. Communicating clearly with future programmers, including future you. Designed to accommodate change without rewriting. Objectives Understand preconditions and postconditions in function specifications, and be able to write correct specifications Be able to write tests against a specification Understand how to use exceptions Introduction Specifications are the linchpin of teamwork. It’s impossible to delegate responsibility for
Explore this link on the map →related reading
- Reading 4: Specificationsweb.mit.edu
- Reading 7: Designing Specificationsweb.mit.edu
- Reading 5: Designing Specificationsweb.mit.edu
- P2900R13.pdfisocpp.org
- p2899r0.pdfopen-std.org
- Would you fly on an AI-coded plane | Hackle's bloghacklewayne.com
- CSC 151 - Documenting Your Codeeikmeier.sites.grinnell.edu
- Defining Shared Behavior with Traits - The Rust Programming Languagedoc.rust-lang.org
- AddyOsmani.com - How to write a good spec for AI agentsaddyosmani.com
- Reading 3: Testingweb.mit.edu
- The Joel Test: 12 Steps to Better Code – Joel on Softwarejoelonsoftware.com
- Problem Set 1: Flashcardsweb.mit.edu