[翻譯]架構師應該知道的97件事_02簡化根本複雜性,消除偶發複雜性p.MsoNormal, li.MsoNormal, div.MsoNormal { margin: 0cm 0cm 0.0001pt; text-align: justify; font-size: 10.5pt; font-family: "Calibri","sans-serif"; }.MsoChpDefault { font-size: 10pt; }div.Section1 { page: Section1; }02 Simplify Essential complexity; Diminish Accidental Complexity
簡化根本複雜性,消除偶發複雜性
p.MsoNormal, li.MsoNormal, div.MsoNormal { margin: 0cm 0cm 0.0001pt; text-align: justify; font-size: 10.5pt; font-family: "Calibri","sans-serif"; }a:link, span.MsoHyperlink { color: blue; text-decoration: underline; }a:visited, span.MsoHyperlinkFollowed { color: purple; text-decoration: underline; }.MsoChpDefault { font-size: 10pt; }div.Section1 { page: Section1; }
Neal Ford
尼爾·福特
ESSENTIAL COMPLEXITY REPRESENTS the difficulty inherent in any problem.
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.
根本複雜性(Essential complexity
)指的是問題與生俱來的難度,它是不可避免的。比如說,協調全國的空中交通有其內在的複雜性,必須即時跟蹤每架飛機的位置(包括飛行高度)、速度、航向和目的地,才能預防空中和跑道上的衝突。像天氣驟變這樣的情況會令航班計劃全盤失效,所以航班時刻表唯有適應瞬息萬變的
環境才能避免機場擁塞。
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.
與之相反,偶發複雜性(accidental complexity
)是從人們解決根本複雜性的過程中衍生出來的。目前陳舊的空中交管系統,就是一個偶發複雜性的例子。系統設計的初衷是為了管理數以千計的飛機參與的交通活動,即解決根本複雜性,但是解決方案本身帶來了新的問題。當前
的空中交管系統之複雜臃腫難以改善,已是不爭的事實,全球多數地區的空中交管系統仍然在使用三十多
年前的技術。
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 complexity 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
.
尼爾·福特是
ThoughtWorks
公司的軟體架構師和文化基因辯論者(
Meme Wrangler
)
。
ThoughtWorks
是一家全球性的
IT
諮詢公司
,
專註於端到端的軟體開發與交付。尼爾設計、開發軟體,編寫教材,撰寫雜誌文章,製作課件,錄製視頻(
DVD
)演講,出版過
5
本書,參加眾多會議並發言。你可以通過他的個人網站(
http://www.nealford.com
)更多地瞭解他。