Software Development
How to stay in Flow
When you are about to be interrupted, dump your working memory as quick as possible... Write down what you are about to do next (next and next etc) - this way you know where to pick up when continuing to work
When you are going good, stop writing.
Ernest Hemingway
Source: Interruptible Workflow Thread by Wisen Tanasa (Clipped Article (Private Joplin))
Several Solutions
Come up with three ways of solving a problem before committing to a solution.
When being interrupted
Talk about following points before just doing what you're being told:
- What is the impact of the work you're asking for? Can't do it if the impact is unclear
- Do you have a spec that is agreed with stakeholders?
- Make clear that you have to do your own estimate first
- Explain clearly what the cost and consequences of dropping your current work are
Documentation
Toolbox
Frontend
- React Component Composition
- Use Storybook!
- Use Typescript!
Try out
Frontend
- Testing with Storybook
- Data Fetching libraries
- React: React Query, RTK Query, SWR, Apollo
- Web Components
Other
- Matrix - An open network for secure, decentralized communication
Software Design
- Build a Ubiquitous Language (共通言語)
- Separate WHAT from HOW
- Public interfaces are important!
- They should communicate WHAT not how - in their name
- Single responsibility
- If you cannot properly name it it probably has more than one responsibility
- One class - one thing
- One method - one thing
Testing principles
- Does Test Driven Design lead to good design? No - but it steers you away from bad design - when you feel how annoying it is to write tests
BDD
- Use the domain language (The Ubiquitous Language)
- Drive Development with Executable Specifications
- Focus ond WHAT not HOW
- Say nothing about HOW it does those things
- Only on WHAT it does
- Make the code simple, easily readable!
- Test ONE thing
- Start tests with "Should do this thing"
- The thing you are testing is the subject
Acceptance Tests / Executable Specifications
Sources:
-
Continuous Delivery - Acceptance Testing with Executable Specifications
-
Properties
- Life-like scenarios
- In Production like Test environments
-
Executable Specifications
- Write them beforehand from the User Story
- It should be from the perspective of an external user of the system
- Use the Ubiquitous language!
- Separate What the system does from how it does it
- Imagine replacing the system with something else that fulfills the same function - the test should still make sense!
- Write them so clear that even the least technical person can understand it!
- Focus on what the user wants - link them to user stories
- Find an underlying need, what the user wants to achieve
- Why are you making this change? Find that and focus on that in the acceptance test
- Have at least one test for each acceptance criteria of your user stories
-
Implementation: Acceptance Test Four Layer Architecture
Articles to read regularly
Events - The Real world
- Model your application as a stream of events - to decouple it
- External:
- User actions
- An external data source publishes new data
- Internal:
- Calculation is finished
- External:
- How to deal with events
- Finite State Machines
- Initial state
- Change state when receiving event, maybe execute code on state enter/exit or particular transition
- Can be expressed as data
- Observer pattern
- Pub / Sub
- Event Streams
- There are nice libraries (https://reactivex.io/) which treat event streams like collections and allow all conveniences of Enumerables like filtering, zipping, mapping
- Time is not something that needs to be managed anymore - you do.. as it happens
- Finite State Machines
Children
- Acceptance Test Four Layer Architecture
- Career Paths
- Coding Competitions
- Four Types of Documentation
- Good Git Commit Messages
- How to know what to build
- Inbox
- Japanese Terms
- Learn Something New
- Patterns
- Project Ideas
- Teaching Programming
- The Checklist
Backlinks