SlideShare a Scribd company logo
1
Growing Software
& Growing Ourselves
DAN PARKIN
2
WHO
AM I?
ABOUT
SOFTWARE CRAFTSMAN
AT CODURANCE
MMU ALUMNUS
ACTIVE IN THE
DEV COMMUNITY
@danpkn
3
JOURNEY
SINCE MMU.
2013
TopCashback
2015
Code Computerlove
2018
Codurance
44
TODAY’S MISSION.
1. 40 MINS - PROVIDE A 10,000 FOOT VIEW OF:
● Code smells & refactoring
○ Technical debt
● Test-Driven Development
○ Classicist TDD
○ Outside-In TDD
● SOLID Principles
○ Some other important principles
● Clean Code & Clean Architecture
○ What is bad code?
○ Habitability
● Spiking & Walking Skeletons
○ Feedback loops
2. 5 MINS - TIPS TO GROW AS A PROFESSIONAL
3. Q&A
5
5
GROWING
SOFTWARE.
SOFTWARE
CHANGES.
7
TECHNICAL PRACTICES I WISH
I’D KNOWN EXISTED.
SOLID PRINCIPLES
DOMAIN-DRIVEN
DESIGN: IMPORTANCE
OF CONTEXT &
LANGUAGE
CODE SMELLS
& REFACTORING
CLEAN CODE &
ARCHITECTURE
TEST-DRIVEN
DEVELOPMENT
SPIKING
& WALKING SKELETONS
8
9
CODE SMELLS
& REFACTORING.
DESIGN CHOICES
“Code smells are symptoms of poor design or
implementation choices”
- Martin Fowler
10
11
12
13
14
15
16
16
The second law of thermodynamics, in principle, states
that a closed system's disorder cannot be reduced, it can
only remain unchanged or increase. A measure of this
disorder is entropy. This law also seems plausible for
software systems; as a system is modified, its disorder, or
entropy, tends to increase. This is known as software
entropy..
IVAR JACOBSON.
17
TECHNICAL
DEBT / MESS.
Technical debt is a concept in software development
that reflects the implied cost of additional rework
caused by choosing an easy solution now instead of
using a better approach that would take longer.
Leads to “spaghetti code”.
REFACTORING
18
ESSENTIAL VS
ACCIDENTAL
COMPLEXITY.
Essential tasks, the fashioning of the complex
conceptual structures that compose the abstract
software entity.
Accidental tasks, the representation of these abstract
entities in programming languages and the mapping of
these onto machine languages within space and speed
constraints.
REFACTORING
19
BROKEN
WINDOWS
THEORY.
A criminological theory that visible signs of crime, anti-
social behavior, and civil disorder create an urban
environment that encourages further crime and
disorder, including serious crimes.
REFACTORING
20
THE BOY
SCOUT RULE.
Leave the campsite cleaner than we found it.
Small, incremental improvements that cumulatively
make a large difference over time.
REFACTORING
21
REFACTOR!
22
TEST-DRIVEN
DEVELOPMENT.
DESIGN WITH EXAMPLES
Test-driven development (TDD) is
a software development process
that relies on the repetition of a
very short development cycle:
requirements are turned into
very specific test cases, then the
software is improved to pass the
new tests, only.
23
24
Sustainable pace
Go slow, to go fast
2525
CLASSICIST TDD.
CLASSICIST TDD (CHICAGO SCHOOL):
● Also called, inside-out TDD
● State based verification
● Use of triangulation
● Stimulus / response pairs
● Explore one fact about the system at a time
● Useful for algorithmic problems
“As the tests get more specific, the code gets
more generic.”
- Robert C. Martin
26
27
Triangulation.
Test case 1
Test case 2
Test case 3
Unknown algorithm
28
29
30
31
32
33
3434
OUTSIDE-IN TDD.
OUTSIDE-IN TDD (LONDON SCHOOL):
● Also called, mockist TDD
● Start testing at the boundaries of the system
● Focus on behaviour verification
● Interaction between objects
● Use of stubs to verify data flow
● Use of mocks to verify side effects
35
36
37
38
3939
MOCKS & STUBS.
MOCKS:
● Test that a side effect did occur
● Test that a side effect didn’t occur
● Control how data flows through the SUT
STUBS:
40
41
42
43
44
SOLID PRINCIPLES.
DESIGN PRINCIPLES
In object-oriented computer
programming, SOLID is a
mnemonic acronym for five
design principles intended to
make software designs more
understandable, flexible and
maintainable.
45
SOLID keeps
software, soft
46
47
S.O.L.I.D
SINGLE RESPONSIBILITY
A class should have only a single responsibility, that is, only
changes to one part of the software's specification should be
able to affect the specification of the class.
OPEN/CLOSED
Software entities should be open for extension, but closed for
modification.
LISKOV SUBSTITUTION
Objects in a program should be replaceable with instances of
their subtypes without altering the correctness of that
program.
INTERFACE SEGREGATION
Many client-specific interfaces are better than one general-
purpose interface. Don’t force clients to depend on methods
they don’t use.
DEPENDENCY INVERSION
Depend on abstractions, not concretions.
48
OTHER
PRINCIPLES.
SEPARATION OF CONCERNS
Clearly separate things that change for different reasons or at
different rates of speed.
COMMAND / QUERY SEGREGATION
Methods should either be a command that performs an action,
or a query that returns data to the caller, but not both.
TELL, DON’T ASK
“Ask the question we really want answered, instead of asking for the
information to help us figure out the answer ourselves” - Growing
Object-Oriented Software, Guided By Tests
SLAP
Single level of abstraction principle.
DRY
Don’t repeat yourself.
49
CLEAN CODE
& ARCHITECTURE.
DESIGN PRINCIPLES
“Even bad code can function. But
if code isn’t clean, it can bring a
development organisation to its
knees.
Every year, countless hours and
significant resources are lost
because of poorly written code.
But it doesn’t have to be that
way.”
50
EMPATHY.
CLEAN CODE
51
HABITABILITY.
CLEAN CODE
52
52
Habitability is the characteristic of source
code that enables people coming to the code
later in its life to understand its construction
and intentions and to change it comfortably
and confidently.
RICHARD GABRIEL.
53
54
WHAT IS
BAD CODE?
DOESN’T REVEAL INTENT
Abbreviations, ambiguity, unclear naming,
excessive use of comments
DIFFICULT TO REASON ABOUT
Large classes / methods, code at different levels of abstraction,
Single Responsibility Principle violation, Command Query
Segregation Principle violation
TIGHTLY COUPLED
Entities are inappropriately intimate, unable to test entities in
isolation, poor / no separation of concerns
SCARY TO CHANGE
Low / no test coverage makes changes risky, developers
scared to add features to / maintain the codebase
CLEAN CODE
The best metric for design
refuse is WTFs per minute.
ROBERT C. MARTIN
56
KENT BECK’S
4 RULES OF
SIMPLE DESIGN
TESTS PASS
EXPRESSES INTENT
NO DUPLICATION (DRY)
SMALL
CLEAN CODE
57
58
59
CLEAN
ARCHITECTURE. OUR APPLICATION
Business logic at the centre
with details that at edges
60
61
62
63
Technical
details
Agnostic of technical details
Technical
details
64
Low level
components
High level components
Low level
components
“Protect high level
components
from low level components”
65
MODULARITY.
Loosely coupled, independent units with good
separation of concerns that can be tested in isolation.
Leads to “ravioli code”.
66
DDD: CONTEXT
& LANGUAGE.
DDD: UBIQUITOUS LANGUAGE
Striving to use the vocabulary of a given business domain,
not only in discussions about the requirements for a
software product, but also in discussions of design as well
the source code itself.
67
68
Ubiquitous Language
“Nurses administer flu vaccines to patients in standard doses”
69
Ubiquitous Language
70
SPIKING &
WALKING
SKELETON.
UNKNOWN UNKNOWNS
"A Walking Skeleton is a tiny implementation of the system
that performs a small end-to-end function. It need not use
the final architecture, but it should link together the main
architectural components. The architecture and the
functionality can then evolve in parallel."
- Alistair Cockburn
71
FEEDBACK
LOOPS.
The faster we receive feedback,
the sooner we can learn and
take action.
7373
TECHNICAL
SPIKE.
SPIKING:
● Experimentation
● Figure out answers to tough technical or design problems
● Reduce the risk of complications and problems
● Validate assumptions & technology choices
● Better understanding, better estimates
● Risk mitigation
● Doesn’t focus on quality, focus is on learning
● Throw away
A “walking skeleton” is an
implementation of the thinnest
possible slice of real functionality
that we can automatically build,
deploy, and test end-to-end
ALISTAIR COCKBURN
75
7676
SUMMARY.
● Take time to learn the fundamentals of software design
○ SOLID,
○ Code smells
○ Refactoring
○ Four rules of simple design
● Adopt TDD
● Protect what makes you money from low level details like frameworks
● Naming is important
○ Use a common language incorporating business terms
● Flush out uncertainty with spikes and walking skeletons
77
77
GROWING OURSELVES.
78
INVEST IN
YOURSELF.
79
GO TO
COMMUNITY
EVENTS.
80
FOLLOW
INFLUENTIAL
DEVS.
81
DELIBERATE
PRACTICE.
82
LEARN IDE
SHORTCUTS
& VIM.
83
GROWING BY
PAIRING.
The amount of serendipity that will occur
in your life, your Luck Surface Area, is
directly proportional to the degree to
which you do something you're
passionate about combined with the total
number of people to whom this is
effectively communicated.
JASON ROBERTS
85
Thanks.
@danpkn
https://bit.ly/2TQ69mf

More Related Content

What's hot

Software testing agile_environment_wp
Software testing agile_environment_wpSoftware testing agile_environment_wp
Software testing agile_environment_wp
Cristiano Caetano
 
Tdd 4 everyone full version
Tdd 4 everyone full versionTdd 4 everyone full version
Tdd 4 everyone full version
Lior Israel
 
Slides for Houston iPhone Developers' Meetup (April 2012)
Slides for Houston iPhone Developers' Meetup (April 2012)Slides for Houston iPhone Developers' Meetup (April 2012)
Slides for Houston iPhone Developers' Meetup (April 2012)
lqi
 
Test driven development vs Behavior driven development
Test driven development vs Behavior driven developmentTest driven development vs Behavior driven development
Test driven development vs Behavior driven development
Gallop Solutions
 
TDD - Test Driven Development
TDD - Test Driven DevelopmentTDD - Test Driven Development
TDD - Test Driven Development
Lim Chanmann
 
Agile principles and practices
Agile principles and practicesAgile principles and practices
Agile principles and practices
Vipin Jose
 
TDD refresher
TDD refresherTDD refresher
TDD refresher
Kerry Buckley
 
Agile Test Driven Development
Agile Test Driven DevelopmentAgile Test Driven Development
Agile Test Driven Development
Viraf Karai
 
Test drive on driven development process
Test drive on driven development processTest drive on driven development process
Test drive on driven development process
Muralidharan Deenathayalan
 
TestCon2018 - Next Generation Testing in the Age of Machines
TestCon2018 - Next Generation Testing in the Age of MachinesTestCon2018 - Next Generation Testing in the Age of Machines
TestCon2018 - Next Generation Testing in the Age of Machines
Berk Dülger
 
Introduction to Test Driven Development
Introduction to Test Driven DevelopmentIntroduction to Test Driven Development
Introduction to Test Driven Development
Murphy Meng
 
Agile and Agile methods: what is the most important to understand to succeed
Agile and Agile methods: what is the most important to understand to succeedAgile and Agile methods: what is the most important to understand to succeed
Agile and Agile methods: what is the most important to understand to succeed
Vaidas Adomauskas
 
Agile and Secure
Agile and SecureAgile and Secure
Agile and Secure
Denim Group
 
Test driven development(tdd)
Test driven development(tdd)Test driven development(tdd)
Test driven development(tdd)
Omar Youssef Shiha
 
Design for Testability
Design for Testability Design for Testability
Design for Testability
Pawel Kalbrun
 
Offshore Agile Maintenance
Offshore Agile MaintenanceOffshore Agile Maintenance
Offshore Agile Maintenance
Naresh Jain
 
tem7
tem7tem7
Tdd
TddTdd
Global Day of Coderetreat'14 - Istanbul Event
Global Day of Coderetreat'14 - Istanbul EventGlobal Day of Coderetreat'14 - Istanbul Event
Global Day of Coderetreat'14 - Istanbul Event
Lemi Orhan Ergin
 
TDD = bra design?
TDD = bra design?TDD = bra design?
TDD = bra design?
Kjetil Klaussen
 

What's hot (20)

Software testing agile_environment_wp
Software testing agile_environment_wpSoftware testing agile_environment_wp
Software testing agile_environment_wp
 
Tdd 4 everyone full version
Tdd 4 everyone full versionTdd 4 everyone full version
Tdd 4 everyone full version
 
Slides for Houston iPhone Developers' Meetup (April 2012)
Slides for Houston iPhone Developers' Meetup (April 2012)Slides for Houston iPhone Developers' Meetup (April 2012)
Slides for Houston iPhone Developers' Meetup (April 2012)
 
Test driven development vs Behavior driven development
Test driven development vs Behavior driven developmentTest driven development vs Behavior driven development
Test driven development vs Behavior driven development
 
TDD - Test Driven Development
TDD - Test Driven DevelopmentTDD - Test Driven Development
TDD - Test Driven Development
 
Agile principles and practices
Agile principles and practicesAgile principles and practices
Agile principles and practices
 
TDD refresher
TDD refresherTDD refresher
TDD refresher
 
Agile Test Driven Development
Agile Test Driven DevelopmentAgile Test Driven Development
Agile Test Driven Development
 
Test drive on driven development process
Test drive on driven development processTest drive on driven development process
Test drive on driven development process
 
TestCon2018 - Next Generation Testing in the Age of Machines
TestCon2018 - Next Generation Testing in the Age of MachinesTestCon2018 - Next Generation Testing in the Age of Machines
TestCon2018 - Next Generation Testing in the Age of Machines
 
Introduction to Test Driven Development
Introduction to Test Driven DevelopmentIntroduction to Test Driven Development
Introduction to Test Driven Development
 
Agile and Agile methods: what is the most important to understand to succeed
Agile and Agile methods: what is the most important to understand to succeedAgile and Agile methods: what is the most important to understand to succeed
Agile and Agile methods: what is the most important to understand to succeed
 
Agile and Secure
Agile and SecureAgile and Secure
Agile and Secure
 
Test driven development(tdd)
Test driven development(tdd)Test driven development(tdd)
Test driven development(tdd)
 
Design for Testability
Design for Testability Design for Testability
Design for Testability
 
Offshore Agile Maintenance
Offshore Agile MaintenanceOffshore Agile Maintenance
Offshore Agile Maintenance
 
tem7
tem7tem7
tem7
 
Tdd
TddTdd
Tdd
 
Global Day of Coderetreat'14 - Istanbul Event
Global Day of Coderetreat'14 - Istanbul EventGlobal Day of Coderetreat'14 - Istanbul Event
Global Day of Coderetreat'14 - Istanbul Event
 
TDD = bra design?
TDD = bra design?TDD = bra design?
TDD = bra design?
 

Similar to Growing Software and Growing Ourselves

CQRS recepies
CQRS recepiesCQRS recepies
CQRS recepies
Francesco Garavaglia
 
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
 
Test driven development
Test driven developmentTest driven development
Test driven development
Sunil Prasad
 
Ds for finance day 4
Ds for finance day 4Ds for finance day 4
Ds for finance day 4
QuantUniversity
 
Refactoring workshop
Refactoring workshop Refactoring workshop
Refactoring workshop
Itzik Saban
 
Waterfallacies V1 1
Waterfallacies V1 1Waterfallacies V1 1
Waterfallacies V1 1
Jorge Boria
 
Continuous Delivery with JavaScript
Continuous Delivery with JavaScriptContinuous Delivery with JavaScript
Continuous Delivery with JavaScript
Rogerio Chaves
 
Modern software architect post the agile wave
Modern software architect post the agile waveModern software architect post the agile wave
Modern software architect post the agile wave
Niels Bech Nielsen
 
Technical Excellence Doesn't Just Happen - AgileIndy 2016
Technical Excellence Doesn't Just Happen - AgileIndy 2016Technical Excellence Doesn't Just Happen - AgileIndy 2016
Technical Excellence Doesn't Just Happen - AgileIndy 2016
Allison Pollard
 
Cleaning Code - Tools and Techniques for Large Legacy Projects
Cleaning Code - Tools and Techniques for Large Legacy ProjectsCleaning Code - Tools and Techniques for Large Legacy Projects
Cleaning Code - Tools and Techniques for Large Legacy Projects
Mike Long
 
TDD and Related Techniques for Non Developers (2012)
TDD and Related Techniques for Non Developers (2012)TDD and Related Techniques for Non Developers (2012)
TDD and Related Techniques for Non Developers (2012)
Peter Kofler
 
Software Quality via Unit Testing
Software Quality via Unit TestingSoftware Quality via Unit Testing
Software Quality via Unit Testing
Shaun Abram
 
Being Test-Driven: It's not really about testing
Being Test-Driven: It's not really about testingBeing Test-Driven: It's not really about testing
Being Test-Driven: It's not really about testing
Raj Indugula
 
Quality in Project Management
Quality in Project ManagementQuality in Project Management
Quality in Project Management
daragao
 
Excavating the knowledge of our ancestors
Excavating the knowledge of our ancestorsExcavating the knowledge of our ancestors
Excavating the knowledge of our ancestors
Uwe Friedrichsen
 
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
Allison Pollard
 
[DN Scrum Breakfast] Effective Cloud Computing
[DN Scrum Breakfast] Effective Cloud Computing[DN Scrum Breakfast] Effective Cloud Computing
[DN Scrum Breakfast] Effective Cloud Computing
Scrum Breakfast Vietnam
 
CyberArk Engineering: Guilds - our journey to mastery
CyberArk Engineering: Guilds - our journey to masteryCyberArk Engineering: Guilds - our journey to mastery
CyberArk Engineering: Guilds - our journey to mastery
Daniel Schwartzer
 
Caring about Code Quality
Caring about Code QualityCaring about Code Quality
Caring about Code Quality
Saltmarch Media
 
TDD Anti-patterns (2022 edition)
TDD Anti-patterns (2022 edition)TDD Anti-patterns (2022 edition)
TDD Anti-patterns (2022 edition)
Ahmed Misbah
 

Similar to Growing Software and Growing Ourselves (20)

CQRS recepies
CQRS recepiesCQRS recepies
CQRS recepies
 
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...
 
Test driven development
Test driven developmentTest driven development
Test driven development
 
Ds for finance day 4
Ds for finance day 4Ds for finance day 4
Ds for finance day 4
 
Refactoring workshop
Refactoring workshop Refactoring workshop
Refactoring workshop
 
Waterfallacies V1 1
Waterfallacies V1 1Waterfallacies V1 1
Waterfallacies V1 1
 
Continuous Delivery with JavaScript
Continuous Delivery with JavaScriptContinuous Delivery with JavaScript
Continuous Delivery with JavaScript
 
Modern software architect post the agile wave
Modern software architect post the agile waveModern software architect post the agile wave
Modern software architect post the agile wave
 
Technical Excellence Doesn't Just Happen - AgileIndy 2016
Technical Excellence Doesn't Just Happen - AgileIndy 2016Technical Excellence Doesn't Just Happen - AgileIndy 2016
Technical Excellence Doesn't Just Happen - AgileIndy 2016
 
Cleaning Code - Tools and Techniques for Large Legacy Projects
Cleaning Code - Tools and Techniques for Large Legacy ProjectsCleaning Code - Tools and Techniques for Large Legacy Projects
Cleaning Code - Tools and Techniques for Large Legacy Projects
 
TDD and Related Techniques for Non Developers (2012)
TDD and Related Techniques for Non Developers (2012)TDD and Related Techniques for Non Developers (2012)
TDD and Related Techniques for Non Developers (2012)
 
Software Quality via Unit Testing
Software Quality via Unit TestingSoftware Quality via Unit Testing
Software Quality via Unit Testing
 
Being Test-Driven: It's not really about testing
Being Test-Driven: It's not really about testingBeing Test-Driven: It's not really about testing
Being Test-Driven: It's not really about testing
 
Quality in Project Management
Quality in Project ManagementQuality in Project Management
Quality in Project Management
 
Excavating the knowledge of our ancestors
Excavating the knowledge of our ancestorsExcavating the knowledge of our ancestors
Excavating the knowledge of our ancestors
 
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
 
[DN Scrum Breakfast] Effective Cloud Computing
[DN Scrum Breakfast] Effective Cloud Computing[DN Scrum Breakfast] Effective Cloud Computing
[DN Scrum Breakfast] Effective Cloud Computing
 
CyberArk Engineering: Guilds - our journey to mastery
CyberArk Engineering: Guilds - our journey to masteryCyberArk Engineering: Guilds - our journey to mastery
CyberArk Engineering: Guilds - our journey to mastery
 
Caring about Code Quality
Caring about Code QualityCaring about Code Quality
Caring about Code Quality
 
TDD Anti-patterns (2022 edition)
TDD Anti-patterns (2022 edition)TDD Anti-patterns (2022 edition)
TDD Anti-patterns (2022 edition)
 

Recently uploaded

20240609 QFM020 Irresponsible AI Reading List May 2024
20240609 QFM020 Irresponsible AI Reading List May 202420240609 QFM020 Irresponsible AI Reading List May 2024
20240609 QFM020 Irresponsible AI Reading List May 2024
Matthew Sinclair
 
WeTestAthens: Postman's AI & Automation Techniques
WeTestAthens: Postman's AI & Automation TechniquesWeTestAthens: Postman's AI & Automation Techniques
WeTestAthens: Postman's AI & Automation Techniques
Postman
 
20240607 QFM018 Elixir Reading List May 2024
20240607 QFM018 Elixir Reading List May 202420240607 QFM018 Elixir Reading List May 2024
20240607 QFM018 Elixir Reading List May 2024
Matthew Sinclair
 
Taking AI to the Next Level in Manufacturing.pdf
Taking AI to the Next Level in Manufacturing.pdfTaking AI to the Next Level in Manufacturing.pdf
Taking AI to the Next Level in Manufacturing.pdf
ssuserfac0301
 
TrustArc Webinar - 2024 Global Privacy Survey
TrustArc Webinar - 2024 Global Privacy SurveyTrustArc Webinar - 2024 Global Privacy Survey
TrustArc Webinar - 2024 Global Privacy Survey
TrustArc
 
Recommendation System using RAG Architecture
Recommendation System using RAG ArchitectureRecommendation System using RAG Architecture
Recommendation System using RAG Architecture
fredae14
 
Best 20 SEO Techniques To Improve Website Visibility In SERP
Best 20 SEO Techniques To Improve Website Visibility In SERPBest 20 SEO Techniques To Improve Website Visibility In SERP
Best 20 SEO Techniques To Improve Website Visibility In SERP
Pixlogix Infotech
 
Nordic Marketo Engage User Group_June 13_ 2024.pptx
Nordic Marketo Engage User Group_June 13_ 2024.pptxNordic Marketo Engage User Group_June 13_ 2024.pptx
Nordic Marketo Engage User Group_June 13_ 2024.pptx
MichaelKnudsen27
 
Choosing The Best AWS Service For Your Website + API.pptx
Choosing The Best AWS Service For Your Website + API.pptxChoosing The Best AWS Service For Your Website + API.pptx
Choosing The Best AWS Service For Your Website + API.pptx
Brandon Minnick, MBA
 
Main news related to the CCS TSI 2023 (2023/1695)
Main news related to the CCS TSI 2023 (2023/1695)Main news related to the CCS TSI 2023 (2023/1695)
Main news related to the CCS TSI 2023 (2023/1695)
Jakub Marek
 
AI 101: An Introduction to the Basics and Impact of Artificial Intelligence
AI 101: An Introduction to the Basics and Impact of Artificial IntelligenceAI 101: An Introduction to the Basics and Impact of Artificial Intelligence
AI 101: An Introduction to the Basics and Impact of Artificial Intelligence
IndexBug
 
Columbus Data & Analytics Wednesdays - June 2024
Columbus Data & Analytics Wednesdays - June 2024Columbus Data & Analytics Wednesdays - June 2024
Columbus Data & Analytics Wednesdays - June 2024
Jason Packer
 
Skybuffer SAM4U tool for SAP license adoption
Skybuffer SAM4U tool for SAP license adoptionSkybuffer SAM4U tool for SAP license adoption
Skybuffer SAM4U tool for SAP license adoption
Tatiana Kojar
 
Energy Efficient Video Encoding for Cloud and Edge Computing Instances
Energy Efficient Video Encoding for Cloud and Edge Computing InstancesEnergy Efficient Video Encoding for Cloud and Edge Computing Instances
Energy Efficient Video Encoding for Cloud and Edge Computing Instances
Alpen-Adria-Universität
 
Serial Arm Control in Real Time Presentation
Serial Arm Control in Real Time PresentationSerial Arm Control in Real Time Presentation
Serial Arm Control in Real Time Presentation
tolgahangng
 
Fueling AI with Great Data with Airbyte Webinar
Fueling AI with Great Data with Airbyte WebinarFueling AI with Great Data with Airbyte Webinar
Fueling AI with Great Data with Airbyte Webinar
Zilliz
 
Your One-Stop Shop for Python Success: Top 10 US Python Development Providers
Your One-Stop Shop for Python Success: Top 10 US Python Development ProvidersYour One-Stop Shop for Python Success: Top 10 US Python Development Providers
Your One-Stop Shop for Python Success: Top 10 US Python Development Providers
akankshawande
 
Monitoring and Managing Anomaly Detection on OpenShift.pdf
Monitoring and Managing Anomaly Detection on OpenShift.pdfMonitoring and Managing Anomaly Detection on OpenShift.pdf
Monitoring and Managing Anomaly Detection on OpenShift.pdf
Tosin Akinosho
 
みなさんこんにちはこれ何文字まで入るの?40文字以下不可とか本当に意味わからないけどこれ限界文字数書いてないからマジでやばい文字数いけるんじゃないの?えこ...
みなさんこんにちはこれ何文字まで入るの?40文字以下不可とか本当に意味わからないけどこれ限界文字数書いてないからマジでやばい文字数いけるんじゃないの?えこ...みなさんこんにちはこれ何文字まで入るの?40文字以下不可とか本当に意味わからないけどこれ限界文字数書いてないからマジでやばい文字数いけるんじゃないの?えこ...
みなさんこんにちはこれ何文字まで入るの?40文字以下不可とか本当に意味わからないけどこれ限界文字数書いてないからマジでやばい文字数いけるんじゃないの?えこ...
名前 です男
 
National Security Agency - NSA mobile device best practices
National Security Agency - NSA mobile device best practicesNational Security Agency - NSA mobile device best practices
National Security Agency - NSA mobile device best practices
Quotidiano Piemontese
 

Recently uploaded (20)

20240609 QFM020 Irresponsible AI Reading List May 2024
20240609 QFM020 Irresponsible AI Reading List May 202420240609 QFM020 Irresponsible AI Reading List May 2024
20240609 QFM020 Irresponsible AI Reading List May 2024
 
WeTestAthens: Postman's AI & Automation Techniques
WeTestAthens: Postman's AI & Automation TechniquesWeTestAthens: Postman's AI & Automation Techniques
WeTestAthens: Postman's AI & Automation Techniques
 
20240607 QFM018 Elixir Reading List May 2024
20240607 QFM018 Elixir Reading List May 202420240607 QFM018 Elixir Reading List May 2024
20240607 QFM018 Elixir Reading List May 2024
 
Taking AI to the Next Level in Manufacturing.pdf
Taking AI to the Next Level in Manufacturing.pdfTaking AI to the Next Level in Manufacturing.pdf
Taking AI to the Next Level in Manufacturing.pdf
 
TrustArc Webinar - 2024 Global Privacy Survey
TrustArc Webinar - 2024 Global Privacy SurveyTrustArc Webinar - 2024 Global Privacy Survey
TrustArc Webinar - 2024 Global Privacy Survey
 
Recommendation System using RAG Architecture
Recommendation System using RAG ArchitectureRecommendation System using RAG Architecture
Recommendation System using RAG Architecture
 
Best 20 SEO Techniques To Improve Website Visibility In SERP
Best 20 SEO Techniques To Improve Website Visibility In SERPBest 20 SEO Techniques To Improve Website Visibility In SERP
Best 20 SEO Techniques To Improve Website Visibility In SERP
 
Nordic Marketo Engage User Group_June 13_ 2024.pptx
Nordic Marketo Engage User Group_June 13_ 2024.pptxNordic Marketo Engage User Group_June 13_ 2024.pptx
Nordic Marketo Engage User Group_June 13_ 2024.pptx
 
Choosing The Best AWS Service For Your Website + API.pptx
Choosing The Best AWS Service For Your Website + API.pptxChoosing The Best AWS Service For Your Website + API.pptx
Choosing The Best AWS Service For Your Website + API.pptx
 
Main news related to the CCS TSI 2023 (2023/1695)
Main news related to the CCS TSI 2023 (2023/1695)Main news related to the CCS TSI 2023 (2023/1695)
Main news related to the CCS TSI 2023 (2023/1695)
 
AI 101: An Introduction to the Basics and Impact of Artificial Intelligence
AI 101: An Introduction to the Basics and Impact of Artificial IntelligenceAI 101: An Introduction to the Basics and Impact of Artificial Intelligence
AI 101: An Introduction to the Basics and Impact of Artificial Intelligence
 
Columbus Data & Analytics Wednesdays - June 2024
Columbus Data & Analytics Wednesdays - June 2024Columbus Data & Analytics Wednesdays - June 2024
Columbus Data & Analytics Wednesdays - June 2024
 
Skybuffer SAM4U tool for SAP license adoption
Skybuffer SAM4U tool for SAP license adoptionSkybuffer SAM4U tool for SAP license adoption
Skybuffer SAM4U tool for SAP license adoption
 
Energy Efficient Video Encoding for Cloud and Edge Computing Instances
Energy Efficient Video Encoding for Cloud and Edge Computing InstancesEnergy Efficient Video Encoding for Cloud and Edge Computing Instances
Energy Efficient Video Encoding for Cloud and Edge Computing Instances
 
Serial Arm Control in Real Time Presentation
Serial Arm Control in Real Time PresentationSerial Arm Control in Real Time Presentation
Serial Arm Control in Real Time Presentation
 
Fueling AI with Great Data with Airbyte Webinar
Fueling AI with Great Data with Airbyte WebinarFueling AI with Great Data with Airbyte Webinar
Fueling AI with Great Data with Airbyte Webinar
 
Your One-Stop Shop for Python Success: Top 10 US Python Development Providers
Your One-Stop Shop for Python Success: Top 10 US Python Development ProvidersYour One-Stop Shop for Python Success: Top 10 US Python Development Providers
Your One-Stop Shop for Python Success: Top 10 US Python Development Providers
 
Monitoring and Managing Anomaly Detection on OpenShift.pdf
Monitoring and Managing Anomaly Detection on OpenShift.pdfMonitoring and Managing Anomaly Detection on OpenShift.pdf
Monitoring and Managing Anomaly Detection on OpenShift.pdf
 
みなさんこんにちはこれ何文字まで入るの?40文字以下不可とか本当に意味わからないけどこれ限界文字数書いてないからマジでやばい文字数いけるんじゃないの?えこ...
みなさんこんにちはこれ何文字まで入るの?40文字以下不可とか本当に意味わからないけどこれ限界文字数書いてないからマジでやばい文字数いけるんじゃないの?えこ...みなさんこんにちはこれ何文字まで入るの?40文字以下不可とか本当に意味わからないけどこれ限界文字数書いてないからマジでやばい文字数いけるんじゃないの?えこ...
みなさんこんにちはこれ何文字まで入るの?40文字以下不可とか本当に意味わからないけどこれ限界文字数書いてないからマジでやばい文字数いけるんじゃないの?えこ...
 
National Security Agency - NSA mobile device best practices
National Security Agency - NSA mobile device best practicesNational Security Agency - NSA mobile device best practices
National Security Agency - NSA mobile device best practices
 

Growing Software and Growing Ourselves

  • 1. 1 Growing Software & Growing Ourselves DAN PARKIN
  • 2. 2 WHO AM I? ABOUT SOFTWARE CRAFTSMAN AT CODURANCE MMU ALUMNUS ACTIVE IN THE DEV COMMUNITY @danpkn
  • 4. 44 TODAY’S MISSION. 1. 40 MINS - PROVIDE A 10,000 FOOT VIEW OF: ● Code smells & refactoring ○ Technical debt ● Test-Driven Development ○ Classicist TDD ○ Outside-In TDD ● SOLID Principles ○ Some other important principles ● Clean Code & Clean Architecture ○ What is bad code? ○ Habitability ● Spiking & Walking Skeletons ○ Feedback loops 2. 5 MINS - TIPS TO GROW AS A PROFESSIONAL 3. Q&A
  • 7. 7 TECHNICAL PRACTICES I WISH I’D KNOWN EXISTED. SOLID PRINCIPLES DOMAIN-DRIVEN DESIGN: IMPORTANCE OF CONTEXT & LANGUAGE CODE SMELLS & REFACTORING CLEAN CODE & ARCHITECTURE TEST-DRIVEN DEVELOPMENT SPIKING & WALKING SKELETONS
  • 8. 8
  • 9. 9 CODE SMELLS & REFACTORING. DESIGN CHOICES “Code smells are symptoms of poor design or implementation choices” - Martin Fowler
  • 10. 10
  • 11. 11
  • 12. 12
  • 13. 13
  • 14. 14
  • 15. 15
  • 16. 16 16 The second law of thermodynamics, in principle, states that a closed system's disorder cannot be reduced, it can only remain unchanged or increase. A measure of this disorder is entropy. This law also seems plausible for software systems; as a system is modified, its disorder, or entropy, tends to increase. This is known as software entropy.. IVAR JACOBSON.
  • 17. 17 TECHNICAL DEBT / MESS. Technical debt is a concept in software development that reflects the implied cost of additional rework caused by choosing an easy solution now instead of using a better approach that would take longer. Leads to “spaghetti code”. REFACTORING
  • 18. 18 ESSENTIAL VS ACCIDENTAL COMPLEXITY. Essential tasks, the fashioning of the complex conceptual structures that compose the abstract software entity. Accidental tasks, the representation of these abstract entities in programming languages and the mapping of these onto machine languages within space and speed constraints. REFACTORING
  • 19. 19 BROKEN WINDOWS THEORY. A criminological theory that visible signs of crime, anti- social behavior, and civil disorder create an urban environment that encourages further crime and disorder, including serious crimes. REFACTORING
  • 20. 20 THE BOY SCOUT RULE. Leave the campsite cleaner than we found it. Small, incremental improvements that cumulatively make a large difference over time. REFACTORING
  • 22. 22 TEST-DRIVEN DEVELOPMENT. DESIGN WITH EXAMPLES Test-driven development (TDD) is a software development process that relies on the repetition of a very short development cycle: requirements are turned into very specific test cases, then the software is improved to pass the new tests, only.
  • 23. 23
  • 25. 2525 CLASSICIST TDD. CLASSICIST TDD (CHICAGO SCHOOL): ● Also called, inside-out TDD ● State based verification ● Use of triangulation ● Stimulus / response pairs ● Explore one fact about the system at a time ● Useful for algorithmic problems “As the tests get more specific, the code gets more generic.” - Robert C. Martin
  • 26. 26
  • 27. 27 Triangulation. Test case 1 Test case 2 Test case 3 Unknown algorithm
  • 28. 28
  • 29. 29
  • 30. 30
  • 31. 31
  • 32. 32
  • 33. 33
  • 34. 3434 OUTSIDE-IN TDD. OUTSIDE-IN TDD (LONDON SCHOOL): ● Also called, mockist TDD ● Start testing at the boundaries of the system ● Focus on behaviour verification ● Interaction between objects ● Use of stubs to verify data flow ● Use of mocks to verify side effects
  • 35. 35
  • 36. 36
  • 37. 37
  • 38. 38
  • 39. 3939 MOCKS & STUBS. MOCKS: ● Test that a side effect did occur ● Test that a side effect didn’t occur ● Control how data flows through the SUT STUBS:
  • 40. 40
  • 41. 41
  • 42. 42
  • 43. 43
  • 44. 44 SOLID PRINCIPLES. DESIGN PRINCIPLES In object-oriented computer programming, SOLID is a mnemonic acronym for five design principles intended to make software designs more understandable, flexible and maintainable.
  • 46. 46
  • 47. 47 S.O.L.I.D SINGLE RESPONSIBILITY A class should have only a single responsibility, that is, only changes to one part of the software's specification should be able to affect the specification of the class. OPEN/CLOSED Software entities should be open for extension, but closed for modification. LISKOV SUBSTITUTION Objects in a program should be replaceable with instances of their subtypes without altering the correctness of that program. INTERFACE SEGREGATION Many client-specific interfaces are better than one general- purpose interface. Don’t force clients to depend on methods they don’t use. DEPENDENCY INVERSION Depend on abstractions, not concretions.
  • 48. 48 OTHER PRINCIPLES. SEPARATION OF CONCERNS Clearly separate things that change for different reasons or at different rates of speed. COMMAND / QUERY SEGREGATION Methods should either be a command that performs an action, or a query that returns data to the caller, but not both. TELL, DON’T ASK “Ask the question we really want answered, instead of asking for the information to help us figure out the answer ourselves” - Growing Object-Oriented Software, Guided By Tests SLAP Single level of abstraction principle. DRY Don’t repeat yourself.
  • 49. 49 CLEAN CODE & ARCHITECTURE. DESIGN PRINCIPLES “Even bad code can function. But if code isn’t clean, it can bring a development organisation to its knees. Every year, countless hours and significant resources are lost because of poorly written code. But it doesn’t have to be that way.”
  • 52. 52 52 Habitability is the characteristic of source code that enables people coming to the code later in its life to understand its construction and intentions and to change it comfortably and confidently. RICHARD GABRIEL.
  • 53. 53
  • 54. 54 WHAT IS BAD CODE? DOESN’T REVEAL INTENT Abbreviations, ambiguity, unclear naming, excessive use of comments DIFFICULT TO REASON ABOUT Large classes / methods, code at different levels of abstraction, Single Responsibility Principle violation, Command Query Segregation Principle violation TIGHTLY COUPLED Entities are inappropriately intimate, unable to test entities in isolation, poor / no separation of concerns SCARY TO CHANGE Low / no test coverage makes changes risky, developers scared to add features to / maintain the codebase CLEAN CODE
  • 55. The best metric for design refuse is WTFs per minute. ROBERT C. MARTIN
  • 56. 56 KENT BECK’S 4 RULES OF SIMPLE DESIGN TESTS PASS EXPRESSES INTENT NO DUPLICATION (DRY) SMALL CLEAN CODE
  • 57. 57
  • 58. 58
  • 59. 59 CLEAN ARCHITECTURE. OUR APPLICATION Business logic at the centre with details that at edges
  • 60. 60
  • 61. 61
  • 62. 62
  • 63. 63 Technical details Agnostic of technical details Technical details
  • 64. 64 Low level components High level components Low level components “Protect high level components from low level components”
  • 65. 65 MODULARITY. Loosely coupled, independent units with good separation of concerns that can be tested in isolation. Leads to “ravioli code”.
  • 66. 66 DDD: CONTEXT & LANGUAGE. DDD: UBIQUITOUS LANGUAGE Striving to use the vocabulary of a given business domain, not only in discussions about the requirements for a software product, but also in discussions of design as well the source code itself.
  • 67. 67
  • 68. 68 Ubiquitous Language “Nurses administer flu vaccines to patients in standard doses”
  • 70. 70 SPIKING & WALKING SKELETON. UNKNOWN UNKNOWNS "A Walking Skeleton is a tiny implementation of the system that performs a small end-to-end function. It need not use the final architecture, but it should link together the main architectural components. The architecture and the functionality can then evolve in parallel." - Alistair Cockburn
  • 72. The faster we receive feedback, the sooner we can learn and take action.
  • 73. 7373 TECHNICAL SPIKE. SPIKING: ● Experimentation ● Figure out answers to tough technical or design problems ● Reduce the risk of complications and problems ● Validate assumptions & technology choices ● Better understanding, better estimates ● Risk mitigation ● Doesn’t focus on quality, focus is on learning ● Throw away
  • 74. A “walking skeleton” is an implementation of the thinnest possible slice of real functionality that we can automatically build, deploy, and test end-to-end ALISTAIR COCKBURN
  • 75. 75
  • 76. 7676 SUMMARY. ● Take time to learn the fundamentals of software design ○ SOLID, ○ Code smells ○ Refactoring ○ Four rules of simple design ● Adopt TDD ● Protect what makes you money from low level details like frameworks ● Naming is important ○ Use a common language incorporating business terms ● Flush out uncertainty with spikes and walking skeletons
  • 84. The amount of serendipity that will occur in your life, your Luck Surface Area, is directly proportional to the degree to which you do something you're passionate about combined with the total number of people to whom this is effectively communicated. JASON ROBERTS