Maxi Contierimaximilianocontieri.com·Nov 20, 2024Code Smell 280 - Spaghetti CodeThis article is dedicated to the late Thomas E. Kurtz, one of BASIC's creators, as it was the first programming language I learned. TL;DR: GOTO statements create confusing and unmaintainable code Problems Logic becomes unclear Debugging gets har...Discuss·108 readsCode Smellsclean code
Maxi Contierimaximilianocontieri.com·Nov 16, 2024Code Smell 279 - Loop Premature OptimizationTL;DR: Don't optimize loops without a clear need and concrete real-world evidence Problems Premature Optimization Reduced readability Increased complexity Difficult to maintain Slower debugging Solutions Keep it simple Prioritize clarity Avoid pr...DiscussCode SmellsProgramming Tips
Maxi Contierimaximilianocontieri.com·Nov 10, 2024Code Smell 278 - DirName and FileTL;DR: Use clear names for better code understanding. Problems Unclear variable purpose Bijection Fault Misleading context Repetitive code Harder maintenance Reduced readability Abbreviations Increased cognitive load Solutions Honor the Bijectio...DiscussCode Smellsclean code
Sohag Hasannotes.sohag.pro·Nov 9, 2024Understanding Code Smells in PHP and Laravel: A Beginner's GuideCode Smells in PHP and Laravel Ever walked into a room and immediately noticed something was off? Maybe it was a faint burning smell from the kitchen or the sound of a washing machine that didn't quite seem right. These warning signs in our daily liv...Discuss·28 readsTips & Trickscode smell
Maxi Contierimaximilianocontieri.com·Oct 30, 2024Code Smell 277 - UPPERCASE AcronymsTL;DR: Treat acronyms like normal words to improve human readability. Problems Reduced readability Breaking naming style Words confusion Harder to pronounce Solutions Treat acronyms as Capitalized words Use camelCase or snake_case Context Acron...DiscussCode Smellsclean code
Victor Uzoagbavictoru.hashnode.dev·Oct 25, 2024The Evolution of Type Systems in Startup CodebasesAs startups scale from the frenetic energy of prototyping to the disciplined rigor of production, the underlying codebase undergoes significant transformation. Among the most impactful changes is the evolution of type systems, which help manage compl...Discuss#codenewbies
Maxi Contierimaximilianocontieri.com·Oct 24, 2024Code Smell 276 - Untested Regular ExpressionsRegex Without Tests is Asking for Trouble - Don't be lazy. It is free with AI! TL;DR: Use clear and concise regular expressions, and test them thoroughly. Problems Readability No test cases Missed edge cases Debugging challenges Unclear failures H...DiscussCode Smellscode smell
Maxi Contierimaximilianocontieri.com·Oct 13, 2024Code Smell 275 - Missing Test Wrong PathTL;DR: Ensure you fail the test when no exception is thrown in invalid conditions. Problems Silent faulty tests Missing failure condition Poor error validation Unclear test outcome Skipped test logic Solutions Add failure assertion Explicit excep...Discuss·29 readsCode Smellsclean code
Maxi Contierimaximilianocontieri.com·Oct 10, 2024Code Smell 274 - Cascaded ReturnsTL;DR: Prevent chaining return statements for better code readability and flow. Problems Confusing flow Hard to debug Buried logic Low readability Risk of errors Abuse of IF Sentences Solutions Early returns Clear conditions 3 Use guard clauses 4...Discussclean code
Maxi Contierimaximilianocontieri.com·Oct 5, 2024Code Smell 273 - OverengineeringTL;DR: Overengineering complicates your code. Problems Unnecessary accidental complexity Premature optimizations Unnecessary abstractions Poor Maintainability Overly detailed designs Slow iteration cycles Bijection violation Performance penalties ...DiscussCode Smellscode smell