Tag: clean-code
🤖 AI Guestbook — #clean-code educational data only
|
|
Last 30 days
Agents 9
Amazonbot 3Perplexity 1
Amazonbot 108Perplexity 68Unknown AI 39Google 39Ahrefs 27ChatGPT 15Claude 13Majestic 7Meta AI 3SEMrush 3Bing 1
Most referenced — #clean-code
Named Constructor Pattern 2Unused Function 2Guard Clause Pattern 2Reducing Cyclomatic Complexity Techniques 1Elvis Operator Not Used 1Verbose Type Functions 1
How they use it
crawler 300
crawler_json 15
pre-tracking 8
Tag total323 pings
Terms pinged15 / 15
Distinct agents10
Extract Class Refactoring
Extract Class splits a large class into two — moving a cohesive subset of fields and methods into a new class that the original delegates to.
2mo ago
quality intermediate
Inline Temp Variable Refactoring
Inline Temp removes a temporary variable used only once when its name adds no clarity — replacing the variable reference with its expression directly.
2mo ago
quality beginner
Reducing Cyclomatic Complexity Techniques
Cyclomatic complexity counts independent code paths — reduce it by early returns, extracting conditions to named functions, using lookup tables, and replacing switch/if chains with polymorphism.
2mo ago
quality intermediate
Refactoring Boolean Flag Parameters
Boolean flags as function parameters obscure intent — replace with enums, separate functions, or named options objects for self-documenting APIs.
2mo ago
quality intermediate
Replace Magic Literal with Symbolic Constant
Magic literals (numbers/strings hardcoded without context) should become named constants — MAX_RETRIES = 3 is self-documenting; the literal 3 is not.
2mo ago
quality beginner
Cognitive Load in Code Design
The mental effort required to understand code — good design minimises extraneous cognitive load so developers can focus on the problem, not the code structure.
2mo ago
general intermediate
Elvis Operator Not Used PHP 5.3+
Writing $x ? $x : $y instead of $x ?: $y — the Elvis operator (?:) returns the left operand if truthy, otherwise the right, eliminating the repeated expression.
2mo ago
style beginner
Null Coalescing Operator Not Used PHP 7.0+
Using isset() + ternary or if/else chains when the null coalescing operator (??) or null coalescing assignment (??=) would be cleaner and more idiomatic.
2mo ago
style beginner
Poor Variable Naming
Single-letter variables, cryptic abbreviations, or meaningless names like $data and $tmp — forcing readers to hold context in their head that the name should provide.
2mo ago
quality beginner
Unused Function PHP 7.0+
A function or method that is defined but never called — dead code that increases maintenance burden and confuses readers about what is part of the active API.
2mo ago
quality beginner
Unused Variable PHP 5.0+
A variable that is assigned but never read — indicating a logic error, incomplete refactoring, or unnecessary computation.
2mo ago
quality beginner
Verbose Type Functions PHP 7.0+
Using is_array(), is_string(), intval(), strval() where type declarations, casting, or native operators express intent more concisely and safely.
2mo ago
php beginner
Guard Clause Pattern PHP 5.0+
Return early from a function when a precondition fails, eliminating deeply nested if-else structures.
2mo ago
style beginner
Named Constructor Pattern PHP 5.0+
Static factory methods with descriptive names that replace overloaded constructors — making object creation intent clear when multiple creation paths exist.
2mo ago
php intermediate
Refactoring PHP 5.0+
Improving code structure without changing its external behaviour — cleaning up debt while keeping tests green.
2mo ago
general beginner