Posts by Maxi Contieri

@Maxi Contieri

Maximiliano Contieri

Clean Code Cookbook
Buenos Aires, Argentina maximilianocontieri.com Joined October 2024
9k Points • 267 Badges • 17 Connections • 349 Followers • 21 Following

Posts by Maxi Contieri

Maxi Contieri • • in Articles • 4 min read
Context is precious. Don't waste it. > TL;DR: Split your AGENTS.md into layered files so your AI loads only the rules that matter for the code you touch. Common Mistake ❌ You put a single massive AGENTS.md , CLAUDE.md , GEMINI.md at your project r...
post-cover-14016
Maxi Contieri • • in Articles • 1 min read
Refactorings are amazing to grow and improve our code > TL;DR: Let's start addressing our code smells I have been writing a series on Code Smells for a long time. https://coderlegion.com/10942/how-to-find-the-stinky-parts-of-your-code There are a...
Maxi Contieri • • in Articles • 4 min read
Forget about data structures, DTOs, POJOs, and anemic objects. > TL;DR: Avoid external manipulation Problems Addressed Encapsulation Violation Anemichttps://coderlegion.com/7246/code-smell-01-anemic-models Models Related Code Smells https://c...
post-cover-13866
Maxi Contieri • • in Articles • 5 min read
Structure your skills so the AI loads only the files it needs. Split complexity across modular files and use keywords to trigger conditional loading. > TL;DR: You reduce token usage when you trigger conditional loading instead of loading all files a...
post-cover-13837
Maxi Contieri • • in Articles • 13 min read
A short thought can bring amazing ideas > TL;DR: There are some great quotes I've been collecting. I use them as inspiration or a motto for some articles. Here we go: > First make the change easy warning: this might be hard, then make the easy c...
Maxi Contieri • • in Articles • 3 min read
Stop the memory rot > TL;DR: You can keep your AI sharp by forcing it to summarize and prune what it remembers a.k.a. compacting. Common Mistake ❌ You keep a single, long conversation open for hours. You feed the AI with every error log and ever...
post-cover-13655
Maxi Contieri • • in Articles • 4 min read
If I see a Variable that doesn't change. I call that variable a constant > TL;DR: Be explicit on what mutates and what doesn't. Problems Addressed Mutabilityhttps://coderlegion.com/6742/the-evil-power-of-mutants Code Optimization Related Code S...
post-cover-13617
Maxi Contieri • • in Articles • 4 min read
You own the code. Own and understand what it does. > TL;DR: Never ship AI-generated code you don't understand — ask until you do. Common Mistake ❌ You ask an AI agent to implement a feature. It returns 200 lines of code. You run the tests. They ...
post-cover-13394
Maxi Contieri • • in Articles • 8 min read
Behavior is repeated across the system. But you are missing a concept > TL;DR: Put together what belongs together Problems Addressed Code Duplication Missing Abstraction Low Cohesion Related Code Smells https://maximilianocontieri.com/code-...
post-cover-13328
Maxi Contieri • • in Articles • 3 min read
Summarize your architecture rules and give your AI a persistent memory > TL;DR: When you use the /init command, you create a context file that saves you from repeating instructions in every new session. Common Mistake ❌ You waste time copying and ...
post-cover-13150
Maxi Contieri • • in Articles • 3 min read
Stop copying code chunks. Start letting AI agents work directly with your files. > TL;DR: Use terminal-based AI tools to give your assistant direct access to your local files and test suites. Common Mistake ❌ You copy code snippets into a web brow...
post-cover-12537
Maxi Contieri • • in Articles • 1 min read
A series of practical advice on how to use AI to code > TL;DR: Master the balance between AI speed and code with professional craftsmanship. In this series, you will learn practical state-of-the-art advices to use AI to code. https://coderlegion.c...
post-cover-12469
Maxi Contieri • • 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
Maxi Contieri • • in Articles • 3 min read
Learn guided by the domain > TL;DR: Use AI to understand requirements and build a shared mental model while you write the code. Common Mistake ❌ You jump directly to code generation with a vague, wishful prompt. The AI appears to understand your ...
post-cover-12228
Maxi Contieri • • 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
Maxi Contieri • • in Articles • 3 min read
Avoid the Agentic Trojan Horse > TL;DR: Treat AI agent skills like dangerous executable code and read the instructions carefully. Common Mistake ❌ You install community skillshttps://coderlegion.com/10515/ai-coding-tip-004-use-modular-skills for y...
post-cover-11791
Maxi Contieri • • in Articles • 6 min read
You own the code, not the AI > TL;DR: If you can't explain all your code, don't commit it. Common Mistake ❌ You prompt and paste AI-generated code directly into your project without thinking twice. You trust the AI without verification and create...
post-cover-11538
Maxi Contieri • • in Articles • 1 min read
Give your collections a purpose and a connection to the real world > TL;DR: Wrap primitive collections into dedicated objects to ensure type safety and encapsulate business logic. Problems Addressed Type safety violations Logic duplicationhttps:...
post-cover-11148
Maxi Contieri • • in Articles • 3 min read
Keep your prompts clean and focused, and stop the context rot > TL;DR: Clear your chat history to keep your AI assistant sharp. Common Mistake ❌ You keep a single chat window open for hours. You switch from debugging a React component to writing...
post-cover-11001
Maxi Contieri • • 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...
chevron_left