Be DRY (Don’t Repeat Yourself) In All Things?
Don’t Repeat Yourself
There is a well-known principle in software development known as DRY, or Don’t Repeat Yourself. Here is the Wikipedia definition:
In software engineering, don’t repeat yourself (DRY) is a principle of software development, aimed at reducing repetition of information of all kinds, especially useful in multi-tier architectures.
I love being DRY when I code – unfortunately when I’m really going fast, sometimes I cheat and don’t follow the DRY principle. But it’s a very good principle to follow.
It’s basically a programming version of “don’t reinvent the wheel”. We coders are really good at leveraging: when we build stuff, in a lot of cases it’s really a bunch of stuff others have developed before us, all thrown together in a new way, with a bunch of new code thrown in to fill out the gaps. (Come to think about it, it’s a bit like patent and product development) Some coders out there don’t follow this model, but of the ones I know, myself included, if we find out that there already is some library out there which does what we want, we are overjoyed.
Might just mean that we are lazy, but lazy in a good way. Why rewrite something that works great? If it doesn’t, then likely we will rewrite it anyway, then hand it back to the community. We humans, love to help.
For example, let’s say that you have an idea for an app, could be anything. Let’s say it’s a dating app. So if we break down the requirements for a dating app, you will see:
- We need to track users of the app
- We need to track profiles of the users
- We need to match them up in some way
So you need users as the core dataset of the app. How do you create these users? Well, you could create a user database and make people sign up and log in. You’ll need to decide if you want to use a handle or an email address for login, have them confirm their email address in order to stop bots from creating fake users, have a “forgot password” mechanism. It’s a lot of work.
Or you could be DRY and say “Hmm. Where would most of my users already be?” Do most of them already have Twitter or Facebook accounts? Facebook? Perfect. Then be DRY and just leverage Facebook login. Use Facebook to log into your application. Done. They all you have to worry about is the rest of the app, like figuring out how to connect soulmates. Now that’s the tough part.
But the DRY principle can extend beyond software development. Think about where in your life you can leverage something you already have, or a combination of things, in order to create something new? Like applying Agile to all aspects of your life (try, iterate, and try again) how can you take things that you already have, and leverage them in new ways in order to reach your goals:
- Are there people in your network who would benefit being connected to each other?
- Are there things that you have in your possession that you can use to start a business?
- Is there knowledge already in your head that you can use in order to make money?
We all have many things already. How do you take something you already have and create something new? As using DRY is the quickest way to build new software, using DRY in life is the quickest way to reach your goals.
— image Thomas Hawk
Latest posts by Chris Kalaboukis (see all)
- When you Innovate, Think About the Elephant in the Room - May 25, 2017
- To Innovate, You May Have to Repeat Yourself, Repeatedly - May 23, 2017
- Why You Need Dedicated Innovators Innovating Innovations - May 18, 2017