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

Architecting Cloud Native Applications
Architecting Cloud Native ApplicationsArchitecting Cloud Native Applications
Architecting Cloud Native Applications
WSO2
 
Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire business
panagenda
 

Recently uploaded (20)

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
 
Architecting Cloud Native Applications
Architecting Cloud Native ApplicationsArchitecting Cloud Native Applications
Architecting Cloud Native Applications
 
WSO2 Micro Integrator for Enterprise Integration in a Decentralized, Microser...
WSO2 Micro Integrator for Enterprise Integration in a Decentralized, Microser...WSO2 Micro Integrator for Enterprise Integration in a Decentralized, Microser...
WSO2 Micro Integrator for Enterprise Integration in a Decentralized, Microser...
 
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
 
TEST BANK For Principles of Anatomy and Physiology, 16th Edition by Gerard J....
TEST BANK For Principles of Anatomy and Physiology, 16th Edition by Gerard J....TEST BANK For Principles of Anatomy and Physiology, 16th Edition by Gerard J....
TEST BANK For Principles of Anatomy and Physiology, 16th Edition by Gerard J....
 
Artificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyArtificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : Uncertainty
 
Platformless Horizons for Digital Adaptability
Platformless Horizons for Digital AdaptabilityPlatformless Horizons for Digital Adaptability
Platformless Horizons for Digital Adaptability
 
Corporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptxCorporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptx
 
AWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of Terraform
 
Mcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot Model
Mcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot ModelMcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot Model
Mcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot Model
 
Decarbonising Commercial Real Estate: The Role of Operational Performance
Decarbonising Commercial Real Estate: The Role of Operational PerformanceDecarbonising Commercial Real Estate: The Role of Operational Performance
Decarbonising Commercial Real Estate: The Role of Operational Performance
 
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost SavingRepurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
 
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin WoodPolkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
 
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
 
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
 
DBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor PresentationDBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor Presentation
 
CNIC Information System with Pakdata Cf In Pakistan
CNIC Information System with Pakdata Cf In PakistanCNIC Information System with Pakdata Cf In Pakistan
CNIC Information System with Pakdata Cf In Pakistan
 
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ..."I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
 
Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire business
 
MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024
 

Code Excellence for the Average Programmer