“Perfect” Is the Enemy of“Good Enough”

“Perfect” Is the Enemy of“Good Enough”

Greg Nyberg

SoFTWARE dESignERS, and architects in particular, tend to evaluate solu- tions by how elegant and optimum they are for a given problem. Like judges at a beauty contest, we look at a design or implementation and immediately see minor flaws or warts that could be eliminated with just a few more changes or refactoring iterations. Domain models simply beg for one more pass to see if there are any common attributes or functions that can be moved into base classes. Services duplicated in multiple implementations cry out their need to become web services. Queries complain about “buffer gets” and nonunique indexes, and demand attention.
My advice: don’t give in to the temptation to make your design, or your imple- mentation, perfect! Aim for “good enough” and stop when you’ve achieved it.
What exactly is “good enough,” you might ask? Good enough means that the remaining imperfections do not impact system functionality, maintainability, or performance in any meaningful way. The architecture and design hangs together. The implementation works and meets the performance require- ments. Code is clear, concise, and well documented. Could it be better? Sure, but it is good enough, so stop. Declare victory and move on to the next task.
The search for perfection in design and implementation leads, in my opin- ion, to overdesigned and obfuscated solutions that are, in the end, harder to maintain.

A number of the axioms in this book caution designers to avoid unnecessary abstraction or complexity. Why do we have problems keeping things simple? Because we are seeking the perfect solution! Why else would an architect introduce complexity in a workable solution except to address a perceived imperfection in the simpler design?
Remember that application development is not a beauty contest, so stop look- ing for flaws and wasting time chasing perfection.
Greg Nyberg is currently an independent J2EE computer consultant with 18 years’ experience designing, building, testing, and deploying large, high-volume, transactional applications such as reservation systems, call centers, and consumer websites. He is the author of the WebLogic companion workbook for Enterprise JavaBeans, Third Edition, (O’Reilly), and the lead author of the book Mastering WebLogic Server (Wiley).

  • 1
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 1
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值