Krakow, December 5th 2017, Beyond Clean Code & Code Quality by @softwaregarden Ego Boost • I’m from Thessaloniki, Greece • The city of “White” Tower… • …which is not white at all!
Krakow, December 5th 2017, Beyond Clean Code & Code Quality by @softwaregarden Ego Boost • I’m from Thessaloniki, Greece • The city of “Frappe” … • …a special coffee that you can find (almost) ONLY in Greece
Krakow, December 5th 2017, Beyond Clean Code & Code Quality by @softwaregarden Ego Boost • I’m from Thessaloniki, Greece • The city of “Frappe” … • …a special coffee that you can find (almost) ONLY in Greece
Krakow, December 5th 2017, Beyond Clean Code & Code Quality by @softwaregarden Ego Boost • I’m from Thessaloniki, Greece • The city of “Mpougatsa” … • …a pie you can fill with (almost) everything
Krakow, December 5th 2017, Beyond Clean Code & Code Quality by @softwaregarden Ego Boost(seriously now) • Principal Software Engineer @ • Co-author of “SonarQube in Action” book • Software Quality evangelist - Software Gardener • Local Tech Community Leader • Father of two
Krakow, December 5th 2017, Beyond Clean Code & Code Quality by @softwaregarden What is this talk NOT about • Quality metrics • Code reviews • Specific tool(s) • Specific programming language(s) • Explaining technical debt
Krakow, December 5th 2017, Beyond Clean Code & Code Quality by @softwaregarden I had a dream… ...that one day code quality management will be as much as important and essential as is today source code management
Krakow, December 5th 2017, Beyond Clean Code & Code Quality by @softwaregarden Technical Debt Definition If the debt grows large enough, eventually the company will spend more on servicing its debt than it invests in increasing the value of its other assets Steve McConell - Author of Code Complete
Krakow, December 5th 2017, Beyond Clean Code & Code Quality by @softwaregarden So many questions • How do we get management buy-in? • How Technical Debt affects our team(s)? • What about legacy code?
Krakow, December 5th 2017, Beyond Clean Code & Code Quality by @softwaregarden So many questions • Product team pushes for new features. No time for refactoring. What should we do? • Is there a silver bullet to tackle code quality? • What to fix / improve first?
Krakow, December 5th 2017, Beyond Clean Code & Code Quality by @softwaregarden How to convince my “superior” • Wear different hats for technical and non-technical people • Speak the management language • Provide a single number in terms of currency or time to market • Don’t ask for permission • Do a PoC
Krakow, December 5th 2017, Beyond Clean Code & Code Quality by @softwaregarden The human factor of Technical Debt Hard to get new people in - business collapses
Krakow, December 5th 2017, Beyond Clean Code & Code Quality by @softwaregarden Should we improve quality of legacy code? • Yes No It depends • Useless to refactor code that is never changing • Keep an eye on code churn • Avoid refactoring for the shake of refactoring
Krakow, December 5th 2017, Beyond Clean Code & Code Quality by @softwaregarden Product team pushes for new features • Do you work for a startup or a Greenfield project ?
Krakow, December 5th 2017, Beyond Clean Code & Code Quality by @softwaregarden Product team pushes for new features • Do you work for a startup or a Greenfield project ? • YES!
Krakow, December 5th 2017, Beyond Clean Code & Code Quality by @softwaregarden Product team pushes for new features • Do you work for a startup or a Greenfield project ? • YES! - Great then just stop adding crappy code
Krakow, December 5th 2017, Beyond Clean Code & Code Quality by @softwaregarden Product team pushes for new features • Do you work for a startup or a Greenfield project ?
Krakow, December 5th 2017, Beyond Clean Code & Code Quality by @softwaregarden Product team pushes for new features • Do you work for a startup or a Greenfield project ? • No!
Krakow, December 5th 2017, Beyond Clean Code & Code Quality by @softwaregarden Product team pushes for new features • Do you work for a startup or a Greenfield project ? • No! - Then you are in deep shit
Krakow, December 5th 2017, Beyond Clean Code & Code Quality by @softwaregarden Product team pushes for new features • Do you work for a startup or a Greenfield project ? • No! - Then you are in deep shit • Try to keep a balance • Pretend you are in a Greenfield project
Krakow, December 5th 2017, Beyond Clean Code & Code Quality by @softwaregarden What’s the best way to improve code Quality? • No silver bullet • Patience • Consistency • Professionalism • Technical Excellence
Krakow, December 5th 2017, Beyond Clean Code & Code Quality by @softwaregarden Strategies to tackle technical debt Code Quality Time - Fix the worst first
Krakow, December 5th 2017, Beyond Clean Code & Code Quality by @softwaregarden Bonus slide - Automation • Step #0 - Define a common set of objective quality rules, agreed by all team members • Step #1 - Automatically check your code locally (Pre-commit checks) • Step #2 - Integrate with your favourite CI engine • Step #3 - Integrate with your favourite code review tool (Post-commit checks) • Step #4 - Reject PRs if quality threshold is hit
Krakow, December 5th 2017, Beyond Clean Code & Code Quality by @softwaregarden Take - aways • The fight against technical debt starts once you understand the metrics - it doesn’t end that time • Poor code quality has side-effects to the team’s psychology • Be patient and don’t give up • One size doesn’t fit all. Experiment. Find your way