Think About What You Are Doing
Code must be as simple as possible, but no simpler
- Meet Customer Need
- Easy To Maintain (same as: Easy To Test)
- Clearly Express Intent
- No Duplicate Code
- Concise As Possible
Tests must be useful
- Fail if the application does not meet the customer need
- Succeed if the application does meet the customer need
- Provide timely feedback
Earlier Feedback is Better
- Instant
- Compile
- Logic Test
- Boundary Test
- Other Automated Test
- Manual Test
- Customer Feedback
Exception Handling
- The code's signature should document its contract
- Throw an exception if and only if the code cannot fulfill its contract
- Only catch exceptions with code that knows how to handle them
- flowchart
Strive for 10 Minute Iterations
- write a failing test
- get the test to pass
- commit
- refactor for simplicity
- commit
My paraphrasing of CRISP builds from the book Pragmatic Project Automation
- Complete
- all prerequisites built in
- Repeatable
- produce the same results at a later time
- Informative
- failures accurately provide relevant information
- Scheduled
- Portable
- same result on different systems
Critical Thinking Resources
- The Character of Physical Law, by Richard Feynman
- On Liberty, by John Stuart Mill
The Black Cat Analogy
- Philosophy is like being in a dark room and looking for a black cat.
- Metaphysics is like being in a dark room and looking for a black cat that isn't there.
- Theology is like being in a dark room and looking for a black cat that isn't there and shouting, "I've found it!"
- Science is like being in a dark room and looking for a black cat using a flashlight.
Test Applications
Two separate one-jar applications running on different ports, made to appear as if they are one application on one port serving up two different paths