以此提醒自己什么是最重要的:写出整洁的代码。不幸的是,很多次我都发现,很多人在重视"代码的样子"的同时,却忽略了要把"代码的功能"也放在同等重要的位置。例如,很多人不愿意去学习ORM实现的背后原理,他们更愿意使用一些像Hibernate实体映射工具的东西把数据映射成实体对象,即使当这样做比起直接获取数据是效率低的让人惊讶时也是如此。他们并不考虑多次远程调用的代价或大数据量传输的成本。他们一遍一遍的就是写不出一个好的保龄球游戏,因为他们把数据库的操作放在循环里了。
Read full article from 整洁的程序和好的程序 | 外刊IT评论
No comments:
Post a Comment