SlideShare a Scribd company logo
Filling in the gap
between realities
A guide to problem solving
for software engineers
Grokking -Thanh Dinh 26/02/2022
Agenda
What is a problem
Problem definition
Causal analysis
Trade-off
2 types of trade-off
Separation principles
Conclusion
What is a problem?
A tale of two realities
The elevator
problem
Lengthy elevator wait
People in an office building started to
complain to building management
about the long wait time for elevators.
As part of office building staff, you are
tasked with solving this problem. How
do you solve it?
Elevator problem - Quick solutions
Who has the problem? - The stakeholders
Stakeholders - Clients vs Users
What is a problem?
Perceived vs Expected Realities
Move perceived reality to expected reality
Move expected reality to perceived reality
Pull 2 realities to a middle point
Fill in the gap of residents' realities
Fill in the gap of Holistics customers' realities
Problem definition
Choosing the right problem statement to solve
A problem well-stated is a
problem half-solved.


John Dewey
Startup is about finding the
right problem to solve.


Anonymous
Problem definition
What is the problem?
What is perceived reality?
What is expected reality? Is it clear?
Who are involved in the problem?
How important is the problem?
When does the problem needs to be solved?
Is there really a problem?
Grokking Techtalk: Problem solving for sw engineers
Highest
abstraction
level
Problem definition should be at the highest abstraction
level that appropriately describes the situation.
Principle
The primary thing when you take a sword in
your hands is your intention to cut the enemy,
whatever the means. If you think only of
hitting, springing, striking or touching the
enemy, you will not be able actually to cut
him.


Miyamoto Musashi
Example: Holistics Analytics as Code
Lower level:
product features
Version control
Logic as code
Automated workflow
Data unit testing
Higher level: pain
points
Can't track who changed what
Unreliable dashboards
Manual, repetitive work
Vendor lock-in
Why
How
Lowest level:
technology choice
Analytics Modeling
Language (AML)
TypeScript
Redis
Postgres
Terraform/Ansible
Why
How
Ladder of abstraction: Product Design
Causal analysis
Knowing what causes the problem
The elevator
problem
Lengthy elevator wait
People in an office building started to
complain to building management
about the long wait time for elevators.
As part of office building staff, you are
tasked with solving this problem. How
do you solve it?
Causal diagram
Non-linear
causal
relationship
In many cases, the causal chain is not linear that can be
described as a tree. Changing one variable can affect itself
through cycles.
Cycles mean there's no definite root cause of the problem.
Pitfall
Causal loop diagram
Non-holistic
thinking
Company growth problem is not just a sales, marketing,
engineering, product problem, but the whole company
problem.
Usually, a problem is caused by interactions between
components or the compound effect of multiple
dimensions, not the individual parts/dimensions. There's no
single root cause to find.
Pitfall
Ishikawa (fishbone) diagram
Forget that problem is
inherently a human thing
Definition of a problem requires a person to even
be called a problem but many engineers forget
this.
Forget to choose the right
problem to solve
Engineers tend to think that "requirements" are
set in stone. In reality, most requirements may
not even make sense in the first place.
Common mistakes
Trade-off
Which one will you choose?
You face a trade-off when it
is hard to choose a solution
Thus you must have already found solutions
in order to have trade-offs
Solution
Ideality
Causal Analysis and Trade-offs
Dimensions
In SE, dimensions come from business requirements
Dimensional priorities
Talk to stakeholders to identify the most important dimensions
There are 2 types
of trade-off
Dimensional trade-off
A solution increases benefit in one dimension but
also increases harmful effect in another
dimension
Alternative trade-off
Solution 1 gives you benefit 1, solution 2 gives
you benefit 2, you can only choose either, but
you want both
Dimensional trade-off examples
More security checks will improve security but
reduce performance
🔐Security vs 🐎Performance
More tests will improve code reliability
but it will take longer to ship new
features
⛑Reliability vs 🔀Agility
Migrate to Kubernetes improves scalability
but increases infrastructure cost
🚀Scalability vs 💸Cost
It is hard to design a software that is both
powerful and user-friendly
💖User- friendliness vs ⚡Power
Alternative trade-off examples
SQL allows for complex joins but
require upfront schema design
SQL vs NoSQL
Monolithic architecture is simpler but less
scalable
Monolithic vs Microservices
Fundamental trade-off between functional
programming and OOP
Expression problem
Grokking Techtalk: Problem solving for sw engineers
Choose a compromise point
Find a sweet spot on the line of compromise
Resolve the trade-off
Use creative problem solving techniques to
overcome the trade-off
2 ways to deal with trade-offs
Only see one side of the trade-off
Only seeing one side of the trade-off means not seeing
the trade-off at all!
Common mistake 1
Programmers know the benefits of everything
and the trade-offs of nothing.


Architects need to understand both.
Rich Hickey
Everything in software architecture is a trade-
off.


If an architect thinks they have discovered
something that isn’t a trade-off, more likely
they just haven’t identified the trade-off yet.
Neal Ford
Opinion: Use boring technology
New
New benefits
Unknown harms
New/fancy tech
Old
Old benefits
Known harms
Boring tech
http://boringtechnology.club/
The nice thing about boringness (so
constrained) is that the capabilities of these
things are well understood. But more
importantly, their failure modes are well
understood
Dan McKinley
Not realize that trade-offs are
not set in stone
Trade-offs are hard to overcome but in many
cases, they are not set in stone. You can resolve
them through separation techniques.
Common mistake 2
The root of many trade-offs are due to couplings.
Resolve the coupling, you can resolve the trade-off
Why separation?
TRIZ separation principles
applied to Software Engineering
Break down different
requirements into separate
time group
Separation in Time
Break down different
requirements into separate
modules
Separation in Space
Break down different
requirements at the submodule
and system level
Separation between
Parts and Whole
Separation in Time
Agility/Cost vs Reliability/Security/Scalability
Separation in Space
Agility: Separate service can be
developed independently
Scalability: New service can be
connected to the common sidecar
Security/Reliability: Handled by
sidecar
Performance: Communication
overhead
Cost: Only makes sense for more
complex systems
Security/Reliability vs Agility/Scalability
Sidecar pattern
Separation between Parts and Whole
Agility/Scalability vs Reliability
Agility: Fast many unit tests without
mocks
Scalability: Functional logic can be
easily parallelized
Reliability: Only need a few reliable
integration tests, most logic covered
by unit tests
Performance:
Communication/serialization
overhead
Cost/Learnability: More time
decoupling stateless from stateful
logic
Functional core Imperative shell
Conclusion
What is a problem
A problem is a gap between perceived and expected reality of
some stakeholder
Look at a problem at its highest level of abstraction: its ultimate
goal
Causal analysis
Trade-off
Solution ideality and relationship with causal analysis
2 types of trade-off: dimensional/alternative
3 separation techniques to resolve trade-offs
Further readings
Bringing software's best practices to
analytics development
Old World New World
Software
Development
Analytics
Configure servers manually
using GUI. Deploy via FTP
upload.
Problems: Hard to maintain;
Prone to error
Configure servers using code
(Infrastructure As-Code).
Continuous Integration / Continuous
Delivery (CI/CD)
Benefits: Reliable, Scalable and
Maintainable.
Build visualizations using drag-
and-drop. Hard to reuse
business logic.
Analytics built with
software principles
Holistics
1- Define analytics
logic as code
2- Code review,
deploy with CI/CD
3- Reliable, trusted
analytics
Work with Holistics
t
Our Culture
Problem-Solving Centric: (as seen from today's talk) We
think from first principles, question assumptions, and
deliberate tradeoffs carefully.
Personal Development: We invest so that as the company
grows, the people grow.
Technical Coaching & Mentorship
Pair Programming
Learning by Teaching...
Building a language for
analytics modeling
Example
Technical
Problem
Powerful type system to enable rich
IDE functionalities
A query language that is
composable/reusable alternative to
SQL
Goal: Making analytics reusable
Solution: A type-based DSL layer that
allows mapping between business logic
to database layer.
Technical challenges:
Grokking Techtalk: Problem solving for sw engineers

More Related Content

PDF
Developer Experience
PDF
50.000 orange stickies later
PDF
High Concurrency Architecture at TIKI
PPTX
4+1 View Model of Software Architecture
PPTX
Technical Debt
PPTX
Vertical Story Slicing Takes the Cake!
PDF
ASE Keynote 2022: From Automation to Empowering Software Developers
PPTX
Continuous Delivery of Agile Architecture
Developer Experience
50.000 orange stickies later
High Concurrency Architecture at TIKI
4+1 View Model of Software Architecture
Technical Debt
Vertical Story Slicing Takes the Cake!
ASE Keynote 2022: From Automation to Empowering Software Developers
Continuous Delivery of Agile Architecture

What's hot (20)

PDF
Grokking Techtalk #45: First Principles Thinking
PPTX
Grokking Techtalk #37: Software design and refactoring
PDF
Grokking TechTalk #33: High Concurrency Architecture at TIKI
PDF
Bizweb Microservices Architecture
PPTX
Grokking Techtalk #40: Consistency and Availability tradeoff in database cluster
PDF
An introduction to Behavior-Driven Development (BDD)
KEY
Concurrent Programming Using the Disruptor
PDF
Kafka: All an engineer needs to know
PPTX
BDD presentation
PPTX
Distributed Transaction in Microservice
PDF
Domain Driven Design và Event Driven Architecture
PPTX
A Practical Guide to Domain Driven Design: Presentation Slides
PPTX
Code Review Best Practices
PDF
Kinh nghiệm triển khai Microservices tại Sapo.vn
PDF
Domain Driven Design
PPT
Domain Driven Design (DDD)
PPTX
Monoliths and Microservices
PDF
Building Bizweb Microservices with Docker
PPSX
Agile, User Stories, Domain Driven Design
PPTX
Software architecture for high traffic website
Grokking Techtalk #45: First Principles Thinking
Grokking Techtalk #37: Software design and refactoring
Grokking TechTalk #33: High Concurrency Architecture at TIKI
Bizweb Microservices Architecture
Grokking Techtalk #40: Consistency and Availability tradeoff in database cluster
An introduction to Behavior-Driven Development (BDD)
Concurrent Programming Using the Disruptor
Kafka: All an engineer needs to know
BDD presentation
Distributed Transaction in Microservice
Domain Driven Design và Event Driven Architecture
A Practical Guide to Domain Driven Design: Presentation Slides
Code Review Best Practices
Kinh nghiệm triển khai Microservices tại Sapo.vn
Domain Driven Design
Domain Driven Design (DDD)
Monoliths and Microservices
Building Bizweb Microservices with Docker
Agile, User Stories, Domain Driven Design
Software architecture for high traffic website
Ad

Similar to Grokking Techtalk: Problem solving for sw engineers (20)

PDF
DDD tales from ProductLand - NewCrafts Paris - May 2024
PPTX
Moving from requirements order taker to business enabler
PPTX
something went wrong and understanding underlying factors
PPT
What is IT Architect
KEY
Keynote Scrum Gathering Barcelona 2012
PPTX
Anatomy of Three Incidents -- Commonalities and Lessons
PDF
When Things Go Bump in the Night
PDF
Oscon2015 150724001540-lva1-app6891
PDF
Building a Successful Organization By Mastering Failure
PPT
Problem Solving Methodology 2011 - 2014
KEY
Become Efficient or Die: The Story of BackType
PDF
Biz Product Learnings
KEY
Another Agile Intro
PDF
The Ultimate Metric
PPTX
Learning from Learnings: Anatomy of Three Incidents
PPS
Management of Complexity in System Design of Large IT Solutions
PPTX
NBSintro2013
PDF
Software engineering for CEOs
PDF
PA2557_SQM_Lecture7 - Defect Prevention.pdf
PDF
The lean principles of data ops
DDD tales from ProductLand - NewCrafts Paris - May 2024
Moving from requirements order taker to business enabler
something went wrong and understanding underlying factors
What is IT Architect
Keynote Scrum Gathering Barcelona 2012
Anatomy of Three Incidents -- Commonalities and Lessons
When Things Go Bump in the Night
Oscon2015 150724001540-lva1-app6891
Building a Successful Organization By Mastering Failure
Problem Solving Methodology 2011 - 2014
Become Efficient or Die: The Story of BackType
Biz Product Learnings
Another Agile Intro
The Ultimate Metric
Learning from Learnings: Anatomy of Three Incidents
Management of Complexity in System Design of Large IT Solutions
NBSintro2013
Software engineering for CEOs
PA2557_SQM_Lecture7 - Defect Prevention.pdf
The lean principles of data ops
Ad

Recently uploaded (20)

PDF
composite construction of structures.pdf
PPTX
Welding lecture in detail for understanding
PDF
Well-logging-methods_new................
PPTX
Lecture Notes Electrical Wiring System Components
PPTX
Lesson 3_Tessellation.pptx finite Mathematics
PPTX
MCN 401 KTU-2019-PPE KITS-MODULE 2.pptx
PPTX
CYBER-CRIMES AND SECURITY A guide to understanding
PPTX
CARTOGRAPHY AND GEOINFORMATION VISUALIZATION chapter1 NPTE (2).pptx
PPTX
Engineering Ethics, Safety and Environment [Autosaved] (1).pptx
PPTX
additive manufacturing of ss316l using mig welding
DOCX
ASol_English-Language-Literature-Set-1-27-02-2023-converted.docx
PPTX
Strings in CPP - Strings in C++ are sequences of characters used to store and...
PPTX
Recipes for Real Time Voice AI WebRTC, SLMs and Open Source Software.pptx
PDF
PPT on Performance Review to get promotions
PPTX
Sustainable Sites - Green Building Construction
PPT
Project quality management in manufacturing
DOCX
573137875-Attendance-Management-System-original
PPTX
MET 305 2019 SCHEME MODULE 2 COMPLETE.pptx
PDF
Operating System & Kernel Study Guide-1 - converted.pdf
PPTX
UNIT 4 Total Quality Management .pptx
composite construction of structures.pdf
Welding lecture in detail for understanding
Well-logging-methods_new................
Lecture Notes Electrical Wiring System Components
Lesson 3_Tessellation.pptx finite Mathematics
MCN 401 KTU-2019-PPE KITS-MODULE 2.pptx
CYBER-CRIMES AND SECURITY A guide to understanding
CARTOGRAPHY AND GEOINFORMATION VISUALIZATION chapter1 NPTE (2).pptx
Engineering Ethics, Safety and Environment [Autosaved] (1).pptx
additive manufacturing of ss316l using mig welding
ASol_English-Language-Literature-Set-1-27-02-2023-converted.docx
Strings in CPP - Strings in C++ are sequences of characters used to store and...
Recipes for Real Time Voice AI WebRTC, SLMs and Open Source Software.pptx
PPT on Performance Review to get promotions
Sustainable Sites - Green Building Construction
Project quality management in manufacturing
573137875-Attendance-Management-System-original
MET 305 2019 SCHEME MODULE 2 COMPLETE.pptx
Operating System & Kernel Study Guide-1 - converted.pdf
UNIT 4 Total Quality Management .pptx

Grokking Techtalk: Problem solving for sw engineers

  • 1. Filling in the gap between realities A guide to problem solving for software engineers Grokking -Thanh Dinh 26/02/2022
  • 2. Agenda What is a problem Problem definition Causal analysis Trade-off 2 types of trade-off Separation principles Conclusion
  • 3. What is a problem? A tale of two realities
  • 4. The elevator problem Lengthy elevator wait People in an office building started to complain to building management about the long wait time for elevators. As part of office building staff, you are tasked with solving this problem. How do you solve it?
  • 5. Elevator problem - Quick solutions
  • 6. Who has the problem? - The stakeholders
  • 8. What is a problem?
  • 10. Move perceived reality to expected reality
  • 11. Move expected reality to perceived reality
  • 12. Pull 2 realities to a middle point
  • 13. Fill in the gap of residents' realities
  • 14. Fill in the gap of Holistics customers' realities
  • 15. Problem definition Choosing the right problem statement to solve
  • 16. A problem well-stated is a problem half-solved. John Dewey
  • 17. Startup is about finding the right problem to solve. Anonymous
  • 18. Problem definition What is the problem? What is perceived reality? What is expected reality? Is it clear? Who are involved in the problem? How important is the problem? When does the problem needs to be solved? Is there really a problem?
  • 20. Highest abstraction level Problem definition should be at the highest abstraction level that appropriately describes the situation. Principle
  • 21. The primary thing when you take a sword in your hands is your intention to cut the enemy, whatever the means. If you think only of hitting, springing, striking or touching the enemy, you will not be able actually to cut him. Miyamoto Musashi
  • 22. Example: Holistics Analytics as Code Lower level: product features Version control Logic as code Automated workflow Data unit testing Higher level: pain points Can't track who changed what Unreliable dashboards Manual, repetitive work Vendor lock-in Why How Lowest level: technology choice Analytics Modeling Language (AML) TypeScript Redis Postgres Terraform/Ansible Why How
  • 23. Ladder of abstraction: Product Design
  • 24. Causal analysis Knowing what causes the problem
  • 25. The elevator problem Lengthy elevator wait People in an office building started to complain to building management about the long wait time for elevators. As part of office building staff, you are tasked with solving this problem. How do you solve it?
  • 27. Non-linear causal relationship In many cases, the causal chain is not linear that can be described as a tree. Changing one variable can affect itself through cycles. Cycles mean there's no definite root cause of the problem. Pitfall
  • 29. Non-holistic thinking Company growth problem is not just a sales, marketing, engineering, product problem, but the whole company problem. Usually, a problem is caused by interactions between components or the compound effect of multiple dimensions, not the individual parts/dimensions. There's no single root cause to find. Pitfall
  • 31. Forget that problem is inherently a human thing Definition of a problem requires a person to even be called a problem but many engineers forget this. Forget to choose the right problem to solve Engineers tend to think that "requirements" are set in stone. In reality, most requirements may not even make sense in the first place. Common mistakes
  • 33. You face a trade-off when it is hard to choose a solution Thus you must have already found solutions in order to have trade-offs
  • 35. Causal Analysis and Trade-offs
  • 37. In SE, dimensions come from business requirements
  • 38. Dimensional priorities Talk to stakeholders to identify the most important dimensions
  • 39. There are 2 types of trade-off
  • 40. Dimensional trade-off A solution increases benefit in one dimension but also increases harmful effect in another dimension Alternative trade-off Solution 1 gives you benefit 1, solution 2 gives you benefit 2, you can only choose either, but you want both
  • 41. Dimensional trade-off examples More security checks will improve security but reduce performance 🔐Security vs 🐎Performance More tests will improve code reliability but it will take longer to ship new features ⛑Reliability vs 🔀Agility Migrate to Kubernetes improves scalability but increases infrastructure cost 🚀Scalability vs 💸Cost It is hard to design a software that is both powerful and user-friendly 💖User- friendliness vs ⚡Power
  • 42. Alternative trade-off examples SQL allows for complex joins but require upfront schema design SQL vs NoSQL Monolithic architecture is simpler but less scalable Monolithic vs Microservices Fundamental trade-off between functional programming and OOP Expression problem
  • 44. Choose a compromise point Find a sweet spot on the line of compromise Resolve the trade-off Use creative problem solving techniques to overcome the trade-off 2 ways to deal with trade-offs
  • 45. Only see one side of the trade-off Only seeing one side of the trade-off means not seeing the trade-off at all! Common mistake 1
  • 46. Programmers know the benefits of everything and the trade-offs of nothing. Architects need to understand both. Rich Hickey
  • 47. Everything in software architecture is a trade- off. If an architect thinks they have discovered something that isn’t a trade-off, more likely they just haven’t identified the trade-off yet. Neal Ford
  • 48. Opinion: Use boring technology New New benefits Unknown harms New/fancy tech Old Old benefits Known harms Boring tech http://boringtechnology.club/
  • 49. The nice thing about boringness (so constrained) is that the capabilities of these things are well understood. But more importantly, their failure modes are well understood Dan McKinley
  • 50. Not realize that trade-offs are not set in stone Trade-offs are hard to overcome but in many cases, they are not set in stone. You can resolve them through separation techniques. Common mistake 2
  • 51. The root of many trade-offs are due to couplings. Resolve the coupling, you can resolve the trade-off Why separation?
  • 52. TRIZ separation principles applied to Software Engineering Break down different requirements into separate time group Separation in Time Break down different requirements into separate modules Separation in Space Break down different requirements at the submodule and system level Separation between Parts and Whole
  • 53. Separation in Time Agility/Cost vs Reliability/Security/Scalability
  • 54. Separation in Space Agility: Separate service can be developed independently Scalability: New service can be connected to the common sidecar Security/Reliability: Handled by sidecar Performance: Communication overhead Cost: Only makes sense for more complex systems Security/Reliability vs Agility/Scalability Sidecar pattern
  • 55. Separation between Parts and Whole Agility/Scalability vs Reliability Agility: Fast many unit tests without mocks Scalability: Functional logic can be easily parallelized Reliability: Only need a few reliable integration tests, most logic covered by unit tests Performance: Communication/serialization overhead Cost/Learnability: More time decoupling stateless from stateful logic Functional core Imperative shell
  • 56. Conclusion What is a problem A problem is a gap between perceived and expected reality of some stakeholder Look at a problem at its highest level of abstraction: its ultimate goal Causal analysis Trade-off Solution ideality and relationship with causal analysis 2 types of trade-off: dimensional/alternative 3 separation techniques to resolve trade-offs
  • 58. Bringing software's best practices to analytics development Old World New World Software Development Analytics Configure servers manually using GUI. Deploy via FTP upload. Problems: Hard to maintain; Prone to error Configure servers using code (Infrastructure As-Code). Continuous Integration / Continuous Delivery (CI/CD) Benefits: Reliable, Scalable and Maintainable. Build visualizations using drag- and-drop. Hard to reuse business logic. Analytics built with software principles Holistics
  • 59. 1- Define analytics logic as code 2- Code review, deploy with CI/CD 3- Reliable, trusted analytics
  • 61. Our Culture Problem-Solving Centric: (as seen from today's talk) We think from first principles, question assumptions, and deliberate tradeoffs carefully. Personal Development: We invest so that as the company grows, the people grow. Technical Coaching & Mentorship Pair Programming Learning by Teaching...
  • 62. Building a language for analytics modeling Example Technical Problem Powerful type system to enable rich IDE functionalities A query language that is composable/reusable alternative to SQL Goal: Making analytics reusable Solution: A type-based DSL layer that allows mapping between business logic to database layer. Technical challenges: