AHA programming, a nice balance between DRY and WET

On Tuesday, I wrote about DRY programing, and how it’s actually OK to repeat yourself.
Someone pointed me to this article by Kent C. Dodds from two years ago on AHA programing as a nice follow-up read.
AHA (pronounced “Aha!” like you just made a discovery) is an acronym I got from Cher Scarlett which stands for “Avoid Hasty Abstractions.”
The way I think of this principle is beautifully described by Sandi Metz who wrote: “prefer duplication over the wrong abstraction.


This content originally appeared on Go Make Things and was authored by Go Make Things

On Tuesday, I wrote about DRY programing, and how it’s actually OK to repeat yourself.

Someone pointed me to this article by Kent C. Dodds from two years ago on AHA programing as a nice follow-up read.

AHA (pronounced “Aha!” like you just made a discovery) is an acronym I got from Cher Scarlett which stands for “Avoid Hasty Abstractions.”

The way I think of this principle is beautifully described by Sandi Metz who wrote: “prefer duplication over the wrong abstraction.”

This is such a solid golden nugget of wisdom that I want you to read it again, then read Sandi’s blog post on the subject: The Wrong Abstraction. It’s fantastic.

For me, these two sentences really sum up years of evolving thinking and experience for me:

I think the key is that we don’t know what the future of code will be. We could spend weeks optimizing code for performance, or coming up with the best API for our new abstraction, only to find out the next day that we made incorrect assumptions and the API needs a complete rework or the feature the code was written for is no longer needed.

Go read Kent’s entire article, and the articles he links to. It’s all really good stuff!


This content originally appeared on Go Make Things and was authored by Go Make Things


Print Share Comment Cite Upload Translate Updates
APA

Go Make Things | Sciencx (2022-02-10T15:30:00+00:00) AHA programming, a nice balance between DRY and WET. Retrieved from https://www.scien.cx/2022/02/10/aha-programming-a-nice-balance-between-dry-and-wet/

MLA
" » AHA programming, a nice balance between DRY and WET." Go Make Things | Sciencx - Thursday February 10, 2022, https://www.scien.cx/2022/02/10/aha-programming-a-nice-balance-between-dry-and-wet/
HARVARD
Go Make Things | Sciencx Thursday February 10, 2022 » AHA programming, a nice balance between DRY and WET., viewed ,<https://www.scien.cx/2022/02/10/aha-programming-a-nice-balance-between-dry-and-wet/>
VANCOUVER
Go Make Things | Sciencx - » AHA programming, a nice balance between DRY and WET. [Internet]. [Accessed ]. Available from: https://www.scien.cx/2022/02/10/aha-programming-a-nice-balance-between-dry-and-wet/
CHICAGO
" » AHA programming, a nice balance between DRY and WET." Go Make Things | Sciencx - Accessed . https://www.scien.cx/2022/02/10/aha-programming-a-nice-balance-between-dry-and-wet/
IEEE
" » AHA programming, a nice balance between DRY and WET." Go Make Things | Sciencx [Online]. Available: https://www.scien.cx/2022/02/10/aha-programming-a-nice-balance-between-dry-and-wet/. [Accessed: ]
rf:citation
» AHA programming, a nice balance between DRY and WET | Go Make Things | Sciencx | https://www.scien.cx/2022/02/10/aha-programming-a-nice-balance-between-dry-and-wet/ |

Please log in to upload a file.




There are no updates yet.
Click the Upload button above to add an update.

You must be logged in to translate posts. Please log in or register.