Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.

Rocket Circus on Code Review

Related Audiobooks

Free with a 30 day trial from Scribd

See all
  • Be the first to comment

  • Be the first to like this

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

    Be the first to comment

    Login to see the comments

Views

Total views

707

On Slideshare

0

From embeds

0

Number of embeds

43

Actions

Downloads

3

Shares

0

Comments

0

Likes

0

×