SlideShare a Scribd company logo
1 of 63
Download to read offline
The Benefit of Sneezing Code Into
an Editor vs Clean Code
#sneezingcode
joind.in/11457
@dave1010
Dave Hulbert
@dave1010
Dave Hulbert
The Benefit of Sneezing Code Into
an Editor vs Clean Code
The Benefit of Sneezing Code Into
an Editor vs Clean Code
The Benefit of Sneezing Code Into
an Editor vs Clean Code
Balance
Balance
Balance
Balance
Delivering fast is good
Good code is good
Analogy
Aims
●
How to run fast (in general)
●
How to sprint (sneeze)
●
How to run a marathon (clean code)
●
Why you should sprint
●
Why you should run a marathon
How to run fast (in general)
●
Developers
– Skilled, Passionate, Healthy, Focused, Disciplined
– (Relevant) conferences, user groups (hello)
– Read books, blogs, code
– Write code, Open Source contributions
How to run fast (in general)
●
Projects
– Good communication
– Good specifications / requirements
– Fast feedback
– Good clients
How to run slow (in general)
●
Complexity
– Code / System
●
Bad / slow / no tests
●
Bugs
●
Lack of investment
– Servers / Workstations / Software
How to run slow (in general)
●
Interruptions
●
Being blocked / waiting
●
Internal processes
●
Too many meetings
Aims
●
How to run fast (in general)
●
How to sprint (sneeze)
●
How to run a marathon (clean code)
●
Why you should sprint
●
Why you should run a marathon
How to sprint (sneeze)
●
What is sprinting?
How to sprint (sneeze)
●
Overtime
●
Ignore everything else
●
Reduce tests / testing
●
Reduce planning
●
Reduce communication
●
Outsource
●
Cut corners
●
Focus; don't improve tools / processes
●
Outsource
Technical Debt
●
What is technical debt?
Causes of technical debt
●
Deciding to release before it's ready
●
Deciding to use a RAD framework
●
Deciding to skip tests & documentation
●
Lack of understanding (requirements, code)
●
Premature optimisation
●
Software entropy
Consequences of technical debt
●
Interest; interest on interest
●
More time on maintenance
●
Less time on new features
●
Harder to estimate new features
●
Miss deadlines
Aims
●
How to run fast (in general)
●
How to sprint (sneeze)
●
How to run a marathon (clean code)
●
Why you should sprint
●
Why you should run a marathon
How to run a marathon
(clean code)
●
Non-code speed-ups: time & money
investment
– Staff training
– Tools and processes
– Planning / requirements
How to run a marathon
(clean code)
●
Clean Code (Uncle Bob)
– SOLID
●
TDD
– Run every bit of code that you write, ASAP
●
DDD
– Model the domain completely in PHP classes that
don't touch the UI, database or framework
Refactoring
Refactoring
●
Key to keeping up speed in big projects
●
Restructuring without changing behaviour
●
No direct measurable user benefit (not a user
story)
●
Makes it easier to read, understand, test,
change, add new features to
●
IDE makes refactoring easier
Refactoring
●
Inject dependencies
●
Decouple (fewer “use” statements)
●
Create interfaces to type hint to
●
Extract functions
●
Rename
●
Reduce cyclomatic complexity (number of
if/else/for/foreach/while/switch in a method)
●
Change depth of inheritance
Examples
●
Journey Planner
●
User API
Aims
●
How to run fast (in general)
●
How to sprint (sneeze)
●
How to run a marathon (clean code)
●
Why you should sprint
●
Why you should run a marathon
Why you should sprint
●
Help you deliver faster in the short term
●
Long term strategy
●
MVP (prove a theory)
●
Disposable prototype
Why you should sprint
●
Treat your servers like cattle, not pets
●
Sometimes code is similar
Examples
●
Laravel
– RAD framework
– Sacrifices SOLID code (a bit) for ease of use
– Static “facades” (instead of using injected
dependencies)
– $user->save() (instead of $userRepository-
>persist($user) )
Examples
●
WordPress
– “5 minute install”
– Low barrier to entry
– Lots of themes and plugins
Aims
●
How to run fast (in general)
●
How to sprint (sneeze)
●
How to run a marathon (clean code)
●
Why you should sprint
●
Why you should run a marathon
Why you should run a marathon
●
Technical debt is a risk
– Especially with big projects
●
Quality is valuable
●
Deliver faster in the long term
Aims
●
How to run fast (in general)
●
How to sprint (sneeze)
●
How to run a marathon (clean code)
●
Why you should sprint
●
Why you should run a marathon
Sprint vs Marathon
Sprint (example) Marathon (example)
Peripheral component (logs) Central component (DB)
Trivial (make a CSV) Complex (search algorithm)
Few consequences of bugs (game) Important (nuclear reactor)
Isolated (contact form) Reused (authentication)
Abandonable (migration script) Continued updates
One developer Big team
Time & money to pay technical debt
later
Long term delivery
Bonus: estimating
●
Estimates for new features need to include
refactoring
– (if you don't want to increase technical debt)
– Refactoring doesn't add perceived value so it's
hard to sell
●
Technical debt is expensive
– Sprint + paying technical debt interest costs more
than running a marathon + continual refactoring
Bonus: Testing
●
TDD is about running your code ASAP
●
Write a test when you fix a bug
●
Fix bugs before writing new code (The Joel
Test)
Wish list
●
A script to track TODOs over time (Jenkins?)
●
A tool that helps you decide whether to
sprint or run a marathon
Resources
●
Books that I've read at least a few chapters of
– Mythical Man-Month: Essays on Software Engineering,
Frederick Brooks
– Clean Code: A Handbook of Agile Software
Craftsmanship, Robert C Martin
– Implementing Domain-Driven Design, Vaughn Vernon
– Modernizing Legacy Applications In PHP, Paul M.
Jones
– More: http://amzn.to/Y29TAK
Resources
●
Refactoring http://refactoring.com/catalog/
●
Speed in Software Development
http://www.targetprocess.com/articles/spee
d-in-software-development.html
●
Technical debt
http://www.construx.com/10x_Software_Dev
elopment/Technical_Debt/
●
Images: HBO, Reddit, XKCD, the Internet
Thanks!
#sneezingcode
joind.in/11457
@dave1010
Dave Hulbert

More Related Content

What's hot

Елена Панина - Drupal performance testing. Тестирование производительности, м...
Елена Панина - Drupal performance testing. Тестирование производительности, м...Елена Панина - Drupal performance testing. Тестирование производительности, м...
Елена Панина - Drupal performance testing. Тестирование производительности, м...LEDC 2016
 
Agile vs Iterative vs Waterfall models
Agile vs Iterative vs Waterfall models Agile vs Iterative vs Waterfall models
Agile vs Iterative vs Waterfall models Marraju Bollapragada V
 
Viktor Voitenko "Deploy Practices of JS Application"
Viktor Voitenko "Deploy Practices of JS Application"Viktor Voitenko "Deploy Practices of JS Application"
Viktor Voitenko "Deploy Practices of JS Application"LogeekNightUkraine
 
Choosing right agile methodology for your project
Choosing right agile methodology for your projectChoosing right agile methodology for your project
Choosing right agile methodology for your projectPrabhat Sinha
 
Feature driven development
Feature driven developmentFeature driven development
Feature driven developmentKhanh Nguyen
 
Scrum Process Overview
Scrum Process OverviewScrum Process Overview
Scrum Process OverviewPaul Nguyen
 
Agile methodology and Scrum Framewwork
Agile methodology and Scrum FramewworkAgile methodology and Scrum Framewwork
Agile methodology and Scrum Framewworksalmanahmed368
 
Towards More Flexible Enterprise Information Systems
Towards More Flexible Enterprise Information SystemsTowards More Flexible Enterprise Information Systems
Towards More Flexible Enterprise Information SystemsCONFENIS 2012
 
Getting started with JBPM
Getting started with JBPMGetting started with JBPM
Getting started with JBPMGirish Bapat
 
Scrum an Agile Methodology
Scrum an Agile MethodologyScrum an Agile Methodology
Scrum an Agile MethodologyZahra Golmirzaei
 
Waterfall vs agile approach scrum framework and best practices in software d...
Waterfall vs agile approach  scrum framework and best practices in software d...Waterfall vs agile approach  scrum framework and best practices in software d...
Waterfall vs agile approach scrum framework and best practices in software d...Tayfun Bilsel
 
Testing strategy for agile projects updated
Testing strategy for agile projects updatedTesting strategy for agile projects updated
Testing strategy for agile projects updatedTharinda Liyanage
 

What's hot (20)

Елена Панина - Drupal performance testing. Тестирование производительности, м...
Елена Панина - Drupal performance testing. Тестирование производительности, м...Елена Панина - Drupal performance testing. Тестирование производительности, м...
Елена Панина - Drupal performance testing. Тестирование производительности, м...
 
Tdd and bdd
Tdd and bddTdd and bdd
Tdd and bdd
 
Agile vs Iterative vs Waterfall models
Agile vs Iterative vs Waterfall models Agile vs Iterative vs Waterfall models
Agile vs Iterative vs Waterfall models
 
Viktor Voitenko "Deploy Practices of JS Application"
Viktor Voitenko "Deploy Practices of JS Application"Viktor Voitenko "Deploy Practices of JS Application"
Viktor Voitenko "Deploy Practices of JS Application"
 
Algorithms
AlgorithmsAlgorithms
Algorithms
 
Choosing right agile methodology for your project
Choosing right agile methodology for your projectChoosing right agile methodology for your project
Choosing right agile methodology for your project
 
Agile Modeling
Agile ModelingAgile Modeling
Agile Modeling
 
Feature driven development
Feature driven developmentFeature driven development
Feature driven development
 
Scrum Process Overview
Scrum Process OverviewScrum Process Overview
Scrum Process Overview
 
Agile methodology and Scrum Framewwork
Agile methodology and Scrum FramewworkAgile methodology and Scrum Framewwork
Agile methodology and Scrum Framewwork
 
Scrum, agile process
Scrum, agile processScrum, agile process
Scrum, agile process
 
Overview of agile
Overview of agileOverview of agile
Overview of agile
 
TDD with Ruby
TDD with RubyTDD with Ruby
TDD with Ruby
 
Towards More Flexible Enterprise Information Systems
Towards More Flexible Enterprise Information SystemsTowards More Flexible Enterprise Information Systems
Towards More Flexible Enterprise Information Systems
 
Getting started with JBPM
Getting started with JBPMGetting started with JBPM
Getting started with JBPM
 
Agile methodology
Agile methodologyAgile methodology
Agile methodology
 
Scrum an Agile Methodology
Scrum an Agile MethodologyScrum an Agile Methodology
Scrum an Agile Methodology
 
Waterfall vs agile approach scrum framework and best practices in software d...
Waterfall vs agile approach  scrum framework and best practices in software d...Waterfall vs agile approach  scrum framework and best practices in software d...
Waterfall vs agile approach scrum framework and best practices in software d...
 
Presentation on Agile Testing
Presentation on Agile TestingPresentation on Agile Testing
Presentation on Agile Testing
 
Testing strategy for agile projects updated
Testing strategy for agile projects updatedTesting strategy for agile projects updated
Testing strategy for agile projects updated
 

Similar to The benefit of sneezing code into an editor vs clean code

Balancing Technical Debt and Clean Code
Balancing Technical Debt and Clean CodeBalancing Technical Debt and Clean Code
Balancing Technical Debt and Clean CodeDave Hulbert
 
Dealing With Legacy: The Real-World Experience
Dealing With Legacy: The Real-World ExperienceDealing With Legacy: The Real-World Experience
Dealing With Legacy: The Real-World ExperienceJakub Holy
 
How To Maintain Million Lines Of Open Source Code And Remain Sane or The Stor...
How To Maintain Million Lines Of Open Source Code And Remain Sane or The Stor...How To Maintain Million Lines Of Open Source Code And Remain Sane or The Stor...
How To Maintain Million Lines Of Open Source Code And Remain Sane or The Stor...Radovan Semancik
 
Indix Engineering Culture Code (2015)
Indix Engineering Culture Code (2015)Indix Engineering Culture Code (2015)
Indix Engineering Culture Code (2015)Rajesh Muppalla
 
HOW TO START (ANYTHING ABOUT CODE).pptx
HOW TO START (ANYTHING ABOUT CODE).pptxHOW TO START (ANYTHING ABOUT CODE).pptx
HOW TO START (ANYTHING ABOUT CODE).pptxssuser62b2da
 
Agile Methods and Data Warehousing (2016 update)
Agile Methods and Data Warehousing (2016 update)Agile Methods and Data Warehousing (2016 update)
Agile Methods and Data Warehousing (2016 update)Kent Graziano
 
CUHK CSCI 4140 2015 Spring Guest Lecture - Agile Development
CUHK CSCI 4140 2015 Spring Guest Lecture - Agile DevelopmentCUHK CSCI 4140 2015 Spring Guest Lecture - Agile Development
CUHK CSCI 4140 2015 Spring Guest Lecture - Agile DevelopmentWong Hoi Sing Edison
 
RandomTest - Random Software Integration Tests That Just Work for C/C++, Java...
RandomTest - Random Software Integration Tests That Just Work for C/C++, Java...RandomTest - Random Software Integration Tests That Just Work for C/C++, Java...
RandomTest - Random Software Integration Tests That Just Work for C/C++, Java...dcieslak
 
Keeping code clean
Keeping code cleanKeeping code clean
Keeping code cleanBrett Child
 
Prashant technical practices-tdd for xebia event
Prashant   technical practices-tdd for xebia eventPrashant   technical practices-tdd for xebia event
Prashant technical practices-tdd for xebia eventXebia India
 
Managing software projects & teams effectively
Managing software projects & teams effectivelyManaging software projects & teams effectively
Managing software projects & teams effectivelyAshutosh Agarwal
 
IFG for SAP Integration, webinar on Automated Testing
IFG for SAP Integration, webinar on Automated TestingIFG for SAP Integration, webinar on Automated Testing
IFG for SAP Integration, webinar on Automated TestingDaniel Graversen
 
[20160314][CUHK][CSCI4140]Life of an Agile Team]
[20160314][CUHK][CSCI4140]Life of an Agile Team][20160314][CUHK][CSCI4140]Life of an Agile Team]
[20160314][CUHK][CSCI4140]Life of an Agile Team]Wong Hoi Sing Edison
 
Clean application development (talk)
Clean application development (talk)Clean application development (talk)
Clean application development (talk)Adam Culp
 
Lean-Agile Development with SharePoint - Bill Ayers
Lean-Agile Development with SharePoint - Bill AyersLean-Agile Development with SharePoint - Bill Ayers
Lean-Agile Development with SharePoint - Bill AyersSPC Adriatics
 
On component interface
On component interfaceOn component interface
On component interfaceLaurence Chen
 
From class to architecture
From class to architectureFrom class to architecture
From class to architectureMarcin Hawraniak
 

Similar to The benefit of sneezing code into an editor vs clean code (20)

Balancing Technical Debt and Clean Code
Balancing Technical Debt and Clean CodeBalancing Technical Debt and Clean Code
Balancing Technical Debt and Clean Code
 
Dealing With Legacy: The Real-World Experience
Dealing With Legacy: The Real-World ExperienceDealing With Legacy: The Real-World Experience
Dealing With Legacy: The Real-World Experience
 
How To Maintain Million Lines Of Open Source Code And Remain Sane or The Stor...
How To Maintain Million Lines Of Open Source Code And Remain Sane or The Stor...How To Maintain Million Lines Of Open Source Code And Remain Sane or The Stor...
How To Maintain Million Lines Of Open Source Code And Remain Sane or The Stor...
 
Better java with design
Better java with designBetter java with design
Better java with design
 
Indix Engineering Culture Code (2015)
Indix Engineering Culture Code (2015)Indix Engineering Culture Code (2015)
Indix Engineering Culture Code (2015)
 
HOW TO START (ANYTHING ABOUT CODE).pptx
HOW TO START (ANYTHING ABOUT CODE).pptxHOW TO START (ANYTHING ABOUT CODE).pptx
HOW TO START (ANYTHING ABOUT CODE).pptx
 
Agile Methods and Data Warehousing (2016 update)
Agile Methods and Data Warehousing (2016 update)Agile Methods and Data Warehousing (2016 update)
Agile Methods and Data Warehousing (2016 update)
 
CUHK CSCI 4140 2015 Spring Guest Lecture - Agile Development
CUHK CSCI 4140 2015 Spring Guest Lecture - Agile DevelopmentCUHK CSCI 4140 2015 Spring Guest Lecture - Agile Development
CUHK CSCI 4140 2015 Spring Guest Lecture - Agile Development
 
Sdlc
SdlcSdlc
Sdlc
 
RandomTest - Random Software Integration Tests That Just Work for C/C++, Java...
RandomTest - Random Software Integration Tests That Just Work for C/C++, Java...RandomTest - Random Software Integration Tests That Just Work for C/C++, Java...
RandomTest - Random Software Integration Tests That Just Work for C/C++, Java...
 
Keeping code clean
Keeping code cleanKeeping code clean
Keeping code clean
 
Debugging 2013- Lars pedersen
Debugging 2013- Lars pedersenDebugging 2013- Lars pedersen
Debugging 2013- Lars pedersen
 
Prashant technical practices-tdd for xebia event
Prashant   technical practices-tdd for xebia eventPrashant   technical practices-tdd for xebia event
Prashant technical practices-tdd for xebia event
 
Managing software projects & teams effectively
Managing software projects & teams effectivelyManaging software projects & teams effectively
Managing software projects & teams effectively
 
IFG for SAP Integration, webinar on Automated Testing
IFG for SAP Integration, webinar on Automated TestingIFG for SAP Integration, webinar on Automated Testing
IFG for SAP Integration, webinar on Automated Testing
 
[20160314][CUHK][CSCI4140]Life of an Agile Team]
[20160314][CUHK][CSCI4140]Life of an Agile Team][20160314][CUHK][CSCI4140]Life of an Agile Team]
[20160314][CUHK][CSCI4140]Life of an Agile Team]
 
Clean application development (talk)
Clean application development (talk)Clean application development (talk)
Clean application development (talk)
 
Lean-Agile Development with SharePoint - Bill Ayers
Lean-Agile Development with SharePoint - Bill AyersLean-Agile Development with SharePoint - Bill Ayers
Lean-Agile Development with SharePoint - Bill Ayers
 
On component interface
On component interfaceOn component interface
On component interface
 
From class to architecture
From class to architectureFrom class to architecture
From class to architecture
 

More from Dave Hulbert

Redevelop 2019 - Debugging our biases and intuition in software development
Redevelop 2019 - Debugging our biases and intuition in software developmentRedevelop 2019 - Debugging our biases and intuition in software development
Redevelop 2019 - Debugging our biases and intuition in software developmentDave Hulbert
 
Human brains are stupid
Human brains are stupidHuman brains are stupid
Human brains are stupidDave Hulbert
 
Practical intro to PhpSpec
Practical intro to PhpSpecPractical intro to PhpSpec
Practical intro to PhpSpecDave Hulbert
 
PhpSpec: practical introduction
PhpSpec: practical introductionPhpSpec: practical introduction
PhpSpec: practical introductionDave Hulbert
 
Silex and Twig (PHP Dorset talk)
Silex and Twig (PHP Dorset talk)Silex and Twig (PHP Dorset talk)
Silex and Twig (PHP Dorset talk)Dave Hulbert
 
Bitcoin The cryptographic currency. Talk at BCBOMO6
Bitcoin The cryptographic currency. Talk at BCBOMO6Bitcoin The cryptographic currency. Talk at BCBOMO6
Bitcoin The cryptographic currency. Talk at BCBOMO6Dave Hulbert
 

More from Dave Hulbert (7)

Redevelop 2019 - Debugging our biases and intuition in software development
Redevelop 2019 - Debugging our biases and intuition in software developmentRedevelop 2019 - Debugging our biases and intuition in software development
Redevelop 2019 - Debugging our biases and intuition in software development
 
Human brains are stupid
Human brains are stupidHuman brains are stupid
Human brains are stupid
 
Practical intro to PhpSpec
Practical intro to PhpSpecPractical intro to PhpSpec
Practical intro to PhpSpec
 
PhpSpec: practical introduction
PhpSpec: practical introductionPhpSpec: practical introduction
PhpSpec: practical introduction
 
Silex and Twig (PHP Dorset talk)
Silex and Twig (PHP Dorset talk)Silex and Twig (PHP Dorset talk)
Silex and Twig (PHP Dorset talk)
 
Bitcoin The cryptographic currency. Talk at BCBOMO6
Bitcoin The cryptographic currency. Talk at BCBOMO6Bitcoin The cryptographic currency. Talk at BCBOMO6
Bitcoin The cryptographic currency. Talk at BCBOMO6
 
Base Homework
Base HomeworkBase Homework
Base Homework
 

Recently uploaded

A Deep Dive into Secure Product Development Frameworks.pdf
A Deep Dive into Secure Product Development Frameworks.pdfA Deep Dive into Secure Product Development Frameworks.pdf
A Deep Dive into Secure Product Development Frameworks.pdfICS
 
From Theory to Practice: Utilizing SpiraPlan's REST API
From Theory to Practice: Utilizing SpiraPlan's REST APIFrom Theory to Practice: Utilizing SpiraPlan's REST API
From Theory to Practice: Utilizing SpiraPlan's REST APIInflectra
 
Transformer Neural Network Use Cases with Links
Transformer Neural Network Use Cases with LinksTransformer Neural Network Use Cases with Links
Transformer Neural Network Use Cases with LinksJinanKordab
 
BusinessGPT - Security and Governance for Generative AI
BusinessGPT  - Security and Governance for Generative AIBusinessGPT  - Security and Governance for Generative AI
BusinessGPT - Security and Governance for Generative AIAGATSoftware
 
^Clinic ^%[+27788225528*Abortion Pills For Sale In harare
^Clinic ^%[+27788225528*Abortion Pills For Sale In harare^Clinic ^%[+27788225528*Abortion Pills For Sale In harare
^Clinic ^%[+27788225528*Abortion Pills For Sale In hararekasambamuno
 
Anypoint Code Builder - Munich MuleSoft Meetup - 16th May 2024
Anypoint Code Builder - Munich MuleSoft Meetup - 16th May 2024Anypoint Code Builder - Munich MuleSoft Meetup - 16th May 2024
Anypoint Code Builder - Munich MuleSoft Meetup - 16th May 2024MulesoftMunichMeetup
 
What is a Recruitment Management Software?
What is a Recruitment Management Software?What is a Recruitment Management Software?
What is a Recruitment Management Software?NYGGS Automation Suite
 
Software Engineering - Introduction + Process Models + Requirements Engineering
Software Engineering - Introduction + Process Models + Requirements EngineeringSoftware Engineering - Introduction + Process Models + Requirements Engineering
Software Engineering - Introduction + Process Models + Requirements EngineeringPrakhyath Rai
 
Weeding your micro service landscape.pdf
Weeding your micro service landscape.pdfWeeding your micro service landscape.pdf
Weeding your micro service landscape.pdftimtebeek1
 
The Evolution of Web App Testing_ An Ultimate Guide to Future Trends.pdf
The Evolution of Web App Testing_ An Ultimate Guide to Future Trends.pdfThe Evolution of Web App Testing_ An Ultimate Guide to Future Trends.pdf
The Evolution of Web App Testing_ An Ultimate Guide to Future Trends.pdfkalichargn70th171
 
Jax, FL Admin Community Group 05.14.2024 Combined Deck
Jax, FL Admin Community Group 05.14.2024 Combined DeckJax, FL Admin Community Group 05.14.2024 Combined Deck
Jax, FL Admin Community Group 05.14.2024 Combined DeckMarc Lester
 
UNI DI NAPOLI FEDERICO II - Il ruolo dei grafi nell'AI Conversazionale Ibrida
UNI DI NAPOLI FEDERICO II - Il ruolo dei grafi nell'AI Conversazionale IbridaUNI DI NAPOLI FEDERICO II - Il ruolo dei grafi nell'AI Conversazionale Ibrida
UNI DI NAPOLI FEDERICO II - Il ruolo dei grafi nell'AI Conversazionale IbridaNeo4j
 
Evolving Data Governance for the Real-time Streaming and AI Era
Evolving Data Governance for the Real-time Streaming and AI EraEvolving Data Governance for the Real-time Streaming and AI Era
Evolving Data Governance for the Real-time Streaming and AI Eraconfluent
 
^Clinic ^%[+27788225528*Abortion Pills For Sale In soweto
^Clinic ^%[+27788225528*Abortion Pills For Sale In soweto^Clinic ^%[+27788225528*Abortion Pills For Sale In soweto
^Clinic ^%[+27788225528*Abortion Pills For Sale In sowetokasambamuno
 
Auto Affiliate AI Earns First Commission in 3 Hours..pdf
Auto Affiliate  AI Earns First Commission in 3 Hours..pdfAuto Affiliate  AI Earns First Commission in 3 Hours..pdf
Auto Affiliate AI Earns First Commission in 3 Hours..pdfSelfMade bd
 
Optimizing Operations by Aligning Resources with Strategic Objectives Using O...
Optimizing Operations by Aligning Resources with Strategic Objectives Using O...Optimizing Operations by Aligning Resources with Strategic Objectives Using O...
Optimizing Operations by Aligning Resources with Strategic Objectives Using O...OnePlan Solutions
 
Workshop: Enabling GenAI Breakthroughs with Knowledge Graphs - GraphSummit Milan
Workshop: Enabling GenAI Breakthroughs with Knowledge Graphs - GraphSummit MilanWorkshop: Enabling GenAI Breakthroughs with Knowledge Graphs - GraphSummit Milan
Workshop: Enabling GenAI Breakthroughs with Knowledge Graphs - GraphSummit MilanNeo4j
 

Recently uploaded (20)

A Deep Dive into Secure Product Development Frameworks.pdf
A Deep Dive into Secure Product Development Frameworks.pdfA Deep Dive into Secure Product Development Frameworks.pdf
A Deep Dive into Secure Product Development Frameworks.pdf
 
From Theory to Practice: Utilizing SpiraPlan's REST API
From Theory to Practice: Utilizing SpiraPlan's REST APIFrom Theory to Practice: Utilizing SpiraPlan's REST API
From Theory to Practice: Utilizing SpiraPlan's REST API
 
Transformer Neural Network Use Cases with Links
Transformer Neural Network Use Cases with LinksTransformer Neural Network Use Cases with Links
Transformer Neural Network Use Cases with Links
 
BusinessGPT - Security and Governance for Generative AI
BusinessGPT  - Security and Governance for Generative AIBusinessGPT  - Security and Governance for Generative AI
BusinessGPT - Security and Governance for Generative AI
 
^Clinic ^%[+27788225528*Abortion Pills For Sale In harare
^Clinic ^%[+27788225528*Abortion Pills For Sale In harare^Clinic ^%[+27788225528*Abortion Pills For Sale In harare
^Clinic ^%[+27788225528*Abortion Pills For Sale In harare
 
Anypoint Code Builder - Munich MuleSoft Meetup - 16th May 2024
Anypoint Code Builder - Munich MuleSoft Meetup - 16th May 2024Anypoint Code Builder - Munich MuleSoft Meetup - 16th May 2024
Anypoint Code Builder - Munich MuleSoft Meetup - 16th May 2024
 
Abortion Pill Prices Germiston ](+27832195400*)[ 🏥 Women's Abortion Clinic in...
Abortion Pill Prices Germiston ](+27832195400*)[ 🏥 Women's Abortion Clinic in...Abortion Pill Prices Germiston ](+27832195400*)[ 🏥 Women's Abortion Clinic in...
Abortion Pill Prices Germiston ](+27832195400*)[ 🏥 Women's Abortion Clinic in...
 
What is a Recruitment Management Software?
What is a Recruitment Management Software?What is a Recruitment Management Software?
What is a Recruitment Management Software?
 
Abortion Clinic In Pretoria ](+27832195400*)[ 🏥 Safe Abortion Pills in Pretor...
Abortion Clinic In Pretoria ](+27832195400*)[ 🏥 Safe Abortion Pills in Pretor...Abortion Clinic In Pretoria ](+27832195400*)[ 🏥 Safe Abortion Pills in Pretor...
Abortion Clinic In Pretoria ](+27832195400*)[ 🏥 Safe Abortion Pills in Pretor...
 
Software Engineering - Introduction + Process Models + Requirements Engineering
Software Engineering - Introduction + Process Models + Requirements EngineeringSoftware Engineering - Introduction + Process Models + Requirements Engineering
Software Engineering - Introduction + Process Models + Requirements Engineering
 
Weeding your micro service landscape.pdf
Weeding your micro service landscape.pdfWeeding your micro service landscape.pdf
Weeding your micro service landscape.pdf
 
Abortion Clinic Pretoria ](+27832195400*)[ Abortion Clinic Near Me ● Abortion...
Abortion Clinic Pretoria ](+27832195400*)[ Abortion Clinic Near Me ● Abortion...Abortion Clinic Pretoria ](+27832195400*)[ Abortion Clinic Near Me ● Abortion...
Abortion Clinic Pretoria ](+27832195400*)[ Abortion Clinic Near Me ● Abortion...
 
The Evolution of Web App Testing_ An Ultimate Guide to Future Trends.pdf
The Evolution of Web App Testing_ An Ultimate Guide to Future Trends.pdfThe Evolution of Web App Testing_ An Ultimate Guide to Future Trends.pdf
The Evolution of Web App Testing_ An Ultimate Guide to Future Trends.pdf
 
Jax, FL Admin Community Group 05.14.2024 Combined Deck
Jax, FL Admin Community Group 05.14.2024 Combined DeckJax, FL Admin Community Group 05.14.2024 Combined Deck
Jax, FL Admin Community Group 05.14.2024 Combined Deck
 
UNI DI NAPOLI FEDERICO II - Il ruolo dei grafi nell'AI Conversazionale Ibrida
UNI DI NAPOLI FEDERICO II - Il ruolo dei grafi nell'AI Conversazionale IbridaUNI DI NAPOLI FEDERICO II - Il ruolo dei grafi nell'AI Conversazionale Ibrida
UNI DI NAPOLI FEDERICO II - Il ruolo dei grafi nell'AI Conversazionale Ibrida
 
Evolving Data Governance for the Real-time Streaming and AI Era
Evolving Data Governance for the Real-time Streaming and AI EraEvolving Data Governance for the Real-time Streaming and AI Era
Evolving Data Governance for the Real-time Streaming and AI Era
 
^Clinic ^%[+27788225528*Abortion Pills For Sale In soweto
^Clinic ^%[+27788225528*Abortion Pills For Sale In soweto^Clinic ^%[+27788225528*Abortion Pills For Sale In soweto
^Clinic ^%[+27788225528*Abortion Pills For Sale In soweto
 
Auto Affiliate AI Earns First Commission in 3 Hours..pdf
Auto Affiliate  AI Earns First Commission in 3 Hours..pdfAuto Affiliate  AI Earns First Commission in 3 Hours..pdf
Auto Affiliate AI Earns First Commission in 3 Hours..pdf
 
Optimizing Operations by Aligning Resources with Strategic Objectives Using O...
Optimizing Operations by Aligning Resources with Strategic Objectives Using O...Optimizing Operations by Aligning Resources with Strategic Objectives Using O...
Optimizing Operations by Aligning Resources with Strategic Objectives Using O...
 
Workshop: Enabling GenAI Breakthroughs with Knowledge Graphs - GraphSummit Milan
Workshop: Enabling GenAI Breakthroughs with Knowledge Graphs - GraphSummit MilanWorkshop: Enabling GenAI Breakthroughs with Knowledge Graphs - GraphSummit Milan
Workshop: Enabling GenAI Breakthroughs with Knowledge Graphs - GraphSummit Milan
 

The benefit of sneezing code into an editor vs clean code

  • 1. The Benefit of Sneezing Code Into an Editor vs Clean Code #sneezingcode joind.in/11457 @dave1010 Dave Hulbert
  • 3. The Benefit of Sneezing Code Into an Editor vs Clean Code
  • 4. The Benefit of Sneezing Code Into an Editor vs Clean Code
  • 5. The Benefit of Sneezing Code Into an Editor vs Clean Code
  • 11. Good code is good
  • 13.
  • 14. Aims ● How to run fast (in general) ● How to sprint (sneeze) ● How to run a marathon (clean code) ● Why you should sprint ● Why you should run a marathon
  • 15. How to run fast (in general) ● Developers – Skilled, Passionate, Healthy, Focused, Disciplined – (Relevant) conferences, user groups (hello) – Read books, blogs, code – Write code, Open Source contributions
  • 16. How to run fast (in general) ● Projects – Good communication – Good specifications / requirements – Fast feedback – Good clients
  • 17.
  • 18. How to run slow (in general) ● Complexity – Code / System ● Bad / slow / no tests ● Bugs ● Lack of investment – Servers / Workstations / Software
  • 19. How to run slow (in general) ● Interruptions ● Being blocked / waiting ● Internal processes ● Too many meetings
  • 20. Aims ● How to run fast (in general) ● How to sprint (sneeze) ● How to run a marathon (clean code) ● Why you should sprint ● Why you should run a marathon
  • 21. How to sprint (sneeze) ● What is sprinting?
  • 22. How to sprint (sneeze) ● Overtime ● Ignore everything else ● Reduce tests / testing ● Reduce planning ● Reduce communication ● Outsource ● Cut corners ● Focus; don't improve tools / processes ● Outsource
  • 23.
  • 24.
  • 25.
  • 26. Technical Debt ● What is technical debt?
  • 27.
  • 28.
  • 29. Causes of technical debt ● Deciding to release before it's ready ● Deciding to use a RAD framework ● Deciding to skip tests & documentation ● Lack of understanding (requirements, code) ● Premature optimisation ● Software entropy
  • 30. Consequences of technical debt ● Interest; interest on interest ● More time on maintenance ● Less time on new features ● Harder to estimate new features ● Miss deadlines
  • 31.
  • 32.
  • 33. Aims ● How to run fast (in general) ● How to sprint (sneeze) ● How to run a marathon (clean code) ● Why you should sprint ● Why you should run a marathon
  • 34. How to run a marathon (clean code) ● Non-code speed-ups: time & money investment – Staff training – Tools and processes – Planning / requirements
  • 35.
  • 36.
  • 37.
  • 38. How to run a marathon (clean code) ● Clean Code (Uncle Bob) – SOLID ● TDD – Run every bit of code that you write, ASAP ● DDD – Model the domain completely in PHP classes that don't touch the UI, database or framework
  • 39.
  • 40.
  • 41.
  • 43. Refactoring ● Key to keeping up speed in big projects ● Restructuring without changing behaviour ● No direct measurable user benefit (not a user story) ● Makes it easier to read, understand, test, change, add new features to ● IDE makes refactoring easier
  • 44.
  • 45. Refactoring ● Inject dependencies ● Decouple (fewer “use” statements) ● Create interfaces to type hint to ● Extract functions ● Rename ● Reduce cyclomatic complexity (number of if/else/for/foreach/while/switch in a method) ● Change depth of inheritance
  • 46.
  • 48. Aims ● How to run fast (in general) ● How to sprint (sneeze) ● How to run a marathon (clean code) ● Why you should sprint ● Why you should run a marathon
  • 49. Why you should sprint ● Help you deliver faster in the short term ● Long term strategy ● MVP (prove a theory) ● Disposable prototype
  • 50. Why you should sprint ● Treat your servers like cattle, not pets ● Sometimes code is similar
  • 51.
  • 52. Examples ● Laravel – RAD framework – Sacrifices SOLID code (a bit) for ease of use – Static “facades” (instead of using injected dependencies) – $user->save() (instead of $userRepository- >persist($user) )
  • 53. Examples ● WordPress – “5 minute install” – Low barrier to entry – Lots of themes and plugins
  • 54. Aims ● How to run fast (in general) ● How to sprint (sneeze) ● How to run a marathon (clean code) ● Why you should sprint ● Why you should run a marathon
  • 55. Why you should run a marathon ● Technical debt is a risk – Especially with big projects ● Quality is valuable ● Deliver faster in the long term
  • 56. Aims ● How to run fast (in general) ● How to sprint (sneeze) ● How to run a marathon (clean code) ● Why you should sprint ● Why you should run a marathon
  • 57. Sprint vs Marathon Sprint (example) Marathon (example) Peripheral component (logs) Central component (DB) Trivial (make a CSV) Complex (search algorithm) Few consequences of bugs (game) Important (nuclear reactor) Isolated (contact form) Reused (authentication) Abandonable (migration script) Continued updates One developer Big team Time & money to pay technical debt later Long term delivery
  • 58. Bonus: estimating ● Estimates for new features need to include refactoring – (if you don't want to increase technical debt) – Refactoring doesn't add perceived value so it's hard to sell ● Technical debt is expensive – Sprint + paying technical debt interest costs more than running a marathon + continual refactoring
  • 59. Bonus: Testing ● TDD is about running your code ASAP ● Write a test when you fix a bug ● Fix bugs before writing new code (The Joel Test)
  • 60. Wish list ● A script to track TODOs over time (Jenkins?) ● A tool that helps you decide whether to sprint or run a marathon
  • 61. Resources ● Books that I've read at least a few chapters of – Mythical Man-Month: Essays on Software Engineering, Frederick Brooks – Clean Code: A Handbook of Agile Software Craftsmanship, Robert C Martin – Implementing Domain-Driven Design, Vaughn Vernon – Modernizing Legacy Applications In PHP, Paul M. Jones – More: http://amzn.to/Y29TAK
  • 62. Resources ● Refactoring http://refactoring.com/catalog/ ● Speed in Software Development http://www.targetprocess.com/articles/spee d-in-software-development.html ● Technical debt http://www.construx.com/10x_Software_Dev elopment/Technical_Debt/ ● Images: HBO, Reddit, XKCD, the Internet