Maxi Contierimaximilianocontieri.com·Dec 21, 2024Code Smell 284 - Encrypted FunctionsTL;DR: Avoid obfuscated functions in your code. This article is based on a real social hacking disguised as a job interview Problems Hidden vulnerabilities Readability Testability Trust issues Bad Naming Solutions Use clear names Avoid obfu...Code Smellsclean code
Maxi Contierimaximilianocontieri.com·Dec 10, 2024Code Smell 283 - Unresolved Meta TagsTL;DR: Incomplete or null meta tags break functionality and user experience. Problems Tags appear in output Email texts include placeholders between human-readable text Missed placeholders confuse users Websites are rendered with strange characters...Code Smellsclean code
Maxi Contierimaximilianocontieri.com·Dec 4, 2024Refactoring 019 - Reify Email AddressesSayit once and only once TL;DR: Avoid duplicate email validations. Problems Addressed Repeated email validation logic in multiple places. Risk of inconsistent validation rules. Difficult to maintain validation rules. Bijection violation Primitive ...Refactoringsrefactoring
Maxi Contierimaximilianocontieri.com·Nov 24, 2024Code Smell 281 - HashesTL;DR: Misaligned equals() and hashCode() break collections. Problems The least surprise principle violation Contract violations Mutable key issues Duplicate hash codes Debugging becomes hard Poor hash distribution Solutions Avoid mutab...41 readsCode Smellsclean code
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...140 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...36 readsCode 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...42 readsCode 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...34 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...28 readsCode 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...#codenewbies