The Death Trap for the Solo Developer
Published: 2021-11-30 17:31:51

Software development is a skill, an art that can only be mastered through years of hard work and practice. Learning from others can help the journey greatly. In work environments that have developers of different skill levels, pair programming, code review, etc. all contribute to a developer’s growth. Even experienced developers can learn from their peers.

However, sometimes if you are a solo developer at a company or on a project, it’s very easy to miss out on the advantages of working with others. It’s really easy to push code without having a formal process. After a while your project will develop tech debt, but you as a developer will also suffer too. Your motivation will suffer and more importantly, your skills will suffer. If you are a solo developer at a company for several years and you don’t challenge yourself, your skills will suffer the consequences. _This is the death trap and it’s hard to escape from it._

I was a solo developer for several years at different companies at different points in my career. Focusing on the below four things helped me to stay motivated to constantly improve myself.

##Refactor Code
Do not be happy just because you finished a particular feature and pushed it out to your users successfully. After a month or two (if you do not have any bugs already), go back and see if you can read your code. If you are having trouble reading it, imagine how another developer would feel reading it. Try to refactor your code. See if you can improve the performance and security of the feature.

Are you using third party libraries? Do you need to use them? Sometimes, especially in the JavaScript world, we import libraries just for one feature. (Ever imported momentjs just to use the format method?) See if you can eliminate that library by implementing the feature yourself. Obviously, you have to have balance here. Use your discretion.

Can you see a better algorithm, design pattern, or data structure to use to improve the code? Can you remove unnecessary comments, i.e. dead code? Can you add better comments to explain certain business logic?

The point is, code is never perfect the first time it’s written. Code reviews can help us to improve our code. But solo developers will have to implement their own code review process in order to reap the benefits. Having a set time to refactor code after every release can help you with that.

##Test, Test, Test
You should always test your code before giving it to the end user. That’s programming 101. But as a solo developer, you might not have a tester to rely on. That means you have to be the tester. You might have to perform functional, integration, system testing and user acceptance testing.

Why is testing especially important for solo developers?
Testing helps you to stay focused on the quality of your code. It’s really easy to feel overwhelmed as a solo developer. You might have to wear several hats. This could easily affect the quality of our code. For example, we might have so many things to do in a short time. Then, we get a request to make some minor tweaks to our code to meet some change to business requirements. After we make the tweaks what should we do? Remember, we still have so many other things to do. But we still have to test, test, and test our code.

Testing holds us accountable to our code. When you test, and you see a bug, you have to fix it before giving it to the user. If we were on a team of developers, we would be held accountable for our code by other developers. Solo developers should hold the same standard if we are working alone on a project. It’s for our best interest. It keeps our skills sharp.

>Testing helps you to stay focused on the quality of your code.

## Documentation
Documentation is probably the least favorite part of software development. But writing documentation for our software helps us in two ways. 

The first way is it helps us to think like a user. When we write code, we are thinking like a developer, but documentation is for the user. This means, we have to take our code and express it in a way that a non-technical person can understand. It gives us a different perspective and this ultimately helps us to be better developers.

The second way is it helps us to stay honest as developers. 
Documentation is like a binding contract between the user requirements and our code. When we have to explain how to use the new features we implemented, we know if it really works or not. It’s really easy to push a new feature that’s half built and to tell the end user it works. But when we have to create documentation on how to actually use the new feature, especially if we include screenshots, it will help us to be honest about our code. It’s also proof that our code meets the user requirements.

> Documentation is like a binding contract between the user requirements and our code.

##Challenge Yourself
There are so many other things we can do to avoid the death trap of working as a solo developer in a company or on a project. These were just a few points. The point is we have to keep challenging ourselves. We have to keep improving our skills. We have to keep moving forward. Remember, if we don’t challenge ourselves, no one else will.