Code Smells and Architectural Anti-Patterns Identification
Lecture 14 of SE602 Software Re-Engineering explores code smells, surface indicators in source code that signal deeper architectural decay and design weaknesses. Originating in Martin Fowler and Kent Beck work, code smells do not represent operational software bugs, but rather poor design decisions that slow down development and increase maintenance fault rates. Students study classic smells: Bloaters (Long Method, Large Class / God Class, Long Parameter List), Object-Orientation Abusers (Switch Statements, Refused Bequest), Change Preventers (Divergent Change, Shotgun Surgery), and Dispensables (Duplicate Code, Dead Code, Speculative Generality). The lecture examines automated static detection heuristics using thresholds on Lines of Code (LOC), Cyclomatic Complexity, and Tight Class Cohesion (TCC), preparing students to audit legacy codebases objectively. Reviewing the accompanying lecture handouts and metric tables reinforces understanding of coupling, cohesion, and architectural decay. Consistent evaluation of control flow graphs, call graph hierarchies, and database schemas ensures robust preparation for academic assessments. Students investigate the trade-offs between system replacement, wrapping legacy components, and iterative code refactoring transformations. The discussion highlights how Lehman laws of evolution, system complexity growth, and declining quality necessitate continuous code restructuring. Key concepts including static program analysis, dynamic execution tracing, and characterization test safety nets are thoroughly demystified. The lecture details classical object-oriented re-engineering patterns demonstrated across standard enterprise software architectures. Structured refactoring methodologies are demonstrated using Martin Fowler catalogs, method extraction, and polymorphism replacement. Software quality attributes, maintainability index equations, and technical debt principal valuations are evaluated alongside empirical benchmarks. Architectural recovery processes are explored through module dependency analysis, component clustering, and high-level design reconstruction. Database schema normalization, legacy record migration, and automated ETL extraction pipelines are systematically analyzed. Monolithic application decomposition strategies including service-oriented architecture (SOA) and the Strangler Fig pattern are examined in depth. Scholars examine program slicing algorithms, forward and backward dependency slices, and impact assessment for proposed modifications. Automated tool support, bytecode instrumentation, and static code analyzers are evaluated to detect architectural violations across repositories.
No questions available yet.
There are currently no examination questions published for Code Smells and Architectural Anti-Patterns Identification. Explore other curriculum units or build a custom quiz with the practice builder.