Simplify Essential Complexity; Diminish Accidental Complexity

本文探讨了软件开发中遇到的本质复杂性和偶然复杂性。本质复杂性是指解决问题本身所固有的难度,例如协调全国的空中交通;而偶然复杂性则是指为解决本质复杂性问题而引入的额外复杂性,如过时的空中交通控制系统。文章建议选择源自实际编码经验而非纯粹理论的框架,并警惕供应商驱动的解决方案可能带来的额外复杂性。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

 Simplify Essential Complexity; Diminish Accidental Complexity

Neal Ford

ESSEnTiAl CoMplExiTy REpRESEnTS the difficulty inherent in any prob- lem. For example, coordinating a nation’s air traffic is an inherently complex problem. Every plane’s exact position (including altitude), speed, direction, and destination must be tracked in real time to prevent mid-air and runway collisions. The flight schedules of aircraft must be managed to avoid airport congestion in a continuously changing environment—a severe change in weather throws the entire schedule out of whack.
Conversely, accidental complexity grows from the things we feel we must build to mitigate essential complexity. The antiquated air traffic control system used today is an example of accidental complexity. It was designed to address the essential complexity of controlling the traffic of thousands of airplanes, but the solution itself introduces its own complexity. In fact, the air traffic control system used today is so complex that updating it has proven difficult, if not impossible. In much of the world, air traffic is guided by technology that is more than 30 years old.
Many frameworks and vendor “solutions” are the symptoms of the accidental complexity disease. Frameworks that solve specific problems are useful. Over- engineered frameworks add more complexity than they relieve.
Developers are drawn to complexity like moths to a flame—frequently with the same result. Puzzle solving is fun, and developers are problem solvers.

Who doesn’t like the rush of solving some incredibly complex problem? In large-scale software, though, removing accidental complexity while retaining the solution to the essential complexity is challenging.
How do you do this? Prefer frameworks derived from working code rather than ones cast down from ivory towers. Look at the percentage of code you have in a solution that directly addresses the business problem versus code that merely services the boundary between the application and the users. Cast a wary eye on vendor-driven solutions. They may not be inherently bad, but vendors often push accidental complexity. Make sure that the solution fits the problem.
It’s the duty of the architect to solve the problems inherent in essential com- plexity without introducing accidental complexity.
Neal Ford is a software architect and meme wrangler at ThoughtWorks, a global IT consultancy with an exclusive focus on end-to-end software development and delivery. He is the designer/developer of applications, instructional materials, magazine articles, courseware, and video/DVD presentations, and he is author and/or editor of five books. He also speaks at lots of conferences. You can assuage your ravenous curiosity about Neal at http://www.nealford.com.

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值