Seven habits of effective developers

本文提出了软件开发者应具备的七个关键习惯:理解问题、使用恰当工具、追求简洁、保持代码清晰、学会调试、利用现有资源及持续学习。这些原则有助于提高开发效率并确保代码质量。

Keep it clean, and keep it simple--that is the maxim software developers should adhere to.

According to Lee Chuk Munn, a staff engineer at Sun Microsystems Asia-Pacific, writing applications is like writing a book.

"Programming is just an expression to a solution. A lot of it is about understanding and recognizing the problem and getting help. This [concept] is generic across all programming languages, it doesn't matter what you use--whether it's C+ or Java. The approach is still the same," he said.

Lee listed seven habits that he said all software developers should possess to be effective in their job:

1. Understand the problem

Before you can deal with the problem, you need to first understand the problem you are trying to solve.

Lee also highlighted the need to do the necessary research before starting development work, and to think about how people will go about using the application, so elements such as user-interface and design should not be neglected.

2. Use appropriate tools

Study various programming concepts and data structures, and start building a reservoir of software design patterns, Lee said.

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

3. Strive for simplicity

Programmers should develop applications that are:


  • Easy to understand;
  • Easy to explain;
  • Easy to maintain; and
  • Easy to document.


Lee noted that simplicity is not only associated with purity or clarity, it also reflects the engineer's understanding of the problem. "Anybody can come up with a convoluted solution," he said.

Noting that debugging is twice as difficult as writing a program, Lee said software developers will have an easier time patching bugs if their applications are clear and uncomplicated.

4. Keep your code clear

Only incorporate code that you understand, and make sure others understand it, too.

Lee explained that software developers are like novelists, each has his own writing style. "Whatever style you adopt [doesn't matter], just make sure you write clearly," he said. "When you write codes, you need to keep them clear. Don't squash them, just like how you would apply text spacing when you write a novel."

Think also about how you organize and label your codes.

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."

While there are no standard code layouts or models software developers can adopt, there are recommended coding practices, he said.

Programmers working on a Java platform, for example, can visit Web sites that recommend certain methods of naming variables, he added. "So there are conventions which most Java developers would already know," Lee said.

5. Learn to debug

Identify bugs early in the development process, and deploy automated testing tools such as jUnit .

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

Finally, like any other profession, software developers must always continue to learn, pick up new skills and improve.

Engineers can also learn from conducting an evaluation after a project has been completed, Lee added. "We need to learn from our good and bad [projects], and try and be better the next time, and the next time after that," he said.

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."

http://www.zdnetasia.com/news/software/0,39044164,62031175,00.htm



评论
成就一亿技术人!
拼手气红包6.0元
还能输入1000个字符
 
红包 添加红包
表情包 插入表情
 条评论被折叠 查看
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值