當軟體的開發起步時,也就等於軟體維護的開始。 軟體維護已經是開發者的日常了,而在軟體維護上最令開發者頭痛的就是接手前人遺留的程式碼 (Legacy Code),因為開發者對於遺留的程式碼的理解有如在秘境探險一般,不熟悉且難以窺探程式的全貌。在這種情況裡無論是新增功能、重構或是除錯都有著改變程式預期行為的風險,開發者很容易在修改程式碼時,遺漏掉原本應該連帶修改的部分導致程式出錯。而這種因為修改某處程式碼,導致其他處程式碼也需要連動修改的擴散現象,在軟體工程裡稱為漣漪效應。 漣漪效應是在描述一個事物造成的影響漸漸擴散的情形,就像是物體掉到水面上所產生的漣漪逐漸擴大一般,而軟體工程的漣漪效應起自於程式設計上相依關係的不良或是某種職責過於分散導致。在軟體維護時,開發者也常因為漣漪效應的關係錯估開發成本導致開發時程的延誤,或是埋下了不知何時會爆炸的臭蟲, 讓軟體日後的維護更加困難。所以如何預判漣漪效應的可能性以及將影響範圍展示出來,已經是開發者在軟體維護上迫切想要解決的問題。 而在以往漣漪效應的相關研究多著重在軟體度量指標 (Software Measurement) 的計算上,但是軟體度量指標所能呈現資訊有限,儘管在程序導向設計上能有顯著的指標性,在物件導向設計上提供的幫助仍有所侷限。尤其是在相依性表現上難以提供開發者實質的幫助,更遑論以此解決耦合力和內聚力為成因的漣漪效應所構成的困境。 為了解決漣漪效應帶給開發者的困擾,本論文提出物件導向程式分析視覺化工具Tetrapod,有別於過去以軟體度量為焦點的方式,嘗試透過物件導向程式設計核心概念「關係」去做漣漪效應的研究,利用物件導向設計中的各種關係剖析漣漪效應並將其視覺化,讓開發者可以透過Tetrapod了解漣漪效應的可能性以及影像擴散的範圍,解決它們在以往遇到漣漪效應的困境。 ;When development begin, the maintenance start. Software maintenance is the daily life of developer. The most difficult job on maintenance is take over legacy code which need to discover and hard to know whole view of program. In the situation, whatever to add new feature, refactoring, debug, all of them may have risk to change expect behavior of program. Developer may accidentally lose the code need to be modify together and cause error of program when modify code. The observations that developer need to modify code which not the target together when modify code in somewhere in software engineering called ripple effect. Ripple effect is described in the case of the impact caused by something gradually diffused which like ripple that caused by something fall in water. The ripple effect on software engineering is caused by bad design of dependency relationship or some responsibility too fragmented. Developers often misjudged development costs led because of ripple effect, then cause development process delay or leaving bugs as time bomb make future maintenance be more difficult. This is why develop need tools to predict possibility affected range caused by ripple effect. In the past, most researches of ripple effect are focus on computing software metrics. But the information that software metric could display are limit, especially to display dependency relationship to aim developers. Not even talk to resolved ripple effect issue cause by awful coupling and cohesion. To resolve trouble that ripple effect bring to developers, in this thesis, develop the tool call “Tetrapod”. To be different from the past that focused on software metrics, try to focus core concept of object-oriented design relationship. Analyze relationship of ripple effect and visualize it to help develop to know possibility affected range caused by ripple effect.