-
![](https://m.primal.net/IfSZ.jpg)
@ Pip the social graph guy
2025-02-16 10:06:56
my 2 sats about abstraction. I understand the itch about taking some piece of code and making it more general, more abstract, however I try to resist it as much as possible. Why? Because it inevitably adds more complexity, it requires more effort to understand and debug. My rule now is that I abstract only when I have repeated the same code 2 or 3 times.
No-one will be confused by repeated code, which is not the case for an abstraction that doesn't fit or is premature.