pabletecodes's profile picture. 🧑‍💻 Software Engineer passionate about simple, well-designed, and easily testable code. Sharing learnings & tips here.

Follow me if you hate messy code 💩.

Pablo Alonso

@pabletecodes

🧑‍💻 Software Engineer passionate about simple, well-designed, and easily testable code. Sharing learnings & tips here. Follow me if you hate messy code 💩.

Yes! Copying is a key part of learning!🎯 - Musicians play existing songs before composing. - Artists replicate before creating a style. - Dancers mimic before making their own moves. Mastery starts with imitation. 🚀

Imitation is great if you put your own spin to it One of my first projects (before money and I had 0 followers) over a decade ago was Tubelytics, and I literally took @Shpigford's famous Baremetrics app and recreated it but for YouTube I looked up (and still do) to him a lot…



Reflections on some recent (and painful) work that we did to replace some frontend components with different APIs and how we might have approached this problem differently: taking advantage of the Adapter pattern: open.substack.com/pub/pabletecod…


When you have to work on some code and... IT HAS TESTS


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/moving-away-…

pabletecodes's tweet image. 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/moving-away-…

"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/pabletecod…

pabletecodes's tweet image. "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/pabletecod…

Real > Imaginary 🙂

Having a prototype is 10x more valuable than a design. Having a design is 10x more valuable than having a little doc. Having a doc is 10x more valuable than having an idea in your head.



Can you fix the design of your code by looking at the design of your unit tests? 🤔 Yes, you can! 👌 I explored this idea with a very simple example and listed a bunch of "smells" or "pains" you can be looking for in your tests 👇 pabletecodes.substack.com/p/improving-co…


Improving Code Design by Identifying Test Code Smells open.substack.com/pub/pabletecod…


This post motivated me to explore how we can apply the "Encapsulate Collection" refactoring in JavaScript, while providing Array-like behaviour on the encapsulated collection: pabletecodes.substack.com/p/encapsulatin…

Deze tweet is niet langer beschikbaar.

Great article with examples of design patterns that can drastically improve your vue.js components 🙂

📕 12 Design Patterns in Vue 👉🏻 In this article, @MichaelThiessen compiled 12 different design patterns for @vuejs, along with short and concise examples of how they work. michaelnthiessen.com/12-design-patt…



"I want AI to do my laundry and dishes so that I can write code, not the other way around" 🤣

pabletecodes's tweet image. "I want AI to do my laundry and dishes so that I can write code, not the other way around" 🤣

Pablo Alonso heeft deze post opnieuw geplaatst

When should I refactor my code? 🤷‍♂️ The "Rule of Three", explained in "Refactoring" by Martin Fowler, is a good guideline:

pabletecodes's tweet image. When should I refactor my code? 🤷‍♂️

The "Rule of Three", explained in "Refactoring" by Martin Fowler, is a good guideline:

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!

pabletecodes's tweet image. 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!

Here's my take on the second Design Challenge thrown by @JuntaoQiu 👇 gist.github.com/alonsogarciapa… Disclaimer: I didn't run the code and I'm not a React developer, so pardon my React! 🤣

Design Challenge 002: Simplifying State Management in React , by @JuntaoQiu open.substack.com/pub/juntao/p/d…

JuntaoQiu's tweet image. Design Challenge 002: Simplifying State Management in React , by @JuntaoQiu open.substack.com/pub/juntao/p/d…


Loading...

Something went wrong.


Something went wrong.