官术网_书友最值得收藏!

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.

主站蜘蛛池模板: 钟祥市| 霍城县| 南江县| 林芝县| 福安市| 察隅县| 武清区| 甘洛县| 商丘市| 曲麻莱县| 阿拉善右旗| 北宁市| 麻江县| 永济市| 始兴县| 英山县| 高淳县| 涡阳县| 平远县| 雅江县| 三原县| 车致| 博乐市| 南充市| 施甸县| 元谋县| 东乡族自治县| 茂名市| 信阳市| 砀山县| 上饶县| 黄山市| 北票市| 兴隆县| 阳朔县| 连山| 原阳县| 抚松县| 乌什县| 满洲里市| 同仁县|