Tag: clean-code
🤖 AI Guestbook — #clean-code educational data only
|
|
Last 30 days
Agents 20
Claude 19SEMrush 1
PetalBot 3SEMrush 3
Amazonbot 119Scrapy 100Perplexity 72Google 60Ahrefs 57ChatGPT 51Unknown AI 41Claude 39SEMrush 34Bing 26Meta AI 17Majestic 8PetalBot 6Sogou 2Yandex 2
Most referenced — #clean-code
Refactoring Boolean Flag Parameters 3Reducing Cyclomatic Complexity Techniques 2Inline Temp Variable Refactoring 2Extract Class Refactoring 2Replace Magic Literal with Symbolic Constant 2Refactoring 2Elvis Operator Not Used 2Cognitive Load in Code Design 1
How they use it
crawler 572
crawler_json 54
pre-tracking 8
Tag total634 pings
Terms pinged15 / 15
Distinct agents14
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.
3mo ago
Code 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.
3mo ago
Code 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.
3mo ago
Code 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.
3mo ago
Code 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.
3mo ago
Code 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.
3mo 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.
3mo 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.
3mo 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.
3mo ago
Code 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.
3mo ago
Code Quality beginner
Unused Variable
PHP 5.0+
A variable that is assigned but never read — indicating a logic error, incomplete refactoring, or unnecessary computation.
3mo ago
Code 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.
3mo ago
PHP beginner
Guard Clause Pattern
PHP 5.0+
4
Return early from a function when a precondition fails, eliminating deeply nested if-else structures.
3mo 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.
3mo ago
PHP intermediate
Refactoring
PHP 5.0+
4
Improving code structure without changing its external behaviour — cleaning up debt while keeping tests green.
3mo ago
General beginner