- Hands-On Dependency Injection in Go
- Corey Scott
- 221字
- 2021-06-10 19:17:51
Why do users want to use your code?
The answer to the question of why your users would want to use your code could be long and varied. If it is, you might want to go back and re-read the SRP section. Beyond being able to split the code into smaller, more concise chunks, we need to make a list. We will apply the 80/20 rule to this list. Typically, 80% of usage comes from 20% of the use cases. Let me put this into perspective with an example.
Consider an automated teller machine (ATM). A list of its use cases might look like the following:
- Withdraw money
- Deposit money
- Check balance
- Change PIN code
- Transfer money
- Deposit check
I reckon that on at least 80% of the occasions that a person uses an ATM, their purpose is to withdraw money. So what can we do with this information? We can optimize the interface to make the most common use cases as convenient as possible. In the case of the ATM, it could be as simple as putting the withdraw function on the first screen at the top so that users don't have to search for it. Now that we understand what our users are trying to achieve, we can build on this and consider how they expect to use it.
- 微信公眾平臺(tái)與小程序開(kāi)發(fā):從零搭建整套系統(tǒng)
- Network Automation Cookbook
- QGIS By Example
- Orleans:構(gòu)建高性能分布式Actor服務(wù)
- C語(yǔ)言程序設(shè)計(jì)實(shí)訓(xùn)教程與水平考試指導(dǎo)
- Orchestrating Docker
- PrimeFaces Blueprints
- 大學(xué)計(jì)算機(jī)基礎(chǔ)實(shí)驗(yàn)指導(dǎo)
- Flink技術(shù)內(nèi)幕:架構(gòu)設(shè)計(jì)與實(shí)現(xiàn)原理
- OpenCV 3.0 Computer Vision with Java
- INSTANT Premium Drupal Themes
- 讓Python遇上Office:從編程入門(mén)到自動(dòng)化辦公實(shí)踐
- jBPM6 Developer Guide
- WebRTC Cookbook
- HTML5+CSS3網(wǎng)頁(yè)布局項(xiàng)目化教程