Xiao Peng

My personal blog moves to xiaopeng.me , blogs about design patterns will be synced to here.
肖鹏,ThoughtWorks资深咨询师,目前关注于架构模式、敏捷软件开发等领域,并致力于软件开发最佳实践的推广和应用。
多次为国内大型企业敏捷组织转型提供咨询和培训服务,在大型团队持续集成方面具有丰富的经验。
  博客园  :: 首页  :: 联系 :: 订阅 订阅  :: 管理

高效程序员的好习惯

Posted on 2006-09-16 21:10  勇敢的鸵鸟  阅读(291)  评论(0编辑  收藏  举报

http://feeds.feedburner.com/kompakarcn

什么是高效程序员的“好习惯“? Rober Miller在Java.net上撰写了一篇文章,Five Habits of Highly Profitable Software Developers。 简单的总结如下:

Habit 1: Constructor Performs Minimal Work. Ideally, its constructor will only load data into its instance variables using the constructor’s parameters

Habit 2: Methods Clearly Convey Their Intent. Long and descriptive method names help developer teams quickly understand the purpose and function of their software.

Habit 3: An Object Performs a Focused Set of Services. Each object in the software to be focused on performing a small and unique set of services. Objects that perform a small amount of work are easier to read and more likely to be used correctly because there is less code to digest.

Habit 4: State-Changing Methods Contain Minimal Behavior Logic.   Intermixing state-changing logic with behavior logic makes the software more difficult to understand because it increases the amount of work happening in one place.

Habit 5: Behavior Methods Can Be Called in Any Order. Ensure that each behavior method provides value independent of any other behavior method.

  • 【备注】暂时还没能翻译一下,不过看原文应该没有问题的。