SlideShare une entreprise Scribd logo
1  sur  21
1
Symptoms of Bad Quality Software
Copyright © 2015 ELI Research India Pvt. Ltd., Chennai 2
http://ashokg.com
Big Ball of Mud: By Brian Foote and Joseph Yoder
Copyright © 2015 ELI Research India Pvt. Ltd., Chennai 3
A Big Ball of Mud is a haphazardly structured, sprawling,
sloppy, duct-tape-and-baling-wire, spaghetti-code jungle.
big ball of mud is a software system that lacks a
perceivable architecture. Although undesirable from an
engineering point of view, such systems are common in
practice due to business pressures and developer
turnover. They have therefore been declared a design
anti-pattern.
Big Ball of Mud: By Brian Foote and Joseph Yoder
Copyright © 2015 ELI Research India Pvt. Ltd., Chennai 4
5
Tell me and I'll forget.
Show me and I might remember.
But involve me and I will understand.
Symptoms of Bad Quality Software
Copyright © 2015 ELI Research India Pvt. Ltd., Chennai 6
• Rigidity
• Fragility
• Immobility (Inseparability)
• Viscosity
• Needless Repetition
• Needless Complexity
• Opacity
Symptoms of Bad Quality Software
Copyright © 2015 ELI Research India Pvt. Ltd., Chennai 7
Rigidity: The design is hard to change
• Very difficult to modify
• Changes propagate via dependencies to other modules
• You start modifying the code and it leads to modify
more code that changes and within minutes you
change the code you never thought would change (in
several places)
• Comes from Strong/High coupling and Week/Low
Cohesion
 Telltale sign: "Huh, it was a lot more complicated than I thought."
Symptoms of Bad Quality Software
Copyright © 2015 ELI Research India Pvt. Ltd., Chennai 8
Fragility: The design is easy to break
• Code is very fragile
• Changes cause cascading effects to many places the
code breaks in unexpected places that have no
conceptual relationship with the changed area
• Fixing the problems causes new problems
• You make a change and very quickly it ends-up making
lot of other changes. The code just breaks and it
becomes very difficult to put it back in to shape
• It starts breaking in several places if you start to do
more changes
Symptoms of Bad Quality Software
Copyright © 2015 ELI Research India Pvt. Ltd., Chennai 9
Fragility: The design is easy to break
• E.g. Kids play with a deck of cards to build a house of
cards. When it comes about 3-4 feet you very careful
to put stuff on it. And you say don't open the door. You
very quite and move very slowly. And we grow and
create software. We type the code it compiles, we
move slowly from the computer, and we say The code
works don't touch it, I'm going home! ShipIt!
• Extremely Fragile.
• The code is very difficult to maintain at that moment
Symptoms of Bad Quality Software
Copyright © 2015 ELI Research India Pvt. Ltd., Chennai 10
Fragility: The design is easy to break
Telltale signs:
– Some modules are constantly on the bug list
– Time is used finding bugs, not fixing them
– Programmers are reluctant to change anything in
the code
Symptoms of Bad Quality Software
Copyright © 2015 ELI Research India Pvt. Ltd., Chennai 11
Inseparability (Immobility)
Spaghetti code is a term for source code that has a complex
and tangled control structure
Symptoms of Bad Quality Software
Copyright © 2015 ELI Research India Pvt. Ltd., Chennai 12
Immobility: The design is hard to reuse!
• The code is so tangled (twisted) that it is impossible to reuse
anything
• The code is very immobile!
• The class depends on other class and that is depeneds on some
other class. Very soon we need to do a disk swap. It needs
everything on my system.
• Immobile code is very difficult to handle
 Telltale sign: A module could be reused but the effort and risk
of separating it from the original environment is too high
-- Decouple the code. Use one level of indirection and abstraction
Symptoms of Bad Quality Software
Copyright © 2015 ELI Research India Pvt. Ltd., Chennai 13
Viscosity: The code resists making a change
• We tend to do, Its easier to do the wrong thing. Its
hard to do the right thing.
• Imagine we have a 40-lines of code and we see some
of the things are matching. We copy and paste it. And
very soon you have 7 copies of it. When you want to
fix it, you'll do it in 4 places and it becomes expensive
to maintain the code.
• Metaphor: Very hard to swim in oil than its in water.
• Resistance! or Friction! or Rotting!
 Unit Testing will help!
Symptoms of Bad Quality Software
Copyright © 2015 ELI Research India Pvt. Ltd., Chennai 14
Needless Complexity: Overdesign.
• We just cannot do simple things, We got to do things
complex
• It makes pride in doing in complex.
• JOKE: Job security! Nobody can understand other than
me 
• REUSE/ABUSE (We need binary reusability. Not source
code level duplication)
Simple things should be simple and complex things should be possible.
- Alan Kay
Symptoms of Bad Quality Software
Copyright © 2015 ELI Research India Pvt. Ltd., Chennai 15
Needless Repetition: Mouse abuse.
• Do not abuse the copy & paste options.
• When it is possible, try to refactor the repetitive code.
Follow DRY principle
Symptoms of Bad Quality Software
Copyright © 2015 ELI Research India Pvt. Ltd., Chennai 16
Opacity: Difficult to understand
• It is very difficult to understand the code on what it
does.
• The meaning walks away with the person who wrote it
or created it.
• The boss says don't touch that code the guy who
wrote it is no longer works here!
 Telltale sign: You are reluctant to fix somebody else’s code or even your own!
Symptoms of Bad Quality Software
Copyright © 2015 ELI Research India Pvt. Ltd., Chennai 17
• DRY
• YAGNI
• SRP
• OCP
• LSP
• DIP
• CQS
Possible Solutions:
Copyright © 2013 Coextrix Technologies Pvt. Ltd., Bangalore 18Copyright © 2015 ELI Research India Pvt. Ltd., Chennai
When a tester didn't find any cool bugs, then he basically has two
options to think about.
a) The software is good enough to go live
b) The software wasn't tested well enough
Typically, the developer thinks it is "a". And, of course, the tester
always fears it could be option "b".
Copyright © 2013 Coextrix Technologies Pvt. Ltd., Bangalore 19Copyright © 2015 ELI Research India Pvt. Ltd., Chennai
Books:
Copyright © 2015 ELI Research India Pvt. Ltd., Chennai 20
1. Refactoring - Improving The Design Of Existing Code
-- by Martin Fowler
2. Agile Software Development
Principles, Patterns, and Practices
-- by Robert C. Martin
3. Clean Code -- by Robert C. Martin
4. Code Complete (2nd Edition) -- by Steve McConnell
A Practical Handbook of Software Construction
5. Working effectively with legacy code
-- by Michael Feathers
Thank you!
Thank you!
The amateur software engineer is always in
search of magic. -- Grady Booch
Copyright © 2015 ELI Research India Pvt. Ltd., Chennai 21
http://ashokg.com

Contenu connexe

Tendances

Peer Code Review An Agile Process
Peer Code Review An Agile ProcessPeer Code Review An Agile Process
Peer Code Review An Agile Processgsporar
 
Intro TDD Portuguese developers meetup London 16/04/2014
Intro TDD Portuguese developers meetup London 16/04/2014Intro TDD Portuguese developers meetup London 16/04/2014
Intro TDD Portuguese developers meetup London 16/04/2014Pedro Santos
 
Big Ball of Mud: Software Maintenance Nightmares
Big Ball of Mud: Software Maintenance NightmaresBig Ball of Mud: Software Maintenance Nightmares
Big Ball of Mud: Software Maintenance NightmaresGonzalo Rodríguez
 
Software craftmanship coaching
Software craftmanship coachingSoftware craftmanship coaching
Software craftmanship coachingPedro Santos
 
Code review guidelines
Code review guidelinesCode review guidelines
Code review guidelinesLalit Kale
 
Code Review Skills for Pythonistas - Nina Zakharenko - EuroPython
Code Review Skills for Pythonistas - Nina Zakharenko - EuroPythonCode Review Skills for Pythonistas - Nina Zakharenko - EuroPython
Code Review Skills for Pythonistas - Nina Zakharenko - EuroPythonNina Zakharenko
 
Writing clean and maintainable code
Writing clean and maintainable codeWriting clean and maintainable code
Writing clean and maintainable codeMarko Heijnen
 
Introduction to TDD
Introduction to TDDIntroduction to TDD
Introduction to TDDAhmed Misbah
 
Let's review it: What designers can learn from (code) review
Let's review it: What designers can learn from (code) reviewLet's review it: What designers can learn from (code) review
Let's review it: What designers can learn from (code) reviewIda Aalen
 
How to Deliver the Right Software (Specification by example)
How to Deliver the Right Software (Specification by example)How to Deliver the Right Software (Specification by example)
How to Deliver the Right Software (Specification by example)Asier Barrenetxea
 
TDD for Testers Workshop
TDD for Testers WorkshopTDD for Testers Workshop
TDD for Testers WorkshopSarah Usher
 
Portrait of professional developer 2.0
Portrait of professional developer 2.0Portrait of professional developer 2.0
Portrait of professional developer 2.0Mikalai Alimenkou
 
Mobile development for startups
Mobile development for startupsMobile development for startups
Mobile development for startupsJorge Barroso
 
Pair Programming, TDD and other impractical things
Pair Programming, TDD and other impractical thingsPair Programming, TDD and other impractical things
Pair Programming, TDD and other impractical thingsMarcello Duarte
 
Common Java problems when developing with Android
Common Java problems when developing with AndroidCommon Java problems when developing with Android
Common Java problems when developing with AndroidStephen Gilmore
 
Code Review Matters and Manners
Code Review Matters and MannersCode Review Matters and Manners
Code Review Matters and MannersTrisha Gee
 

Tendances (20)

Peer Code Review An Agile Process
Peer Code Review An Agile ProcessPeer Code Review An Agile Process
Peer Code Review An Agile Process
 
Intro TDD Portuguese developers meetup London 16/04/2014
Intro TDD Portuguese developers meetup London 16/04/2014Intro TDD Portuguese developers meetup London 16/04/2014
Intro TDD Portuguese developers meetup London 16/04/2014
 
Big Ball of Mud: Software Maintenance Nightmares
Big Ball of Mud: Software Maintenance NightmaresBig Ball of Mud: Software Maintenance Nightmares
Big Ball of Mud: Software Maintenance Nightmares
 
Software craftmanship coaching
Software craftmanship coachingSoftware craftmanship coaching
Software craftmanship coaching
 
Code review guidelines
Code review guidelinesCode review guidelines
Code review guidelines
 
Clean code
Clean codeClean code
Clean code
 
Code Review Skills for Pythonistas - Nina Zakharenko - EuroPython
Code Review Skills for Pythonistas - Nina Zakharenko - EuroPythonCode Review Skills for Pythonistas - Nina Zakharenko - EuroPython
Code Review Skills for Pythonistas - Nina Zakharenko - EuroPython
 
Writing clean and maintainable code
Writing clean and maintainable codeWriting clean and maintainable code
Writing clean and maintainable code
 
Code review at large scale
Code review at large scaleCode review at large scale
Code review at large scale
 
Introduction to TDD
Introduction to TDDIntroduction to TDD
Introduction to TDD
 
Let's review it: What designers can learn from (code) review
Let's review it: What designers can learn from (code) reviewLet's review it: What designers can learn from (code) review
Let's review it: What designers can learn from (code) review
 
How to Deliver the Right Software (Specification by example)
How to Deliver the Right Software (Specification by example)How to Deliver the Right Software (Specification by example)
How to Deliver the Right Software (Specification by example)
 
TDD for Testers Workshop
TDD for Testers WorkshopTDD for Testers Workshop
TDD for Testers Workshop
 
Portrait of professional developer 2.0
Portrait of professional developer 2.0Portrait of professional developer 2.0
Portrait of professional developer 2.0
 
Mobile development for startups
Mobile development for startupsMobile development for startups
Mobile development for startups
 
Pair Programming, TDD and other impractical things
Pair Programming, TDD and other impractical thingsPair Programming, TDD and other impractical things
Pair Programming, TDD and other impractical things
 
Common Java problems when developing with Android
Common Java problems when developing with AndroidCommon Java problems when developing with Android
Common Java problems when developing with Android
 
Pair Programming
Pair ProgrammingPair Programming
Pair Programming
 
BBOM-AgilePT-2010
BBOM-AgilePT-2010BBOM-AgilePT-2010
BBOM-AgilePT-2010
 
Code Review Matters and Manners
Code Review Matters and MannersCode Review Matters and Manners
Code Review Matters and Manners
 

Similaire à Symptoms of Bad Quality Software

10 Big Ideas from Industry
10 Big Ideas from Industry10 Big Ideas from Industry
10 Big Ideas from IndustryGarth Gilmour
 
11 rules for programmer should live by
11 rules for programmer should live by11 rules for programmer should live by
11 rules for programmer should live byYe Win
 
Workshop fight legacy code write unit test
Workshop fight legacy code write unit testWorkshop fight legacy code write unit test
Workshop fight legacy code write unit testTung Nguyen Thanh
 
[XPday.vn] Legacy code workshop (at) [XP Day Vietnam 2015]
[XPday.vn] Legacy code workshop (at) [XP Day Vietnam 2015][XPday.vn] Legacy code workshop (at) [XP Day Vietnam 2015]
[XPday.vn] Legacy code workshop (at) [XP Day Vietnam 2015]Agile đây Vietnam
 
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
 
jsDay - Javascript as a programming language
jsDay - Javascript as a programming languagejsDay - Javascript as a programming language
jsDay - Javascript as a programming languageMarco Cedaro
 
What is DevOps?
What is DevOps?What is DevOps?
What is DevOps?jeckels
 
How HipChat Ships and Recovers Fast with DevOps Practices
How HipChat Ships and Recovers Fast with DevOps PracticesHow HipChat Ships and Recovers Fast with DevOps Practices
How HipChat Ships and Recovers Fast with DevOps PracticesAtlassian
 
14 Habits of Great SQL Developers
14 Habits of Great SQL Developers14 Habits of Great SQL Developers
14 Habits of Great SQL DevelopersIke Ellis
 
Arch factory - Agile Design: Best Practices
Arch factory - Agile Design: Best PracticesArch factory - Agile Design: Best Practices
Arch factory - Agile Design: Best PracticesIgor Moochnick
 
Developers Best Practices
Developers Best PracticesDevelopers Best Practices
Developers Best Practicesaqib javaid
 
Dancing for a product release
Dancing for a product releaseDancing for a product release
Dancing for a product releaseLaurent Cerveau
 
Code smells and Other Malodorous Software Odors
Code smells and Other Malodorous Software OdorsCode smells and Other Malodorous Software Odors
Code smells and Other Malodorous Software OdorsClint Edmonson
 
How To Do Kick-Ass Software Development
How To Do Kick-Ass Software DevelopmentHow To Do Kick-Ass Software Development
How To Do Kick-Ass Software DevelopmentSven Peters
 
top developer mistakes
top developer mistakes top developer mistakes
top developer mistakes Hanokh Aloni
 

Similaire à Symptoms of Bad Quality Software (20)

10 Big Ideas from Industry
10 Big Ideas from Industry10 Big Ideas from Industry
10 Big Ideas from Industry
 
11 rules for programmer should live by
11 rules for programmer should live by11 rules for programmer should live by
11 rules for programmer should live by
 
Best pratice
Best praticeBest pratice
Best pratice
 
Workshop fight legacy code write unit test
Workshop fight legacy code write unit testWorkshop fight legacy code write unit test
Workshop fight legacy code write unit test
 
[XPday.vn] Legacy code workshop (at) [XP Day Vietnam 2015]
[XPday.vn] Legacy code workshop (at) [XP Day Vietnam 2015][XPday.vn] Legacy code workshop (at) [XP Day Vietnam 2015]
[XPday.vn] Legacy code workshop (at) [XP Day Vietnam 2015]
 
How to write bad code using C#
How to write bad code using C#How to write bad code using C#
How to write bad code using C#
 
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.....
 
jsDay - Javascript as a programming language
jsDay - Javascript as a programming languagejsDay - Javascript as a programming language
jsDay - Javascript as a programming language
 
While You Are Coding
While You Are CodingWhile You Are Coding
While You Are Coding
 
Traits of a Good Engineer
Traits of a Good EngineerTraits of a Good Engineer
Traits of a Good Engineer
 
What is DevOps?
What is DevOps?What is DevOps?
What is DevOps?
 
How HipChat Ships and Recovers Fast with DevOps Practices
How HipChat Ships and Recovers Fast with DevOps PracticesHow HipChat Ships and Recovers Fast with DevOps Practices
How HipChat Ships and Recovers Fast with DevOps Practices
 
14 Habits of Great SQL Developers
14 Habits of Great SQL Developers14 Habits of Great SQL Developers
14 Habits of Great SQL Developers
 
Arch factory - Agile Design: Best Practices
Arch factory - Agile Design: Best PracticesArch factory - Agile Design: Best Practices
Arch factory - Agile Design: Best Practices
 
Developers Best Practices
Developers Best PracticesDevelopers Best Practices
Developers Best Practices
 
Make a better with clean code
Make a better with clean codeMake a better with clean code
Make a better with clean code
 
Dancing for a product release
Dancing for a product releaseDancing for a product release
Dancing for a product release
 
Code smells and Other Malodorous Software Odors
Code smells and Other Malodorous Software OdorsCode smells and Other Malodorous Software Odors
Code smells and Other Malodorous Software Odors
 
How To Do Kick-Ass Software Development
How To Do Kick-Ass Software DevelopmentHow To Do Kick-Ass Software Development
How To Do Kick-Ass Software Development
 
top developer mistakes
top developer mistakes top developer mistakes
top developer mistakes
 

Symptoms of Bad Quality Software

  • 1. 1
  • 2. Symptoms of Bad Quality Software Copyright © 2015 ELI Research India Pvt. Ltd., Chennai 2 http://ashokg.com
  • 3. Big Ball of Mud: By Brian Foote and Joseph Yoder Copyright © 2015 ELI Research India Pvt. Ltd., Chennai 3 A Big Ball of Mud is a haphazardly structured, sprawling, sloppy, duct-tape-and-baling-wire, spaghetti-code jungle. big ball of mud is a software system that lacks a perceivable architecture. Although undesirable from an engineering point of view, such systems are common in practice due to business pressures and developer turnover. They have therefore been declared a design anti-pattern.
  • 4. Big Ball of Mud: By Brian Foote and Joseph Yoder Copyright © 2015 ELI Research India Pvt. Ltd., Chennai 4
  • 5. 5 Tell me and I'll forget. Show me and I might remember. But involve me and I will understand.
  • 6. Symptoms of Bad Quality Software Copyright © 2015 ELI Research India Pvt. Ltd., Chennai 6 • Rigidity • Fragility • Immobility (Inseparability) • Viscosity • Needless Repetition • Needless Complexity • Opacity
  • 7. Symptoms of Bad Quality Software Copyright © 2015 ELI Research India Pvt. Ltd., Chennai 7 Rigidity: The design is hard to change • Very difficult to modify • Changes propagate via dependencies to other modules • You start modifying the code and it leads to modify more code that changes and within minutes you change the code you never thought would change (in several places) • Comes from Strong/High coupling and Week/Low Cohesion  Telltale sign: "Huh, it was a lot more complicated than I thought."
  • 8. Symptoms of Bad Quality Software Copyright © 2015 ELI Research India Pvt. Ltd., Chennai 8 Fragility: The design is easy to break • Code is very fragile • Changes cause cascading effects to many places the code breaks in unexpected places that have no conceptual relationship with the changed area • Fixing the problems causes new problems • You make a change and very quickly it ends-up making lot of other changes. The code just breaks and it becomes very difficult to put it back in to shape • It starts breaking in several places if you start to do more changes
  • 9. Symptoms of Bad Quality Software Copyright © 2015 ELI Research India Pvt. Ltd., Chennai 9 Fragility: The design is easy to break • E.g. Kids play with a deck of cards to build a house of cards. When it comes about 3-4 feet you very careful to put stuff on it. And you say don't open the door. You very quite and move very slowly. And we grow and create software. We type the code it compiles, we move slowly from the computer, and we say The code works don't touch it, I'm going home! ShipIt! • Extremely Fragile. • The code is very difficult to maintain at that moment
  • 10. Symptoms of Bad Quality Software Copyright © 2015 ELI Research India Pvt. Ltd., Chennai 10 Fragility: The design is easy to break Telltale signs: – Some modules are constantly on the bug list – Time is used finding bugs, not fixing them – Programmers are reluctant to change anything in the code
  • 11. Symptoms of Bad Quality Software Copyright © 2015 ELI Research India Pvt. Ltd., Chennai 11 Inseparability (Immobility) Spaghetti code is a term for source code that has a complex and tangled control structure
  • 12. Symptoms of Bad Quality Software Copyright © 2015 ELI Research India Pvt. Ltd., Chennai 12 Immobility: The design is hard to reuse! • The code is so tangled (twisted) that it is impossible to reuse anything • The code is very immobile! • The class depends on other class and that is depeneds on some other class. Very soon we need to do a disk swap. It needs everything on my system. • Immobile code is very difficult to handle  Telltale sign: A module could be reused but the effort and risk of separating it from the original environment is too high -- Decouple the code. Use one level of indirection and abstraction
  • 13. Symptoms of Bad Quality Software Copyright © 2015 ELI Research India Pvt. Ltd., Chennai 13 Viscosity: The code resists making a change • We tend to do, Its easier to do the wrong thing. Its hard to do the right thing. • Imagine we have a 40-lines of code and we see some of the things are matching. We copy and paste it. And very soon you have 7 copies of it. When you want to fix it, you'll do it in 4 places and it becomes expensive to maintain the code. • Metaphor: Very hard to swim in oil than its in water. • Resistance! or Friction! or Rotting!  Unit Testing will help!
  • 14. Symptoms of Bad Quality Software Copyright © 2015 ELI Research India Pvt. Ltd., Chennai 14 Needless Complexity: Overdesign. • We just cannot do simple things, We got to do things complex • It makes pride in doing in complex. • JOKE: Job security! Nobody can understand other than me  • REUSE/ABUSE (We need binary reusability. Not source code level duplication) Simple things should be simple and complex things should be possible. - Alan Kay
  • 15. Symptoms of Bad Quality Software Copyright © 2015 ELI Research India Pvt. Ltd., Chennai 15 Needless Repetition: Mouse abuse. • Do not abuse the copy & paste options. • When it is possible, try to refactor the repetitive code. Follow DRY principle
  • 16. Symptoms of Bad Quality Software Copyright © 2015 ELI Research India Pvt. Ltd., Chennai 16 Opacity: Difficult to understand • It is very difficult to understand the code on what it does. • The meaning walks away with the person who wrote it or created it. • The boss says don't touch that code the guy who wrote it is no longer works here!  Telltale sign: You are reluctant to fix somebody else’s code or even your own!
  • 17. Symptoms of Bad Quality Software Copyright © 2015 ELI Research India Pvt. Ltd., Chennai 17 • DRY • YAGNI • SRP • OCP • LSP • DIP • CQS Possible Solutions:
  • 18. Copyright © 2013 Coextrix Technologies Pvt. Ltd., Bangalore 18Copyright © 2015 ELI Research India Pvt. Ltd., Chennai
  • 19. When a tester didn't find any cool bugs, then he basically has two options to think about. a) The software is good enough to go live b) The software wasn't tested well enough Typically, the developer thinks it is "a". And, of course, the tester always fears it could be option "b". Copyright © 2013 Coextrix Technologies Pvt. Ltd., Bangalore 19Copyright © 2015 ELI Research India Pvt. Ltd., Chennai
  • 20. Books: Copyright © 2015 ELI Research India Pvt. Ltd., Chennai 20 1. Refactoring - Improving The Design Of Existing Code -- by Martin Fowler 2. Agile Software Development Principles, Patterns, and Practices -- by Robert C. Martin 3. Clean Code -- by Robert C. Martin 4. Code Complete (2nd Edition) -- by Steve McConnell A Practical Handbook of Software Construction 5. Working effectively with legacy code -- by Michael Feathers Thank you!
  • 21. Thank you! The amateur software engineer is always in search of magic. -- Grady Booch Copyright © 2015 ELI Research India Pvt. Ltd., Chennai 21 http://ashokg.com