SlideShare a Scribd company logo
1 of 62
Code Excellence
            for the
Average Programmer

  By Llewellyn Falco & Woody Zuill
How many are working
  with legacy code?




                 2
VS
Goal:
Simple Techniques
for Code Excellence
Project:
Charting Project




                   6
the golden rule
Leave things BETTER
than you found them
Never be more than 2 minutes away
 from checking in and going home
Arm Yourself
Arm Yourself
Tests
Arm Yourself
Tests
Tools
Arm Yourself
Tests
Tools
Patterns
What makes code
hard to work with?
Remove the 3 C’s...
Remove the 3 C’s...
   Clutter
Remove the 3 C’s...
   Clutter
   Complexity
Remove the 3 C’s...
   Clutter
   Complexity
   Cleverness
Removing Clutter
Definition : Clutter is anything in your code that does
                      not add value.
Removing Clutter
Definition : Clutter is anything in your code that does
                      not add value.



      Format your code
Removing Clutter
Definition : Clutter is anything in your code that does
                      not add value.



      Format your code
      Delete comments
Removing Clutter
Definition : Clutter is anything in your code that does
                      not add value.



      Format your code
      Delete comments
      Delete dead code
Removing Clutter
Definition : Clutter is anything in your code that does
                      not add value.



      Format your code
      Delete comments
      Delete dead code
      Delete unnecessary code
Removing Complexity
Removing Complexity
 Bad Names
Removing Complexity
 Bad Names
 Long Methods
Removing Complexity
 Bad Names
 Long Methods
 Deep Conditionals (if/for/while/switch)
Removing Complexity
 Bad Names
 Long Methods
 Deep Conditionals (if/for/while/switch)
 Magic Numbers
Removing Complexity
 Bad Names
 Long Methods
 Deep Conditionals (if/for/while/switch)
 Magic Numbers
 Improper Variable Scoping
Removing Complexity
 Bad Names
 Long Methods
 Deep Conditionals (if/for/while/switch)
 Magic Numbers
 Improper Variable Scoping
 Missing Encapsulation
Removing Complexity
 Bad Names
 Long Methods
 Deep Conditionals (if/for/while/switch)
 Magic Numbers
 Improper Variable Scoping
 Missing Encapsulation
 Obscure Code Blocks
Removing Cleverness
 “If it’s simple and elegant, you wouldn’t refer to it
                      as ‘clever’”
Removing Cleverness
 “If it’s simple and elegant, you wouldn’t refer to it
                      as ‘clever’”


   Cryptic Code
Removing Cleverness
 “If it’s simple and elegant, you wouldn’t refer to it
                      as ‘clever’”


   Cryptic Code
   Abbreviated Code
Removing Cleverness
 “If it’s simple and elegant, you wouldn’t refer to it
                      as ‘clever’”


  Cryptic Code
  Abbreviated Code
  Hijacking a Method(changing its intent for your
own purposes)
... and the 3 D’s
... and the 3 D’s
    Duplication
... and the 3 D’s
    Duplication
    Duplication
... and the 3 D’s
    Duplication
    Duplication
    Duplication
Our code base is just
a big mess, and no
one is happy working
in it.
Next Steps




:-)




             1-2
Next Steps
Spring Cleaning Week - Start
each task with 25 minutes of
cleaning with a co-worker.
:-)




                           1-2
Next Steps




             2-2
Next Steps
Books




             2-2
Next Steps
Books
‘Clean Code’ by Robert Martin




                                2-2
Next Steps
Books
‘Clean Code’ by Robert Martin
‘Working Effectively with
Legacy Code’ by Michael Feathers


                             2-2
What we offer
What we offer
• Day Classes on site
 •Single day class to educate & train employees
 on a single aspect of agile
What we offer
• Day Classes on site
    •Single day class to educate & train employees
    on a single aspect of agile

•   On site Coaching
    •Minimum 2 weeks working on site with
    employees on their stuff.
    •Training/Mentoring
    •Setup of framework
       •Source Control
       •Automated Builds
       •Continuous integration
       •Work environment
www.ApprovalTests.com
     check here for more information
   about how we actually tested the code
Contact

           Woody Zuill
          wzuill@yahoo.com



  Llewellyn Falco
   info@spunlabs.com
Goal:
Simple Techniques
for Code Excellence

More Related Content

Similar to Code Excellence for the Average Programmer

Agile latvia evening_unit_testing_in_practice
Agile latvia evening_unit_testing_in_practiceAgile latvia evening_unit_testing_in_practice
Agile latvia evening_unit_testing_in_practice
denis Udod
 
20191116 DevFest 2019 The Legacy Code came to stay (El legacy vino para queda...
20191116 DevFest 2019 The Legacy Code came to stay (El legacy vino para queda...20191116 DevFest 2019 The Legacy Code came to stay (El legacy vino para queda...
20191116 DevFest 2019 The Legacy Code came to stay (El legacy vino para queda...
Antonio de la Torre Fernández
 
How I Learned to Stop Worrying and Love Legacy Code.....
How I Learned to Stop Worrying and Love Legacy Code.....How I Learned to Stop Worrying and Love Legacy Code.....
How I Learned to Stop Worrying and Love Legacy Code.....
Mike Harris
 

Similar to Code Excellence for the Average Programmer (20)

Agile latvia evening_unit_testing_in_practice
Agile latvia evening_unit_testing_in_practiceAgile latvia evening_unit_testing_in_practice
Agile latvia evening_unit_testing_in_practice
 
20191116 DevFest 2019 The Legacy Code came to stay (El legacy vino para queda...
20191116 DevFest 2019 The Legacy Code came to stay (El legacy vino para queda...20191116 DevFest 2019 The Legacy Code came to stay (El legacy vino para queda...
20191116 DevFest 2019 The Legacy Code came to stay (El legacy vino para queda...
 
高品質軟體的基本動作 101 + 102 for NUU
高品質軟體的基本動作 101 + 102 for NUU高品質軟體的基本動作 101 + 102 for NUU
高品質軟體的基本動作 101 + 102 for NUU
 
Managing Complexity in Salesforce, David Felkel
Managing Complexity in Salesforce, David FelkelManaging Complexity in Salesforce, David Felkel
Managing Complexity in Salesforce, David Felkel
 
Technical Excellence Doesn't Just Happen--Igniting a Craftsmanship Culture
Technical Excellence Doesn't Just Happen--Igniting a Craftsmanship CultureTechnical Excellence Doesn't Just Happen--Igniting a Craftsmanship Culture
Technical Excellence Doesn't Just Happen--Igniting a Craftsmanship Culture
 
From keyboard to production
From keyboard to productionFrom keyboard to production
From keyboard to production
 
Building In Quality: The Beauty Of Behavior Driven Development (BDD)
Building In Quality: The Beauty Of Behavior Driven Development (BDD)Building In Quality: The Beauty Of Behavior Driven Development (BDD)
Building In Quality: The Beauty Of Behavior Driven Development (BDD)
 
Achieving Technical Excellence in Your Software Teams - from Devternity
Achieving Technical Excellence in Your Software Teams - from Devternity Achieving Technical Excellence in Your Software Teams - from Devternity
Achieving Technical Excellence in Your Software Teams - from Devternity
 
Code Quality Makes Your Job Easier
Code Quality Makes Your Job EasierCode Quality Makes Your Job Easier
Code Quality Makes Your Job Easier
 
How to become a .net debugging Jedi (.Net Summit, Minsk)
How to become a .net debugging Jedi (.Net Summit, Minsk)How to become a .net debugging Jedi (.Net Summit, Minsk)
How to become a .net debugging Jedi (.Net Summit, Minsk)
 
Clean Code Software Engineering
Clean Code Software Engineering Clean Code Software Engineering
Clean Code Software Engineering
 
Planning JavaScript and Ajax for larger teams
Planning JavaScript and Ajax for larger teamsPlanning JavaScript and Ajax for larger teams
Planning JavaScript and Ajax for larger teams
 
Software Quality via Unit Testing
Software Quality via Unit TestingSoftware Quality via Unit Testing
Software Quality via Unit Testing
 
Raising the Bar
Raising the BarRaising the Bar
Raising the Bar
 
“One man” development process model
“One man” development process model“One man” development process model
“One man” development process model
 
How I Learned to Stop Worrying and Love Legacy Code.....
How I Learned to Stop Worrying and Love Legacy Code.....How I Learned to Stop Worrying and Love Legacy Code.....
How I Learned to Stop Worrying and Love Legacy Code.....
 
Don't let your tests slow you down
Don't let your tests slow you downDon't let your tests slow you down
Don't let your tests slow you down
 
Developer Job in Practice
Developer Job in PracticeDeveloper Job in Practice
Developer Job in Practice
 
CQRS recepies
CQRS recepiesCQRS recepies
CQRS recepies
 
Real developers-dont-need-unit-tests
Real developers-dont-need-unit-testsReal developers-dont-need-unit-tests
Real developers-dont-need-unit-tests
 

More from Llewellyn Falco

More from Llewellyn Falco (20)

Lets connect linked_in
Lets connect linked_inLets connect linked_in
Lets connect linked_in
 
Test driven development done well
Test driven development done wellTest driven development done well
Test driven development done well
 
Do not use the greater than sign in programming
Do not use the greater than sign in programmingDo not use the greater than sign in programming
Do not use the greater than sign in programming
 
Cutting code quickly
Cutting code quicklyCutting code quickly
Cutting code quickly
 
The falco technical coaching framework
The falco technical coaching frameworkThe falco technical coaching framework
The falco technical coaching framework
 
Expressive objects
Expressive objectsExpressive objects
Expressive objects
 
Roi on learning hour
Roi on learning hourRoi on learning hour
Roi on learning hour
 
Mob programming
Mob programmingMob programming
Mob programming
 
Mob testing
Mob testingMob testing
Mob testing
 
Developing design sense of code smells
Developing design sense of code smellsDeveloping design sense of code smells
Developing design sense of code smells
 
10x
10x10x
10x
 
Strong Style Pairing
Strong Style PairingStrong Style Pairing
Strong Style Pairing
 
Exploratory and Unit Testing
Exploratory and Unit TestingExploratory and Unit Testing
Exploratory and Unit Testing
 
Increase testability with code seams
Increase testability with code seamsIncrease testability with code seams
Increase testability with code seams
 
Advanced unit testing
Advanced unit testingAdvanced unit testing
Advanced unit testing
 
The curse of knowledge
The curse of knowledgeThe curse of knowledge
The curse of knowledge
 
Approval testing from basic to advanced
Approval testing   from basic to advancedApproval testing   from basic to advanced
Approval testing from basic to advanced
 
Intentional code
Intentional codeIntentional code
Intentional code
 
Strategy agile games 2015
Strategy   agile games 2015Strategy   agile games 2015
Strategy agile games 2015
 
Getting existing code under tests
Getting existing code under testsGetting existing code under tests
Getting existing code under tests
 

Recently uploaded

EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
Earley Information Science
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
Joaquim Jorge
 

Recently uploaded (20)

Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonets
 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a Fresher
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivity
 
What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?
 
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
 
Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century education
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Script
 

Code Excellence for the Average Programmer