码迷,mamicode.com
首页 > 其他好文 > 详细

Don’t Be Clever

时间:2015-09-04 08:43:21      阅读:193      评论:0      收藏:0      [点我收藏+]

标签:

?

Don’t Be Clever

Eben Hewitt

gEnERAl inTElligEnCE, RESouRCEFulnESS, thoughtfulness, a breadth and depth of knowledge, and an affinity for precision are laudable qualities in anyone, and particularly prized in architects.
Cleverness, however, carries a certain additional connotation. It implies an ability to quickly conceive of a solution that may get you out of a jam, but that ultimately rests on a gimmick, a shell game, or a switcharoo. We remember clever debaters from high school—always able to play semantics or work the logical fallacies to win the point.
Clever software is expensive, hard to maintain, and brittle. Don’t be clever. Be as dumb as you possibly can and still create the appropriate design. The appro- priate design will never be clever. If cleverness appears absolutely required, the problem is incorrectly framed; reset the problem. Reframe it until you can be dumb again. Work in rough chalk sketches; stay general. Let go of the flavor of the day. It takes a smart architect to be dumb.
It is our cleverness that allows us to trick software into working. Don’t be the attorney who gets your software off on a technicality. We are not Rube Gold- berg. We are not MacGyver, ever ready to pull some complicated design out of our hats having been allowed only a paper clip, a firecracker, and a piece of chewing gum. Empty your head and approach the problem without your extensive knowledge of closures and generics and how to manipulate object graduation in the heap. Sometimes of course, such stuff is exactly what we need. But less often than we might think.
?
??More developers can implement and maintain dumb solutions. In dumb solu- tions, each component can do only one thing. They will take less time to cre- ate, and less time to change later. They inherit optimizations from the build- ing blocks you’re using. They emerge from the page as a living process, and you can feel their elegance and simplicity. Clever designs will stay stubbornly rooted; their details are too embroiled in the overall picture. They crumble if you touch them.
Eben Hewitt is a principal on the architecture team at a multibillion-dollar na- tional retail company, where he is currently focused on designing and implement- ing its service-oriented architecture. He is the author of the upcoming Java SOA Cookbook from O’Reilly.

Don’t Be Clever

标签:

原文地址:http://blog.csdn.net/wangzi11322/article/details/48206267

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!