Posts by Maxi Contieri

@Maxi Contieri

Maximiliano Contieri

Clean Code Cookbook
Buenos Aires, Argentina maximilianocontieri.com Joined October 2024
6.4k Points159 Badges4 Connections183 Followers7 Following

Posts by Maxi Contieri

Maxi Contieri in Articles 3 min read
Speak the model’s native tongue. > TL;DR: When you prompt in English, you align with how AI learned code and spend fewer tokens. Disclaimer: You might have noticed English is not my native language. This article targets people whose native language...
post-cover-9545
Maxi Contieri 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
Maxi Contieri in Articles 3 min read
A safety-first workflow for AI-assisted coding > TL;DR: Commit your code before asking an AI Assistant to change it. Common Mistake ❌ Developers ask AI assistant to "refactor this function" or "add error handling" while they have uncommitted chang...
post-cover-9307
Maxi Contieri 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...
Maxi Contieri in Articles 5 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
Maxi Contieri 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...
Maxi Contieri 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
Maxi Contieri 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
Maxi Contieri in Articles 8 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
Maxi Contieri in Articles 9 min read
Turn hidden private logic into a real concept without using AI > TL;DR: You can and should test private methods Problems Addressed Broken encapsulation Hidden rules White-box Testing Dependencies Hard testing Mixed concerns Low reuse Code D...
post-cover-8309
Maxi Contieri in Articles 2 min read
Code is hard to read when you use tricky names with no semantics or rely on accidental language complexity. > TL;DR: Don't try to look too smart. Clean code emphasizes readability and simplicity. Problems Readability Maintainability Code Qualit...
Maxi Contieri in Articles 6 min read
The code has lots of comments. Comments are coupled to implementation and hardly maintained. > TL;DR: Leave comments just for important design decisions. Don't explain the obvious. Problems Maintainability Obsolete Documentation Readability D...
post-cover-8106
Maxi Contieri in Articles 5 min read
When bad configuration kills all internet proxies > TL;DR: Overly large auto-generated config can crash your system. Problems Config overload Hardcodedhttps://coderlegion.com/7475/code-smell-02-constants-and-magic-numbers limit Lack of validati...
Maxi Contieri in Articles 5 min read
Too much parsing, exploding, regex, strcmp, strpos and string manipulation functions. > TL;DR: Use real abstractions and real objects instead of accidental string manipulation. Problems Complexity Readability Maintainability Lack of abstracti...
post-cover-7929
Maxi Contieri in Articles 6 min read
Humans get bored after line five. > TL;DR: Refactor and extract functions longer than five lines. Problems Low cohesion High coupling Hard to read Low reusability Solutions 1 Refactorhttps://maximilianocontieri.com/refactoring-010-extract-...
post-cover-7617
Maxi Contieri in Articles 4 min read
A method makes calculations with lots of numbers without describing their semantics > TL;DR: Avoid Magic numbers without explanation. You don't know their source and are very afraid of changing them. Problems Couplinghttps://coderlegion.com/6634...
post-cover-7475
Maxi Contieri in Articles 3 min read
Your objects have no behavior. > TL;DR: Don't use objects as data structures Problems Lack of encapsulation No mappinghttps://coderlegion.com/6313/just-follow-this-design-principle to real-world entities Duplicated Code Couplinghttps://coderle...
post-cover-7246
Maxi Contieri in Articles 7 min read
Failure to program in the 1950s had dire consequences. Machine time was costly. Jumping from punch cards to the compiler and then to execution could take hours or even days. Luckily, those times are long gone. Are they? > TL;DR: Fail fast. Don't hid...
post-cover-7024
Posted in Programming group
Maxi Contieri in Articles 9 min read
Allowed global variables and supposed memory savings. > TL;DR: Don't ever user Singletons For 20 years I have been teaching software at the University of Buenos Aires. In the software engineering course we teach design patterns and the same "scheme...
Posted in Programming group
Maxi Contieri in Articles 1 min read
Index articles on software design > TL;DR: This is an index to already published articles on software design. Some rules must be followed and embraced to create great software designs. This article summarizes them, serving as an index to full sto...
post-cover-6864
chevron_left

Latest Jobs

View all jobs →