Fullstack Ruby logo

Fullstack Ruby

Subscribe
Archives
February 15, 2022

What’s Better Than DRY? DOEY! (Don’t Over-Exert Yourself)

Greetings, my fellow Rubyist! It's been a while! Getting back into the swing of things this year after the holiday break proved to be more challenging than I anticipated. But nevertheless, I am here and ready to talk shop.

I thought it might be worthwhile to switch gears a bit and write a philosophical post about a topic near and dear to my heart: less code. As many an experienced programmer will tell you, sometimes the amount of code you remove, or refrain from writing in the first place, is just as important as the code you contribute to a codebase. I explain in my article:​

When I’m in my “flow state” as a programmer, what I’m constantly doing is finding ways to eliminate redundancies. This goes far beyond DRY (Don’t Repeat Yourself), which is a generally useful concept but typically only thought of as applying to small code blocks. “Hey, these few lines here are basically the same as these few lines over there. Let’s extract them out to a single function! Cool, cool.”
​
I find that application of DRY to be far less compelling than one where you can recognize that entire subsystems of your application as a whole can be made entirely redundant if you simply took the time to search for higher-level abstractions.

I am always on the lookout for these higher-level abstractions. By ensuring many of the lines of code in your application serve a broader purpose, rather than comprise part of merely a single chain of logic, you can get way more done with (ultimately) less. And the more you pivot from solely writing feature-facing code and wade into the waters of authoring libraries and frameworks, the more vital this skill becomes.

Anyway, I hope you enjoy this article, and please let me know what you think! Your feedback is much appreciated. –J

​What’s Better Than DRY? DOEY! (Don’t Over-Exert Yourself)​

Don't miss what's next. Subscribe to Fullstack Ruby:
Fullstack Ruby
This email brought to you by Buttondown, the easiest way to start and grow your newsletter.