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
分享到:
相关推荐
The Seven Habits of Highly Effective People The Seven Habits of Highly Effective People
**正文** 《高效能人士的七个文本编辑习惯》是一本专为程序员设计的指南,它深入探讨了如何利用 ...文件“habits_2007.pdf”可能包含更详细的解释和示例,对于想要提升文本编辑效率的程序员来说,是不容错过的资源。
### 七种高效文本编辑习惯 #### 概述 在当今数字时代,计算机屏幕前的大部分时间都花费在了文本编辑上。无论是编程代码、撰写文档还是处理电子邮件,高效的文本编辑技能都能显著提升工作效率,减少错误。...
根据提供的文件信息,我们可以深入探讨《The 7 Habits of Highly Effective People》这本书中的核心理念与实践方法。尽管这并非一本直接与IT行业相关的书籍,但其中所包含的原则和思维方式对于提升个人及团队效率...
"The 6 Habits of Highly Effective Bosses provides an excellent training model that a manager can both fully appreciate and easily implement." —Raymond G. Steitz, V.P. of Global Human Resources, ...
根据"The 7 Habits of Highly Effective People V1.2",我们可以提炼出以下知识点: Habit 1:Be Proactive * 习惯定义:习惯是知识、技能和欲望的交叉点 * 习惯说明:员工需要承担自己角色的成功,主动性员工会...
根据给定文件的信息,我们可以提炼出《高效能人士的七个习惯》这本书的相关知识点。以下是针对这些知识点的详细解析: ### 一、书籍简介 《高效能人士的七个习惯》是美国作家史蒂芬·柯维(Stephen R....
### 六个仅仅是有效谈判者的习惯 #### 背景介绍 本文来自哈佛商业评论(HBR),由詹姆斯·K·塞贝纽斯撰写。文章深入探讨了在高风险、高压环境中,即使是经验丰富的谈判者也可能犯下的常见错误,并提出了避免这些...
《高效能人士的七个习惯》是由史蒂芬·柯维提出的一套个人和组织发展理论,它强调通过内在的自我改变来实现外在的成功。这个理念在管理信息化领域有着广泛的应用,尤其对于提升个人和团队效能有着显著的帮助。...
The 7 Habits of Highly Effective Teachers.pptx
高效能人士的7个习惯7 Habits for Effective People.pptx
Synovate - Media habits of Chinese consumers.pptx
《高效人士7个习惯》是美国管理大师史蒂芬·柯维所著的一本书,它不仅是一本关于个人效率的指南,更是一套基于原则、性格和个人内在改变的全面成长体系。这本书通过介绍七个习惯,旨在帮助人们实现个人和人际层面的...
2. **晶体习性(Crystal Habits)**: 指晶体生长过程中形成的特定形态或外形特征,这些特征对于理解材料的性质至关重要。 3. **晶体形状算法(Crystal Shape Algorithm)**: 用于预测晶体生长方向和形状的计算方法,...
A program to improve study habits of high-school students GRADUATE TRAINING FOR PRECOLLEGE TEACHERS OF PSYCHOLOGY 325 REFERENCES CITY COLLEQE. Directions Committee report. New York: The City ...
Chapter 45 Developing habits: Brushing your code Chapter 46 Breaking down things: How to eat an elephant Chapter 47 The value of hard work and why you keep avoiding it Chapter 48 Any action is better ...