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 14, 2024Refactoring 020 - Transform Static FunctionsTL;DR: Replace static functions with object interactions. Problems Addressed High coupling due to global access Poor testability Overloaded protocols in classes Decreased cohesion Related Code Smells https://maximilianocontieri.com/code-smell-...40 readsRefactoringsclean code
Hans L'Hoesthans.lhoest.eu·Dec 6, 2024Notes on Preparatory RefactoringNotes inspired by Emily Bache's short Youtube video Design Better Code with Preparatory Refactoring in TDD | Demo. A preparatory refactoring is a refactoring to make future changes to accommodate new requirements easy. By definition, current behavior...TDD (Test-driven development)
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 30, 2024Code Smell 282 - Bad DefaultsTL;DR: Treat unknown responses as unauthorized, not as valid. Problems Security risks Ignoring unknown cases Error Misinterpretation Defaulting to valid states Mismatch Authorizations Failing to log events Exploitation Potential Solutions Validat...638 readsCode Smellsclean code
Michael Laroccamichaeljudelarocca.hashnode.dev·Nov 26, 2024FeaturedHow to Elevate Your Coding Skills to Stand Out in the Job MarketIntroduction To become a hirable and sought-after web developer in today’s competitive job market, you must elevate your coding skills to a professional level to stand out from other candidates, significantly increasing your chances of being hired. I...16 likes·193 reads#codenewbies
Gagandeep Singhblog.gagan93.me·Nov 24, 2024Refactoring: Lessons Learnt So FarBackground Refactoring is the process of restructuring code, without changing its original functionality. Over the past three years, my role has allowed me to pick a lot of refactoring tasks, which have enhanced my skills and understanding around R...2 likes·88 readsrefactoring
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