5. HowTo
• Challenge Assumptions
• Challenge Decisions
• Both in Design & Implementation
• Refer to Standards - at least some work of your own
• Play the Game (but do not forget the praise)
6. Strategy: Pre-Code
• Gather Requirements
• Identify Consumer
• Read the design spec
• Get a high-level code overview
• Use it (strict virtualenv separation)
7. Strategy: In-Code
• Multi-Pass Approach: One Objective per Pass
• 1st: Check Requirements coverage
8. 2. Standard Adherence
• Code style - PEP 8, parent project, in-module consistency
• Module design - namespaces, dir structure, entry points, etc.
• Global Documentation - narrative, entry points
• Packaging - setup, tests, dependencies, environmental dependencies
• Use of Standard Lib Modules - Logging, Config files, Unittest, etc.
9. 3. Error Handling
• Exceptions
• Propagate exceptions from 3rd party libs
• Create own types for own errors
• Kill the Pokemons
• Avoid User-facing Assertions
10. 4. Code Blocks
• Documentation: signature & return types, exceptions, semantic match
• Sensible defaults
• Partitioning / Block Length (aim for 10 LoC average)
• Mark Sub-Blocks thru empty lines
• KISS
• Transparent call chains
11. 5. Tests
• Coverage
• Check Environmental dependencies
• Reporting
• Test the tests