Applying the skill "Distinguish Actions, Calculations and Data".
See part 1 for some background knowledge.
James Su - 2022/05/27
ing in the changing world
Actions, Calculations and Data
• Actions - Functions with side e
ected by when and how many times they are called.
• Calculations - functions without any side e
• Given the same input, returns the same output.
• Data - facts about events
• Immutable in functional programming languages
• Can be immutable in object-oriented programming languages
for information system
• Thinking a problem before coding
• Coding a solution
• Reading existing code
Use case - Pending Emails
• Look for Actions because they need the most attention.
• Find code smell without running code.
Thinking a problem before coding
• What data we will need to capture (Data)
• What decisions we will need to make (Calculations)
• Clarifying problems needs attention (Actions)
Thinking a problem
Coding a solution
• Changeability: Actions > Calculations > Data.
• Few Actions, more Calculations and Data.
Coding a solution
A technique for building
software in layers.
What is software design?
"using one’s aesthetic sense to guide
programming choices to improve the ease of
coding, testing, and maintaining software"
ied design help us
to develop aesthetic senses
• Straightforward implementation
• Abstraction barrier
• Minimal interface
• Comfortable layers
• Arrows represent function calls
• Functions are in di
Visualizing our function calls
call functions from similar layers of abstraction
all functions in a layer should serve the same purpose
may exist in three levels
• Interaction between layers
• Implementation of one layer
• Implementation of one function
Use call graph
• Global zoom level
• Layer zoom level
• Function zoom level
ind problems in di
Call graph practice
Q & A