SlideShare a Scribd company logo
The Abstract Art of Software
Development
Jean Piaget
● Developmental stages
– Sensorimotor
– Preoperational
– Concrete Operational
– Formal Operational
Preoperational
● Age 2 to 7
● Magical Thinking
● Why?
● Script Kiddies
● Copy and Pasters
Concrete Operational
● Age 7 to 11
● Thinks logically about problem and
systematically tackles it
● Focuses on the problem
● Large blocks of code
● Nested Ifs
● Repeated Functionality
Formal Operational
● Age 11 to 15-20
● Abstraction
● Meta-cognition
● Problems belong to classes instead of one offs
● How a problem is solved is as or more
important as solving it
● Characterized by comfort with abstraction
Abstraction
● Strunk and White – Elements of Style
– “Omit needless words.”
● Omit needless information
The Big Question
How do we figure out what is needless and what
is needed information?
Abstract Painting
● Move away from strict representation
● Remove aspects of the painting
● Convey impression, theme, idea, emotion, etc.
The Starry Night – van Gogh
Guernica - Picasso
Nude Descending a Staircase No.
2- Duchamp
Composition ii - Mondrian
Step 0
● Where are we?
● Where are we going?
– Goals
● Metrics
● Focus is on solving the problem not on
making the solution
Three aspects of Software
Development
● Design
– Determine how the domain should work
● Code
– Determine how to implement design
● UI
– Create the user experience
● Interface with the code
● Read the data
● Modify the data based on the domain design
Clarity
● Understanding a problem = being able to
reduce it to the only important parts
● Step 0
– What do we want to do?
– What do we know?
– What is the least we can do this with?
Focus on what changes
● If I change this, does it matter?
● A process has two points of change
– Data inputs
– Internal processing based on conditions
● This is process state
Inputs
● What does this process actually need to know
to do what it is supposed to?
● What information do the system need that it
does not know?
Is this input actually needed?
● Is it actually used in the core of the process?
● Is it already available either through another
piece of input or as part of the system?
● Am I actually using this input, or just a property
of it?
Generalizability
Understanding Comics: The Invisible Art – Scott
McCloud
Models
● Contain only the aspects of the thing modeled that
are relevant to the situation
● Lets you use the same process across a very
different objects, as long as they can fit the model
● Creating a model (or interface) lets design to the
situation
● Can use a intermediate converter to make a model
out of something
MVC – many models to one view
View Model Interface

A view can have a defined interface for how it
gets handles the model data.

Providing a translation from your data models
to the interface will allow the view to display
and interact with it

A table can display a 2d array, a list of objects,
steps in a mathematical series, etc.
MVC – many views for one model
Multiple view types of the same model

A single data entity can be displayed by any
number of views

e.g. Song
 Audio in media player
 Music staff with lyrics
 Word Cloud
 Etc.
Abstraction collision
● Push a button versus generalized
● What are your goals?
● Start Date/End Date anti-pattern
States
How to identify states
● If you change this, does it change behavior?
● Externally handled
– Conditionals
● If
● Loops
● Encapsulated
– Subclasses with different processing
– Lambdas and/or method references
Make your states explicit
● What is the reason for the branch in behavior?
● Take complicated conditionals and abstract
them to descriptive methods
● If (movie.author == “George Lucas” &&
movie.containsCharacter(“Jar Jar Binks”)) → if
(isTerribleStarWars(movie)
Explicit states
● Communicates why branching occurs
● Can be shared
● Can be overriden
– This is great for testing
Change (and repair)
Single Paths
● Eliminate needless duplication
● Present clear entry points for a process that are as
accepting as possible
● Identify when entering that process is earliest
possible
● If you are copying – pasting code (even to alter it
slightly), strongly consider combining them
● Reduce mutating a property to as few paths as
possible
Units of Work
● Be able to describe what something does in
simple English before someone gets bored
● Rule of thumb: As soon as you say “And
then...”, it's a new unit of work
● Non-trivial blocks for if then or loops are units of
work
– Prefer tying them to the conditional states
Embrace levels
● Core concept of traditional software abstraction
● Single entry point opens up to all possible state
combinations pathways
● Each level only needs to know what it needs to
know
● Accept what is given without knowing the
source
Single Responsibility Principle
● Prefer housing all logic on one path (i.e. don't
split your processing across unrelated sections
of the code, between code and database, etc.)
● Keep your object graph complete over the
process (i.e. have all necessary data accessible
through code/no explicit database calls)
Communication
Names
● Choose names that convey information
● Method name → what does this method
actually do
● Variables → what is this thing
– var x < int maxOccupancy
– adjectives (“temp”) and general nouns (“num”)
should modify nouns
In defense of Hungarian notation
● http://www.joelonsoftware.com/articles/Wrong.html
● In cases where you can't represent type information
with classes, etc., encoding that information into the
name is better than not
● Don't forget step 0
– “What's my goal?”
– Don't encode duplicate or otherwise useless
information
Speak the language
What are you actually presenting?
● It's not pages
● It's not components
● It's domain data and actions
– Understand the aspects of this data and actions
– Presenting these together makes up the user
experience
Mise en place
Consider: Dimensions
● Objects data properties that are comparable
● Two types:
– Directly comparable (i.e. determinable difference in
magnitude)
– Enumerable (can be mapped to a defined list)
Use or create a vocabulary
● Sapir-Whorf hypothesis
● Pidgin
– Quick communication
– Concerns itself only with what matters
Establish a contract
● Any barrier should have clear indication of what
is expected/what is not allowed
● In a perfect world, derive code from the contract
Opinionated vs. Non-opinionated
● What you choose to display or not display and
what actions are and are not available should
be meaningful
● Non-opinionated
– Show everything/allow everything
● Opinionated
– Guides the user in the intended use by reducing
what is shown/allowed
Merging the two?
Avoid needless choices
Affordances
Steve Erdman
Steve.erdman77@gmail.com
@MrSquicky

More Related Content

Similar to The abstract art of software development

Single Responsibility Principle
Single Responsibility PrincipleSingle Responsibility Principle
Single Responsibility Principle
BADR
 
The working architecture of node js applications open tech week javascript ...
The working architecture of node js applications   open tech week javascript ...The working architecture of node js applications   open tech week javascript ...
The working architecture of node js applications open tech week javascript ...
Viktor Turskyi
 
The working architecture of NodeJS applications, Виктор Турский
The working architecture of NodeJS applications, Виктор ТурскийThe working architecture of NodeJS applications, Виктор Турский
The working architecture of NodeJS applications, Виктор Турский
Sigma Software
 
Structured Software Design
Structured Software DesignStructured Software Design
Structured Software Design
Giorgio Zoppi
 
Object Oriented, Design patterns and data modelling worshop
Object Oriented, Design patterns and data modelling worshopObject Oriented, Design patterns and data modelling worshop
Object Oriented, Design patterns and data modelling worshop
Mohammad Shawahneh
 
Doing Enterprise Business with Processes & Rules
Doing Enterprise Business with Processes & RulesDoing Enterprise Business with Processes & Rules
Doing Enterprise Business with Processes & RulesSrinath Perera
 
Interpretable Machine Learning
Interpretable Machine LearningInterpretable Machine Learning
Interpretable Machine Learning
inovex GmbH
 
CS8592-OOAD Lecture Notes Unit-1
CS8592-OOAD Lecture Notes Unit-1CS8592-OOAD Lecture Notes Unit-1
CS8592-OOAD Lecture Notes Unit-1
Gobinath Subramaniam
 
Software Design Principles and Best Practices - Satyajit Dey
Software Design Principles and Best Practices - Satyajit DeySoftware Design Principles and Best Practices - Satyajit Dey
Software Design Principles and Best Practices - Satyajit Dey
Cefalo
 
L15.pptx
L15.pptxL15.pptx
L15.pptx
ImonBennett
 
Think components. March 2017
Think components. March 2017Think components. March 2017
Think components. March 2017
Ivan Babak
 
Functional Patterns for C++ Multithreading (C++ Dev Meetup Iasi)
Functional Patterns for C++ Multithreading (C++ Dev Meetup Iasi)Functional Patterns for C++ Multithreading (C++ Dev Meetup Iasi)
Functional Patterns for C++ Multithreading (C++ Dev Meetup Iasi)
Ovidiu Farauanu
 
General introduction to AI ML DL DS
General introduction to AI ML DL DSGeneral introduction to AI ML DL DS
General introduction to AI ML DL DS
Roopesh Kohad
 
FRU Kathmandu: Adopting with Change Frontend Architecture and Patterns
FRU Kathmandu: Adopting with Change Frontend Architecture and PatternsFRU Kathmandu: Adopting with Change Frontend Architecture and Patterns
FRU Kathmandu: Adopting with Change Frontend Architecture and Patterns
Leapfrog Technology Inc.
 
Design patterns for fun & profit - CoderCruise 2018
Design patterns for fun & profit - CoderCruise 2018Design patterns for fun & profit - CoderCruise 2018
Design patterns for fun & profit - CoderCruise 2018
David Litvak Bruno
 
Adrian Colyer - Keynote: NoSQL matters - NoSQL matters Dublin 2015
Adrian Colyer - Keynote: NoSQL matters - NoSQL matters Dublin 2015Adrian Colyer - Keynote: NoSQL matters - NoSQL matters Dublin 2015
Adrian Colyer - Keynote: NoSQL matters - NoSQL matters Dublin 2015
NoSQLmatters
 
Keeping business logic out of your UIs
Keeping business logic out of your UIsKeeping business logic out of your UIs
Keeping business logic out of your UIs
Petter Holmström
 
AMW43 - Unba.se, Distributed database for human interaction
AMW43 - Unba.se, Distributed database for human interactionAMW43 - Unba.se, Distributed database for human interaction
AMW43 - Unba.se, Distributed database for human interaction
Daniel Norman
 

Similar to The abstract art of software development (20)

Single Responsibility Principle
Single Responsibility PrincipleSingle Responsibility Principle
Single Responsibility Principle
 
The working architecture of node js applications open tech week javascript ...
The working architecture of node js applications   open tech week javascript ...The working architecture of node js applications   open tech week javascript ...
The working architecture of node js applications open tech week javascript ...
 
The working architecture of NodeJS applications, Виктор Турский
The working architecture of NodeJS applications, Виктор ТурскийThe working architecture of NodeJS applications, Виктор Турский
The working architecture of NodeJS applications, Виктор Турский
 
Structured Software Design
Structured Software DesignStructured Software Design
Structured Software Design
 
Object Oriented, Design patterns and data modelling worshop
Object Oriented, Design patterns and data modelling worshopObject Oriented, Design patterns and data modelling worshop
Object Oriented, Design patterns and data modelling worshop
 
Doing Enterprise Business with Processes & Rules
Doing Enterprise Business with Processes & RulesDoing Enterprise Business with Processes & Rules
Doing Enterprise Business with Processes & Rules
 
PyData2015
PyData2015PyData2015
PyData2015
 
Interpretable Machine Learning
Interpretable Machine LearningInterpretable Machine Learning
Interpretable Machine Learning
 
CS8592-OOAD Lecture Notes Unit-1
CS8592-OOAD Lecture Notes Unit-1CS8592-OOAD Lecture Notes Unit-1
CS8592-OOAD Lecture Notes Unit-1
 
Software Design Principles and Best Practices - Satyajit Dey
Software Design Principles and Best Practices - Satyajit DeySoftware Design Principles and Best Practices - Satyajit Dey
Software Design Principles and Best Practices - Satyajit Dey
 
L15.pptx
L15.pptxL15.pptx
L15.pptx
 
Clean Code
Clean CodeClean Code
Clean Code
 
Think components. March 2017
Think components. March 2017Think components. March 2017
Think components. March 2017
 
Functional Patterns for C++ Multithreading (C++ Dev Meetup Iasi)
Functional Patterns for C++ Multithreading (C++ Dev Meetup Iasi)Functional Patterns for C++ Multithreading (C++ Dev Meetup Iasi)
Functional Patterns for C++ Multithreading (C++ Dev Meetup Iasi)
 
General introduction to AI ML DL DS
General introduction to AI ML DL DSGeneral introduction to AI ML DL DS
General introduction to AI ML DL DS
 
FRU Kathmandu: Adopting with Change Frontend Architecture and Patterns
FRU Kathmandu: Adopting with Change Frontend Architecture and PatternsFRU Kathmandu: Adopting with Change Frontend Architecture and Patterns
FRU Kathmandu: Adopting with Change Frontend Architecture and Patterns
 
Design patterns for fun & profit - CoderCruise 2018
Design patterns for fun & profit - CoderCruise 2018Design patterns for fun & profit - CoderCruise 2018
Design patterns for fun & profit - CoderCruise 2018
 
Adrian Colyer - Keynote: NoSQL matters - NoSQL matters Dublin 2015
Adrian Colyer - Keynote: NoSQL matters - NoSQL matters Dublin 2015Adrian Colyer - Keynote: NoSQL matters - NoSQL matters Dublin 2015
Adrian Colyer - Keynote: NoSQL matters - NoSQL matters Dublin 2015
 
Keeping business logic out of your UIs
Keeping business logic out of your UIsKeeping business logic out of your UIs
Keeping business logic out of your UIs
 
AMW43 - Unba.se, Distributed database for human interaction
AMW43 - Unba.se, Distributed database for human interactionAMW43 - Unba.se, Distributed database for human interaction
AMW43 - Unba.se, Distributed database for human interaction
 

Recently uploaded

BASIC C++ lecture NOTE C++ lecture 3.pptx
BASIC C++ lecture NOTE C++ lecture 3.pptxBASIC C++ lecture NOTE C++ lecture 3.pptx
BASIC C++ lecture NOTE C++ lecture 3.pptx
natyesu
 
ER(Entity Relationship) Diagram for online shopping - TAE
ER(Entity Relationship) Diagram for online shopping - TAEER(Entity Relationship) Diagram for online shopping - TAE
ER(Entity Relationship) Diagram for online shopping - TAE
Himani415946
 
The+Prospects+of+E-Commerce+in+China.pptx
The+Prospects+of+E-Commerce+in+China.pptxThe+Prospects+of+E-Commerce+in+China.pptx
The+Prospects+of+E-Commerce+in+China.pptx
laozhuseo02
 
test test test test testtest test testtest test testtest test testtest test ...
test test  test test testtest test testtest test testtest test testtest test ...test test  test test testtest test testtest test testtest test testtest test ...
test test test test testtest test testtest test testtest test testtest test ...
Arif0071
 
原版仿制(uob毕业证书)英国伯明翰大学毕业证本科学历证书原版一模一样
原版仿制(uob毕业证书)英国伯明翰大学毕业证本科学历证书原版一模一样原版仿制(uob毕业证书)英国伯明翰大学毕业证本科学历证书原版一模一样
原版仿制(uob毕业证书)英国伯明翰大学毕业证本科学历证书原版一模一样
3ipehhoa
 
Living-in-IT-era-Module-7-Imaging-and-Design-for-Social-Impact.pptx
Living-in-IT-era-Module-7-Imaging-and-Design-for-Social-Impact.pptxLiving-in-IT-era-Module-7-Imaging-and-Design-for-Social-Impact.pptx
Living-in-IT-era-Module-7-Imaging-and-Design-for-Social-Impact.pptx
TristanJasperRamos
 
guildmasters guide to ravnica Dungeons & Dragons 5...
guildmasters guide to ravnica Dungeons & Dragons 5...guildmasters guide to ravnica Dungeons & Dragons 5...
guildmasters guide to ravnica Dungeons & Dragons 5...
Rogerio Filho
 
Latest trends in computer networking.pptx
Latest trends in computer networking.pptxLatest trends in computer networking.pptx
Latest trends in computer networking.pptx
JungkooksNonexistent
 
How to Use Contact Form 7 Like a Pro.pptx
How to Use Contact Form 7 Like a Pro.pptxHow to Use Contact Form 7 Like a Pro.pptx
How to Use Contact Form 7 Like a Pro.pptx
Gal Baras
 
History+of+E-commerce+Development+in+China-www.cfye-commerce.shop
History+of+E-commerce+Development+in+China-www.cfye-commerce.shopHistory+of+E-commerce+Development+in+China-www.cfye-commerce.shop
History+of+E-commerce+Development+in+China-www.cfye-commerce.shop
laozhuseo02
 
Output determination SAP S4 HANA SAP SD CC
Output determination SAP S4 HANA SAP SD CCOutput determination SAP S4 HANA SAP SD CC
Output determination SAP S4 HANA SAP SD CC
ShahulHameed54211
 
Multi-cluster Kubernetes Networking- Patterns, Projects and Guidelines
Multi-cluster Kubernetes Networking- Patterns, Projects and GuidelinesMulti-cluster Kubernetes Networking- Patterns, Projects and Guidelines
Multi-cluster Kubernetes Networking- Patterns, Projects and Guidelines
Sanjeev Rampal
 
急速办(bedfordhire毕业证书)英国贝德福特大学毕业证成绩单原版一模一样
急速办(bedfordhire毕业证书)英国贝德福特大学毕业证成绩单原版一模一样急速办(bedfordhire毕业证书)英国贝德福特大学毕业证成绩单原版一模一样
急速办(bedfordhire毕业证书)英国贝德福特大学毕业证成绩单原版一模一样
3ipehhoa
 
1比1复刻(bath毕业证书)英国巴斯大学毕业证学位证原版一模一样
1比1复刻(bath毕业证书)英国巴斯大学毕业证学位证原版一模一样1比1复刻(bath毕业证书)英国巴斯大学毕业证学位证原版一模一样
1比1复刻(bath毕业证书)英国巴斯大学毕业证学位证原版一模一样
3ipehhoa
 
This 7-second Brain Wave Ritual Attracts Money To You.!
This 7-second Brain Wave Ritual Attracts Money To You.!This 7-second Brain Wave Ritual Attracts Money To You.!
This 7-second Brain Wave Ritual Attracts Money To You.!
nirahealhty
 
1.Wireless Communication System_Wireless communication is a broad term that i...
1.Wireless Communication System_Wireless communication is a broad term that i...1.Wireless Communication System_Wireless communication is a broad term that i...
1.Wireless Communication System_Wireless communication is a broad term that i...
JeyaPerumal1
 

Recently uploaded (16)

BASIC C++ lecture NOTE C++ lecture 3.pptx
BASIC C++ lecture NOTE C++ lecture 3.pptxBASIC C++ lecture NOTE C++ lecture 3.pptx
BASIC C++ lecture NOTE C++ lecture 3.pptx
 
ER(Entity Relationship) Diagram for online shopping - TAE
ER(Entity Relationship) Diagram for online shopping - TAEER(Entity Relationship) Diagram for online shopping - TAE
ER(Entity Relationship) Diagram for online shopping - TAE
 
The+Prospects+of+E-Commerce+in+China.pptx
The+Prospects+of+E-Commerce+in+China.pptxThe+Prospects+of+E-Commerce+in+China.pptx
The+Prospects+of+E-Commerce+in+China.pptx
 
test test test test testtest test testtest test testtest test testtest test ...
test test  test test testtest test testtest test testtest test testtest test ...test test  test test testtest test testtest test testtest test testtest test ...
test test test test testtest test testtest test testtest test testtest test ...
 
原版仿制(uob毕业证书)英国伯明翰大学毕业证本科学历证书原版一模一样
原版仿制(uob毕业证书)英国伯明翰大学毕业证本科学历证书原版一模一样原版仿制(uob毕业证书)英国伯明翰大学毕业证本科学历证书原版一模一样
原版仿制(uob毕业证书)英国伯明翰大学毕业证本科学历证书原版一模一样
 
Living-in-IT-era-Module-7-Imaging-and-Design-for-Social-Impact.pptx
Living-in-IT-era-Module-7-Imaging-and-Design-for-Social-Impact.pptxLiving-in-IT-era-Module-7-Imaging-and-Design-for-Social-Impact.pptx
Living-in-IT-era-Module-7-Imaging-and-Design-for-Social-Impact.pptx
 
guildmasters guide to ravnica Dungeons & Dragons 5...
guildmasters guide to ravnica Dungeons & Dragons 5...guildmasters guide to ravnica Dungeons & Dragons 5...
guildmasters guide to ravnica Dungeons & Dragons 5...
 
Latest trends in computer networking.pptx
Latest trends in computer networking.pptxLatest trends in computer networking.pptx
Latest trends in computer networking.pptx
 
How to Use Contact Form 7 Like a Pro.pptx
How to Use Contact Form 7 Like a Pro.pptxHow to Use Contact Form 7 Like a Pro.pptx
How to Use Contact Form 7 Like a Pro.pptx
 
History+of+E-commerce+Development+in+China-www.cfye-commerce.shop
History+of+E-commerce+Development+in+China-www.cfye-commerce.shopHistory+of+E-commerce+Development+in+China-www.cfye-commerce.shop
History+of+E-commerce+Development+in+China-www.cfye-commerce.shop
 
Output determination SAP S4 HANA SAP SD CC
Output determination SAP S4 HANA SAP SD CCOutput determination SAP S4 HANA SAP SD CC
Output determination SAP S4 HANA SAP SD CC
 
Multi-cluster Kubernetes Networking- Patterns, Projects and Guidelines
Multi-cluster Kubernetes Networking- Patterns, Projects and GuidelinesMulti-cluster Kubernetes Networking- Patterns, Projects and Guidelines
Multi-cluster Kubernetes Networking- Patterns, Projects and Guidelines
 
急速办(bedfordhire毕业证书)英国贝德福特大学毕业证成绩单原版一模一样
急速办(bedfordhire毕业证书)英国贝德福特大学毕业证成绩单原版一模一样急速办(bedfordhire毕业证书)英国贝德福特大学毕业证成绩单原版一模一样
急速办(bedfordhire毕业证书)英国贝德福特大学毕业证成绩单原版一模一样
 
1比1复刻(bath毕业证书)英国巴斯大学毕业证学位证原版一模一样
1比1复刻(bath毕业证书)英国巴斯大学毕业证学位证原版一模一样1比1复刻(bath毕业证书)英国巴斯大学毕业证学位证原版一模一样
1比1复刻(bath毕业证书)英国巴斯大学毕业证学位证原版一模一样
 
This 7-second Brain Wave Ritual Attracts Money To You.!
This 7-second Brain Wave Ritual Attracts Money To You.!This 7-second Brain Wave Ritual Attracts Money To You.!
This 7-second Brain Wave Ritual Attracts Money To You.!
 
1.Wireless Communication System_Wireless communication is a broad term that i...
1.Wireless Communication System_Wireless communication is a broad term that i...1.Wireless Communication System_Wireless communication is a broad term that i...
1.Wireless Communication System_Wireless communication is a broad term that i...
 

The abstract art of software development

  • 1. The Abstract Art of Software Development
  • 2. Jean Piaget ● Developmental stages – Sensorimotor – Preoperational – Concrete Operational – Formal Operational
  • 3. Preoperational ● Age 2 to 7 ● Magical Thinking ● Why? ● Script Kiddies ● Copy and Pasters
  • 4. Concrete Operational ● Age 7 to 11 ● Thinks logically about problem and systematically tackles it ● Focuses on the problem ● Large blocks of code ● Nested Ifs ● Repeated Functionality
  • 5.
  • 6. Formal Operational ● Age 11 to 15-20 ● Abstraction ● Meta-cognition ● Problems belong to classes instead of one offs ● How a problem is solved is as or more important as solving it ● Characterized by comfort with abstraction
  • 7.
  • 8. Abstraction ● Strunk and White – Elements of Style – “Omit needless words.” ● Omit needless information
  • 9. The Big Question How do we figure out what is needless and what is needed information?
  • 10. Abstract Painting ● Move away from strict representation ● Remove aspects of the painting ● Convey impression, theme, idea, emotion, etc.
  • 11. The Starry Night – van Gogh
  • 13. Nude Descending a Staircase No. 2- Duchamp
  • 14. Composition ii - Mondrian
  • 15. Step 0 ● Where are we? ● Where are we going? – Goals ● Metrics ● Focus is on solving the problem not on making the solution
  • 16.
  • 17.
  • 18. Three aspects of Software Development ● Design – Determine how the domain should work ● Code – Determine how to implement design ● UI – Create the user experience ● Interface with the code ● Read the data ● Modify the data based on the domain design
  • 19. Clarity ● Understanding a problem = being able to reduce it to the only important parts ● Step 0 – What do we want to do? – What do we know? – What is the least we can do this with?
  • 20.
  • 21.
  • 22. Focus on what changes ● If I change this, does it matter? ● A process has two points of change – Data inputs – Internal processing based on conditions ● This is process state
  • 23. Inputs ● What does this process actually need to know to do what it is supposed to? ● What information do the system need that it does not know?
  • 24.
  • 25. Is this input actually needed? ● Is it actually used in the core of the process? ● Is it already available either through another piece of input or as part of the system? ● Am I actually using this input, or just a property of it?
  • 26. Generalizability Understanding Comics: The Invisible Art – Scott McCloud
  • 27. Models ● Contain only the aspects of the thing modeled that are relevant to the situation ● Lets you use the same process across a very different objects, as long as they can fit the model ● Creating a model (or interface) lets design to the situation ● Can use a intermediate converter to make a model out of something
  • 28. MVC – many models to one view View Model Interface  A view can have a defined interface for how it gets handles the model data.  Providing a translation from your data models to the interface will allow the view to display and interact with it  A table can display a 2d array, a list of objects, steps in a mathematical series, etc.
  • 29. MVC – many views for one model Multiple view types of the same model  A single data entity can be displayed by any number of views  e.g. Song  Audio in media player  Music staff with lyrics  Word Cloud  Etc.
  • 30. Abstraction collision ● Push a button versus generalized ● What are your goals? ● Start Date/End Date anti-pattern
  • 32. How to identify states ● If you change this, does it change behavior? ● Externally handled – Conditionals ● If ● Loops ● Encapsulated – Subclasses with different processing – Lambdas and/or method references
  • 33. Make your states explicit ● What is the reason for the branch in behavior? ● Take complicated conditionals and abstract them to descriptive methods ● If (movie.author == “George Lucas” && movie.containsCharacter(“Jar Jar Binks”)) → if (isTerribleStarWars(movie)
  • 34. Explicit states ● Communicates why branching occurs ● Can be shared ● Can be overriden – This is great for testing
  • 36. Single Paths ● Eliminate needless duplication ● Present clear entry points for a process that are as accepting as possible ● Identify when entering that process is earliest possible ● If you are copying – pasting code (even to alter it slightly), strongly consider combining them ● Reduce mutating a property to as few paths as possible
  • 37. Units of Work ● Be able to describe what something does in simple English before someone gets bored ● Rule of thumb: As soon as you say “And then...”, it's a new unit of work ● Non-trivial blocks for if then or loops are units of work – Prefer tying them to the conditional states
  • 38. Embrace levels ● Core concept of traditional software abstraction ● Single entry point opens up to all possible state combinations pathways ● Each level only needs to know what it needs to know ● Accept what is given without knowing the source
  • 39. Single Responsibility Principle ● Prefer housing all logic on one path (i.e. don't split your processing across unrelated sections of the code, between code and database, etc.) ● Keep your object graph complete over the process (i.e. have all necessary data accessible through code/no explicit database calls)
  • 41. Names ● Choose names that convey information ● Method name → what does this method actually do ● Variables → what is this thing – var x < int maxOccupancy – adjectives (“temp”) and general nouns (“num”) should modify nouns
  • 42. In defense of Hungarian notation ● http://www.joelonsoftware.com/articles/Wrong.html ● In cases where you can't represent type information with classes, etc., encoding that information into the name is better than not ● Don't forget step 0 – “What's my goal?” – Don't encode duplicate or otherwise useless information
  • 44. What are you actually presenting? ● It's not pages ● It's not components ● It's domain data and actions – Understand the aspects of this data and actions – Presenting these together makes up the user experience
  • 46. Consider: Dimensions ● Objects data properties that are comparable ● Two types: – Directly comparable (i.e. determinable difference in magnitude) – Enumerable (can be mapped to a defined list)
  • 47. Use or create a vocabulary ● Sapir-Whorf hypothesis ● Pidgin – Quick communication – Concerns itself only with what matters
  • 48.
  • 49. Establish a contract ● Any barrier should have clear indication of what is expected/what is not allowed ● In a perfect world, derive code from the contract
  • 50. Opinionated vs. Non-opinionated ● What you choose to display or not display and what actions are and are not available should be meaningful ● Non-opinionated – Show everything/allow everything ● Opinionated – Guides the user in the intended use by reducing what is shown/allowed
  • 54.