Pablo Alonso (@pabletecodes) profile picture

👨🏻‍💻 Product Engineer / Human in the loop Taking a career break to recharge and decide what to do next 🏄‍♂️

Gijonfornia
Joined January 2010
How does a coding agent work? I built a super basic coding agent and wrote about it here 👇 pabletecodes.substack.com/p/…
1
34
Just asked ChatGPT about MCP (no idea what you're talking about) and pointed me to this video 🙂
2
40
When you have to work on some code and... IT HAS TESTS
47
As you might already know Boolean Parameters are often considered a "code smell". I wrote yet another post explaining why and what's a better alternative 👇 pabletecodes.substack.com/p/…
50
"Replace Loop with Pipeline" is a simple refactoring to simplify loops. I've been using it a lot lately and I wrote this post so that you learn about it and can use it too 🙂 open.substack.com/pub/pablet…
1
1
83
"I want AI to do my laundry and dishes so that I can write code, not the other way around" 🤣
78
Don't ask me why but every time I use the💃 emoji, it reminds me to @xavijam. Does someone else "suffer" from this? 🤣 Example:
1
6
103
When working with code, we tend to wear "two hats" (a metaphor attributed to Kent Beck). We're either: - 👷 Developing: adding tests and fixing them (changing behaviour) - ✨ Refactoring: restructuring the code (changing structure) Alwasy be mindful of what hat you're wearing!
1
1
110
When should I refactor my code? 🤷‍♂️ The "Rule of Three", explained in "Refactoring" by Martin Fowler, is a good guideline:
1
1
2
120
5. Extract to method -> Similar to "Extract to function", in the context of a class: extract a set of statements into a new method within the same class 👇
1
31
4. Extract to function -> Extract one or more statements into a function in the enclosing or an outer scope 👇
1
8
3. Inline variable -> The opposite of the previous one: inline all usages of a variable within the scope where it has been defined 👇
1
3
2. Extract to constant -> Extract any value (eg: 'hello' string) into a constant in the enclosing or an outer scope 👇
1
5
1. Rename symbol -> Easily rename all occurrences of any symbol (eg: variables, functions, classes, methods, ...) within a file 👇
1
3