code quality as a built-in process
TRANSCRIPT
Code Qualityas a built-in process
By Elad Maimon
When to start with code quality ?
When to start with code quality ?
Qualitydoes nots t a r tafter yous u b m i t
PAIR PROGRAMMING
What is pair programming ?
What is pair programming ?
1 monitor
What is pair programming ?
1 monitor
1 keyboard
What is pair programming ?
1 monitor
1 keyboard
1 mouse
What is pair programming ?
1 monitor
1 keyboard
1 mouse
What is pair programming ?
1 monitor
1 keyboard
1 mouse
2 developers
Driver Navigator Tactician Strategist
switch frequently...
Pros
Higher code quality
Pros
Higher code quality
Pros
Encourage discussions
Higher code quality
Pros
Encourage discussions
Knowledge sharing
Higher code quality
Pros
Encourage discussions
Knowledge sharing
Shared code ownership
Higher code quality
Pros
Encourage discussions
Knowledge sharing
Shared code ownership
Teaching tool
Higher code quality
Pros
Encourage discussions
Knowledge sharing
Shared code ownership
Focus
Teaching tool
1 + 1 > 2 ?
Might reduce creativity
1 + 1 > 2 ?
Reduce independency
Might reduce creativity
1 + 1 > 2 ?
Reduce independency
Might reduce creativity
1 + 1 > 2 ?
Soloist teammate
- Be stubborn
- Get attached to your code
- Dominate
- Distract yourself
- Late
- Overuse
DOs DONTs- Find proper environment
- Talk a lot
- Postpone hard decisions
- Take shared breaks
- Switch roles frequently
- Switch pairs often
T e s t D r i v e n Development
Why
automated
tests ?
It’s all about t r u s t ...
o u r j o b i s N O T t o C OD Eo u r j o b i s N O T t o T E S Twe are software engineersw e S H I P s of t w a r e t ha tSOLVES problems. (Uri Nativ)
TDD & BDD
Who writes this ?
Code Reviews
Online vs.
Formal
WHEN ?
Every line of code!
WHAT ?
Search for...
Search for...
Bugs
Search for...
Bugs Design
Search for...
Bugs Design Requirements
Bugs Design Requirements
UI
Bugs Design Requirements
UI Readability
Bugs Design Requirements
UI Readability Styleguide
Code comments...
Code comments...
documentation = { how: “code”, why: “comments”}
# TODO documents ?
Self documenting code➭ Function and variable names➭ Naming conventions
Self documenting code➭ Function and variable names➭ Naming conventions
This:
Self documenting code➭ Function and variable names➭ Naming conventions
vs. This:
This:
- Write extensive commit comment
- Split to short commits
- Don’t get attached to your code
- Understand the reviewer is a better reference to readability than you
Reviewer Reviewee- Don’t insist on perfect
solution
- Different approaches are OK
- Ask for explanations
- Separate faults that are not “NO GO” ( open ticket )
- Don’t argue back and forth more than twice - talk F2F