code review  jss, 2011-03-24
Announcements•   Follow rocketcirus on Twitter•   Deployment Circus next Monday
Methods•   Pair Programming / Over-the-shoulder•   Process driven human review•   Automatic Tools•   Not Testing
GoalsCode Critique:•   Uncover bugs•   Improve UX for downstream•   Higher quality software
HowTo•   Challenge Assumptions•   Challenge Decisions•   Both in Design & Implementation•   Refer to Standards - at least ...
Strategy: Pre-Code•   Gather Requirements•   Identify Consumer•   Read the design spec•   Get a high-level code overview• ...
Strategy: In-Code•   Multi-Pass Approach: One Objective per Pass•   1st: Check Requirements coverage
2. Standard Adherence•   Code style - PEP 8, parent project, in-module consistency•   Module design - namespaces, dir stru...
3. Error Handling•   Exceptions    •   Propagate exceptions from 3rd party libs    •   Create own types for own errors•   ...
4. Code Blocks•   Documentation: signature & return types, exceptions, semantic match•   Sensible defaults•   Partitioning...
5. Tests•   Coverage•   Check Environmental dependencies•   Reporting•   Test the tests
Restrisiko
Upcoming SlideShare
Loading in …5
×

Rocket Circus on Code Review

662 views

Published on

0 Comments
0 Likes
Statistics
Notes
  • Be the first to comment

  • Be the first to like this

No Downloads
Views
Total views
662
On SlideShare
0
From Embeds
0
Number of Embeds
43
Actions
Shares
0
Downloads
2
Comments
0
Likes
0
Embeds 0
No embeds

No notes for slide

Rocket Circus on Code Review

  1. 1. code review jss, 2011-03-24
  2. 2. Announcements• Follow rocketcirus on Twitter• Deployment Circus next Monday
  3. 3. Methods• Pair Programming / Over-the-shoulder• Process driven human review• Automatic Tools• Not Testing
  4. 4. GoalsCode Critique:• Uncover bugs• Improve UX for downstream• Higher quality software
  5. 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. 6. Strategy: Pre-Code• Gather Requirements• Identify Consumer• Read the design spec• Get a high-level code overview• Use it (strict virtualenv separation)
  7. 7. Strategy: In-Code• Multi-Pass Approach: One Objective per Pass• 1st: Check Requirements coverage
  8. 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. 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. 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. 11. 5. Tests• Coverage• Check Environmental dependencies• Reporting• Test the tests
  12. 12. Restrisiko

×