1 / 3
Caption Text
2 / 3
Caption Two
3 / 3
Caption Three margin testing

Friday, November 26, 2010

明星软件工程师的10种特质(英汉)

http://www.jobbole.com/entry.php/344
 - 职场博客 - 伯乐在线
[发表人]:   [发表时间]:2010-11-24 05:10 PM

  如今,每家公司都似乎成了科技公司。从软件创业公司到投机性投资公司、制药巨头和媒体巨头,它们都越来越多地加入到软件业务行列。

明星软件工程师的10大特质   伯乐在线-职场博客

  代码质量不仅成为了一个必需品,更成为了一个竞争优势。因为众多公司围绕软件而竞争,开发软件的人——软件工程师正显得越发重要。但是,你该如何发现那种百里挑一的程序员呢?在本文中,我们简明扼要地列出了明星开发人员的10种特质。
  • 1. 热爱编程
  • 2. 完成事情
  • 3. 持续重构代码
  • 4. 使用设计模式
  • 5. 编写测试
  • 6. 善用现有代码
  • 7. 专注可用性
  • 8. 编写可维护的代码
  • 9. 能用任何语言编程
  • 10. 知晓基本的计算机科学

  1. 热爱编程

  编程是一种为了满足兴趣而心甘情愿去做的劳动(Programming is a labor of love)。和其他任何职业一样,唯有真正的热情,才能完成真正的伟大事情。这里有个误解,认为编写代码是机械化并纯科学性的。事实上,最优秀的软件工程师是工匠,他们能把能量、独创性和创造力融入到每一行代码中。伟大的工程师知道何时该把代码雕琢至完美,知道何时把大型系统像拼图一样组装到一块。热爱编程的工程师从构建软件中获得满足,就好比一位作曲家在完成一部交响乐后而欣喜若狂。正是兴奋感和成就感,才造就了喜爱编程的明星工程师。


  2. 完成事情

  有很多技术人员只谈论软件而不编写代码(只说不做型)。而伟大软件工程师会真正去编码,这也是他们最为重要的品质之一。他们是实际做事的人。聪明人都知道,解决问题的最佳途径是直面问题,而不是花上数周来设计复杂又不必要的架构和函数库。优秀工程师应当会问:解决手头问题的最简单方法是什么?最近的软件开发方法——敏捷实践,正是专注那个。它的思想是,把复杂的项目拆分为短小的迭代,每个迭代只关注一小部分的增量功能。因为每个迭代对应的编码只需要数周,所以功能易于管理并简单。


  3. 持续重构代码

  编码很像雕刻。要像艺术家一样不断完善自己的作品,软件工程师也要通过可能的最佳方式来持续完善自己的代码,以达到目标。重新塑造代码的原则称为"重构",Martin Fowler在他的创意书中有相应描述。重构背后的原始思想是:改善代码而不改变其功能,移动调整部分代码以确保系统不腐,还有确保系统完成基于当前需求该完成的事。持续重构可以让开发人员解决另一个著名的问题——"黑盒遗留代码"(这个问题基本无人想触及)。

  几十年的软件开发文化要求我们,不应该去改变正常工作的东西。然而,随着时间推移,问题是我们成为了老旧代码的奴隶,老旧代码变得不稳定和不兼容。而重构正好可以改变这一状况,因为我们是代码的主人,不是它的奴隶。重构在工程师和代码之间建立起持续的"对话",并带来所有权、确定性、自信心和系统的稳定性。

  千万不要成为老旧代码的奴隶。如果代码是他人所写,或许你可以轻易推脱责任。但大多数时候,那些代码是自己所写,要拿得起放得下,旧代码该埋时,就把它埋了!


  4. 使用设计模式

  自从所谓的"四人帮"(Erich Gamma、Richard Helm、Ralph Johnson和John Vlissides)发表他们的著作——《设计模式》后,全世界的软件工程师一直都在讨论模式。在我们所处世界,不管是自然界还是人类行为,模式无处不在。软件工程自然也不例外。模式就是不断重现的跨语言跨系统的场景和机制。一位优秀的工程师通常能识别并利用模式,而不是受制于模式。工程师不应(强制)让系统去适应某种模式,而需发现在系统中使用模式的时机(恰当使用模式)。在使用模式来确保正确性时,应借鉴利用前人的智慧结晶,使用以前能正当解决特定工程问题的方法。但请切记:模式不是万灵药;不要为了使用设计模式而使用设计模式。


  5. 编写测试

  曾有段时间,软件工程师们认为测试不值得他们去做。然而,如果你不做测试,你怎么能确保代码就能正常工作呢?敏捷实践中的"单元测试"已获得普遍认可,因为它注重编写测试来反映代码是否有效。随着系统增大,测试也随之增大。有经验的工程师知道并了解测试的价值所在,因为测试的目的就是创建一个能正常运作的系统。优秀的工程师通常会确保出现过一次的Bug不会再出现第二次。但优秀的工程师也知道,不应该浪费时间写那些琐碎或多余的测试,而需要专注测试各个组件中的核心部分。


  6. 善用现有代码 

  "重新发明轮子"一直是软件行业中的巨大问题之一。从发明新语言到从写函数库,忽视并重写那些已经存在并已能工作的奇怪驱动力,已经造成大量软件开发的失败案例。一位明星工程师会专注三种基本类型的重用:第一,内部基础架构的重用,相应代码是他自己或同事编写的;第二,使用第三方的函数库,比如JDK。最后,研究使用某些大型网络服务商提供的相应服务,比如Amazon。总之,正确善用现有的代码,使得软件工程师能真正专注于最为重要的事情上——应用程序本身。


  7. 专注可用性 

  优秀的工程师通常都专注于用户。无论用户是企业还是个人,无论是为消费型的软件公司还是投资银行,需要关注的都是可用性。用户如何和系统交互?系统是否提供一种简单、直接和平稳的操作体验?有种说法,因为软件工程师是技术人员,他/她和"用户如何与系统交互"没有关联,这种说法严重错误。优秀工程师努力工作是为了什么?不正是让系统简单并易于使用。他们无时无刻都会想到用户,不会尝试去发明那些令人费解,只有极客才能理解并欣赏的东西。

  有些时候,一些软件工程师过于投入,反而忘记所编写的程序/软件,是供他人使用,不是做给自己看的"艺术品"。所以,在软件开发过程中,一直要把"用户"放在心中。


  8. 编写可维护的代码

  软件开发界的另外一个小秘密是:编写优秀代码和糟糕代码所花费的时间是一样多。一位训练有素的工程师,他/她会从第一行代码开始就考虑可维护性和代码的演化。没有任何理由编写"丑陋"的代码、长达数页的函数,或是稀奇古怪的变量名。优秀的工程师编写代码会遵循命名惯例,代码编写紧凑、简单和不过度炫耀聪明。代码的每一行,都应恰如其分地展现出其原有目的。在给不便理解的代码(块)合理注释时,别忘了命名规则。清晰明了的函数名和变量名可以让代码不言而明。

  在编码时,有些程序员会有这种心态:过一会儿再来修改或完善某部分代码或某条语句。但谁知这一"过一会"竟然是"一天"、"一周"、"一个月"或"一年",甚至以后根本就没机会再回头修改。所以,尽量别妥协写出暂时堪用的代码。否则,不仅不会节省开发时间,也可以阻碍整个进程。当然也不利于后续维护人员的工作。


  9. 能用任何语言编程

  优秀的软件工程师活血有自己一门特别钟爱的编程语言,但从不会执迷于当中。如今已有很多优秀的编程语言,也就是说,如果你只会使用其中一门语言,说明你缺乏多样性。你可以用Java、C#或C++编写任何现代软件,可以用PHP、Perl或Ruby编写任何网站的后台。简而言之,编程所用语言,远远没有语言相应的函数库重要。优秀的工程师能够认知到这一点,并愿意去学习新语言、新函数库和构建系统的新方法。


  10. 知晓基本的计算机科学知识

  最后,但肯定不是优秀工程师最不重要的特质就是:扎实的基础。优秀的工程师或许并没有计算机科学的学位,但他/她必须知道基础——数据结构和算法。如果不知道哈希表,或者不知道链表和数组之间的差别,你如何构建一款大型的软件?。这些都是每位从事软件开发的开发人员应当知道的。算法也同样重要,从二分查找到各种排序,到图形遍历,一位明星工程师必须知道并内在消化这些基础东西。因为这些基础就是你在构建任何现代软件中做抉择时的必备品。


  结束语

  以上就是区分伟大软件工程师的诸多特质。其中讨论的"热情",是非常重要的。代码重用、设计模式、基础数据结构和算法都是必须知道的,而敏捷实践中的重构和单元测试则有助于工程师应对复杂的软件。尤为重要的是,明星工程师相信简洁和常识。也正是这些信念,帮助他们成功构建当今世界所需的看似不可能又错综复杂的系统。

  引用网上看到的一段话:对于知识,要求知若渴;对于自己,要虚怀若谷。保持开放的心态,保持孩童般的好奇心看待新鲜事物。当今世界,日新月异,不仅要从书中获取知识,更要尽可能从其他途径来学习经验和知识,在求知过程中,《请谨记5件事,做一名快速的学习者》。

  如果你觉得一位明星软件工程师还应具备其他特质,请在评论或微博中和大家分享讨论。

--------------------------------

Top 10 Traits of a Rockstar Software Engineer

Every company is a tech company these days. From software startups to hedge funds to pharmaceutical giants to big media, they're all increasingly in the business of software. Quality code has become not only a necessity, but a competitive differentiator. And as companies compete around software, the people who can make it happen - software engineers - are becoming increasingly important. But how do you spot the 'cream of the crop' programmers? In this post we outline the top ten traits of a rockstar developer.

We've written here before about the future of software development, in which a few smart developers can leverage libraries and web services to build large-scale systems of unprecedented complexity. It only takes a couple of smart engineers to create quality software of immense value, and below is a list of the top ten qualities you should look for when hiring a developer:

  1. Loves To Code
  2. Gets Things Done
  3. Continuously Refactors Code
  4. Uses Design Patterns
  5. Writes Tests
  6. Leverages Existing Code
  7. Focuses on Usability
  8. Writes Maintainable Code
  9. Can Code in Any Language
  10. Knows Basic Computer Science

1. Loves To Code

Programming is a labor of love. Like any occupation, truly great things are achieved only with passion. It is a common misconception that writing code is mechanical and purely scientific. In truth, the best software engineers are craftsman, bringing energy, ingenuity, and creativity to every line of code. Great engineers know when a small piece of code is shaping up perfectly and when the pieces of a large system start to fit together like a puzzle. Engineers who love to code derive pleasure from building software in much the same way a composer might feel ecstatic about finishing a symphony. It is that feeling of excitement and accomplishment that makes rockstar engineers love to code.

2. Gets Things Done

There are plenty of technical people out there who talk about software instead writing it. One of the most important traits of a great software engineer is that they actually code. They actually get things done. Smart people know that the best way to solve problems is go straight at them. Instead of spending weeks designing complex, unnecessary infrastructure and libraries, a good engineer should ask: What is the simplest path to solving the problem at hand? The recent methodologies for building software, called  Agile practices, focus on just that. The idea is to break complex projects into short iterations, each of which focuses on a small set of incremental features. Because each iteration takes just a few weeks to code, the features are manageable and simple. Teams that follow agile practices never create infrastructure for its own sake, instead they are focused on addressing a simple set of requirements. The secret is that when this approach is applied iteratively, a rich, complex piece of software arises naturally.

3. Continuously Refactors Code

Coding is very much like sculpting. Just like an artist is constantly perfecting his masterpiece, an engineer continuously reshapes his code to meet requirements in the best possible way. The discipline of reshaping code is known as refactoring and was formally described by Martin Fowler in his seminal book. The original idea behind refactoring was to improve code without changing what it does, moving pieces of the software around to ensure that the system is free of rot and also does what it is supposed to do based on current requirements. Continuous refactoring allows developers to solve another well-known problem - black box legacy code that no one wants to touch. For decades engineering culture dictated that you should not change the things that work. The issue, though, is that over time you become a slave to the old code, which grows unstable and incompatible. Refactoring changes that, because instead of the code owning you, you own the code. Refactoring establishes ongoing dialogue between the engineer and the code and leads to ownership, certainty, confidence, and stability in the system.

4. Uses Design Patterns

Ever since the so called Gang of Four published their famous Design Patterns book, world-class engineers have been talking about patterns. Patterns are ubiquitous in our world - both in nature and all human endeavors; software engineering is no exception. Patterns are recurrent scenarios and mechanisms that live across languages and systems. A good engineer always recognizes and leverages patterns, but is not driven by them. Instead of trying to fit the system into a set of patterns, the engineer recognizes opportunities in which to apply patterns. Applying a pattern ensures correctness since it leverages existing know-how: a method for solving a particular engineering problem that has worked before.

5. Writes Tests

Long gone are the days when engineers thought of testing as beneath them. After all, how can you be certain that your code is actually working if you never test it? An agile practice called Unit Testing has recently gained popularity because it focuses on writing tests to mirror the code. As the system grows, the body of tests grows with it, providing proof that the code actually works. Experienced engineers know and understand the value of tests, because their goal is to create a working system. Good engineers will always write a test once a bug has been exposed to make sure it does not come back again. But a good engineer also knows not to waste time writing trivial or redundant tests, instead focusing on testing the essential parts of each component.

6. Leverages Existing Code

Reinventing the wheel has always been one of the biggest problems in the software industry. From inventing new languages to rewriting libraries, the strange drive to ignore and redo what is already there and already works has been the cause of a lot of software failures. A rockstar engineer will focus on three essential kinds of reuse. First of all, the reuse of internal infrastructure, the code that he and his peers have written. Secondly, the use of third party libraries, for example, in Java, the libraries that are part of JDK or popular libraries provided by the Apache Foundation. And finally, a good engineer would look to leverage web-scale web service, like the ones offered by Amazon. Correct leveraging of existing infrastructure allows rockstar engineers to focus on what is most essential - the application itself.

7. Focuses on Usability

Good engineers always focus on the users. Whether the user is a business or an individual, whether the engineer works for a consumer software company or an investment bank, the focus is on working, usable software. How will users interact with the system? Does it provide a simple, intuitive, and smooth experience? The notion that because a software engineer is a techie, he or she thus can not relate to how other people interact with the system is deeply flawed. Good engineers work hard to make the system simple and usable. They think about customers all the time and do not try to invent convoluted stuff that can only be understood and appreciated by geeks.

8. Writes Maintainable Code

The other secret of good engineers is that it takes the same amount of time to write good code as it does to write bad code. A disciplined engineer thinks about the maintainability and evolution of the code from its first line. There is never any reason to write ugly code, a method that spawns multiple pages, or code with cryptic variable names. Rockstars write code which follows naming conventions, code which is compact, simple and not overly clever. Each line of code serves its purpose and resides in the right place. The bits that are difficult to understand are commented, but otherwise naming conventions are clear. Expressive names for methods and variables can make the code self-explanatory.

9. Can Code in Any Language

A good engineer might have a favorite programming language but is never religious about it. There are many great programming languages these days and to say that you only can code in one of them is to demonstrate a lack of versatility. In Java, C#, or C++ you can write any modern software. You can code the back end of any web site in PHP, in Perl, or in Ruby. At the end of the day, the language does not matter as much as the libraries that come with it. A good engineer knows that and is willing and able to learn new languages, new libraries and new ways of building systems.

10. Knows Basic Computer Science

The last, but certainly not the least trait of a great engineer is a solid foundation. A good engineer might not have a degree in computer science but must know the basics - data structures and algorithms. How can you build large scale software without knowing what a hashtable is? Or the difference between a linked list and an array? These are the basics that everyone should know. And the algorithms are just as important - from binary search to different sorts to graph traversals, a rockstar engineer must know and internalize the basics. These foundations are necessary to make the right design decisions when building any modern piece of software.

Conclusion

There are many traits that distinguish great software engineers. Among the ones we discussed, passion is certainly very important. Knowing the basics like code reuse, design patterns, fundamental data structures, and algorithms is necessary, while agile practices of refactoring and unit testing help engineers iteratively evolve complex software. Most importantly, rockstar engineers believe in simplicity and common sense. It is these beliefs that help them succeed in building the seemingly impossible, complex software systems that are necessary in today's world.

Let us know what other traits you think a rockstar software engineer should have, in the comments below.


No comments:

Post a Comment

Featured Post

Windows和Ubuntu双系统完全独立的安装方法

http://www.ubuntuhome.com/windows-and-ubuntu-install.html  | Ubuntu Home Posted by Snow on 2012/06/25 安装Windows和Ubuntu双系统时,很多人喜欢先安装windows,然...