learning-it by example

Back to the video

Spec-Driven Development: Write the Spec First

A quick first try passed 1 of 7 spec rules; code written to the spec passed 7 of 7.

Video #180 ยท AI coding and productivity

Steps in the video

  1. 0:00 A quick first try passed 1 of 7 spec rules. Written to the spec, 7 of 7.
  2. 0:29 The idea
  3. 1:08 Setup
  4. 1:29 The spec
  5. 2:13 Read the spec
  6. 2:24 Each rule becomes a check
  7. 2:45 A quick first try
  8. 2:56 Written to the spec
  9. 3:19 Run it
  10. 3:54 What this does not show
  11. 4:34 Mistakes to avoid
  12. 5:19 My take and next steps
  13. 5:58 Recap

Files

  • check.py (22 lines)
  • first_try.py (5 lines)
  • run.py (14 lines)
  • slug.py (15 lines)
  • spec.txt (12 lines)

Download the code (zip)

Tested with

Python 3.12.15

What this does not show

Both versions of the function are hand-written for this video; no assistant wrote any code, so this does not test how well an assistant follows a spec.

Sources

Learning IT by Example.