[Engineering] Accidental complexity

It's the duty of the architect to solve the problems inherent in essential complexity without introducing accidental complexity. ——Neal Ford

Model-Driven Development with Executable UML:Preface

Logical complexity of software systems is one of the main factors causing problems and errors in their planning, design, development, testing, deployment, maintenance, and use. There is a common understanding that building complex software systems requires careful planning, good architectural design, and well-controlled development processes. Many good books and papers, as well as all software engineering curricula, address this issue and yet, many software projects fail, miss their deadlines, or exceed their budgets. Building or maintaining a complex system (be it software or not) is always connected to a risk of mistakes and missed requirements, because humans (who are supposed to build the system) are intrinsically prone to errors when handling too many details and interrelated components at a time.

However, logical complexity is not completely inherent to software systems. On one hand, there is an inevitable component of complexity that is inherent to the very problem domain a software system deals with. The term essential complexity refers to that part of logical complexity inherent to the problem domain, and not introduced by a solution or the implementation technology used for it. Essential complexity is, thus, the ‘‘natural’’ part of complexity that cannot be removed and will exist in every solution to a problem, simply because a simple solution to the problem does not exist. However, essential complexity stands in contrast to accidental complexity, which arises purely from the implementation technology, tools, and methods applied in a solution. While essential complexity is unavoidable by any approach chosen to solve a problem, accidental complexity is caused by that very approach.

One of the main tasks in software engineering as a discipline is to discover means to minimize accidental complexity. Accidental complexity is to be minimized in any good software architecture, design, and implementation.

Sometimes, accidental complexity can be caused by mistakes such as ineffective planning or project management, or a low priority placed on a project. However, some accidental complexity always occurs as a result of solving any problem. For example, the complexity caused by out-of-memory errors in many programs is an accidental complexity that occurs because someone decided to use a computer to solve the problem [Wiki].

Another significant cause of accidental complexity is a mismatching or immature technology or process selected for the development of a software system. If the available technology (including the language used for software development) requires the developer to write more words or perform more actions to specify a design decision than is really necessary, the artifacts of the development will be accidentally complex. Using an assembly language to implement a non-trivial algorithm, and using a file system interface to build a database application are simple, extreme examples of such mismatching technology. A less obvious example of such accidental complexity is when some code has to be written to specify that a relationship between two objects has to be established when one object is dragged and dropped on the other object. This can be done in an easier and more direct way, by demonstration.

For that reason, raising the level of abstraction of the technology used for development of software systems, and doing so in a way that it better matches the problem domain of those systems, is one of the basic means for guarding against accidental complexity. Raising the level of abstraction is one of the main characteristics of the evolution of software engineering as a discipline. As Bran Selic once said, ‘‘There has been no revolution in software engineering since the invention of a compiler.’’ In other words, once we understood that we did not have to talk to the computer in the language its hardware understands, but rather we can do it in a language that is more suitable for us, and which can be automatically translated into the language of the machine, we made the most significant breakthrough in software engineering. Everything since then has basically been all about raising the level of abstraction of the language used to program machines.

The point of raising the level of abstraction is to achieve better expressiveness. By using a language that better matches the problem you want to solve, you can say more ‘‘facts’’ in fewer ‘‘words.’’ This also means that you can do more with less work. In addition, written words do not have to be the only way to communicate with the machine. Pictures (such as diagrams), motions, and sounds (for example, spoken words) have already been a mode of communication between humans and computer programs, so they can be in software development, too.

參考

軟件架構(gòu)師應(yīng)該知道的97件事
Executable UML模型驅(qū)動(dòng)開(kāi)發(fā)

最后編輯于
?著作權(quán)歸作者所有,轉(zhuǎn)載或內(nèi)容合作請(qǐng)聯(lián)系作者
  • 序言:七十年代末废累,一起剝皮案震驚了整個(gè)濱河市贡珊,隨后出現(xiàn)的幾起案子,更是在濱河造成了極大的恐慌潜慎,老刑警劉巖眷柔,帶你破解...
    沈念sama閱讀 218,451評(píng)論 6 506
  • 序言:濱河連續(xù)發(fā)生了三起死亡事件辅甥,死亡現(xiàn)場(chǎng)離奇詭異狡忙,居然都是意外死亡洗做,警方通過(guò)查閱死者的電腦和手機(jī)弓叛,發(fā)現(xiàn)死者居然都...
    沈念sama閱讀 93,172評(píng)論 3 394
  • 文/潘曉璐 我一進(jìn)店門(mén),熙熙樓的掌柜王于貴愁眉苦臉地迎上來(lái)诚纸,“玉大人撰筷,你說(shuō)我怎么就攤上這事∑枧牵” “怎么了毕籽?”我有些...
    開(kāi)封第一講書(shū)人閱讀 164,782評(píng)論 0 354
  • 文/不壞的土叔 我叫張陵,是天一觀的道長(zhǎng)井辆。 經(jīng)常有香客問(wèn)我关筒,道長(zhǎng),這世上最難降的妖魔是什么杯缺? 我笑而不...
    開(kāi)封第一講書(shū)人閱讀 58,709評(píng)論 1 294
  • 正文 為了忘掉前任蒸播,我火速辦了婚禮,結(jié)果婚禮上,老公的妹妹穿的比我還像新娘袍榆。我一直安慰自己胀屿,他們只是感情好,可當(dāng)我...
    茶點(diǎn)故事閱讀 67,733評(píng)論 6 392
  • 文/花漫 我一把揭開(kāi)白布蜡塌。 她就那樣靜靜地躺著碉纳,像睡著了一般。 火紅的嫁衣襯著肌膚如雪馏艾。 梳的紋絲不亂的頭發(fā)上劳曹,一...
    開(kāi)封第一講書(shū)人閱讀 51,578評(píng)論 1 305
  • 那天,我揣著相機(jī)與錄音琅摩,去河邊找鬼铁孵。 笑死,一個(gè)胖子當(dāng)著我的面吹牛房资,可吹牛的內(nèi)容都是我干的赵哲。 我是一名探鬼主播,決...
    沈念sama閱讀 40,320評(píng)論 3 418
  • 文/蒼蘭香墨 我猛地睜開(kāi)眼腾供,長(zhǎng)吁一口氣:“原來(lái)是場(chǎng)噩夢(mèng)啊……” “哼罢坝!你這毒婦竟也來(lái)了?” 一聲冷哼從身側(cè)響起搭独,我...
    開(kāi)封第一講書(shū)人閱讀 39,241評(píng)論 0 276
  • 序言:老撾萬(wàn)榮一對(duì)情侶失蹤婴削,失蹤者是張志新(化名)和其女友劉穎,沒(méi)想到半個(gè)月后牙肝,有當(dāng)?shù)厝嗽跇?shù)林里發(fā)現(xiàn)了一具尸體唉俗,經(jīng)...
    沈念sama閱讀 45,686評(píng)論 1 314
  • 正文 獨(dú)居荒郊野嶺守林人離奇死亡,尸身上長(zhǎng)有42處帶血的膿包…… 初始之章·張勛 以下內(nèi)容為張勛視角 年9月15日...
    茶點(diǎn)故事閱讀 37,878評(píng)論 3 336
  • 正文 我和宋清朗相戀三年配椭,在試婚紗的時(shí)候發(fā)現(xiàn)自己被綠了虫溜。 大學(xué)時(shí)的朋友給我發(fā)了我未婚夫和他白月光在一起吃飯的照片。...
    茶點(diǎn)故事閱讀 39,992評(píng)論 1 348
  • 序言:一個(gè)原本活蹦亂跳的男人離奇死亡股缸,死狀恐怖衡楞,靈堂內(nèi)的尸體忽然破棺而出,到底是詐尸還是另有隱情敦姻,我是刑警寧澤寺酪,帶...
    沈念sama閱讀 35,715評(píng)論 5 346
  • 正文 年R本政府宣布,位于F島的核電站替劈,受9級(jí)特大地震影響寄雀,放射性物質(zhì)發(fā)生泄漏。R本人自食惡果不足惜陨献,卻給世界環(huán)境...
    茶點(diǎn)故事閱讀 41,336評(píng)論 3 330
  • 文/蒙蒙 一盒犹、第九天 我趴在偏房一處隱蔽的房頂上張望。 院中可真熱鬧,春花似錦急膀、人聲如沸沮协。這莊子的主人今日做“春日...
    開(kāi)封第一講書(shū)人閱讀 31,912評(píng)論 0 22
  • 文/蒼蘭香墨 我抬頭看了看天上的太陽(yáng)慷暂。三九已至,卻和暖如春晨雳,著一層夾襖步出監(jiān)牢的瞬間行瑞,已是汗流浹背。 一陣腳步聲響...
    開(kāi)封第一講書(shū)人閱讀 33,040評(píng)論 1 270
  • 我被黑心中介騙來(lái)泰國(guó)打工餐禁, 沒(méi)想到剛下飛機(jī)就差點(diǎn)兒被人妖公主榨干…… 1. 我叫王不留血久,地道東北人。 一個(gè)月前我還...
    沈念sama閱讀 48,173評(píng)論 3 370
  • 正文 我出身青樓帮非,卻偏偏與公主長(zhǎng)得像氧吐,于是被迫代替她去往敵國(guó)和親。 傳聞我的和親對(duì)象是個(gè)殘疾皇子末盔,可洞房花燭夜當(dāng)晚...
    茶點(diǎn)故事閱讀 44,947評(píng)論 2 355

推薦閱讀更多精彩內(nèi)容

  • “玉環(huán)……” 我看著那個(gè)蒼老的帝王一臉糾結(jié)的表情陨舱,心里忽然覺(jué)得有些好笑翠拣。這個(gè)人在年輕時(shí)代也許是真的很英明神武,但是...
    伽樓閱讀 21,059評(píng)論 17 24
  • ELK stack安裝 logstash 收集日志 elasticsearch 存儲(chǔ)+搜索 kibana 顯示 前...
    戲入子迷閱讀 859評(píng)論 0 48
  • 作者 范友軍 流水 奈不住寂寞 似戀人摯情而熱放 風(fēng) 來(lái)得也正是時(shí)候 搖醒了一冬的酣睡 村口 搖搖白白來(lái)了一群大仙...
    中原焦點(diǎn)閱讀 155評(píng)論 0 2
  • 喜樂(lè)操練90天——15《心靈與力量》 你們不要憂(yōu)愁隅忿,因靠耶和華而得的喜樂(lè)是你們的力量心剥“钭穑《尼希米記》8章10節(jié) ...
    午后的咖啡與茶閱讀 835評(píng)論 0 0