Introduction
Today I want to present a method to improve your learning progress. Deliberate Programming provides us with measureable metrics that we can use to evaluate our practice performance and identify sinkholes. I will go into more detail about how this works, but first let me explain where this comes from and why it could be useful to you.
Where did Deliberate Programming come from?
How can we further improve?
Technology and software development have been growing a lot in the last centuries. Architects came up with methods and patterns for almost any of the difficulties we face today.
- 1930s: Functionality
- 1940s: Performance
- 1950s: Scaleability
- 1960s: Useability
- 1970s: Security
- 1980s: Standards
- 1990s: Productivity
- 2000s: Correctness
- 2010s: Evolvability
The necessary patterns and methods for all these problems exist today. When this is the case, how can we further improve your software development?
One of the possible answers is to improve the learning process of our developers. Many problems in software today could have been prevented with these patterns if they were properly applied. Deliberate Programming is a practice technique that can help developers to improve their skills, for example: Test-Driven Development (TDD) might not be applied 100%, because the developers are not used to it. Here Deliberate Programming could be used to improve their compliance to the TDD method.
Source of Deliberate Programming
The art of learning new skills or improving existing ones is not new to the programming sector. Instead, it is well explored and documented. People have been learning skills like swordsmanship or chess for decades. We can use the knowledge that these people have aquiered to improve our own learning processes. They have defined a few forms of practice methods that build the base for Deliberate Programming – so I will explain them first.
Naive Practice
This is what most people will do when they would like to get better at something. It consist of continously practice by repeatedly executing your skill. It is based on the assumption that if you pour in more hours, you will improve – sooner or later.
However, modern research has shown that just simply practicing by repetition alone will only work to a certain extent. When an acceptable skill-level is reached, the additional practice times will no longer improve your skill. At this point more advanced practice-methods are required.
Purposeful Practice
The first step in Purposeful Practice is to set a goal for your practice: What do you want to get good at? The answer should not be a generic skill, but a specific aspect. It has to be a clear target of what you want to achieve using the SMART-criteria:
Specific – target a specific area for improvement
Wikipedia on SMART criteria – https://en.wikipedia.org/wiki/SMART_criteria
Measureable – quantify or at least suggest an indicator of progress
Assignable – specify who will do it
Realistic – State what results can realistically be achieved, given available resources
Time-related – specify when the result(s) can be achieved
Now it is time to practice said skill, but really concentrate on just this specific aspect. Seek some feedback on how you did and try to integrate the conclusions in your practice. Another important part of this practice is the right level of difficulty: You would like to stretch your comfort zone. It should still be do-able, but difficult.
Deliberate Practice
If you execute Purposeful Practice in a well-defined field and with a teacher that gives tailored practice advice, it becomes Deliberate Practice.
In this context, well-defined means, that there are clear standards and guidelines on what a good or poor execution is. For example, if you want to be good at Formula 1 Racing, other people can judge your skills by observing you.
When applying this method, the roadmap looks like this:
- Assess your limits (optional: with teacher/substitute)
- Set a SMART goal
- Practice with focus
- Get Feedback
- Repeat
Deliberate Programming
In combination with automated observation and multiple reflection steps Deliberate Practice can become Deliberate Programming when applied to improve a programming skill.
When applying this method to the existing Deliberate Practice roadmap, you get a few changes in the roadmap:
- During the focussed practice step it is important to record all of your activities and results.
- The feedback collection step is extended by 5 additional phases:
- Log your stream of consciousness
- Assess your idea flow
- Evaluate your performance
- Draw a conclusion
- Transform these conclusions in resolutions
How does it work in practice?
Let’s say we want to practice the method of Test-Driven Development (TDD). Then the first step would be to familiarize yourself with the rules of TDD. Once we are familiar with the rules, we can build our metrics that we want to use to rate our performance:
- Did we write the test-code before the implementation?
- Do the test cases progressively get more difficult?
- Did we switch between writing test- and production-code?
- Did we refactored after a passing test run and still passed all of them afterwards?
- Did we write the simplest implementation possible for each step?
- Were any new tests automatically passing because of previous implementations?
- Are all alternative cases covered in tests?
Picking a task
Once we got our metrics setup, we pick an exercise to practice the specific aspect we want to improve. In our case, that would be TDD. For our exercise we choose the “From Roman Numerals”-Kata from the Clean Code Developer School’s Coding Dojo. Now we want to solve this exercise while applying TDD as much as we can.
Building an activity-log
Before we can start with the exercise, we have to setup our tooling. Since we did not find any tool that provided the functionality we needed, the decision fell on a little Powershell-Script combined with git:
We work in a git-repository and save our changes to the files as often as possible. The Powershell-Script executes in the background and automatically commits your changes in a regular time interval. This creates a nice history of what changes you did in which order and when. It is the equivalent to the chess players game script and will be the foundation of our analysis.
Add your thoughts
After you executed the Kata, come back to your git history. Now you should have multiple commits documenting the steps that you took to solve the problem. Go through each commit and make notes about what you were thinking at that moment and why you made that certain change. The what is already documented in the commits, so focus on your inner thoughts and reasoning behind it. Maybe you had a plan how you wanted to go from there? Write it down.
Identify disruptive factors
We now have an activity-log of the actions we took and which intention we were having at that time. This allows us to identify certain disruptive factors in our workflow. For this purpose we have categorized 4 disruptive factors, but you can add your own:
- Hesitation: You are not quite sure of how to do something or lost in thought. This is not necessarily bad, but you should write down what you were thinking about or struggling with.
- Derailment: You did not focus on the task at hand, but instead did something else. You need to work on your focus.
- Rework: You had to come back and do something again, because you were not happy with it or it did not work that way. Maybe you could have done it differently from the beginning.
- Research: You encountered something that you did not know or were not sure about. What was it? Should you consider revisiting that topic?
Evaluate your performance
With this information we have a very detailed activity-log that we can use to evaluate how well we did at our task. We do this by validating our metrics that we decided on previously. Which ones did you fulfil? Are there ones you struggle with? How can you improve those on the next session?
Once you have set your resolutions for the next practice, you can start your next cycle of Deliberate Practice.
Summary
Deliberate Programming is a way to practice certain skills while providing feedback through metrics and optionally trainers, too. It helps to analyze your workflow during the practice tasks and analyze for weak points. These metrics give you a solid indication of how good you are and how to further improve.