Better Know an Acronym: What Does It Mean To Keep Our Code DRY?
One of the hard parts about learning how to develop software is the minefield of acronyms that exist within the industry.
The goal of this series of articles is to shine a light on an acronym so that the next time another developer uses it in conversation you can follow along without missing a beat.
What Does it Mean To Keep Our Code DRY?
In this article, we’re going to be discussing the acronym DRY.
DRY stands for Don’t Repeat Yourself. By keeping our code DRY “every piece of knowledge must have a single unambiguous authoritative representation within the system”
Now you may be asking yourself: “How Do I Do That?”.
The goal is to use classes to collect common logic in one place. We may have lots of code related to users scattered throughout our code so we just bring them all together into a User
class. Do we have a lot of functions that deal with how arrays are manipulated? Bring them into an Array
class.
Scott Keck-Warren
Scott is the Director of Technology at WeCare Connect where he strives to provide solutions for his customers needs. He's the father of two and can be found most weekends working on projects around the house with his loving partner.
Top Posts
- Working With Soft Deletes in Laravel (By Example)
- Fixing CMake was unable to find a build program corresponding to "Unix Makefiles"
- Upgrading to Laravel 8.x
- Get The Count of the Number of Users in an AD Group
- Multiple Vagrant VMs in One Vagrantfile
- Fixing the "this is larger than GitHub's recommended maximum file size of 50.00 MB" error
- Changing the Directory Vagrant Stores the VMs In
- Accepting Android SDK Licenses From The OSX Command Line
- Fixing the 'Target class [config] does not exist' Error
- Using Rectangle to Manage MacOS Windows