Posts

Showing posts from July, 2020

AHA programming - Kent Dodds

I watched Kent Dodds presentation in React Summit 2020 and also read his aha blog post. AHA stands for Avoid Hasty Abstractions and Kent likes it described as: prefer duplication over the wrong abstraction. Ok, on the surface that sounds controversial, prefer duplication? Goes against principle of DRY. But we already follow guidelines that cause duplication e.g. WET Write Everything Twice ...but not a third time (we follow that at Opentable). Often times you think you know a component will be reused but in fact you may be wrong and it may take a couple of implementations to really understand if it's common pattern or not.  And that's Kents point: don't rush into abstractions. Code duplication is ok while it's being figured out. Over time/uses the commonalities will become clear and then you can create an abstraction that will work better. He's not saying don't do abstractions, he is saying take your time to learn the domain. In the video presentation Kent highl