Knowing when to persevere and when to change approach
It strikes me that one of the most important skills to develop in software development is knowing when to keep going with an approach to a problem and when we should stop and try something else.
This situation doesn’t always happen because if we have two people available and realise before we start on the task that there is some doubt as to which solution is the most appropriate then we can adopt a set based approach whereby we try out multiple potential solutions in parallel.
However I’ve found that there are times when we might think that one solution is much better than the alternatives and we will start working on that and discard the alternatives for the moment.
Frequently the approach we choose will solve our problem but on other occasions we can end up getting a bit bogged down when it doesn’t work out as expected.
At this stage I often find that my instinct is to try and solve these problems and while I think this is certainly a valid approach it’s also very easy to end up shaving the yak.
This seems to happen much more frequently when working alone and even when we’re getting feedback which suggests that what we’re trying isn’t working we can be reluctant to back track.
I think there is some pride involved as I frequently find myself really wanting to make the current approach work as I believe that a better developer than myself would be able to do so.
Sometimes that is the case but more often than not when I work through the problem with a colleague their suggestion is to try another approach rather than continuing to struggle with the current one.
It doesn’t make a lot of sense to spend all our time going down one avenue when our goal is solve a particular problem and the solution is a means to that end.
When discussing this with Nick he pointed out that we also need to recognise when we should persevere with the approach.
One way to avoid too much yak shaving is to set a timebox by when we should either have a better idea of whether we are going to be able to solve the problem with this solution or if we need to consider an alternative.
If there’s some light at the end of the tunnel with an approach after this period then I would be inclined to keep on going but it’s sometimes difficult to tell how close we actually are and how much is wishful thinking!
I still sometimes find myself struggling to decide whether to keep going or change direction so it’d be interesting to know if anyone has ideas around doing so more effectively.