Sharma [email protected] This work is funded by SENECA project under Marie-Skłodowska Curie Actions Innovative Training Networks ITN-EID. Grant agreement number 642954.
and effects • Smell detection – Research and practice • Various detection approaches • Demo - Designite • Learning from developing smells detection tools • Avoiding, detecting, and eradicating smells in practice • Pragmatic strategies Overview
• Increasing Complexity • As a software system evolves, the complexity increases unless efforts are made to contain the complexity • Declining Quality • The quality of the software will decline unless it is rigorously maintained Lehman’s laws of software evolution
(a suboptimal or poor solution) • Violates best practices (of the domain) • Impacts quality (make it difficult for a software system to evolve and maintain) • Recurrence Smells’ Characteristics
component is realizing more than one architectural concern/feature. In other words, the component is not cohesive. Akin to LCOM (Lack of Cohesion of Methods) that is applicable to classes, we can compute LCC (Lack of Component Cohesion) to measure the component cohesion. LCC = 0.36 in the previous example
instance, Mantyla’s classification include bloaters, couplers, and change preventers. • Principle-based smell classification: Classification based on the primary object- oriented design principle that the smells violate - abstraction, modularization, encapsulation, and hierarchy. • Artifact characteristics-based smell classification: Classification based on characteristics of the types such as data, interfaces, responsibility, and unnecessary complexity by W. Wake. • Granularity-based smell classification: Moha classified smells using two-level classification.
• Exhaustive: classify all the considered smells, • Simple: classify smells within the scope and granularity effortlessly • Consistent: produce a consistent classification even if it carried out by different people, and • Coherent: produce clearly distinguishable categories without overlaps.
all smells can be detected Expands the horizon of metrics-based detection Very few smells show evolutionary characteristics • Depend heavily on training data • Still unknown whether algorithms can scale to the large number of known smells Depends on metric data and corresponding thresholds
on their description and interpretation, their detection methods also differ significantly and they detect smells inconsistently. • Metrics tools show inconsistent results even for well- known metrics such as LCOM, CC, and LOC.
or refactor out the backend Extensibility • Smell detection logic must be extensible. i.e., new rules can be added without any change in source code analysis logic and user interface Architecture refactoring is expensive but effective and highly fruitful!
smells are same! • Prioritize based on factors such as potential impact of the smell • It’s ok to live with some smells. There is no software with zero smells.