SlideShare a Scribd company logo
1 of 12
Download to read offline
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
Goals

Code Critique:

•   Uncover bugs

•   Improve UX for downstream

•   Higher quality software
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)
Strategy: Pre-Code

•   Gather Requirements

•   Identify Consumer

•   Read the design spec

•   Get a high-level code overview

•   Use it (strict virtualenv separation)
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 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.
3. Error Handling

•   Exceptions

    •   Propagate exceptions from 3rd party libs

    •   Create own types for own errors

•   Kill the Pokemons

•   Avoid User-facing Assertions
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
5. Tests


•   Coverage

•   Check Environmental dependencies

•   Reporting

•   Test the tests
Restrisiko

More Related Content

Viewers also liked

Delilah Panio - 2012 Un-Resume
Delilah Panio - 2012 Un-ResumeDelilah Panio - 2012 Un-Resume
Delilah Panio - 2012 Un-ResumeDelilahPanio
 
Unit 6 miriam rodríguez
Unit 6 miriam rodríguezUnit 6 miriam rodríguez
Unit 6 miriam rodríguezlola caravaca
 
Pets company
Pets companyPets company
Pets companykysjw24
 
The minerals jessica
The minerals jessicaThe minerals jessica
The minerals jessicalola caravaca
 
Living things maria moya
Living things maria moyaLiving things maria moya
Living things maria moyalola caravaca
 
Factories Presentation
Factories PresentationFactories Presentation
Factories PresentationManuel Azevedo
 
Presentación1. de gonzalo science
Presentación1. de gonzalo sciencePresentación1. de gonzalo science
Presentación1. de gonzalo sciencelola caravaca
 
Trade technocratspricelist
Trade technocratspricelistTrade technocratspricelist
Trade technocratspricelistgorin2008
 
2 study international at perspektywy march 2013
2  study   international at perspektywy march 20132  study   international at perspektywy march 2013
2 study international at perspektywy march 2013Ancestry Central
 
Unit 15 contemporary age
Unit 15 contemporary ageUnit 15 contemporary age
Unit 15 contemporary agelola caravaca
 
Thesis w notes_alimac
Thesis w notes_alimacThesis w notes_alimac
Thesis w notes_alimacalimac326
 
The economy mamartinez5b
The economy mamartinez5bThe economy mamartinez5b
The economy mamartinez5blola caravaca
 
Science unit8 electricity and magnetism berg
Science unit8 electricity and magnetism bergScience unit8 electricity and magnetism berg
Science unit8 electricity and magnetism berglola caravaca
 

Viewers also liked (20)

Delilah Panio - 2012 Un-Resume
Delilah Panio - 2012 Un-ResumeDelilah Panio - 2012 Un-Resume
Delilah Panio - 2012 Un-Resume
 
Unit 6 miriam rodríguez
Unit 6 miriam rodríguezUnit 6 miriam rodríguez
Unit 6 miriam rodríguez
 
Pets company
Pets companyPets company
Pets company
 
Catalogo deepgaming
Catalogo deepgamingCatalogo deepgaming
Catalogo deepgaming
 
The minerals jessica
The minerals jessicaThe minerals jessica
The minerals jessica
 
Living things maria moya
Living things maria moyaLiving things maria moya
Living things maria moya
 
Factories Presentation
Factories PresentationFactories Presentation
Factories Presentation
 
Health and illness
Health and illnessHealth and illness
Health and illness
 
Presentación1. de gonzalo science
Presentación1. de gonzalo sciencePresentación1. de gonzalo science
Presentación1. de gonzalo science
 
Trade technocratspricelist
Trade technocratspricelistTrade technocratspricelist
Trade technocratspricelist
 
2 study international at perspektywy march 2013
2  study   international at perspektywy march 20132  study   international at perspektywy march 2013
2 study international at perspektywy march 2013
 
Catálogo web 2013
Catálogo web 2013Catálogo web 2013
Catálogo web 2013
 
Landscape in spain
Landscape in spainLandscape in spain
Landscape in spain
 
PyPy 1.5
PyPy 1.5PyPy 1.5
PyPy 1.5
 
Unit 15 contemporary age
Unit 15 contemporary ageUnit 15 contemporary age
Unit 15 contemporary age
 
Thesis w notes_alimac
Thesis w notes_alimacThesis w notes_alimac
Thesis w notes_alimac
 
The economy mamartinez5b
The economy mamartinez5bThe economy mamartinez5b
The economy mamartinez5b
 
The modern age
The modern ageThe modern age
The modern age
 
Presentation1
Presentation1Presentation1
Presentation1
 
Science unit8 electricity and magnetism berg
Science unit8 electricity and magnetism bergScience unit8 electricity and magnetism berg
Science unit8 electricity and magnetism berg
 

Similar to Rocket Circus on Code Review

Blackboard DevCon 2012 - Ensuring Code Quality
Blackboard DevCon 2012 - Ensuring Code QualityBlackboard DevCon 2012 - Ensuring Code Quality
Blackboard DevCon 2012 - Ensuring Code QualityNoriaki Tatsumi
 
Aliaksei Skobeleu "Taking Control Over Code Metrics"
Aliaksei Skobeleu "Taking Control Over Code Metrics"Aliaksei Skobeleu "Taking Control Over Code Metrics"
Aliaksei Skobeleu "Taking Control Over Code Metrics"LogeekNightUkraine
 
TDD and Related Techniques for Non Developers (2012)
TDD and Related Techniques for Non Developers (2012)TDD and Related Techniques for Non Developers (2012)
TDD and Related Techniques for Non Developers (2012)Peter Kofler
 
Mixing d ps building architecture on the cross cutting example
Mixing d ps building architecture on the cross cutting exampleMixing d ps building architecture on the cross cutting example
Mixing d ps building architecture on the cross cutting examplecorehard_by
 
Threat Modeling the CI/CD Pipeline to Improve Software Supply Chain Security ...
Threat Modeling the CI/CD Pipeline to Improve Software Supply Chain Security ...Threat Modeling the CI/CD Pipeline to Improve Software Supply Chain Security ...
Threat Modeling the CI/CD Pipeline to Improve Software Supply Chain Security ...Denim Group
 
Coding Standard And Code Review
Coding Standard And Code ReviewCoding Standard And Code Review
Coding Standard And Code ReviewMilan Vukoje
 
Slides for Houston iPhone Developers' Meetup (April 2012)
Slides for Houston iPhone Developers' Meetup (April 2012)Slides for Houston iPhone Developers' Meetup (April 2012)
Slides for Houston iPhone Developers' Meetup (April 2012)lqi
 
Capability Building for Cyber Defense: Software Walk through and Screening
Capability Building for Cyber Defense: Software Walk through and Screening Capability Building for Cyber Defense: Software Walk through and Screening
Capability Building for Cyber Defense: Software Walk through and Screening Maven Logix
 
Enter the mind of an Agile Developer
Enter the mind of an Agile DeveloperEnter the mind of an Agile Developer
Enter the mind of an Agile DeveloperBSGAfrica
 
Quality metrics and angular js applications
Quality metrics and angular js applicationsQuality metrics and angular js applications
Quality metrics and angular js applicationsnadeembtech
 
Unit Testing in JavaScript
Unit Testing in JavaScriptUnit Testing in JavaScript
Unit Testing in JavaScriptRob Scaduto
 
Open Chemistry: Input Preparation, Data Visualization & Analysis
Open Chemistry: Input Preparation, Data Visualization & AnalysisOpen Chemistry: Input Preparation, Data Visualization & Analysis
Open Chemistry: Input Preparation, Data Visualization & AnalysisMarcus Hanwell
 

Similar to Rocket Circus on Code Review (20)

Blackboard DevCon 2012 - Ensuring Code Quality
Blackboard DevCon 2012 - Ensuring Code QualityBlackboard DevCon 2012 - Ensuring Code Quality
Blackboard DevCon 2012 - Ensuring Code Quality
 
Aliaksei Skobeleu "Taking Control Over Code Metrics"
Aliaksei Skobeleu "Taking Control Over Code Metrics"Aliaksei Skobeleu "Taking Control Over Code Metrics"
Aliaksei Skobeleu "Taking Control Over Code Metrics"
 
TDD and Related Techniques for Non Developers (2012)
TDD and Related Techniques for Non Developers (2012)TDD and Related Techniques for Non Developers (2012)
TDD and Related Techniques for Non Developers (2012)
 
Case study
Case studyCase study
Case study
 
Interactive SDLC
Interactive SDLCInteractive SDLC
Interactive SDLC
 
Mixing d ps building architecture on the cross cutting example
Mixing d ps building architecture on the cross cutting exampleMixing d ps building architecture on the cross cutting example
Mixing d ps building architecture on the cross cutting example
 
CNUG TDD June 2014
CNUG TDD June 2014CNUG TDD June 2014
CNUG TDD June 2014
 
Threat Modeling the CI/CD Pipeline to Improve Software Supply Chain Security ...
Threat Modeling the CI/CD Pipeline to Improve Software Supply Chain Security ...Threat Modeling the CI/CD Pipeline to Improve Software Supply Chain Security ...
Threat Modeling the CI/CD Pipeline to Improve Software Supply Chain Security ...
 
Coding Standard And Code Review
Coding Standard And Code ReviewCoding Standard And Code Review
Coding Standard And Code Review
 
Code Review for iOS
Code Review for iOSCode Review for iOS
Code Review for iOS
 
Slides for Houston iPhone Developers' Meetup (April 2012)
Slides for Houston iPhone Developers' Meetup (April 2012)Slides for Houston iPhone Developers' Meetup (April 2012)
Slides for Houston iPhone Developers' Meetup (April 2012)
 
SonarQube
SonarQubeSonarQube
SonarQube
 
Capability Building for Cyber Defense: Software Walk through and Screening
Capability Building for Cyber Defense: Software Walk through and Screening Capability Building for Cyber Defense: Software Walk through and Screening
Capability Building for Cyber Defense: Software Walk through and Screening
 
Enter the mind of an Agile Developer
Enter the mind of an Agile DeveloperEnter the mind of an Agile Developer
Enter the mind of an Agile Developer
 
Quality metrics and angular js applications
Quality metrics and angular js applicationsQuality metrics and angular js applications
Quality metrics and angular js applications
 
Functional Tests. PHP Unconf 2016
Functional Tests. PHP Unconf 2016Functional Tests. PHP Unconf 2016
Functional Tests. PHP Unconf 2016
 
Node.js architecture (EN)
Node.js architecture (EN)Node.js architecture (EN)
Node.js architecture (EN)
 
Unit Testing in JavaScript
Unit Testing in JavaScriptUnit Testing in JavaScript
Unit Testing in JavaScript
 
Open Chemistry: Input Preparation, Data Visualization & Analysis
Open Chemistry: Input Preparation, Data Visualization & AnalysisOpen Chemistry: Input Preparation, Data Visualization & Analysis
Open Chemistry: Input Preparation, Data Visualization & Analysis
 
Building XWiki
Building XWikiBuilding XWiki
Building XWiki
 

More from rocketcircus

More from rocketcircus (7)

Pytables
PytablesPytables
Pytables
 
Descriptor Protocol
Descriptor ProtocolDescriptor Protocol
Descriptor Protocol
 
Descriptor Protocol
Descriptor ProtocolDescriptor Protocol
Descriptor Protocol
 
Python Academy
Python AcademyPython Academy
Python Academy
 
intro to scikits.learn
intro to scikits.learnintro to scikits.learn
intro to scikits.learn
 
AWS Quick Intro
AWS Quick IntroAWS Quick Intro
AWS Quick Intro
 
Message Queues
Message QueuesMessage Queues
Message Queues
 

Rocket Circus on Code Review

  • 1. code review jss, 2011-03-24
  • 2. Announcements • Follow rocketcirus on Twitter • Deployment Circus next Monday
  • 3. Methods • Pair Programming / Over-the-shoulder • Process driven human review • Automatic Tools • Not Testing
  • 4. Goals Code Critique: • Uncover bugs • Improve UX for downstream • Higher quality software
  • 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