Refactoring
Refactoring is the disciplined process of restructuring existing code to improve its internal design, readability, or maintainability without changing its external behavior.
23 resources across 3 libraries
Glossary Terms(8)
Design Patterns
Design patterns are general, reusable solutions to commonly occurring problems in software design, providing a shared vocabulary and proven structural template…
Test-Driven Development (TDD)
Test-Driven Development (TDD) is a software development practice in which developers write an automated test for a small piece of functionality before writing…
Technical Debt
Technical debt is a metaphor describing the implied future cost of choosing a faster, easier, but less thorough implementation now, rather than doing the more…
Refactoring
Refactoring is the disciplined process of restructuring existing code to improve its internal design, readability, or maintainability without changing its exte…
Continuous Refactoring
Continuous refactoring is the practice of making small, incremental structural improvements to code regularly, as an ongoing part of everyday development, rath…
Clean Code
Clean code refers to source code that is easy for other developers to read, understand, and modify, prioritizing clarity and simplicity through practices like…
YAGNI Principle
YAGNI ("You Aren't Gonna Need It") is a software design principle from Extreme Programming that advises developers not to add functionality until it is actuall…
DRY Principle
DRY ("Don't Repeat Yourself") is a software development principle stating that every piece of knowledge or logic should have a single, unambiguous representati…
Study Notes(4)
Refactoring Safely with Tests
Understand why a solid test suite is what makes structural code changes safe, and how to build one for legacy code that has none.
Refactoring to Patterns
How to evolve messy, ad-hoc code toward well-known design patterns incrementally, using the smell-driven refactoring approach popularized by Joshua Kerievsky.
Code Quality and Refactoring
Learn how to measure code quality and use refactoring to improve internal structure without changing external behavior.
Refactoring State with moved Blocks
The moved block lets Terraform track renamed or relocated resources declaratively, avoiding destructive replace plans when refactoring configuration.
Interview Questions(11)
What is the Single Responsibility Principle?
The Single Responsibility Principle states that a class should have only one reason to change, meaning it should own exactly one well-defined responsibility ra…
What is the Law of Demeter?
The Law of Demeter, also called the principle of least knowledge, states that a method should only call methods on itself, its own fields, its parameters, or o…
What is the DRY Principle?
DRY, short for "Don’t Repeat Yourself," is the design principle that every piece of knowledge or logic in a system should have a single, unambiguous, authorita…
What is the God Object Anti-Pattern?
A God Object is a class that has grown to know or do far too much — it centralizes unrelated state and behavior from across the system, violating the single re…
What is Spaghetti Code?
Spaghetti code is source code with a tangled, unstructured control flow and object structure — jumps, deep conditionals, and unclear dependencies between class…
What Are Common OOP Anti-Patterns?
Common OOP anti-patterns include the God Object (one class doing everything), Spaghetti Code (tangled, untraceable control flow), the Anemic Domain Model (data…
What is the Circular Dependency Anti-Pattern?
A circular dependency is a design flaw where two or more classes (or modules) depend directly on each other, either mutually referencing one another or forming…
What is a Code Smell?
A code smell is a surface-level indicator in source code that suggests a deeper design or maintainability problem, even though the code still compiles and work…
What is Refactoring in OOP?
Refactoring is the disciplined process of restructuring existing code’s internal design without changing its external behavior, typically applied in small, ver…
What is the Extract Method Refactoring?
Extract Method is the refactoring technique of taking a fragment of code from a larger method and moving it into its own well-named method, then calling that n…
What is Replace Conditional with Polymorphism?
Replace Conditional with Polymorphism is the refactoring that removes a branching statement — usually a switch or if/else chain keyed on an object’s type — by…