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

What are your users capable of?

Now that we are clear on who the users are, we can develop a better understanding of their worldview. There is likely a massive disparity between the skills, experience, and domain knowledge between you and your users, and even between you and future you. This where most technical tools and software libraries fail. Think back to when you just started with Go. What did your code look like? Were there any language features in Go that you weren't using yet? Personally, I come from a Java background and, because of this, I entered the field with some preconceived ideas:

  • I thought that threads were expensive (and that goroutines were threads)
  • I thought that everything had to be in a struct
  • Being used to explicit interfaces meant that I was not as enthusiastic about using the interface segregation principle (ISP) or the dependency inversion principle (DSP) as I am now
  • I didn't understand the power of channels
  • Passing lambdas around blew my mind

Over time, I have seen these sorts of things pop up over and over, particularly in code-review comments. There is quite an effective way of answering the question: What are the users capable of? Write an example and ask your colleagues the following questions:

  • What does this do?
  • How would you have done it?
  • What do you expect this function to do?

If you don't have any users that you can quiz, another option is to ask yourself, What else exists that is similar? I am not suggesting that you follow other people's mistakes. The basic theory here is that if something else exists, and your users are comfortable with it then, if yours is similar, they will not have to learn to use it. This was perhaps best illustrated to me when using lambdas. Colleagues from a functional background were happy with it, but those from an object-oriented background found it either somewhat confounding or just not intuitive.

主站蜘蛛池模板: 云南省| 准格尔旗| 吉隆县| 阿克陶县| 叶城县| 张北县| 磴口县| 黄浦区| 准格尔旗| 南郑县| 全南县| 清水河县| 汪清县| 亚东县| 兴化市| 岳西县| 怀仁县| 禹城市| 新丰县| 台东市| 扎兰屯市| 法库县| 长兴县| 谷城县| 靖西县| 新邵县| 冕宁县| 全州县| 和政县| 马边| 景洪市| 兴国县| 界首市| 永吉县| 洛浦县| 蒙自县| 虞城县| 岱山县| 西藏| 英德市| 分宜县|