如何成为一个高效的程序开发人员

 如何成为一个高效的程序开发人员

Sun Microsystems亚太区的工程师Lee Chuk Munn写了一篇不错的小文,介绍一个高效程序开发人员的应该有的7个习惯(Seven habits of effective developers):

  1. Understand the problem

    For instance, Lee said, there are different algorithms engineers can use to write a sorting program.

    To select the right one to use, developers need to first understand the size of the data–that the sorting program will be administered on–in order to decide which is the right algorithm to use. "Choosing the wrong one would put your application in jeopardy in future," he said.

  2. Use appropriate tools

    Quoting American psychologist Abraham Maslow, Lee read: "If the only tool you have is a hammer, you will see every problem as a nail."

    This Maslow concept has become so popular among software developers that it has been dubbed the "Golden Hammer" rule, which cautions engineers with limited knowledge or training of solutions that they run the risk of using only tools they are familiar with, but that may not be the most appropriate, when they develop a new program.

  3. Strive for simplicity

    Programmers should develop applications that are:
    Easy to understand;  Easy to explain;  Easy to maintain; andEasy to document.

  4. Keep your code clear

    Lee said: "Put yourself as an author, how would you write something that others can easily understand and follow your thoughts? That’s how a programmer should code as well."

  5. Learn to debug

    "Sometimes, there are bugs in your codes, or in other [software] libraries that you may have bought or downloaded that you cannot control," Lee said, underscoring the need for developers to "test early, test often".

  6. Leverage what is available

    Developers should also look for solutions or algorithms that are already publicly available, such as those highlighted in developer forums and mailing lists.
  7. Continue to learn

    Can developers then balance the commercial need to push out applications as quickly as possible, with the need to write codes that are clean?

    Lee believes they can. "A lot of people say if they don’t have quantity time, at least they have quality. That’s not true… You can’t have quality time if you don’t put in quantity time," he said. "There’s commercialization [in software development] but there’s also ‘art’ and ‘good’ codes. And you can achieve both." 

如何成为一个高效的程序员,我觉得这是每个开发者应该去思考一下的问题。聪明 不等于高效。在我看来,所谓的高效是能够快速适应问题领域,分析面对的问题,最后快速找到解决方案。在这个过程中,很多品质(Lee Chuk Munn把他叫习惯)决定了是否高效。比如KISS原则,在一个team中,如果大家都一致认同这个原则,并在产品设计,需求分析甚至编码的时候时刻提醒自己,那么在brainstorm的时候,很容易达到一致或者可以很快明确当前的主要TODO是什么。相反的,如果有人忽略了KISS,那么很容易纠缠于细节,导致最后的讨论失去主方向。请记住:把一个系统设计的复杂要比简单来的容易得多

我很喜欢Lee关于写代码的比喻 ——  编写应用程序,就像你再写一本书。写书的时候你应该尽量保持结构清晰并且让你的读者不会觉得很晦涩。如果写书人能够尝试用40%的时间站在读者的角度去思考问题,我觉得这种书成为畅销书的可能性很大。

最后是自我学习,我在面试一些技术人员的时候,我很少问到一些很生僻,很刁难的问题。我更愿意了解他/她在项目中的角色和对新技术的态度。如果一个开发者愿意学习,并且能够学习,我觉得这种品质要比让他记住一些问题的答案重要的多。现在互联网上公开的文献资料和课程都很多,只要愿意学习,视野一定会慢慢扩大 —— NextLib也是帮助你管理个人知识的一个好工具 :) 。这是很重要的,还记得“黄金锤子”吧 : 如果你手上只有一把锤子,那么你会把所有问题看成是钉子 ;)

猜你喜欢

转载自hijack.iteye.com/blog/121253
今日推荐