This document discusses the Open Closed Principle of software design. It explores the tension between meeting today's needs while allowing for future changes. The principle advocates designing software that is open for extension, but closed for modification, by favoring changing software through addition of new code rather than modifying existing code. This reduces the risks and costs of unexpected defects when software is modified. The document examines how qualities like flexibility, reliability and stability can be promoted by following this principle.
OO Inheritance - Not Always Evil - Refactoring to Open-Closed with InheritancePhilip Schwarz
Refactoring an unmaintainable mess of nested conditionals to the Open/Closed principle - using OO inheritance -- an example - Inheritance is not always evil!
Based on Sandi Metz's 'All the Little Things' http://www.confreaks.com/videos/3358-railsconf-all-the-little-things
Refactoring Applications using SOLID PrinciplesSteven Smith
We’ve all heard about well-designed software projects, where things aren’t (yet) a big ball of mud that’s painful to work with, but many of us aren’t lucky enough to work on these. Nor is it an option for us to get to start a brand new “greenfield” project, where we can leave behind the legacy of spaghetti code and technical debt our current project might have.
But there is hope! By applying refactoring steps based on SOLID principles of object oriented design, we can reduce the technical debt of our existing application, improve our code quality, and hopefully make our application more enjoyable and productive to work with.
In this session, we’ll briefly introduce the SOLID principles and several design patterns, and then we’ll apply these principles and patterns by improving the design of an existing application through several refactoring steps.
OO Inheritance - Not Always Evil - Refactoring to Open-Closed with InheritancePhilip Schwarz
Refactoring an unmaintainable mess of nested conditionals to the Open/Closed principle - using OO inheritance -- an example - Inheritance is not always evil!
Based on Sandi Metz's 'All the Little Things' http://www.confreaks.com/videos/3358-railsconf-all-the-little-things
Refactoring Applications using SOLID PrinciplesSteven Smith
We’ve all heard about well-designed software projects, where things aren’t (yet) a big ball of mud that’s painful to work with, but many of us aren’t lucky enough to work on these. Nor is it an option for us to get to start a brand new “greenfield” project, where we can leave behind the legacy of spaghetti code and technical debt our current project might have.
But there is hope! By applying refactoring steps based on SOLID principles of object oriented design, we can reduce the technical debt of our existing application, improve our code quality, and hopefully make our application more enjoyable and productive to work with.
In this session, we’ll briefly introduce the SOLID principles and several design patterns, and then we’ll apply these principles and patterns by improving the design of an existing application through several refactoring steps.
During this talk we will discuss about the SOLID Principles described by Robert C. Martin, applying them in the Java programming language. Each principle will be explained in detail, with practical Java examples.
We will assess how these principles make it easy to develop the software for the entire duration of the project, and how some problems can appear if these principles are not applied. We will present common code fragments that do not respect these principles, and we'll see how we can correct them. Taking the SOLID principles into consideration, we will also analyse a real Java project using a Static Code Analyzer tool (e.g. STAN).
Finally, we will discuss the strategies on how to apply these design principles in "greenfield" projects, as well as "legacy" projects, while offering some tips and tricks.
Object Oriented Design Principles
~ How to become a SOLID programmer ~
~ A guide to make a well-designed application with Laravel ~
"Proper Object Oriented Design makes a developer's life easy, whereas bad design makes it a disaster"
Learning solid principles using c#
S Single Responsibility Principle
O Open Closed Principle
L Liskovs Substitution Principle
I Interface Segregation Principle
D Dependency Inversion principle
This BJUG presentation is focused on the unique inter-process communication (IPC) mechanism introduced by Android, namely Binder. As such, we will be exploring the entire Android software stack, starting from the Linux kernel, moving up to the Linux userspace, reaching the Android framework and ending our journey with some real-life usages of Binder in Android applications.
We will show how widely used Binder actually is in Android, thus proving that it is a cornerstone of the operating system. The main focus is on the programming model exposed towards developers and we will highlight when, how and why it should be used.
https://bjug.ro/binding-android-piece-by-piece/
This course provides a detailed introduction to the Object Oriented techniques identified by Robert Martin as the SOLID principles of software design. Intended for both novice and intermediary developers, each of the five principles are fully defined and explored. Real-world coding examples are provided for each software tenant to help fully expound upon the design techniques. By the end of the session, developers will be able to identify common code smells while applying SOLID programming practices that ensure clean and maintainable code.
Refactoring: Improve the design of existing codeValerio Maggio
Refactoring: Improve the design of existing code
Software Engineering class on main refactoring techniques and bad smells reported in the famous Fawler's book on this topic!
"Refactoring to SOLID Code" session presentation from
Emerging .NET Devs - October 2011 User Group Meeting.
Please note that this presentation has been simplified for publishing.
A talk about DevOps that I gave at a SysARmy meetup while visiting MuleSoft's Buenos Aires DevOps team. I've been thinking a lot recently about what DevOps is, what it means to be a DevOps Engineer (or in my case a DevOps Engineering Manager). Putting this together was really helpful to clarify some ideas I've been kicking around.
During this talk we will discuss about the SOLID Principles described by Robert C. Martin, applying them in the Java programming language. Each principle will be explained in detail, with practical Java examples.
We will assess how these principles make it easy to develop the software for the entire duration of the project, and how some problems can appear if these principles are not applied. We will present common code fragments that do not respect these principles, and we'll see how we can correct them. Taking the SOLID principles into consideration, we will also analyse a real Java project using a Static Code Analyzer tool (e.g. STAN).
Finally, we will discuss the strategies on how to apply these design principles in "greenfield" projects, as well as "legacy" projects, while offering some tips and tricks.
Object Oriented Design Principles
~ How to become a SOLID programmer ~
~ A guide to make a well-designed application with Laravel ~
"Proper Object Oriented Design makes a developer's life easy, whereas bad design makes it a disaster"
Learning solid principles using c#
S Single Responsibility Principle
O Open Closed Principle
L Liskovs Substitution Principle
I Interface Segregation Principle
D Dependency Inversion principle
This BJUG presentation is focused on the unique inter-process communication (IPC) mechanism introduced by Android, namely Binder. As such, we will be exploring the entire Android software stack, starting from the Linux kernel, moving up to the Linux userspace, reaching the Android framework and ending our journey with some real-life usages of Binder in Android applications.
We will show how widely used Binder actually is in Android, thus proving that it is a cornerstone of the operating system. The main focus is on the programming model exposed towards developers and we will highlight when, how and why it should be used.
https://bjug.ro/binding-android-piece-by-piece/
This course provides a detailed introduction to the Object Oriented techniques identified by Robert Martin as the SOLID principles of software design. Intended for both novice and intermediary developers, each of the five principles are fully defined and explored. Real-world coding examples are provided for each software tenant to help fully expound upon the design techniques. By the end of the session, developers will be able to identify common code smells while applying SOLID programming practices that ensure clean and maintainable code.
Refactoring: Improve the design of existing codeValerio Maggio
Refactoring: Improve the design of existing code
Software Engineering class on main refactoring techniques and bad smells reported in the famous Fawler's book on this topic!
"Refactoring to SOLID Code" session presentation from
Emerging .NET Devs - October 2011 User Group Meeting.
Please note that this presentation has been simplified for publishing.
A talk about DevOps that I gave at a SysARmy meetup while visiting MuleSoft's Buenos Aires DevOps team. I've been thinking a lot recently about what DevOps is, what it means to be a DevOps Engineer (or in my case a DevOps Engineering Manager). Putting this together was really helpful to clarify some ideas I've been kicking around.
What is DevOps? A lot of people think it means a lot of different things. We tend to think it has two complimentary aspects: culture and technology changes. Culture is what creates DevOps, technology enables it. Thanks, Kelly Goetsch, for the slide work.
This presentation includes
-Introduction to Continuous Integration (CI) and Continuous Deployment (CD)
-Introduction to Importance and Drawbacks of CI/CD
-Salesforce CI/CD Best Practices
-Implementation of CI/CD on Salesforce
AIMDek is positioned to cater end-to-end Salesforce services with faster time-to-market roll outs at minimal operational costs while ensuring you get a tactical package evaluation and roadmap, robust implementations and rollouts, product development and support and build exceptional customer experiences. Learn more here http://bit.ly/2ZdBWfW
There are many design principles that have become best practices over the years. Using these principles we can develop scalable and maintainable enterprise application with time tested approaches.
To assist in overcoming this obstacle, DevOps Solutions kicks in. This blog post will offer an in-depth overview of the DevOps lifecycle, including the stages involved. So, whether you are new to DevOps or looking to enhance your existing knowledge, this Ecosmob guide will provide you with a complete understanding of the DevOps lifecycle.
Devops On Cloud Powerpoint Template Slides Powerpoint Presentation SlidesSlideTeam
Introducing DevOps On Cloud PowerPoint Template Slides PowerPoint Presentation Slides. Provide an overview of DevOps with this attention-grabbing PPT slideshow. This presentation helps to understand the need for DevOps, how it is different from traditional IT, DevOps use cases in business, lifecycle, roadmap, and so on. Provide an overview of how DevOps is different from agile by using the content-ready DevOps strategy PPT visuals. The slides also explain the roles, responsibilities, and skills of DevOps engineers. DevOps automation tools and DevOps roadmap for implementation in the organization can be discussed effectively. Provide an overview of DevOps on the cloud by describing cloud computing, characteristics of cloud computing, benefits, top risks related to cloud computing, etc. Cloud computing use cases and cloud deployment models can be presented with the help of visual attention-grabbing DevOps implementation roadmap PowerPoint slides. The roadmap to integrate cloud computing in business can be depicted easily by using the DevOps implementation strategy PowerPoint slideshow. https://bit.ly/3d8uYRY
For a beginner, this is a good quality pictorial representation of DevOps and DevOps Center of Excellence.
Opex Software focuses on consulting, implementation and development of DevOps tools and platforms. Have helped small and large data centers! This presentation talks about Continuous Integration, Continuous Delivery at a high level. For detailed presentations and flows, please ping us.
Thanks again, Enjoy!
Direct Style Effect Systems -The Print[A] Example- A Comprehension AidPhilip Schwarz
The subject of this deck is the small Print[A] program in the following blog post by Noel Welsh: https://www.inner-product.com/posts/direct-style-effects/.
Keywords: "direct-style", "context function", "context functions", "algebraic effect", "algebraic effects", "scala", "effect system", "effect systems", "effect", "side effect", "composition", "fp", "functional programming"
Folding Cheat Sheet #4 - fourth in a seriesPhilip Schwarz
For functions that can be defined both as an instance of a right fold and as an instance of a left fold, one may be more efficient than the other.
Let's look at the example of a function 'decimal' that converts a list of digits into the corresponding decimal number.
Erratum: it has been pointed out that it is possible to define the zip function using a right fold (see slide 5).
Tagless Final Encoding - Algebras and Interpreters and also ProgramsPhilip Schwarz
Tagless Final Encoding - Algebras and Interpreters and also Programs - An introduction, through the work of Gabriel Volpe.
Slide deck home: http://fpilluminated.com/assets/tagless-final-encoding-algebras-interpreters-and-programs.html
A sighting of traverseFilter and foldMap in Practical FP in ScalaPhilip Schwarz
Slide deck home: http://fpilluminated.com/assets/sighting-of-scala-cats-traverseFilter-and-foldMap-in-practical-fp-in-scala.html.
Download PDF for perfect image quality.
A sighting of sequence function in Practical FP in ScalaPhilip Schwarz
Slide deck home: http://fpilluminated.com/assets/sighting-of-scala-cats-sequence-function-in-practical-fp-in-scala.html.
Download PDF for perfect image quality.
This talk was presented on Aug 3rd 2023 during the Scala in the City event a ITV in London https://www.meetup.com/scala-in-the-city/events/292844968/
Visit the following for a description, slideshow, all slides with transcript, pdf, github repo, and eventually a video recording: http://fpilluminated.com/assets/n-queens-combinatorial-puzzle-meets-cats.html
At the centre of this talk is the N-Queens combinatorial puzzle. The reason why this puzzle features in the Scala book and functional programming course by Martin Odersky (the language’s creator), is that such puzzles are a particularly suitable application area of 'for comprehensions'.
We’ll start by (re)acquainting ourselves with the puzzle, and seeing the role played in it by permutations. Next, we’ll see how, when wanting to visualise candidate puzzle solutions, Cats’ monoidal functions fold and foldMap are a great fit for combining images.
While we are all very familiar with the triad providing the bread, butter and jam of functional programming, i.e. map, filter and fold, not everyone knows about the corresponding functions in Cats’ monadic variant of the triad, i.e. mapM, filterM and foldM, which we are going to learn about next.
As is often the case in functional programming, the traverse function makes an appearance, and we shall grab the opportunity to point out the symmetry that exists in the interrelation of flatMap / foldMap / traverse and flatten / fold / sequence.
Armed with an understanding of foldM, we then look at how such a function can be used to implement an iterative algorithm for the N-Queens puzzle.
The talk ends by pointing out that the iterative algorithm is smarter than the recursive one, because it ‘remembers’ where it has already placed previous queens.
Kleisli composition, flatMap, join, map, unit - implementation and interrelat...Philip Schwarz
Kleisli composition, flatMap, join, map, unit. A study/memory aid, to help learn/recall their implementation/interrelation.
Version 2, updated for Scala 3
Nat, List and Option Monoids -from scratch -Combining and Folding -an examplePhilip Schwarz
Nat, List and Option Monoids, from scratch. Combining and Folding: an example.
This is a new version of the original which has some cosmetic changes and a new 7th slide which only differs from slide 6 in that it defines the fold function in terms of the foldRight function.
Code: https://github.com/philipschwarz/nat-list-and-option-monoids-from-scratch-combining-and-folding-an-example
Nat, List and Option Monoids -from scratch -Combining and Folding -an examplePhilip Schwarz
Nat, List and Option Monoids, from scratch. Combining and Folding: an example.
Code: https://github.com/philipschwarz/nat-list-and-option-monoids-from-scratch-combining-and-folding-an-example
The Sieve of Eratosthenes - Part II - Genuine versus Unfaithful Sieve - Haske...Philip Schwarz
When I posted the deck for Part 1 to the Scala users forum, Odd Möller linked to a paper titled "The Genuine Sieve of Eratosthenes", which speaks of the Unfaithful Sieve.
Part 2 is based on that paper and on Richard Bird's faithful Haskell implementation of the Sieve, which we translate into Scala.
Scala code for Richard Bird's infinite primes Haskell program: https://github.com/philipschwarz/sieve-of-eratosthenes-part-2-scala
Sum and Product Types -The Fruit Salad & Fruit Snack Example - From F# to Ha...Philip Schwarz
Sum and Product Types -The Fruit Salad & Fruit Snack Example - From F# to Haskell, Scala and Java.
Inspired by the example in Scott Wlaschin’s F# book: Domain Modeling Made Functional.
Download for better results.
Java 19 Code: https://github.com/philipschwarz/fruit-salad-and-fruit-snack-ADT-example-java
Field Employee Tracking System| MiTrack App| Best Employee Tracking Solution|...informapgpstrackings
Keep tabs on your field staff effortlessly with Informap Technology Centre LLC. Real-time tracking, task assignment, and smart features for efficient management. Request a live demo today!
For more details, visit us : https://informapuae.com/field-staff-tracking/
A Comprehensive Look at Generative AI in Retail App Testing.pdfkalichargn70th171
Traditional software testing methods are being challenged in retail, where customer expectations and technological advancements continually shape the landscape. Enter generative AI—a transformative subset of artificial intelligence technologies poised to revolutionize software testing.
Experience our free, in-depth three-part Tendenci Platform Corporate Membership Management workshop series! In Session 1 on May 14th, 2024, we began with an Introduction and Setup, mastering the configuration of your Corporate Membership Module settings to establish membership types, applications, and more. Then, on May 16th, 2024, in Session 2, we focused on binding individual members to a Corporate Membership and Corporate Reps, teaching you how to add individual members and assign Corporate Representatives to manage dues, renewals, and associated members. Finally, on May 28th, 2024, in Session 3, we covered questions and concerns, addressing any queries or issues you may have.
For more Tendenci AMS events, check out www.tendenci.com/events
In 2015, I used to write extensions for Joomla, WordPress, phpBB3, etc and I ...Juraj Vysvader
In 2015, I used to write extensions for Joomla, WordPress, phpBB3, etc and I didn't get rich from it but it did have 63K downloads (powered possible tens of thousands of websites).
We describe the deployment and use of Globus Compute for remote computation. This content is aimed at researchers who wish to compute on remote resources using a unified programming interface, as well as system administrators who will deploy and operate Globus Compute services on their research computing infrastructure.
Quarkus Hidden and Forbidden ExtensionsMax Andersen
Quarkus has a vast extension ecosystem and is known for its subsonic and subatomic feature set. Some of these features are not as well known, and some extensions are less talked about, but that does not make them less interesting - quite the opposite.
Come join this talk to see some tips and tricks for using Quarkus and some of the lesser known features, extensions and development techniques.
First Steps with Globus Compute Multi-User EndpointsGlobus
In this presentation we will share our experiences around getting started with the Globus Compute multi-user endpoint. Working with the Pharmacology group at the University of Auckland, we have previously written an application using Globus Compute that can offload computationally expensive steps in the researcher's workflows, which they wish to manage from their familiar Windows environments, onto the NeSI (New Zealand eScience Infrastructure) cluster. Some of the challenges we have encountered were that each researcher had to set up and manage their own single-user globus compute endpoint and that the workloads had varying resource requirements (CPUs, memory and wall time) between different runs. We hope that the multi-user endpoint will help to address these challenges and share an update on our progress here.
Enhancing Research Orchestration Capabilities at ORNL.pdfGlobus
Cross-facility research orchestration comes with ever-changing constraints regarding the availability and suitability of various compute and data resources. In short, a flexible data and processing fabric is needed to enable the dynamic redirection of data and compute tasks throughout the lifecycle of an experiment. In this talk, we illustrate how we easily leveraged Globus services to instrument the ACE research testbed at the Oak Ridge Leadership Computing Facility with flexible data and task orchestration capabilities.
Custom Healthcare Software for Managing Chronic Conditions and Remote Patient...Mind IT Systems
Healthcare providers often struggle with the complexities of chronic conditions and remote patient monitoring, as each patient requires personalized care and ongoing monitoring. Off-the-shelf solutions may not meet these diverse needs, leading to inefficiencies and gaps in care. It’s here, custom healthcare software offers a tailored solution, ensuring improved care and effectiveness.
Globus Compute wth IRI Workflows - GlobusWorld 2024Globus
As part of the DOE Integrated Research Infrastructure (IRI) program, NERSC at Lawrence Berkeley National Lab and ALCF at Argonne National Lab are working closely with General Atomics on accelerating the computing requirements of the DIII-D experiment. As part of the work the team is investigating ways to speedup the time to solution for many different parts of the DIII-D workflow including how they run jobs on HPC systems. One of these routes is looking at Globus Compute as a way to replace the current method for managing tasks and we describe a brief proof of concept showing how Globus Compute could help to schedule jobs and be a tool to connect compute at different facilities.
top nidhi software solution freedownloadvrstrong314
This presentation emphasizes the importance of data security and legal compliance for Nidhi companies in India. It highlights how online Nidhi software solutions, like Vector Nidhi Software, offer advanced features tailored to these needs. Key aspects include encryption, access controls, and audit trails to ensure data security. The software complies with regulatory guidelines from the MCA and RBI and adheres to Nidhi Rules, 2014. With customizable, user-friendly interfaces and real-time features, these Nidhi software solutions enhance efficiency, support growth, and provide exceptional member services. The presentation concludes with contact information for further inquiries.
Top Features to Include in Your Winzo Clone App for Business Growth (4).pptxrickgrimesss22
Discover the essential features to incorporate in your Winzo clone app to boost business growth, enhance user engagement, and drive revenue. Learn how to create a compelling gaming experience that stands out in the competitive market.
Check out the webinar slides to learn more about how XfilesPro transforms Salesforce document management by leveraging its world-class applications. For more details, please connect with sales@xfilespro.com
If you want to watch the on-demand webinar, please click here: https://www.xfilespro.com/webinars/salesforce-document-management-2-0-smarter-faster-better/
Innovating Inference - Remote Triggering of Large Language Models on HPC Clus...Globus
Large Language Models (LLMs) are currently the center of attention in the tech world, particularly for their potential to advance research. In this presentation, we'll explore a straightforward and effective method for quickly initiating inference runs on supercomputers using the vLLM tool with Globus Compute, specifically on the Polaris system at ALCF. We'll begin by briefly discussing the popularity and applications of LLMs in various fields. Following this, we will introduce the vLLM tool, and explain how it integrates with Globus Compute to efficiently manage LLM operations on Polaris. Attendees will learn the practical aspects of setting up and remotely triggering LLMs from local machines, focusing on ease of use and efficiency. This talk is ideal for researchers and practitioners looking to leverage the power of LLMs in their work, offering a clear guide to harnessing supercomputing resources for quick and effective LLM inference.
Large Language Models and the End of ProgrammingMatt Welsh
Talk by Matt Welsh at Craft Conference 2024 on the impact that Large Language Models will have on the future of software development. In this talk, I discuss the ways in which LLMs will impact the software industry, from replacing human software developers with AI, to replacing conventional software with models that perform reasoning, computation, and problem-solving.
Gamify Your Mind; The Secret Sauce to Delivering Success, Continuously Improv...Shahin Sheidaei
Games are powerful teaching tools, fostering hands-on engagement and fun. But they require careful consideration to succeed. Join me to explore factors in running and selecting games, ensuring they serve as effective teaching tools. Learn to maintain focus on learning objectives while playing, and how to measure the ROI of gaming in education. Discover strategies for pitching gaming to leadership. This session offers insights, tips, and examples for coaches, team leads, and enterprise leaders seeking to teach from simple to complex concepts.
Enterprise Resource Planning System includes various modules that reduce any business's workload. Additionally, it organizes the workflows, which drives towards enhancing productivity. Here are a detailed explanation of the ERP modules. Going through the points will help you understand how the software is changing the work dynamics.
To know more details here: https://blogs.nyggs.com/nyggs/enterprise-resource-planning-erp-system-modules/
May Marketo Masterclass, London MUG May 22 2024.pdfAdele Miller
Can't make Adobe Summit in Vegas? No sweat because the EMEA Marketo Engage Champions are coming to London to share their Summit sessions, insights and more!
This is a MUG with a twist you don't want to miss.
OpenFOAM solver for Helmholtz equation, helmholtzFoam / helmholtzBubbleFoamtakuyayamamoto1800
In this slide, we show the simulation example and the way to compile this solver.
In this solver, the Helmholtz equation can be solved by helmholtzFoam. Also, the Helmholtz equation with uniformly dispersed bubbles can be simulated by helmholtzBubbleFoam.
2. Tension
Between
known
needs
of
today
changes
that
will
arrive
in
the
future
Sandi
Metz
The
Fundamental
Target
of
Design
3. Code
needs
to
work
today
just
once,
and
it
needs
to
be
easy
to
change
forever
4. It
is
at
this
point
of
tension
where
design
ma2ers
today’s
needs
future
changes
5. its
purpose,
its
enHre
reason
for
being,
is
to
reduce
the
cost
of
change.
6. 1999
3rd
Apr
2014
@KentBeck
design
is
irrelevant
for
today.
it
only
ma2ers
when
we
want
to
change
the
so9ware...
@KentBeck
change
is
the
only
reason
to
organize
so9ware
at
all…
7. adopted
by
agile
community
as
a
truth
about
soZware
development
Henrik
Christensen
2010
8. “soZware
must
be
designed
and
developed
to
make
it
easy
to
change”
9. Let’s
examine
soZware
qualiHes
that
enable
ease
of
change
Look
for
definiHons
in
ISO
9126
Projects
someHmes
fail
due
to
not
having
any
clear
defini=ons
of
"success”
This
standard
tries
to
develop
a
common
understanding
of
project
objec=ves
and
goals,
e.g.
soZware
qualiHes
10. SoZware
is
Reliabile
if
it
can
maintain
a
specific
level
of
performance
under
specific
usage
condiHons
11. in
our
secng…
In
parHcular,
we
are
interested
in
preserving
reliability
in
the
face
of
change
SoZware
is
Reliabile
if
it
can
perform
the
required
func=ons
without
failing
13. Analysability
Maintainability
Changeability
Stability
Testability
SoZware
is
Analysable
if
you
can
• diagnose
it
for
§ deficiencies
§ causes
of
failure
• idenHfy
the
parts
to
be
modified
“Analysability
is
basically
the
ability
to
understand
soZware”
14. Analysability
Maintainability
Changeability
Stability
Testability
SoZware
is
changeable
if
it
allows
you
to
• implement
a
specific
modificaHon
• add,
modify,
or
enhance
a
feature
at
a
reasonable
cost
“almost
all
Design
Pa2erns
are
geared
towards
increasing
design’s
changeability”
15. Analysability
Maintainability
Changeability
Stability
Testability
“SoZware
is
flexible
if
you
can
add/enhance
func=onality
purely
by
adding
so9ware
units
and
specifically
not
by
modifying
exis=ng
so9ware
units”
Flexibility
a
special
case
of
changeability
16. Changeability
Behavioural
changes
that
are
introduced
by
modifying
exisHng
producHon
code
Changeability
is
a
desirable
quality,
but
it
relies
on
Change
by
Modifica=on
Change
by
ModificaHon
“The
less
I
ever
modify
a
class,
the
higher
the
probability
that
it
will
remain
free
of
defects”
ModificaHons
carry
the
risk
of
introducing
defects,
and
the
necessary
cost
of
avoiding
them:
tesHng,
code
reviewing,
etc.
17. Behavioural
changes
that
are
introduced
by
modifying
exisHng
producHon
code
Change
by
ModificaHon
Change
by
AddiHon
Behavioural
changes
that
are
introduced
by
adding
new
producHon
code
instead
of
modifying
exisHng
code
Contrast
Change
by
Addi=on
avoids
(risky)
modifica=ons
altogether
with
18. Changeability
Change
by
AddiHon
Change
by
ModificaHon
Changeability
does
not
take
a
stand
point
with
regards
to
the
way
a
specified
modificaHon
is
implemented
Flexibility
In
contrast,
Flexibility
does
take
this
stand
point
and
requires
that
no
modifica=ons
are
made
19. Analysability
Maintainability
Changeability
Stability
Testability
SoZware
is
Stable
if
it
avoids
unexpected
effects
when
modified
“I
advocate
the
pracHce
to
avoid
modifying
exis=ng
code
but
preferably
add
features
or
modify
exis=ng
ones
by
other
means”
“any
change
to
exisHng
soZware
carries
a
risk
of
introducing
defects”
20. Changeability
Stability
Flexibility
Reliability
Change
by
ModificaHon
Change
by
AddiHon
-‐
+ -‐
+
Summary
+ supports
-‐ risks
undermining
relies
on
21. Ques=on:
how
do
we
promote
flexibility,
reliability
and
stability
in
our
soZware?
Analysability
Maintainability
Changeability
Stability
Testability
Flexibility
Reliability
22. Answer:
we
favour
‘Change
by
Addi=on’
over
‘Change
by
Modifica=on’
Changeability
Stability
Flexibility
Reliability
Change
by
ModificaHon
Change
by
AddiHon
-‐
+ -‐
+
23. I
cover
techniques
that
focus
on
flexibility
Christensen
if
you
require
that
s/w
can
adapt
to
changing
requirements
without
modifying
the
produc=on
code
then
you
need
to
employ
a
SPECIAL
set
of
design
and
programming
techniques
as
well
as
adopt
a
SPECIAL
mindset
24. “Another
way
of
characterising
Change
by
Addi=on
that
you
may
come
across
is
the
Open
Closed
Principle”
How
do
we
achieve
?
Change
by
AddiHon
25. The
Open-‐Closed
Principle
Modules
should
be
both
open
and
closed
Bertrand
Meyer
Object
Oriented
SoZware
ConstrucHon
The
most
comprehensive,
definiHve
OO
reference
ever
published
1988
26. Isn’t
there
a
contradic=on
between
the
two
terms?
Modules
should
be
both
OPEN
and
CLOSED
¬(p
∧
¬p)
27. The
contradic=on
is
only
apparent
The
two
terms
correspond
to
goals
of
a
different
nature
e.g.
a
Dutch
door
can
be
both
OPEN
and
CLOSED
It
is
a
29. A
module
is
said
to
be
OPEN
if
it
is
sHll
available
for
extension
or
add
fields
to
its
data
structures
Data
Structures
fields
+
operations
e.g.
it
should
be
possible
to
expand
its
set
of
opera=ons
30. A
module
is
said
to
be
CLOSED
If
it
is
available
for
use
by
other
modules
Has
a
well-‐defined,
stable
descripHon
(its
interface
–
in
informaHon
hiding
sense)
public
part
secret
part
interface
1
can
be
compiled,
stored
in
a
library,
and
made
available
for
clients
to
use
2
in
the
case
of
a
design
or
specificaHon
module:
• approved
• baselined
in
version
control
• its
interface
published
for
benefit
of
other
module
authors
3
31. OPEN
if
it
is
sHll
available
for
extension
CLOSED
If
it
is
available
for
use
by
other
modules
Recap
–
A
module
is…
32. It
is
impossible
to
foresee
all
the
elements
that
a
module
will
need
in
its
lifeHme
X
The
need
for
ness
so
developers
wish
to
keep
the
module
open
for
as
long
as
possible
so
that
they
can
address
changes,
and
extensions
by
changing
elements
or
adding
new
elements
33. The
need
for
ness
if
a
module
is
never
closed
unHl
it
is
certain
that
it
contains
all
the
needed
features
x
every
developer
would
always
be
waiHng
for
compleHon
of
another
developer's
job
then
mulH-‐module
s/w
can
never
reach
compleHon
x
in
a
system
consisHng
of
many
modules,
most
modules
will
depend
on
some
others
but
it
is
also
necessary
to
close
modules
34. Modules
should
be
both
open
and
closed
We
want
modules
to
be
both
for
extension
and
for
modificaHon
35. the
two
goals
of
openness
and
closedness
with
tradi=onal
techniques
are
incompa=ble
36. either
you
keep
a
module
open
and
others
cannot
use
it
yet
and
any
change
or
extension
can
trigger
a
painful
chain
reac=on
of
changes
or
you
close
it
in
many
other
modules
which
relied
on
the
original
module
directly
or
indirectly
37. A
B
C
D
E
A
module
and
its
clients
A’
F
G
H
I
New
clients
which
need
A’,
an
adapted
or
extended
version
of
A
Typical
situaHon
where
the
needs
for
Open
and
Closed
modules
are
hard
to
reconcile
=
client
of
41. A
B
C
D
E
A’
F
G
H
I
SoluHon
We
have
taken
a
copy
of
A
and
modified
it,
turning
it
into
the
desired
A’
42.
SoluHon
Meyer’s
Assessment
the
consequences
are
appalling
an
explosion
of
variants
of
the
original
module,
many
of
them
very
similar,
but
never
quite
iden=cal
if
you
extrapolate
its
effects
to
• many
modules
• many
modificaHon
requests
• a
long
period
of
Hme
43.
SoluHon
(Source
tree
copy)
Christensen’s
Assessment
Probably
the
main
reason
it
is
encountered
so
o9en
in
prac=ce
Easy
to
explain
to
colleagues
&
new
developers
No
implementa=on
interference
X
44.
SoluHon
(Source
tree
copy)
Christensen’s
Assessment
Quick
but
very
dangerous
In
the
long
run
it
is
oZen
a
real
disaster…
The
soluHon
has
severe
limita=ons.
46.
SoluHon
(Source
tree
copy)
Christensen’s
Assessment
when
you
want
to
add/modify
logic
you
have
to:
• Do
it
for
each
source
tree
• Write
the
same
test
cases
for
each
source
tree
you
have
to
do
it
in
each
source
tree
when
you
need
to
remove
a
defect
47. DRIFT
PracHce
shows
that
over
Hme
the
source
trees
evolve
into
completely
different
direcHons:
they
dri9
apart.
AZer
a
while
it
is
more
or
less
like
maintaining
a
set
of
completely
different
applica=ons
At
that
point,
before
you
do
any
of
the
operaHons,
you
have
to
first
analyse
each
source
tree!!
48. Used
in
airports
to
generate
reports
of
local
weather
one
variant
for
each
airport
in
Denmark
init
and
config
code
Example
SAWOS
-‐
Semi
AutomaHc
Weather
ObservaHon
System
8
copies!!!
50. That
was
Meyer’s
first
unsa=sfactory
soluHon
to
the
problem
of
making
modules
both
OPEN
and
CLOSED
Let’s
turn
to
the
second
one
51. A
B
C
D
E
A’
F
G
H
I
A
module
and
its
clients
New
clients
which
need
A’,
an
adapted
or
extended
version
of
A
=
client
of
Problem
52. SoluHon
2
A
B
C
D
E
A’
F
G
H
I
Change
by
ModificaHon
53. A+
B
C
D
E
A’
F
G
H
I
We
have
modified
A
into
A+,
which
can
switch
between
two
modes
of
execuHon
In
one
mode
it
behaves
like
A,
and
in
the
other
it
behaves
as
expected
of
A’
SoluHon
54. A+
B
C
D
E
A’
F
G
H
I
We
have
modified
A
into
A+,
which
can
switch
between
two
modes
of
execuHon
In
one
mode
it
behaves
like
A,
and
in
the
other
it
behaves
as
expected
of
A’
SoluHon
55. A+
B
C
D
E
A’
F
G
H
I
If
(variant
==
VARIANT_1)
then
{
….
}
else
{
….
}
At
points
of
varia=on,
A+
looks
like
this:
We
have
modified
A
into
A+,
which
can
switch
between
two
modes
of
execuHon
In
one
mode
it
behaves
like
A,
and
in
the
other
it
behaves
as
expected
of
A’
AlternaHvely,
this
can
be
a
switch
SoluHon
56. A+
B
C
D
E
A’
F
G
H
I
SoluHon
–
Meyer’s
Assessment
57. A+
B
C
D
E
A’
F
G
H
I
The
poten=al
for
disaster
is
obvious:
changes
to
A
may
invalidate
the
assumpHons
on
the
basis
of
which
the
old
clients
used
A.
So
the
changes
may
start
a
dramaHc
series
of
changes
in
clients,
client
of
clients....etc
SoluHon
–
Meyer’s
Assessment
58. A+
A’
F
G
H
I
SoluHon
–
Meyer’s
Assessment
The
poten=al
for
disaster
is
obvious:
changes
to
A
may
invalidate
the
assumpHons
on
the
basis
of
which
the
old
clients
used
A.
So
the
changes
may
start
a
dramaHc
series
of
changes
in
clients,
client
of
clients....etc
B
C
E
D
this
is
a
nightmare
for
the
proj.
mgr.
the
system
regresses
and
several
modules
have
to
be
re-‐
opened
for
dev/test/debug/
documentaHon
59. Even
though
the
Change
soluHon
has
this
problema=c
ripple
effect,
it
is
sHll
be2er
than
the
Copy
solu=on.
On
the
surface,
the
copy
solu=on
seems
be2er
because
it
avoids
the
ripple
effect
of
change
but
in
fact
it
may
even
be
more
catastrophic…it
only
postpones
the
day
of
reckoning
We
saw
earlier
the
risks
of
an
explosion
of
variants,
many
of
them
very
similar,
but
never
quite
iden=cal:
SoluHon
–
Meyer’s
Assessment
soluHon
soluHon
60.
SoluHon
(Parametric
soluHon)
Christensen’s
Assessment
CondiHonals
are
easy
to
understand.
So
approach
is
easy
to
describe
to
other
developers.
Avoids
Mul=ple
Maintenance
Problem
Only
one
code
base
to
maintain
soluHon
soluHon
61. LiabiliHes,
most
of
which
deal
with
long
term
maintainability
Change
by
ModificaHon
Reliability
Concerns
–
soluHon
relies
on
with
risk
of
introducing
new
defects
Analysability
concerns
–
as
more
and
more
requirements
are
handled
by
parameter
switching,
the
code
becomes
less
easy
to
analyse
…
Responsibility
erosion
–
the
soZware
has,
without
much
noHce,
been
given
an
extra
responsibility
drives
towards
Procedural
Design
Blob
aka
God
Class
SoluHon
(Parametric
soluHon)
Christensen’s
Assessment
62. A
reasonable
approach
at
first,
but
one
with
serious
problems
for
applicaHons
that
need
to
grow
over
Hme
SoluHon
(Switches)
Shalloway’s
Assessment
Not
too
bad
as
long
as
you
just
keep
adding
cases…
2004
63. but
soon
you
need
to
introduce
fall-‐throughs…
…and
then
the
switches
are
not
as
nice
as
they
used
to
be
64. Eventually
you
need
to
start
adding
varia=ons
within
a
case.
I
like
to
call
this
switch!
The
flow
of
the
switches
themselves
becomes
confusing,
hard
to
read,
hard
to
decipher.
When
a
new
case
comes
in
the
programmer
must
find
every
place
it
can
be
involved
(o9en
finding
all
but
one
of
them).
Suddenly
things
get
bad
in
a
hurry.
65. Analysability
Stability
Reliability
solu=on
-‐ -‐ -‐
Summary
Analysability
Stability
Reliability
solu=on
-‐
-‐
-‐
With
non-‐OO
methods,
there
are
only
only
2
solu=ons
available
to
us,
BOTH
UNSATISFACTORY
mul=ple
maintenance
problem
Change
by
ModificaHon
CHANGE
COPY
66. If
non-‐OO
methods
are
all
we
have,
then
Meyer
says
we
face
a
change
or
copy
dilemma
CHANGE
COPY
67. A
B
C
D
E
A’
F
G
H
I
So
how
can
we
have
modules
that
are
both
and
?
How
can
we
keep
A
and
everything
in
the
top
part
of
the
figure
unchanged,
…
…while
providing
A’
to
the
bo>om
clients,
and
avoiding
duplica=on
of
so9ware?
68. A
B
C
D
E
A’
F
G
H
I
With
the
OO
concept
of
inheritance
Inheritance
allows
us
to
get
out
of
the
CHANGE
OR
COPY
dilemma…
…because
inheritance
allows
us
to
define
a
new
module
A'
in
terms
of
an
exis=ng
module
A,
…by
sta=ng
only
the
differences
between
the
two
A’
defines
new
features,
and
redefines
(i.e.
modifies)
one
or
more
of
A’s
features
inherits
from
Change
by
AddiHon
69. Thanks
to
inheritance,
OO
developers
can
adopt
a
much
more
incremental
approach
to
soZware
development
than
used
to
be
possible
with
earlier
methods
OO
inheritance
70. Hacking = Slipshod approach to building and
modifying code
Slipshod = Done poorly or too quickly; careless.
The
Hacker
may
seem
bad
but
oZen
his
heart
is
pure.
71. He
sees
a
useful
piece
of
soZware,
which
is
almost
able
to
address
the
needs
of
the
moment,
more
general
than
the
soZware’s
original
purpose.
Hacker
Spurred
by
a
laudable
desire
not
to
redo
what
can
be
reused,
our
hacker
starts
modifying
the
original
to
add
provisions
for
new
cases
solu=on
72. The
impulse
is
good
but
the
effect
is
oZen
to
pollute
the
soZware
with
many
clauses
of
the
form
if
that_special_case
then…
if
(<special
case
D>)
then …
if
(<special
case
C>)
then …
if
(<special
case
B>)
then …
if
(<special
case
A>)
then …
switch!
73. so
that
aZer
a
few
rounds
of
hacking,
perhaps
by
different
hackers,
the
soZware
starts
resembling
a
chunk
of
Swiss
cheese
that
has
been
leZ
outside
for
too
long
in
August
–
it
has
both
holes
and
growth
Hacking
74. Open-Closed Principle =
One
way
to
describe
the
OCP
and
the
consequent
OO
techniques
is
to
think
of
them
as
organised
hacking
Hacking
The
organised
form
of
hacking
will
enable
us
to
cater
to
the
variants
without
affec=ng
the
consistency
of
the
original
version.
Inheritance
Change
by
ModificaHon
Change
by
AddiHon
75. if
you
have
control
over
original
s/w
and
can
rewrite
it
so
that
it
will
address
the
needs
of
several
kinds
of
clients
…you
should
do
so
Caveats
at
no
extra
complicaHon
76.
The
OCP
principle
and
associated
techniques
are
intended
for
the
adapta=on
of
healthy
modules
If
there
is
something
wrong
with
a
module
you
should
fix
it…
…not
leave
the
original
alone
and
try
to
correct
the
problem
in
the
derived
module
Derived
Base
neither
OCP
nor
redefiniHon
in
inheritance
is
a
way
to
address
design
flaws,
let
alone
bugs
Design
Flaw
77.
78. its
purpose,
its
enHre
reason
for
being,
is
to
reduce
the
cost
of
change.
79. Ques=on:
how
do
we
promote
flexibility,
reliability
and
stability
in
our
soZware?
Analysability
Maintainability
Changeability
Stability
Testability
Flexibility
Reliability
80. Answer:
we
favour
‘Change
by
Addi=on’
over
‘Change
by
Modifica=on’
Changeability
Stability
Flexibility
Reliability
Change
by
ModificaHon
Change
by
AddiHon
-‐
+ -‐
+
81. How
do
we
achieve
?
Change
by
AddiHon
which
uses
OO
inheritance
Inheritance
We
apply
the
Open-‐Closed
Principle
82. extends
is
evil!!!!!
Yes,
we’ll
cover
that
in
the
next
presentaHon:
Part
II
But,
using
inheritance
is
no
longer
the
main
approach
to
saHsfying
the
OCP
Allen
Holub
2004
2003
83. in
which
we
look
at
the
modern,
contemporary
version
of
the
OCP
again,
we’ll
cover
this
in
the
next
presentaHon:
Part
II
Using
inheritance
is
sHll
one
of
the
ways
of
saHsfying
the
OCP,
and
was
considered
THE
approach
for
a
long
while
Why
extends
is
evil
1988
-‐
1st
ed.
1997
–
2nd
ed.
1995
That
started
changing
with
the
emergence
of
the
design
techniques
presented
in
Design
Pa2erns
2003
84.
85. References
All
images
sourced
from
h>p://www.google.co.uk/advanced_image_search,
so
see
there
for
details
of
which
are
subject
to
copyright
Object-‐Oriented
So9ware
Construc=on
–
by
Bertrand
Meyer;
PublicaHon
Date:
3
April
1997
|
ISBN-‐10:
0136291554
|
ISBN-‐13:
978-‐0136291558
|
EdiHon:
2
Flexible,
Reliable
So9ware:
Using
Pa2erns
and
Agile
Development
–
by
Henrik
B.
Christensen;
PublicaHon
Date:
11
May
2010
|
ISBN-‐10:
1420093622
|
ISBN-‐13:
978-‐1420093629
Design
Pa2erns
Explained:
A
New
Perspec=ve
on
Object-‐Oriented
Design;
by
Alan
Shalloway;
PublicaHon
Date:
12
Oct
2004
|
ISBN-‐10:
0321247140
|
ISBN-‐13:
978-‐0321247148
|
EdiHon:
2
Less
-‐
The
Path
to
Be2er
Design;
by
Sandi
Metz
at
GoRuCo
2011
goruco_2011_-‐_sandi_metz_-‐_less_-‐_the_path_to_be>er_design_1280x720.mp4
Why
Extends
is
Evil
-‐
Improve
your
code
by
replacing
concrete
base
classes
with
interfaces;
by
Allen
Holub;
h>p://www.javaworld.com/arHcle/2073649/core-‐java/why-‐extends-‐is-‐evil.html