2012年12月24日
摘要: State allows the object alter its behavior when its internal state changes. This pattern avoids large, multipart conditional statements. It also in... 阅读全文
posted @ 2012-12-24 20:50 #hanhui 阅读(141) 评论(0) 推荐(0)
摘要: 介绍Linux虚拟网络, Open vSwitch http://www.ibm.com/developerworks/linux/library/l-virtual-networking/index.html 阅读全文
posted @ 2012-12-24 13:16 #hanhui 阅读(93) 评论(0) 推荐(0)
  2012年12月23日
摘要: Observer is also known as dependents or publish-subscribe. When the object changes its state, its dependents will be notified and updated automatic... 阅读全文
posted @ 2012-12-23 19:11 #hanhui 阅读(78) 评论(0) 推荐(0)
摘要: 使用有意义的名字,名字明确了用途,不用更多注释。有时错误的注释会更坏事,即使现在正确,但随着时间的推移,注释和代码多半已经不能对应了。 别让名字掺杂有现有数据类型名字,有时会让人误解。也不要使用很难区分差别的名字。 使用有意义的名字,别使用0和O,l和1,谁看谁晕。要从名字区分出意... 阅读全文
posted @ 2012-12-23 09:51 #hanhui 阅读(105) 评论(0) 推荐(0)
摘要: 是糟糕的代码毁掉了公司吗?不是代码,而是无穷无尽的需求和无法逃避的交付时间毁掉了代码和公司。停止增加新代码,代码质量才能得到提升。我们当然需要高质量代码,但那需要时间,如果只看到交付时间,最终肯定是糟糕的代码。 这里最了解问题的是程序员,他/她应该说明实情,只重眼前利益(需求+交付时间),... 阅读全文
posted @ 2012-12-23 00:01 #hanhui 阅读(73) 评论(0) 推荐(0)
  2012年12月22日
摘要: Mac OS 设置$PATH环境变量 启动Terminal, echo 'export PATH=somepath:$PATH' >> ~/.bash_profile 打开一个新的Terminal,echo $PATH ,查看新的$PATH内容 原文:http://www.... 阅读全文
posted @ 2012-12-22 22:36 #hanhui 阅读(120) 评论(0) 推荐(0)
  2012年12月21日
摘要: 完成一个项目或者一个特性相关的开发工作,对于软件工程师来说就如履行一份合同或者一份契约和承诺。涉及的甲乙双方应该都对合同所涉及的工作、完成日期以及报酬达成一致意见。如果甲方(通常是客户或者是领导)将合同强加给乙方(通常是软件开发团队或者软件工程师),那么在开发工作开始之前就埋下了项目失败... 阅读全文
posted @ 2012-12-21 15:43 #hanhui 阅读(109) 评论(0) 推荐(0)
摘要: “在这个迭代周期就快封版之前,team leader Alice询问特性A是否可以按时提交版本发布,软件工程师Bob回答说已经完成90%,应该可以发布特性。”这样的场景恐怕很多软件开发人员(包括项目经理和软件工程师)都经历过。 已经完成90%的特性似乎距离发布就差百米赛跑的最... 阅读全文
posted @ 2012-12-21 00:04 #hanhui 阅读(119) 评论(0) 推荐(0)
  2012年12月20日
摘要: Template method lets abstract base class (this is the class to implement the algorithm) to implement invariant algorithm. The subclasses can redefi... 阅读全文
posted @ 2012-12-20 23:23 #hanhui 阅读(115) 评论(0) 推荐(0)
  2012年12月19日
摘要: 本文出处[1] ... It's certainly worthwhile for every programmer to read Design Patterns at least once, if only to learn the shared vocabulary of common... 阅读全文
posted @ 2012-12-19 12:10 #hanhui 阅读(127) 评论(0) 推荐(0)