Daily Habits of
Highly Agile Developers
Nitin Bhide
http://thinkingcraftsman.in
19th Aug 2018
Disclaimer
 All the habits/suggestions are backed up theory,
anecdotal evidence and research.
 I practice what I preach. I have followed these
practices in my coding everyday for last 25 years.
 These are NOT myths, urban legends and common
practices followed without thought.
 No animals were harmed in developing these ideas (I
am not sure about Developers)
WHY AGILE WORKS ?
Lets start with a Fundamental Question
Relative Cost of Fixing Defects
WRONG
Cost of Fixing a Defect
Cost
TimeError Introduced
Depends on distance between
‘defect introduced’ to ‘defect fixed’
August 18 5
Do not fall for the illusion that by preventing errors, you
won’t have errors to fix. The truth is, the cost of
preventing errors is often far greater than the cost of
fixing them.
- Ed Catmull, Creativity, Inc.
Minimizing Cost of Defects
 Focus on reducing the distance between defect
introduced to defect fixed
 Use Techniques to detect defect as quickly as possible
(FAIL IMMEDIATLEY AND VISIBLY)
 Once the defect detected/reported, FIX IT
IMMEDIATELY
HOW TO FAIL FAST DAILY ?
How to fail fast daily ?
 What are the ways by which you can “reduce the
distance” between “coding defect introduced to
coding defect detected” especially in newly written
code?
◦ Of course once the defect is detected you have to fix it
immediately to get real benefits
 What are the ways by which you can make it easy to
‘detect newly introduced defect’
CODE WITH ZERO WARNING AND
ZERO STATIC ANALYSIS ERRORS
Compiler Warnings and Static
Analysis Errors
 What is warning level in your module ?
 How many warnings are there in your code today ?
 Do you fix warnings immediately ?
 Warnings in a newly written code has ‘extremely low
distance of defect introduced to defected detected’ and
hence extremely low cost of fixing the defect.
Compiler Warnings
 Every generation of compiler improves on potential
problems detection.
 A Piece of Code with Zero Warnings usually has
extremely low incidences of coding bugs.
 Compiler Warnings and Static Analysis Errors MUST
BE FIXED WITHIN A DAY
COMMIT EARLY AND COMMIT
OFTEN
Commit Your Code Changes Frequently
 Commit your code changes ‘frequently’
◦ At least twice a day
◦ 10 times a day or more is perfectly fine
 Key Purpose of Version Control is allow you quickly
recover from mistakes.
 DO NOT INSIST MANUALLY REVIEWING EVERY
CODE COMMIT
MANUAL CODE REVIEWS ARE
OVERRATED
Minimize Manual Code Reviews
 Code Review checklists DON’T work
 Typical Manual Code Review process results in ‘FAIL
LATER”.
SMALL FUNCTIONS
Small Functions
 Entire function should be visible without any Page
UP/Down
◦ Approx. 25 lines (max)
 Because entire function is visible it is much more easier to
understand impact of newly added code.
◦ Automatically reduces code complexity
◦ Reduces number of returns in a function (makes easier to write
error handling)
◦ Reduces code duplication
◦ Properly Naming function results in easier ‘debugging’ as logic is
automatically documented in sequence of function names
Small Function
 In 1950, G. A. Miller’s experimental results suggested
that humans are generally able to hold only seven
plus or minus two units of information in short-
term memory.
 These limits impact the debugging capacity/skills of
developers.
◦ For developer it is difficult to analyse the impact a change if
code complexity is greater than 7.
◦ Small functions automatically limit the complexity
 Great Code is like a Beautiful Zen Garden. You have to
do small things (like weeding and watering) everyday to
get beautiful garden.
 You have to do these small things ‘unconsciously’. It
should become habit.
 Try it for 1 month and then for 3 month. And
see the difference in your own code.
Contact
Feel free to email me at
nitinbhide@thinkingcraftsman.in
Aug-18 Commercial in Confidence (C) Nitin Bhide 26

Daily Habits Of Highly Agile Developers

  • 1.
    Daily Habits of HighlyAgile Developers Nitin Bhide http://thinkingcraftsman.in 19th Aug 2018
  • 2.
    Disclaimer  All thehabits/suggestions are backed up theory, anecdotal evidence and research.  I practice what I preach. I have followed these practices in my coding everyday for last 25 years.  These are NOT myths, urban legends and common practices followed without thought.  No animals were harmed in developing these ideas (I am not sure about Developers)
  • 3.
    WHY AGILE WORKS? Lets start with a Fundamental Question
  • 4.
    Relative Cost ofFixing Defects WRONG
  • 5.
    Cost of Fixinga Defect Cost TimeError Introduced Depends on distance between ‘defect introduced’ to ‘defect fixed’ August 18 5
  • 6.
    Do not fallfor the illusion that by preventing errors, you won’t have errors to fix. The truth is, the cost of preventing errors is often far greater than the cost of fixing them. - Ed Catmull, Creativity, Inc.
  • 7.
    Minimizing Cost ofDefects  Focus on reducing the distance between defect introduced to defect fixed  Use Techniques to detect defect as quickly as possible (FAIL IMMEDIATLEY AND VISIBLY)  Once the defect detected/reported, FIX IT IMMEDIATELY
  • 8.
    HOW TO FAILFAST DAILY ?
  • 9.
    How to failfast daily ?  What are the ways by which you can “reduce the distance” between “coding defect introduced to coding defect detected” especially in newly written code? ◦ Of course once the defect is detected you have to fix it immediately to get real benefits  What are the ways by which you can make it easy to ‘detect newly introduced defect’
  • 10.
    CODE WITH ZEROWARNING AND ZERO STATIC ANALYSIS ERRORS
  • 11.
    Compiler Warnings andStatic Analysis Errors  What is warning level in your module ?  How many warnings are there in your code today ?  Do you fix warnings immediately ?  Warnings in a newly written code has ‘extremely low distance of defect introduced to defected detected’ and hence extremely low cost of fixing the defect.
  • 12.
    Compiler Warnings  Everygeneration of compiler improves on potential problems detection.  A Piece of Code with Zero Warnings usually has extremely low incidences of coding bugs.  Compiler Warnings and Static Analysis Errors MUST BE FIXED WITHIN A DAY
  • 13.
    COMMIT EARLY ANDCOMMIT OFTEN
  • 14.
    Commit Your CodeChanges Frequently  Commit your code changes ‘frequently’ ◦ At least twice a day ◦ 10 times a day or more is perfectly fine  Key Purpose of Version Control is allow you quickly recover from mistakes.  DO NOT INSIST MANUALLY REVIEWING EVERY CODE COMMIT
  • 15.
    MANUAL CODE REVIEWSARE OVERRATED
  • 16.
    Minimize Manual CodeReviews  Code Review checklists DON’T work  Typical Manual Code Review process results in ‘FAIL LATER”.
  • 17.
  • 18.
    Small Functions  Entirefunction should be visible without any Page UP/Down ◦ Approx. 25 lines (max)  Because entire function is visible it is much more easier to understand impact of newly added code. ◦ Automatically reduces code complexity ◦ Reduces number of returns in a function (makes easier to write error handling) ◦ Reduces code duplication ◦ Properly Naming function results in easier ‘debugging’ as logic is automatically documented in sequence of function names
  • 19.
    Small Function  In1950, G. A. Miller’s experimental results suggested that humans are generally able to hold only seven plus or minus two units of information in short- term memory.  These limits impact the debugging capacity/skills of developers. ◦ For developer it is difficult to analyse the impact a change if code complexity is greater than 7. ◦ Small functions automatically limit the complexity
  • 20.
     Great Codeis like a Beautiful Zen Garden. You have to do small things (like weeding and watering) everyday to get beautiful garden.  You have to do these small things ‘unconsciously’. It should become habit.  Try it for 1 month and then for 3 month. And see the difference in your own code.
  • 21.
    Contact Feel free toemail me at nitinbhide@thinkingcraftsman.in Aug-18 Commercial in Confidence (C) Nitin Bhide 26

Editor's Notes

  • #15 Purpose of “Breaks in Car” is to allow you to go faster