SlideShare une entreprise Scribd logo
1  sur  66
Télécharger pour lire hors ligne
The Architecture of
Uncertainty
@KevlinHenney
When a design decision
can reasonably go one of
two ways, an architect
needs to take a step back.
Instead of trying to decide
between options A and B,
the question becomes
"How do I design so that
the choice between A and
B is less significant?" The
most interesting thing is not
actually the choice
between A and B, but the
fact that there is a choice
between A and B.
Kevlin Henney
"Use Uncertainty As a Driver"
We have tried to demonstrate by these
examples that it is almost always incorrect to
begin the decomposition of a system into
modules on the basis of a flowchart. We
propose instead that one begins with a list of
difficult design decisions or design decisions
which are likely to change. Each module is
then designed to hide such a decision from
the others.
David L Parnas
"On the Criteria to Be Used in Decomposing Systems into Modules"
struct Date
{
int year, month, day;
};
struct Date
{
int days_since_epoch;
};
class Date
{
public:
...
private:
...
};
Public APIs, like diamonds,
are forever.
Joshua Bloch
"Bumper-Sticker API Design"
http://www.infoq.com/articles/API-Design-Joshua-Bloch
public class RecentlyUsedList
{
private IList<string> items = new List<string>();
public int Count
{
get
{
return items.Count;
}
}
public string this[int index]
{
get
{
return items[index];
}
}
public void Add(string newItem)
{
if(newItem == null)
throw new ArgumentNullException();
items.Remove(newItem);
items.Insert(0, newItem);
}
...
}
public class RecentlyUsedList : List<string>
{
public override void Add(string newItem)
{
if(newItem == null)
throw new ArgumentNullException();
items.Remove(newItem);
items.Insert(0, newItem);
}
...
}
public class RecentlyUsedList : List<string>
{
public new void Add(string newItem)
{
if(newItem == null)
throw new ArgumentNullException();
items.Remove(newItem);
items.Insert(0, newItem);
}
...
}
public class RecentlyUsedList
{
public RecentlyUsedList()
{
Items = new List<string>();
}
public List<string> Items
{
get;
private set;
}
public void Add(string newItem)
{
if(newItem == null)
throw new ArgumentNullException();
Items.Remove(newItem);
Items.Insert(0, newItem);
}
...
}
public class RecentlyUsedList
{
private IList<string> items = new List<string>();
public int Count
{
get
{
return items.Count;
}
}
public string this[int index]
{
get
{
return items[index];
}
}
public void Add(string newItem)
{
if(newItem == null)
throw new ArgumentNullException();
items.Remove(newItem);
items.Insert(0, newItem);
}
...
}
public class RecentlyUsedList
{
private IList<string> items = new List<string>();
public int Count
{
get
{
return items.Count;
}
}
public string this[int index]
{
get
{
return items[Count – index - 1];
}
}
public void Add(string newItem)
{
if(newItem == null)
throw new ArgumentNullException();
items.Remove(newItem);
items.Add(newItem);
}
...
}
All architecture is design but not
all design is architecture.
Architecture represents the
significant design decisions that
shape a system, where significant
is measured by cost of change.
Grady Booch
Architecture is the decisions that
you wish you could get right early
in a project, but that you are not
necessarily more likely to get
them right than any other.
Ralph Johnson
Analysis Design Code Test
Analysis Design Code Test
Analysis Design Code Test
Walking on water and
developing software
from a specification
are easy if both are
frozen.
Edward V Berard
Expert
Proficient
Competent
Advanced Beginner
Novice
The "defined" process control model
requires that every piece of work be
completely understood. Given a well-
defined set of inputs, the same
outputs are generated every time.
Ken Schwaber
Agile Software Development with Scrum
The empirical process control model,
on the other hand, expects the
unexpected. It provides and exercises
control through frequent inspection
and adaptation for processes that are
imperfectly defined and generate
unpredictable and unrepeatable
results.
Ken Schwaber
Agile Software Development with Scrum
Design Design Design Design
Design
Programming is a design
activity.
Jack W Reeves
"What Is Software Design?"
Coding actually makes sense more
often than believed. Often the
process of rendering the design in
code will reveal oversights and the
need for additional design effort. The
earlier this occurs, the better the
design will be.
Jack W Reeves
"What Is Software Design?"
Properly gaining control
of the design process
tends to feel like one is
losing control of the
design process.
In 1990 I proposed a theory, called
Worse Is Better, of why software would
be more likely to succeed if it was
developed with minimal invention.
It is far better to have an underfeatured
product that is rock solid, fast, and
small than one that covers what an
expert would consider the complete
requirements.
interface Iterator
{
boolean set_to_first_element();
boolean set_to_next_element();
boolean set_to_next_nth_element(in unsigned long n) raises(…);
boolean retrieve_element(out any element) raises(…);
boolean retrieve_element_set_to_next(out any element, out boolean more) raises(…);
boolean retrieve_next_n_elements(
in unsigned long n, out AnySequence result, out boolean more) raises(…);
boolean not_equal_retrieve_element_set_to_next(in Iterator test, out any element) raises(…);
void remove_element() raises(…);
boolean remove_element_set_to_next() raises(…);
boolean remove_next_n_elements(in unsigned long n, out unsigned long actual_number) raises(…);
boolean not_equal_remove_element_set_to_next(in Iterator test) raises(…);
void replace_element(in any element) raises(…);
boolean replace_element_set_to_next(in any element) raises(…);
boolean replace_next_n_elements(
in AnySequence elements, out unsigned long actual_number) raises(…);
boolean not_equal_replace_element_set_to_next(in Iterator test, in any element) raises(…);
boolean add_element_set_iterator(in any element) raises(…);
boolean add_n_elements_set_iterator(
in AnySequence elements, out unsigned long actual_number) raises(…);
void invalidate();
boolean is_valid();
boolean is_in_between();
boolean is_for(in Collection collector);
boolean is_const();
boolean is_equal(in Iterator test) raises(…);
Iterator clone();
void assign(in Iterator from_where) raises(…);
void destroy();
};
interface BindingIterator
{
boolean next_one(out Binding result);
boolean next_n(in unsigned long how_many, out BindingList result);
void destroy();
};
Speculative Generality
Brian Foote suggested this name for a smell to
which we are very sensitive. You get it when
people say, "Oh, I think we need the ability to do
this kind of thing someday" and thus want all
sorts of hooks and special cases to handle things
that aren't required. The result often is harder to
understand and maintain. If all this machinery
were being used, it would be worth it. But if it
isn't, it isn't. The machinery just gets in the way,
so get rid of it.
Martin Fowler
Refactoring
The best route to
generality is through
understanding known,
specific examples and
focusing on their
essence to find an
essential common
solution. Simplicity
through experience
rather than generality
through guesswork.
Kevlin Henney
"Simplicity before Generality,
Use before Reuse"
We can find generality
and flexibility in trying
to deliver specific
solutions, but if we
weigh anchor and
forget the specifics too
soon, we end up adrift
in a sea of nebulous
possibilities, a world of
tricky configuration
options, long-winded
interfaces, and not-
quite-right abstractions.
Kevlin Henney
"Simplicity before Generality,
Use before Reuse"
You have a problem. You
decide to solve it with
configuration. Now you have
<%= $problems %> problems!
Dan North
https://twitter.com/tastapod/status/342935892207497219
typedef ... string;
template<
typename char_type,
typename traits,
typename allocator>
class basic_string;
Trying effective memory management of a container
whose representation and management is not fully
open to you is like eating with a knife and fork...
held with chopsticks... through mittens.
Kevlin Henney, "Distinctly Qualified"
Henney's Hypothesis
For each additional required
template parameter, the potential
number of users is halved.
Matthew Wilson
Extended STL
If you have a procedure with
ten parameters, you probably
missed some.
Alan Perlis
Prediction is very difficultPrediction is very difficult,
especially about the future.
Niels Bohr
Stewart Brand, How Buildings Learn
See also http://www.laputan.org/mud/
Rate of change
package com.sun…;
Examination of small programs leads to
the conclusion that requiring exception
specifications could both enhance
developer productivity and enhance
code quality, but experience with large
software projects suggests a different
result — decreased productivity and
little or no increase in code quality.
Eric Gunnerson
All happy families are alike;
each unhappy family is
unhappy in its own way.
Leo Tolstoy
Anna Karenina


 



Scenario buffering by dot-voting possible changes and then readjusting dependencies
A
B
C
D
E
F






 






People overvalue their knowledge
and underestimate the probability
of their being wrong.
The greatest obstacle to
discovering the shape of
the earth, the continents,
and the oceans was not
ignorance but the illusion
of knowledge.
Daniel J Boorstin
0. Lack of Ignorance
1. Lack of Knowledge
2. Lack of Awareness
3. Lack of Process
4. Meta-Ignorance
Five Orders of Ignorance
Phillip G Armour
Education is learning
what you didn't even
know you didn't know.
Daniel J Boorstin

Contenu connexe

Plus de Kevlin Henney

Lambda? You Keep Using that Letter
Lambda? You Keep Using that LetterLambda? You Keep Using that Letter
Lambda? You Keep Using that LetterKevlin Henney
 
Lambda? You Keep Using that Letter
Lambda? You Keep Using that LetterLambda? You Keep Using that Letter
Lambda? You Keep Using that LetterKevlin Henney
 
Solid Deconstruction
Solid DeconstructionSolid Deconstruction
Solid DeconstructionKevlin Henney
 
Procedural Programming: It’s Back? It Never Went Away
Procedural Programming: It’s Back? It Never Went AwayProcedural Programming: It’s Back? It Never Went Away
Procedural Programming: It’s Back? It Never Went AwayKevlin Henney
 
Structure and Interpretation of Test Cases
Structure and Interpretation of Test CasesStructure and Interpretation of Test Cases
Structure and Interpretation of Test CasesKevlin Henney
 
Refactoring to Immutability
Refactoring to ImmutabilityRefactoring to Immutability
Refactoring to ImmutabilityKevlin Henney
 
Turning Development Outside-In
Turning Development Outside-InTurning Development Outside-In
Turning Development Outside-InKevlin Henney
 
Giving Code a Good Name
Giving Code a Good NameGiving Code a Good Name
Giving Code a Good NameKevlin Henney
 
Clean Coders Hate What Happens To Your Code When You Use These Enterprise Pro...
Clean Coders Hate What Happens To Your Code When You Use These Enterprise Pro...Clean Coders Hate What Happens To Your Code When You Use These Enterprise Pro...
Clean Coders Hate What Happens To Your Code When You Use These Enterprise Pro...Kevlin Henney
 
Thinking Outside the Synchronisation Quadrant
Thinking Outside the Synchronisation QuadrantThinking Outside the Synchronisation Quadrant
Thinking Outside the Synchronisation QuadrantKevlin Henney
 
The Error of Our Ways
The Error of Our WaysThe Error of Our Ways
The Error of Our WaysKevlin Henney
 

Plus de Kevlin Henney (20)

Lambda? You Keep Using that Letter
Lambda? You Keep Using that LetterLambda? You Keep Using that Letter
Lambda? You Keep Using that Letter
 
Lambda? You Keep Using that Letter
Lambda? You Keep Using that LetterLambda? You Keep Using that Letter
Lambda? You Keep Using that Letter
 
Solid Deconstruction
Solid DeconstructionSolid Deconstruction
Solid Deconstruction
 
Get Kata
Get KataGet Kata
Get Kata
 
Procedural Programming: It’s Back? It Never Went Away
Procedural Programming: It’s Back? It Never Went AwayProcedural Programming: It’s Back? It Never Went Away
Procedural Programming: It’s Back? It Never Went Away
 
Structure and Interpretation of Test Cases
Structure and Interpretation of Test CasesStructure and Interpretation of Test Cases
Structure and Interpretation of Test Cases
 
Agility ≠ Speed
Agility ≠ SpeedAgility ≠ Speed
Agility ≠ Speed
 
Refactoring to Immutability
Refactoring to ImmutabilityRefactoring to Immutability
Refactoring to Immutability
 
Old Is the New New
Old Is the New NewOld Is the New New
Old Is the New New
 
Turning Development Outside-In
Turning Development Outside-InTurning Development Outside-In
Turning Development Outside-In
 
Giving Code a Good Name
Giving Code a Good NameGiving Code a Good Name
Giving Code a Good Name
 
Clean Coders Hate What Happens To Your Code When You Use These Enterprise Pro...
Clean Coders Hate What Happens To Your Code When You Use These Enterprise Pro...Clean Coders Hate What Happens To Your Code When You Use These Enterprise Pro...
Clean Coders Hate What Happens To Your Code When You Use These Enterprise Pro...
 
Thinking Outside the Synchronisation Quadrant
Thinking Outside the Synchronisation QuadrantThinking Outside the Synchronisation Quadrant
Thinking Outside the Synchronisation Quadrant
 
Code as Risk
Code as RiskCode as Risk
Code as Risk
 
Software Is Details
Software Is DetailsSoftware Is Details
Software Is Details
 
Game of Sprints
Game of SprintsGame of Sprints
Game of Sprints
 
Good Code
Good CodeGood Code
Good Code
 
The Error of Our Ways
The Error of Our WaysThe Error of Our Ways
The Error of Our Ways
 
Driven to Tests
Driven to TestsDriven to Tests
Driven to Tests
 
Learning Curve
Learning CurveLearning Curve
Learning Curve
 

Dernier

Precise and Complete Requirements? An Elusive Goal
Precise and Complete Requirements? An Elusive GoalPrecise and Complete Requirements? An Elusive Goal
Precise and Complete Requirements? An Elusive GoalLionel Briand
 
Salesforce Implementation Services PPT By ABSYZ
Salesforce Implementation Services PPT By ABSYZSalesforce Implementation Services PPT By ABSYZ
Salesforce Implementation Services PPT By ABSYZABSYZ Inc
 
SpotFlow: Tracking Method Calls and States at Runtime
SpotFlow: Tracking Method Calls and States at RuntimeSpotFlow: Tracking Method Calls and States at Runtime
SpotFlow: Tracking Method Calls and States at Runtimeandrehoraa
 
VictoriaMetrics Anomaly Detection Updates: Q1 2024
VictoriaMetrics Anomaly Detection Updates: Q1 2024VictoriaMetrics Anomaly Detection Updates: Q1 2024
VictoriaMetrics Anomaly Detection Updates: Q1 2024VictoriaMetrics
 
Osi security architecture in network.pptx
Osi security architecture in network.pptxOsi security architecture in network.pptx
Osi security architecture in network.pptxVinzoCenzo
 
Best Angular 17 Classroom & Online training - Naresh IT
Best Angular 17 Classroom & Online training - Naresh ITBest Angular 17 Classroom & Online training - Naresh IT
Best Angular 17 Classroom & Online training - Naresh ITmanoharjgpsolutions
 
Tech Tuesday - Mastering Time Management Unlock the Power of OnePlan's Timesh...
Tech Tuesday - Mastering Time Management Unlock the Power of OnePlan's Timesh...Tech Tuesday - Mastering Time Management Unlock the Power of OnePlan's Timesh...
Tech Tuesday - Mastering Time Management Unlock the Power of OnePlan's Timesh...OnePlan Solutions
 
Real-time Tracking and Monitoring with Cargo Cloud Solutions.pptx
Real-time Tracking and Monitoring with Cargo Cloud Solutions.pptxReal-time Tracking and Monitoring with Cargo Cloud Solutions.pptx
Real-time Tracking and Monitoring with Cargo Cloud Solutions.pptxRTS corp
 
SAM Training Session - How to use EXCEL ?
SAM Training Session - How to use EXCEL ?SAM Training Session - How to use EXCEL ?
SAM Training Session - How to use EXCEL ?Alexandre Beguel
 
Leveraging AI for Mobile App Testing on Real Devices | Applitools + Kobiton
Leveraging AI for Mobile App Testing on Real Devices | Applitools + KobitonLeveraging AI for Mobile App Testing on Real Devices | Applitools + Kobiton
Leveraging AI for Mobile App Testing on Real Devices | Applitools + KobitonApplitools
 
Enhancing Supply Chain Visibility with Cargo Cloud Solutions.pdf
Enhancing Supply Chain Visibility with Cargo Cloud Solutions.pdfEnhancing Supply Chain Visibility with Cargo Cloud Solutions.pdf
Enhancing Supply Chain Visibility with Cargo Cloud Solutions.pdfRTS corp
 
Introduction to Firebase Workshop Slides
Introduction to Firebase Workshop SlidesIntroduction to Firebase Workshop Slides
Introduction to Firebase Workshop Slidesvaideheekore1
 
How to submit a standout Adobe Champion Application
How to submit a standout Adobe Champion ApplicationHow to submit a standout Adobe Champion Application
How to submit a standout Adobe Champion ApplicationBradBedford3
 
2024 DevNexus Patterns for Resiliency: Shuffle shards
2024 DevNexus Patterns for Resiliency: Shuffle shards2024 DevNexus Patterns for Resiliency: Shuffle shards
2024 DevNexus Patterns for Resiliency: Shuffle shardsChristopher Curtin
 
Effectively Troubleshoot 9 Types of OutOfMemoryError
Effectively Troubleshoot 9 Types of OutOfMemoryErrorEffectively Troubleshoot 9 Types of OutOfMemoryError
Effectively Troubleshoot 9 Types of OutOfMemoryErrorTier1 app
 
Large Language Models for Test Case Evolution and Repair
Large Language Models for Test Case Evolution and RepairLarge Language Models for Test Case Evolution and Repair
Large Language Models for Test Case Evolution and RepairLionel Briand
 
Simplifying Microservices & Apps - The art of effortless development - Meetup...
Simplifying Microservices & Apps - The art of effortless development - Meetup...Simplifying Microservices & Apps - The art of effortless development - Meetup...
Simplifying Microservices & Apps - The art of effortless development - Meetup...Rob Geurden
 
VictoriaMetrics Q1 Meet Up '24 - Community & News Update
VictoriaMetrics Q1 Meet Up '24 - Community & News UpdateVictoriaMetrics Q1 Meet Up '24 - Community & News Update
VictoriaMetrics Q1 Meet Up '24 - Community & News UpdateVictoriaMetrics
 
Powering Real-Time Decisions with Continuous Data Streams
Powering Real-Time Decisions with Continuous Data StreamsPowering Real-Time Decisions with Continuous Data Streams
Powering Real-Time Decisions with Continuous Data StreamsSafe Software
 
SensoDat: Simulation-based Sensor Dataset of Self-driving Cars
SensoDat: Simulation-based Sensor Dataset of Self-driving CarsSensoDat: Simulation-based Sensor Dataset of Self-driving Cars
SensoDat: Simulation-based Sensor Dataset of Self-driving CarsChristian Birchler
 

Dernier (20)

Precise and Complete Requirements? An Elusive Goal
Precise and Complete Requirements? An Elusive GoalPrecise and Complete Requirements? An Elusive Goal
Precise and Complete Requirements? An Elusive Goal
 
Salesforce Implementation Services PPT By ABSYZ
Salesforce Implementation Services PPT By ABSYZSalesforce Implementation Services PPT By ABSYZ
Salesforce Implementation Services PPT By ABSYZ
 
SpotFlow: Tracking Method Calls and States at Runtime
SpotFlow: Tracking Method Calls and States at RuntimeSpotFlow: Tracking Method Calls and States at Runtime
SpotFlow: Tracking Method Calls and States at Runtime
 
VictoriaMetrics Anomaly Detection Updates: Q1 2024
VictoriaMetrics Anomaly Detection Updates: Q1 2024VictoriaMetrics Anomaly Detection Updates: Q1 2024
VictoriaMetrics Anomaly Detection Updates: Q1 2024
 
Osi security architecture in network.pptx
Osi security architecture in network.pptxOsi security architecture in network.pptx
Osi security architecture in network.pptx
 
Best Angular 17 Classroom & Online training - Naresh IT
Best Angular 17 Classroom & Online training - Naresh ITBest Angular 17 Classroom & Online training - Naresh IT
Best Angular 17 Classroom & Online training - Naresh IT
 
Tech Tuesday - Mastering Time Management Unlock the Power of OnePlan's Timesh...
Tech Tuesday - Mastering Time Management Unlock the Power of OnePlan's Timesh...Tech Tuesday - Mastering Time Management Unlock the Power of OnePlan's Timesh...
Tech Tuesday - Mastering Time Management Unlock the Power of OnePlan's Timesh...
 
Real-time Tracking and Monitoring with Cargo Cloud Solutions.pptx
Real-time Tracking and Monitoring with Cargo Cloud Solutions.pptxReal-time Tracking and Monitoring with Cargo Cloud Solutions.pptx
Real-time Tracking and Monitoring with Cargo Cloud Solutions.pptx
 
SAM Training Session - How to use EXCEL ?
SAM Training Session - How to use EXCEL ?SAM Training Session - How to use EXCEL ?
SAM Training Session - How to use EXCEL ?
 
Leveraging AI for Mobile App Testing on Real Devices | Applitools + Kobiton
Leveraging AI for Mobile App Testing on Real Devices | Applitools + KobitonLeveraging AI for Mobile App Testing on Real Devices | Applitools + Kobiton
Leveraging AI for Mobile App Testing on Real Devices | Applitools + Kobiton
 
Enhancing Supply Chain Visibility with Cargo Cloud Solutions.pdf
Enhancing Supply Chain Visibility with Cargo Cloud Solutions.pdfEnhancing Supply Chain Visibility with Cargo Cloud Solutions.pdf
Enhancing Supply Chain Visibility with Cargo Cloud Solutions.pdf
 
Introduction to Firebase Workshop Slides
Introduction to Firebase Workshop SlidesIntroduction to Firebase Workshop Slides
Introduction to Firebase Workshop Slides
 
How to submit a standout Adobe Champion Application
How to submit a standout Adobe Champion ApplicationHow to submit a standout Adobe Champion Application
How to submit a standout Adobe Champion Application
 
2024 DevNexus Patterns for Resiliency: Shuffle shards
2024 DevNexus Patterns for Resiliency: Shuffle shards2024 DevNexus Patterns for Resiliency: Shuffle shards
2024 DevNexus Patterns for Resiliency: Shuffle shards
 
Effectively Troubleshoot 9 Types of OutOfMemoryError
Effectively Troubleshoot 9 Types of OutOfMemoryErrorEffectively Troubleshoot 9 Types of OutOfMemoryError
Effectively Troubleshoot 9 Types of OutOfMemoryError
 
Large Language Models for Test Case Evolution and Repair
Large Language Models for Test Case Evolution and RepairLarge Language Models for Test Case Evolution and Repair
Large Language Models for Test Case Evolution and Repair
 
Simplifying Microservices & Apps - The art of effortless development - Meetup...
Simplifying Microservices & Apps - The art of effortless development - Meetup...Simplifying Microservices & Apps - The art of effortless development - Meetup...
Simplifying Microservices & Apps - The art of effortless development - Meetup...
 
VictoriaMetrics Q1 Meet Up '24 - Community & News Update
VictoriaMetrics Q1 Meet Up '24 - Community & News UpdateVictoriaMetrics Q1 Meet Up '24 - Community & News Update
VictoriaMetrics Q1 Meet Up '24 - Community & News Update
 
Powering Real-Time Decisions with Continuous Data Streams
Powering Real-Time Decisions with Continuous Data StreamsPowering Real-Time Decisions with Continuous Data Streams
Powering Real-Time Decisions with Continuous Data Streams
 
SensoDat: Simulation-based Sensor Dataset of Self-driving Cars
SensoDat: Simulation-based Sensor Dataset of Self-driving CarsSensoDat: Simulation-based Sensor Dataset of Self-driving Cars
SensoDat: Simulation-based Sensor Dataset of Self-driving Cars
 

The Architecture of Uncertainty

  • 2.
  • 3. When a design decision can reasonably go one of two ways, an architect needs to take a step back. Instead of trying to decide between options A and B, the question becomes "How do I design so that the choice between A and B is less significant?" The most interesting thing is not actually the choice between A and B, but the fact that there is a choice between A and B. Kevlin Henney "Use Uncertainty As a Driver"
  • 4. We have tried to demonstrate by these examples that it is almost always incorrect to begin the decomposition of a system into modules on the basis of a flowchart. We propose instead that one begins with a list of difficult design decisions or design decisions which are likely to change. Each module is then designed to hide such a decision from the others. David L Parnas "On the Criteria to Be Used in Decomposing Systems into Modules"
  • 5. struct Date { int year, month, day; };
  • 8. Public APIs, like diamonds, are forever. Joshua Bloch "Bumper-Sticker API Design" http://www.infoq.com/articles/API-Design-Joshua-Bloch
  • 9. public class RecentlyUsedList { private IList<string> items = new List<string>(); public int Count { get { return items.Count; } } public string this[int index] { get { return items[index]; } } public void Add(string newItem) { if(newItem == null) throw new ArgumentNullException(); items.Remove(newItem); items.Insert(0, newItem); } ... }
  • 10. public class RecentlyUsedList : List<string> { public override void Add(string newItem) { if(newItem == null) throw new ArgumentNullException(); items.Remove(newItem); items.Insert(0, newItem); } ... }
  • 11. public class RecentlyUsedList : List<string> { public new void Add(string newItem) { if(newItem == null) throw new ArgumentNullException(); items.Remove(newItem); items.Insert(0, newItem); } ... }
  • 12. public class RecentlyUsedList { public RecentlyUsedList() { Items = new List<string>(); } public List<string> Items { get; private set; } public void Add(string newItem) { if(newItem == null) throw new ArgumentNullException(); Items.Remove(newItem); Items.Insert(0, newItem); } ... }
  • 13. public class RecentlyUsedList { private IList<string> items = new List<string>(); public int Count { get { return items.Count; } } public string this[int index] { get { return items[index]; } } public void Add(string newItem) { if(newItem == null) throw new ArgumentNullException(); items.Remove(newItem); items.Insert(0, newItem); } ... }
  • 14. public class RecentlyUsedList { private IList<string> items = new List<string>(); public int Count { get { return items.Count; } } public string this[int index] { get { return items[Count – index - 1]; } } public void Add(string newItem) { if(newItem == null) throw new ArgumentNullException(); items.Remove(newItem); items.Add(newItem); } ... }
  • 15. All architecture is design but not all design is architecture. Architecture represents the significant design decisions that shape a system, where significant is measured by cost of change. Grady Booch
  • 16. Architecture is the decisions that you wish you could get right early in a project, but that you are not necessarily more likely to get them right than any other. Ralph Johnson
  • 20. Walking on water and developing software from a specification are easy if both are frozen. Edward V Berard
  • 22. The "defined" process control model requires that every piece of work be completely understood. Given a well- defined set of inputs, the same outputs are generated every time. Ken Schwaber Agile Software Development with Scrum
  • 23. The empirical process control model, on the other hand, expects the unexpected. It provides and exercises control through frequent inspection and adaptation for processes that are imperfectly defined and generate unpredictable and unrepeatable results. Ken Schwaber Agile Software Development with Scrum
  • 26. Programming is a design activity. Jack W Reeves "What Is Software Design?"
  • 27. Coding actually makes sense more often than believed. Often the process of rendering the design in code will reveal oversights and the need for additional design effort. The earlier this occurs, the better the design will be. Jack W Reeves "What Is Software Design?"
  • 28.
  • 29. Properly gaining control of the design process tends to feel like one is losing control of the design process.
  • 30.
  • 31. In 1990 I proposed a theory, called Worse Is Better, of why software would be more likely to succeed if it was developed with minimal invention.
  • 32. It is far better to have an underfeatured product that is rock solid, fast, and small than one that covers what an expert would consider the complete requirements.
  • 33. interface Iterator { boolean set_to_first_element(); boolean set_to_next_element(); boolean set_to_next_nth_element(in unsigned long n) raises(…); boolean retrieve_element(out any element) raises(…); boolean retrieve_element_set_to_next(out any element, out boolean more) raises(…); boolean retrieve_next_n_elements( in unsigned long n, out AnySequence result, out boolean more) raises(…); boolean not_equal_retrieve_element_set_to_next(in Iterator test, out any element) raises(…); void remove_element() raises(…); boolean remove_element_set_to_next() raises(…); boolean remove_next_n_elements(in unsigned long n, out unsigned long actual_number) raises(…); boolean not_equal_remove_element_set_to_next(in Iterator test) raises(…); void replace_element(in any element) raises(…); boolean replace_element_set_to_next(in any element) raises(…); boolean replace_next_n_elements( in AnySequence elements, out unsigned long actual_number) raises(…); boolean not_equal_replace_element_set_to_next(in Iterator test, in any element) raises(…); boolean add_element_set_iterator(in any element) raises(…); boolean add_n_elements_set_iterator( in AnySequence elements, out unsigned long actual_number) raises(…); void invalidate(); boolean is_valid(); boolean is_in_between(); boolean is_for(in Collection collector); boolean is_const(); boolean is_equal(in Iterator test) raises(…); Iterator clone(); void assign(in Iterator from_where) raises(…); void destroy(); };
  • 34. interface BindingIterator { boolean next_one(out Binding result); boolean next_n(in unsigned long how_many, out BindingList result); void destroy(); };
  • 35. Speculative Generality Brian Foote suggested this name for a smell to which we are very sensitive. You get it when people say, "Oh, I think we need the ability to do this kind of thing someday" and thus want all sorts of hooks and special cases to handle things that aren't required. The result often is harder to understand and maintain. If all this machinery were being used, it would be worth it. But if it isn't, it isn't. The machinery just gets in the way, so get rid of it. Martin Fowler Refactoring
  • 36. The best route to generality is through understanding known, specific examples and focusing on their essence to find an essential common solution. Simplicity through experience rather than generality through guesswork. Kevlin Henney "Simplicity before Generality, Use before Reuse"
  • 37. We can find generality and flexibility in trying to deliver specific solutions, but if we weigh anchor and forget the specifics too soon, we end up adrift in a sea of nebulous possibilities, a world of tricky configuration options, long-winded interfaces, and not- quite-right abstractions. Kevlin Henney "Simplicity before Generality, Use before Reuse"
  • 38. You have a problem. You decide to solve it with configuration. Now you have <%= $problems %> problems! Dan North https://twitter.com/tastapod/status/342935892207497219
  • 40. template< typename char_type, typename traits, typename allocator> class basic_string; Trying effective memory management of a container whose representation and management is not fully open to you is like eating with a knife and fork... held with chopsticks... through mittens. Kevlin Henney, "Distinctly Qualified"
  • 41. Henney's Hypothesis For each additional required template parameter, the potential number of users is halved. Matthew Wilson Extended STL
  • 42. If you have a procedure with ten parameters, you probably missed some. Alan Perlis
  • 43. Prediction is very difficultPrediction is very difficult, especially about the future. Niels Bohr
  • 44.
  • 45.
  • 46.
  • 47.
  • 48.
  • 49.
  • 50.
  • 51.
  • 52. Stewart Brand, How Buildings Learn See also http://www.laputan.org/mud/
  • 54.
  • 56. Examination of small programs leads to the conclusion that requiring exception specifications could both enhance developer productivity and enhance code quality, but experience with large software projects suggests a different result — decreased productivity and little or no increase in code quality. Eric Gunnerson
  • 57. All happy families are alike; each unhappy family is unhappy in its own way. Leo Tolstoy Anna Karenina
  • 58.        Scenario buffering by dot-voting possible changes and then readjusting dependencies
  • 59.
  • 61.
  • 62. People overvalue their knowledge and underestimate the probability of their being wrong.
  • 63. The greatest obstacle to discovering the shape of the earth, the continents, and the oceans was not ignorance but the illusion of knowledge. Daniel J Boorstin
  • 64.
  • 65. 0. Lack of Ignorance 1. Lack of Knowledge 2. Lack of Awareness 3. Lack of Process 4. Meta-Ignorance Five Orders of Ignorance Phillip G Armour
  • 66. Education is learning what you didn't even know you didn't know. Daniel J Boorstin