Tag: code

You can’t create the right abstraction until you fully understand the code, but the existence of the wrong abstraction may prevent you from ever doing so. This suggests that you should not reach for abstractions, but instead, you should resist them until they absolutely insist upon being created.

--Sandi Metz, 99 Bottles

I see that Sandi Metz has a new edition of her 99 Bottles book out, with new JavaScript & PHP versions as well as the classic Ruby. I'll have to read it. I'm a big fan of Sandi's, and her work tends to be rich with insights and well-formulated principles about coding & program design. Even if it's an OO-focused book, and my preference is more FP focused these days, it's still a good bet that the book will be more than worth the time to work through it.

Good Sandi Metz post: in software it's important to get the abstractions right, even if it comes at the cost of some duplication. Over time, the wrong or broken abstractions cause way bigger problems than duplication. Ideally you won't have either problem, but if you have to have one then choose the lesser evil of duplication if it enables cleaner abstractions.

"Every practice we use as part of our work puts forces on us, and generally those forces can push us toward or away from more successful ways of doing things." --Ron Jeffries