使用本體論建構Bad Code Smells分類
Abstract
“Bad Code Smells"是程式設計師間採用的一種專業用語,指的是程式碼中出現的某種徵兆,表示程式碼的設計上出現問題。事實上,"Bad Code Smells"包含了許多豐富的程式設計經驗,但卻缺乏正式及系統化格式來記錄這些寶貴的知識。在我們的研究中,我們將"Bad Code Smells"視為一組概念,並以本體論的概念為基礎發展了一個Bad code smell 分類框架。這個分類框架不僅描述了Bad Code Smells 的概念化規格,也提供了一個正式及系統化的記錄格式,用以保存Bad Code Smell 的實際例證,使得我們得以保存這些寶貴的知識。
另一方面,在本研究中,我們也探討重構技巧背後的本質。「重構」指的是一種較嚴謹的程式設計技巧,用以在不改變程式的外部行為的狀況下,重新構造設計不良的程式結構。在本研究中,我們提出了策略導向的觀點來檢視重構技巧的本質。在這樣的觀點上,我們將重構技巧視為完成重構策略目標的戰略。最後,我們以重構策略的觀點基礎,提出了數種重構策略,並提出了一個新的分類法,將重構技巧予以分類。
“Bad code smells” is a jargon term used among programmers to refer to asymptom of something wrong in codes. These bad code smells provide richexperiences of programming but they are seldom formally defined. In our study, weview bad code smells as a set of concept. Based on the conception of ontology wedevelop a taxonomy framework that is the specification of conceptualization of badcode smells. It also provide a formal and systematic format for recording instances ofbad code smells and improve to preserve the valuable knowledge of bad code smells. In the other hand, we also study the essences behind refactorings. Refactoringsare disciplined techniques for restructuring an existing body of code, altering its internal structure without changing its external behavior. In our study, we propose astrategy-oriented viewpoint of refactorings. We view refactroing techniques as tactics used to achieve the goal of a refactoring strategies. Finally, we develop a taxonomy of refactorings based on the strategy-oriented viewpoint for classifying refactoring techniqeus.
“Bad code smells” is a jargon term used among programmers to refer to asymptom of something wrong in codes. These bad code smells provide richexperiences of programming but they are seldom formally defined. In our study, weview bad code smells as a set of concept. Based on the conception of ontology wedevelop a taxonomy framework that is the specification of conceptualization of badcode smells. It also provide a formal and systematic format for recording instances ofbad code smells and improve to preserve the valuable knowledge of bad code smells. In the other hand, we also study the essences behind refactorings. Refactoringsare disciplined techniques for restructuring an existing body of code, altering its internal structure without changing its external behavior. In our study, we propose astrategy-oriented viewpoint of refactorings. We view refactroing techniques as tactics used to achieve the goal of a refactoring strategies. Finally, we develop a taxonomy of refactorings based on the strategy-oriented viewpoint for classifying refactoring techniqeus.
Description
Keywords
程式碼的壞味道, 重構, 本體論, bad code smells, refactorings, ontology