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
Mihai Olteanblog.mihaioltean.com·Nov 8, 2024Typescript stories - Generics vs Union typesThis will be a quick and more “back-to-basics” kind of article. While doing some small refactoring, I stumbled across a situation where I had to pass an object, but the shape of the object is completely different depending on the component using that...Discuss·1 like·40 readsTypeScript
Maxi Contierimaximilianocontieri.com·Nov 5, 2024Refactoring 018 - Replace SingletonTL;DR: Refactor singletons to reduce coupling Problems Addressed High coupling Difficult testability Multi-threading issues Garbage accumulation 15 problems more... Related Code Smells https://maximilianocontieri.com/code-smell-32-singletons https...DiscussRefactoringssoftware development
Vijay Thirugnanamyocanay.com·Nov 1, 2024Can i refactor the code before a release?Sometimes, we need to refactor the code. But there are deadlines that need to be met. So, do we refactor or incur technical debt? The answer depends on automated test cases. If you have automated test cases and have good coverage, then it is better t...Discusscoding
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
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
Joel MilliganforNanoAPIblog.nanoapi.io·Oct 21, 2024Introducing NanoAPI - Redefining API DevelopmentHello there! Thanks for dropping by. We’re excited to introduce NanoAPI, a powerful new refactoring tool designed to help developers, architects, and CTOs streamline the way they work with complex API codebases. Whether you’re dealing with a legacy m...Discuss·26 readsmonolithic architecture
Maxi Contierimaximilianocontieri.com·Oct 20, 2024Refactoring 017 - Convert Attributes to SetsTL;DR: Using sets for attributes simplifies your code and makes state management easier Problems Addressed Mutability Complexity Attributes become polluted Setters Related Code Smells https://maximilianocontieri.com/code-smell-35-state-as-pro...DiscussRefactoringsProgramming Tips