打开APP
userphoto
未登录

开通VIP,畅享免费电子书等14项超值服

开通VIP
高效程序开发人员的应该有的7个习惯

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

  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(Keep it simple,keep it stupid)原则,在一个team中,如果大家都一致认同这个原则,并在产品设计,需求分析甚至编码的时候时刻提醒自己,那么在brainstorm的时候,很容易达到一致或者可以很快明确当前的主要TODO是什么。相反的,如果有人忽略了KISS,那么很容易纠缠于细节,导致最后的讨论失去主方向。请记住:把一个系统设计的复杂要比简单来的容易得多

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

本站仅提供存储服务,所有内容均由用户发布,如发现有害或侵权内容,请点击举报
打开APP,阅读全文并永久保存 查看更多类似文章
猜你喜欢
类似文章
【热】打开小程序,算一算2024你的财运
Nachos :)
内推15-30k高薪技术岗位,文末有2020年内推群!
学习“高效人士的七个习惯”
Understanding premultiplied alpha
CodeTyphon
The Trac Project
更多类似文章 >>
生活服务
热点新闻
分享 收藏 导长图 关注 下载文章
绑定账号成功
后续可登录账号畅享VIP特权!
如果VIP功能使用有故障,
可点击这里联系客服!

联系客服