Skip to main content

How is your team staying DRY

DRY (Don't Repeat Yourself) is one of the basic fundamentals that developers are taught. If you find repeated code throughout your project you should move that code it into a method that can be the one spot that that code will exist. This reduces complexity and reduces the likelihood of bugs because the code is only in one place.

When I am presented with a new problem, I almost always immediately think of how I would solve that problem. What can I do, starting from scratch to solving the issue?

DRY should also apply to new code that you write, others have likely solved the problem you face, perhaps even with your team. Many times the problem has already been solved or a pattern has been established that will assist in solving the problem.  If you can use an existing piece of code you will save time and effort completing your task and be able to spend more time and effort on something else.

To keep myself and my team as efficient as possible, I need to first find out if someone has already done work that I can reuse. I need to reduce the amount of time I spend writing code that has already been written and focus on the details that are specific to my project.

What steps can I take to make sure I am not duplicating work? What resources do I have and what processes are in place to help me find existing work?

Everyone on the team should be able to answer the question, "How do you ensure you aren't duplicating work?" Their answer should be a list of steps they take before beginning to work or a resource they can point to as a centralized location of knowledge. If you ask a teammate this question and they don't have a good answer, then chances are that your team isn't being as efficient as possible. Knowing how to answer this question also benefits new teammates as they will have somewhere to start before writing new code and they will get an idea for standards that your team follows.

Here are a few things I have found work to help reduce redundancy with my team. Before any new work begins the developer that will work on the story will research what needs to be accomplished and come up with a plan of attack. This step usually takes between 1 - 4 hours depending on the size of the story.

After they have a plan detailed, they call a team huddle. The team huddle is a short, 5 - 10 minute, meeting of all available teammates. The developer explains the story and how they are going to complete the story. This huddle allows anyone else within the team to bring up instances where something has already been accomplished or point out any issue that could be solved in a more efficient manner. In a few cases this huddle has allowed for the entire story to be resolved without any new work, that is the ultimate in efficiency.

We also have a weekly developers meeting where we discuss questions that have come up throughout the week, set team standards, and learn as a group. We have spent time coming up with simple things like folder structure as well as more complicated things like how we shared data across different part of the project. We have had dedicated learning when the group felt it needed more training on a specific subject. No matter what topic has been covered, we have always gained more shared knowledge in the group and set ourselves up to take advantage of that shared knowledge.

Our team also has an internal resource where we keep record of any design decisions and coding standards that have been agreed upon. The goal is that if there is a question about something that has already been decided, we won't have to rehash all of the original arguments to come to the same conclusion because we can look up what was already decided. If things need to be changed then the resource is modified to reflect those changes. This prevents us from needing to have multiple meetings over the same topics, or returning months later to an issue that has already been solved.

How do you ensure you aren't duplicating work?

Comments

Popular posts from this blog

Converting a Large AngularJS Application to TypeScript Part 1

I work on a project that uses AngularJS heavily. Recently we wondered if using a preprocesser like CoffeeScript or TypeScript for our JavaScript would be beneficial. If our team is going to switch languages, we would need to be able to convert existing code over without much pain and we would have to find enough value in switching that it would be worth the conversion. I had read an article that stated that because TypeScript is a SuperSet of JavaScript, you could convert a plain JavaScript file to TypeScript by changing the extension to .ts and not much else would need to change. I wanted to test out this claim, so I took a file that I was familiar with, an Angular Controller, and tried to convert it to TypeScript to see how much effort it would take and then try to figure out where we would benefit from using TypeScript. This is what the controller JavaScript file looked like to start out with: ( function () { 'use strict' ; angular .module( 'app'

Interns: Taking off the training wheels

My intern team has been working for several weeks now on our new website. We have already completed one deployment to production and are finalizing our second one. We started with a plan to release often adding small bits of functionality as we go and so far that plan has been working really well. We already feel like we have accomplished a lot because we have completed many of our project's requirements and should easily be able to complete the rest giving us time to do even more than just the original requirements. One of the things I have had some difficulty balancing has been how much to lead the interns and how much to let them figure out on their own. In deciding what our team process should be and how we should allocate our time, I think it was important for me to do more leading. I saw some deficiencies in how we were currently working and brought up some ideas for how we could address them. We had moved into spending all our time just working through stories and did not

My idea for Hearthstone to add more deck slots

Recently someone asked the Blizzard developers for more slots for decks in the game Hearthstone. The response was that they are talking about it and looking into it, but no decision has been made yet. One of the concerns over adding deck slots is that it could complicate the UI for Hearthstone and make it more difficult for new players to understand. I have what I think would be a good solution to add more deck slots without increasing the learning curve for the game much if at all. First I would take a look at the current selection screen for starting to play a game. It defaults to showing the decks that are custom built by the player if they have any custom decks, and there is an option to page over to the basic decks. This basic deck screen is perfect for how I would change this process. Instead of having 2 pages of decks, 1 for basic and 1 for custom, you would just see the select a Hero screen. Then once you selected the Hero you wanted, you would see all of the decks that