Red, Green, Refactor; the TDD mantra is about breaking things down into small pieces and repeating steps, building up from simple to complex, until you accomplish the larger goal. It gives you a framework for how to approach a problem and confidently and consistently solve that problem. Coding using TDD leads to better code and is less stressful.
So why not try to take what works well about TDD and apply it to everyday life?
First stop and think about what you are doing. What do you want to accomplish? Do you want to get a new job? Are you planning a vacation? Do you want to get in better shape? Whatever your goal is, you need to start by figuring out what you ultimately want to accomplish.
Once you know what you want to do, what is the smallest step that you can complete that will set you on your way? Update your resume, book a hotel room, go for a walk. Whatever makes sense for you to begin, do it and start the ball rolling towards completing your goal.
Now that you have the first step towards completing your goal, continue working on the next smallest thing you can do to further progress. Just with TDD, keep cycling through small improvements until you get to the end.
If you are trying to accomplish something and large, something that will take many steps, perhaps something that will take many years or the rest of your life even, you also need to remember to "refactor." Take some time out in pursuit of your goal and look at how far you have come, what you have accomplished, and how things might have changed along the way. Think about how differently you have been able to change code when you refactor because of different things that you have learned and new variables that have been introduced, well the same can applied to life changes and lessons.
So that covers the value that TDD provides, but what about the Tests themselves? In TDD you have tests to provide confidence when you change something. Tests will give you information about what the code is supposed to be doing, and probably about how you reached the ultimate solution.
So how can you get tests in real life? You need to keep track of your progress and the steps you have taken towards your goal. Get an Evernote account and make a note for everything you do. Get a pen and paper notebook and track what you are trying to do. Whatever method works best for you, but start tracking your progress.
No, you won't be able to run your "tests" fast or often, but having a log of what you have been doing will allow you to look back and see what has worked well for you and what hasn't. If you organize your notes well you should be able to go over them fairly quickly and see patterns.
As with TDD coding, you will continue to learn as you apply the mantra and you can refine your process to suit your needs.
So why not try to take what works well about TDD and apply it to everyday life?
First stop and think about what you are doing. What do you want to accomplish? Do you want to get a new job? Are you planning a vacation? Do you want to get in better shape? Whatever your goal is, you need to start by figuring out what you ultimately want to accomplish.
Once you know what you want to do, what is the smallest step that you can complete that will set you on your way? Update your resume, book a hotel room, go for a walk. Whatever makes sense for you to begin, do it and start the ball rolling towards completing your goal.
Now that you have the first step towards completing your goal, continue working on the next smallest thing you can do to further progress. Just with TDD, keep cycling through small improvements until you get to the end.
If you are trying to accomplish something and large, something that will take many steps, perhaps something that will take many years or the rest of your life even, you also need to remember to "refactor." Take some time out in pursuit of your goal and look at how far you have come, what you have accomplished, and how things might have changed along the way. Think about how differently you have been able to change code when you refactor because of different things that you have learned and new variables that have been introduced, well the same can applied to life changes and lessons.
So that covers the value that TDD provides, but what about the Tests themselves? In TDD you have tests to provide confidence when you change something. Tests will give you information about what the code is supposed to be doing, and probably about how you reached the ultimate solution.
So how can you get tests in real life? You need to keep track of your progress and the steps you have taken towards your goal. Get an Evernote account and make a note for everything you do. Get a pen and paper notebook and track what you are trying to do. Whatever method works best for you, but start tracking your progress.
No, you won't be able to run your "tests" fast or often, but having a log of what you have been doing will allow you to look back and see what has worked well for you and what hasn't. If you organize your notes well you should be able to go over them fairly quickly and see patterns.
As with TDD coding, you will continue to learn as you apply the mantra and you can refine your process to suit your needs.
Comments
Post a Comment