Recent posts tagged codesmell

Level UI • 22 hours • in Articles • 9 min read
Somewhere in the last year, "do we need an MCP server?" joined the list of questions that arrive in a brief before anyone has said what the thing is for. It is usually framed as MCP vs API, as though the Model Context Protocol were a newer kind of AP...
post-cover-33074
  • ai
  • api
  • webdev
  • security
Maxi Contieri • Oct 21 • in Articles • 21 min read
Your request is gone. Your pointer is not. > TL;DR: Don't keep request-owned pointers in long-lived variables, or the next request reads freed memory. Problems 😔 Use after freehttps://en.wikipedia.org/wiki/Danglingpointer on stale request memory ...
post-cover-32009
  • codesmell
Maxi Contieri • Aug 21 • in Articles • 2 min read
One broken window invites another > TL;DR: Don't reuse an existing getter to bolt on new business logic from outside the object. Problems 😔 Duplicated business ruleshttps://maximilianocontieri.com/code-smell-46-repeated-code Broken encapsulation ...
post-cover-25086
  • codesmell
Valentine Shimanovsky • Aug 11 • in Articles • 8 min read
There is a popular idea that refactoring is making code shorter. It is not entirely wrong. Repetition, pointless conditional branches, and dead variables do make code longer for no reason. But the usual topmost problems are when the intentions of a c...
post-cover-24442
  • refactoring
  • software-engineering
  • clean-code
  • codesmell
Maxi Contieri • Aug 5 • in Articles • 7 min read
There's an industry trend to avoid writing code as much as possible, because who has time to write eight lines when a stranger already published a package for it. Turns out that convenience isn't free > TL;DR: Write your code unless you need an exis...
post-cover-24177
  • codesmell
Maxi Contieri • Jul 31 • in Articles • 11 min read
You can avoid null if you try > TL;DR: Don't use null for real places Problems 😔 Tight Coupling Unexpected Results Solutions 😃 1. Model unknown locations polymorphically Context 💬 Null Islandhttps://en.wikipedia.org/wiki/NullIsland is a fict...
post-cover-23892
  • codesmell
Tom Smithverified • 18 hours • in Articles • 9 min read
Security dominated this week, but not in the usual way. Two active campaigns turned GitHub configuration files into attack surfaces. Researchers demonstrated that the built-in browsers inside AI coding tools can read your SSH keys. And at Oracle AI ...
post-cover-33104
  • agenticai
  • devsecops
  • github
  • localai
Maxi Contieri • Jun 23 • in Articles • 10 min read
Brushing Over Real Problems > TL;DR: You write tests that touch every line but verify nothing, creating false confidence in a broken system. Problems 😔 False confidence Hidden production defectshttps://coderlegion.com/6337/we-need-to-stop-the-bug...
post-cover-21230
  • codesmell
Maxi Contieri • Apr 9 • in Articles • 6 min read
Don't turn collaborators into permanent roommates > TL;DR: You should avoid storing stateless utility classes as instance variables initialized with new. Problems Hardcoded dependencies Testing difficulties High couplinghttps://coderlegion.com...
post-cover-14389
  • codesmell
Maxi Contieri • Feb 28 • in Articles • 1 min read
Discouraged by Object-Oriented Programming, Many mixed languages support it. And developers abuse them. > TL;DR: Global functions bring a lot of coupling. Don't use them. Problems Tight Coupling Poor Readability Maintainability Testability H...
post-cover-12270
  • codesmell
Maxi Contieri • Feb 19 • in Articles • 7 min read
Small changes yield unexpected problems. > TL;DR: If small changes have big impact, you need to decouple your system. Problems High Couplinghttps://coderlegion.com/6634/coupling-the-one-and-only-software-design-problem Low maintainability Side...
post-cover-11940
  • codesmell
Maxi Contieri • Feb 2 • in Articles • 1 min read
The code smells badly. Let's see how to change the aromas. > TL;DR: A Compilation of bad smells in code. In this series, we will see several symptoms and situations that make us doubt the quality of our development. We will present possible solutio...
  • codesmell
Maxi Contieri • Jan 30 • in Articles • 7 min read
Assertions, Preconditions, Postconditions and invariants are our allies to avoid invalid objects. Avoiding them leads to hard-to-find errors. > TL;DR: If you turn off your assertions just in production your phone will ring at late hours. Problems ...
post-cover-10793
  • codesmell
Maxi Contieri • Jan 23 • in Articles • 6 min read
An object that knows too much or does too much. > TL;DR: Don't take too many responsibilities in a single class. Problems Low cohesion High couplinghttps://coderlegion.com/6634/coupling-the-one-and-only-software-design-problem Single Responsib...
post-cover-10362
  • codesmell
Maxi Contieri • Jan 10 • in Articles • 4 min read
Non-Parameterized constructors are a code smell of an invalid object that will dangerously mutate. Incomplete objects cause lots of issues. > TL;DR: Pass the essence to all your objects so they will not need to mutate. Problems Mutability Incom...
post-cover-9517
  • codesmell
Maxi Contieri • Jan 4 • in Articles • 3 min read
Programmers use Null as different flags. It can hint at an absence, an undefined value, en error etc. Multiple semantics lead to coupling and defects. > TL;DR: Null is schizophrenic and does not exist in real-world. Its creator regretted and program...
  • codesmell
Maxi Contieri • Dec 30, 2025 • in Articles • 1 min read
Using Boolean variables as flags introduces accidental implementation complexity and pollutes the code with Ifs. > TL;DR: Avoid Boolean variables, they lead to conditional logic and force you to write Ifs. Create polymorphic states instead. Problem...
post-cover-9110
  • codesmell
Maxi Contieri • Dec 28, 2025 • in Articles • 5 min read
You polish code that nobody touches while the real hotspots burn > TL;DR: Don't waste time refactoring code that never changes; focus on frequently modified problem areas. Problems Wasted effort Wrong priorities Missed real issues Team product...
  • codesmell
Maxi Contieri • Dec 20, 2025 • in Articles • 5 min read
Objects or Functions need too many arguments to work. > TL;DR: Don't pass more than three arguments to your functions. Problems Low maintainability Low Reuse Coupling Solutions 1. Find cohesive relations among arguments 2. Create a "con...
post-cover-8662
  • codesmell
endrilickollari • Dec 19, 2025 • in Articles • 5 min read
The Limitations of Lexical Analysis In the world of static analysis, there is a distinct hierarchy of capability. At the bottom, you have lexical analysis—tools that treat code as a stream of strings. These are your grep-based linters. They are incre...
post-cover-8619
  • golang
  • techdebt
  • clean-code
  • codesmell
Maxi Contieri • Dec 15, 2025 • in Articles • 4 min read
Code that is no longer used or needed. > TL;DR: Do not keep code "just in case I need it". Problems Maintainability Extra reading Broken intent Wasted effort Solutions 1. Remove the code 2. KISShttps://en.wikipedia.org/wiki/KISSprinciple 3...
post-cover-8495
  • codesmell
Maxi Contieri • Dec 13, 2025 • in Articles • 1 min read
When syntax noise hides real design problems > TL;DR: When you focus code reviews on syntax, you miss architecture, security, design and intent. Problems Syntax fixation Design blindness Missed risks Bad feedback Useless discussions Reviewer...
post-cover-8451
  • codesmell
chevron_left
🔥 27 posts • 👩‍💻 3 active writers

✨ Want to write in this topic?
Share your learning. Get discovered. Build your profile.
Join CoderLegion

💡 Why developers use CoderLegion
Track learning • Share posts • Get ranked publicly
Create your profile