I have started playing badminton recently with my work mates after work everyday. It keeps me fitter than usual and is loads of fun too. I learnt to play badminton by looking at how other people in our apartment society played. I also played it casually when I was in college and learnt a few more tricks looking at the games of other players. I just played for playing sake and never analyzed the game much. Now that I am older and wiser, I analyze the game and try to improve everyday. Some of the lessons can be extrapolated to working in a software development team too.
A bad position is a losing position
No matter how powerful or skillful you are with the racket, if you are not in a good position when you make contact with the shuttle, then risk of losing a point is much higher. If you are racing against time and the shuttle cock reaching the floor, you will play a defensive shot which puts you at a disadvantage in the game. In a software development team, if you are not clear about the story that you are executing or there is an unreal deadline (usually caused by you being not clear about the story), the following events may unfold.
- You will program with a stressful state of mind and will spend more time typing than thinking
- The code you push will not be well designed and hence less maintainable which leads to technical debt
- You will skip writing tests which will exaggerate point 2.
- You will deliver code with more defects due to point 1.
- The quality team will reject your release and you will have to fix the defects i.e. rework
- Due to points 1, 2 and 3 the defects you fix will break other things
This cycle repeats and the you have missed the timeline for the release by days or even weeks. Both you and the business feel bad about the whole thing.
A good position leads to a winning position
Thanks to the advice of the more experienced players that I play with, I am learning about how to get into good positions. It gives me more time to observe the positions my opponents are in. Now I have more options in shots. The important thing is being disciplined about keeping yourself in good positions. Similarly as a software developer you can get yourself into a good position if you
- Spend time thinking about the story, scenarios, existing code and tech architecture
- Call out risks to your team before you start programming and everyone agrees on the scope
- Have a daily and weekly plan of how you will execute and release the story
- Actually follow the plans and deliver
- You will write code that is designed well
- You will have more tests
- The software you release will have lesser defects
- The defects that do get raised can be fixed easily due points 1. and 2.
- The chances of you meeting the timelines for the release are much higher
- Both you and the business are happier
- You have more time improving you programming skills and paying off technical debt.
In badminton, it is easy think that having a great smash or playing a cheeky shot wins games. In practice, winning shots are built on the player being in great positions.
As programmers, we tend to jump into programming head first without being in a good position. Getting into a good position means understanding and planning the story. Once you are in this position, programming is just about executing the plan.