Code Quality
as a built-in process
By Elad Maimon
When to start with
code quality ?
When to start with
code quality ?
Quality
does not
s t a r t
after you
submit
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
Test Driven
Development
Why
automated
tests ?
It’s all about trust ...
our job is NOT to CODE
our job is NOT to TEST
we are software engineers
we SHIP software that
SOLVES 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

Code quality as a built-in process