7 Tips for Becoming a Better Developer
Most of the writing on software development is very technical, aimed at researching and solving a particular problem. Such writing provides tremendous value, and I imagine most of what I will write in this blog will be just that - posts focusing on technical aspects of certain languages, platforms, and frameworks.
For this first entry, however, I would like to take a look at the bigger picture and think about the main things that helped me a lot in becoming a better developer in the past couple of years.
Most of the examples in this blog post are related to Android development. Still, the concepts are applicable to any field.
Tip #1: Know your domain
If you have chosen something as your craft, and are spending most of your waking hours doing it, it would only make sense to always improve and hone that skill.
Regardless of your current experience, never stop learning. Don't ever make a mistake and assume that you know something already and there is nothing to learn. Even the basics. By doing that, you shut your brain off to any possibility of learning something new, and there is always something to learn.
Remain curious, be open-minded, and always ask questions. Never be content with things you don't know. Never settle with what you do know. Especially when it comes to your area of expertise.
“Sell your cleverness and buy bewilderment.” - Rumi
Here are some things that have helped me a lot to become a better Android developer. The principles, however, apply to any language and platform.
- Start searching for answers in the source code and the documentation. By reading the source code of Kotlin and Android, I got many great ideas that I now regularly use in my projects, and it helped a lot to improve my style as well.
- Strive to fully understand things that you use on a daily basis. If you are an Android developer like me, start with Activities and Fragments, you will use them in every single application. Open up the source for
AppCompatActivityand go through all the public methods it exposes. Look for things you never knew existed. Do the same for
Fragment. Modern IDEs make it so easy and you will learn a lot. Make a habit of
CMD/Ctrl+ clicking classes and see what’s inside.
- Stay informed about new things in your domain. Find a newsletter, read blogs, watch YouTube - do anything to stay in touch with what is happening in your chosen field.
Tip #2: Know your tools
Every craftsman has to constantly improve their knowledge of the tools they use. If your main line of work is being a developer, I imagine you spend a lot of time in some kind of text editor, or, most probably an IDE. Nowadays, IDEs are very advanced and it’s highly likely you don't know most of the features your IDE offers. Some of the features might not be useful to you personally, but you won't know it if you don't even suspect they exist.
Here are some things to get you started:
- Google and try out different productivity tips for your IDE.
- Learn and use the shortcuts for actions you are using repetitively.
- See if there is a template/snippet functionality in your IDE.
- Invest some time in setting up custom lint rules to quickly spot errors and code smells.
- Browse available plugins and see if any can help improve your workflow.
Apart from the IDE/text editor, make sure to spend some time looking into features and productivity tips for your Mac/PC, whatever you use. It is your main tool when it comes to coding, so make sure you are comfortable with it.
There should not be a single thing that is detrimental to your workflow and the quality of your work. If there is, someone online has probably found a solution. Go find it.
Tip #3: Sharpen your micro and macro
There are two concepts you have probably heard of, being a developer - Clean Code and Clean Architecture. I like to refer to them as micro and macro.
Clean Code is your micro - how you write your code, the naming conventions, the style/conventions of your language of choice, the structure of your functions, DSL, etc.
Clean Architecture is your macro - the architecture of your software, the way you structure your files, and what public APIs you expose.
When it comes to the Clean Code, or your micro, there are a lot of things you can do to improve it, but if you don't know where to start, I would recommend Robert. C. Martin's book Clean Code, which popularized the concept. Or just google it, there is a lot of material on the topic. The main point here is that your code should make sense and be easily readable by your fellow developers. Or by you after a year or so.
The Clean Architecture is a harder nut to crack, especially if you are just starting out. For the beginners out there I would recommend focusing on learning Clean Code and the specifics of your language/platform. As soon as you get a grasp of that, learn the most popular architectural pattern for your platform. In the case of Android, it would be MVVM. After that, learn the Clean Architecture, which also has an excellent corresponding book by Robert. C. Martin.
Moreover, all architectural patterns aim to solve certain problems, they have evolved over time and became what they are for a reason. Make sure you know and understand what those problems are, and don't blindly copy the patterns just to use them. It would certainly be better than not using any pattern at all, however, the main point I am trying to make here is if you are doing something, understand the why behind it.
Some would say that in smaller projects it doesn't make sense to complicate the codebase with the boilerplate that might come from implementing a Clean Architecture pattern or any other pattern for that matter, and I would argue that how you do anything is how you do everything. Your attitude towards your work is a habit and it can only go two ways.
Tip #4: Writers are readers
I love books and I am fascinated by the people who write them. Many, if not all, of the most accomplished writers, are first and foremost readers themselves - because of their love for the craft but also to fuel their creativity.
I don't see why it should be any different for writing code.
There are a lot of open-source projects that you can learn from. Tutorials and documentation are often good for learning isolated cases. By reading real projects, you learn how it all comes together. It is one of the best ways to learn both macro and micro. So do yourself a favor and let GitHub become your library.
If a project's author is better than you, you will learn a lot. And if, on the other hand, you happen to be further along on this journey, you can train your brain to spot things that can be improved. You should be doing it with your own code anyway. It is a win-win situation.
And if you don't understand or don't agree with something you see, don't dismiss it immediately. Think about it and understand it. Talk with other people about code. Discuss ideas. Always question your logic. We are creatures of habit, but for many people, unfortunately, habits mean living in the past, repeating engrained neurological patterns again and again without any potential for growth. Just as life can get stale and uneventful because of routine, your code can and will get stale without active and mindful participation.
Here is an awesome curated list for all you Android developers to get you started.
And if you are not an Android developer, you know what to do.
Tip #5: Do not ever sacrifice the quality of your code
In science, there is a concept called entropy - a measure of disorder in a given system. Or in layman's terms - as time goes on, things tend to fall apart. Everything that is orderly, will always tend towards disorder.
Code is no different.
There are many reasons why code will degrade over time and turn into an unmanageable pile of spaghetti on some occasions. It might be a result of poor planning, it might happen because of some shortcuts we continuously take during development, it might happen because of time constraints, it might happen because we lose passion for a project and abandon things at a “good enough” state.
Never stop at the point when your code works. Try to see how you can improve the structure of your code, how you can make your code more readable and elegant. It might sound like a lot of work in the beginning but, eventually, your first drafts will start coming out very close to the final result.
If you had finished your coding session late at night, make a habit of reviewing it in the morning, and see if you still like what you wrote and things make sense.
Avoid taking shortcuts.
When a thought creeps in to make it a little bit easier for yourself, sacrificing the code quality in the process, catch that thought immediately and make it a trigger for yourself to step up your game.
There will be times when you will be pressured by time and will have to find solutions fast. Never see it as an excuse for sloppy code. See it as a challenge and a test for everything you have learned so far. Train yourself to maintain a professional approach to your work and never drop your standards, especially when things are falling apart around you.
And just to make things clear - I do not ask you to write perfect code.
I ask you not to write code that is worse than what you are capable of.
Tip #6: Be active and engaged at what you do
One of my main passions in life is learning how to learn. Trust me, this simple skill is a game-changer for anything you do in life. I love learning and constant growth, and for that reason, I have a major beef with schools and our outdated education system. Don't worry, I will not go on a huge tangent about that, but there is a reason I mentioned schools here.
From a young age, school taught us to sit still, passively absorb information, and expect others to have all the answers.
That is not how learning works.
One of the most important components of learning is being active and engaged, just like you had been learning before you went to elementary.
The same applies to writing code. When you are actively thinking and are engaged in the process, you will make fewer mistakes, write better code, and every coding session will become a learning session as well.
Let's talk about every developer's best friend for a minute. Yes, StackOverflow. Without any doubt, it is one of the most valuable resources for any developer. However, if you are more advanced and looking for ways to improve, I want you to pay attention to how you use it.
Many developers become too dependant on StackOverflow. They expect it to have all the answers to every question they might have during the development process.
You can certainly copy-paste other people's code, and it might be the best piece of code for your problem. There is nothing wrong with that. All I ask you is this - actively think and digest that code while you are at it.
Understand the code and make it your own.
And before we move on, just as a thought experiment ask yourself one simple question. If, as an exercise, you were not allowed to use StackOverflow for one day, and had to search for solutions on your own, in the documentation and the source code, would it make you a better developer?
Tip #7: Take care of your body
And here is the topic I wish got discussed more often in our community. First things first. I am not a nutrition or fitness expert but I feel like this needs to be mentioned here. Sometimes we get too involved in certain areas of our life, often times our career, while forgetting the others. But I would argue that there is nothing more important than our well-being. Especially for us, programmers.
I don't want to beat a dead horse here. We all know and heard a thousand times how bad it is to sit in front of a computer all day, eating pizza, and ignoring sunshine. Much fewer of us have an established routine to make ourselves healthier.
It all comes to priorities. Doing things without seeing an immediate benefit is incredibly hard, especially if the alternative is more satisfying, or doesn't require effort. I can name many reasons why being healthy will benefit your career as a software developer. For one, everyone knows the difference between a foggy slow brain, starved of nutrients and oxygen, and a well-rested brain fueled by proper nutrition.
However, I feel like there are many more important reasons than programming, or any career for that matter, why you should consider shining some consciousness onto the health and fitness area of your life and establishing a health-focused routine that will serve you for years to come. Becoming a better software developer will come as a bonus.
Here are some of my reasons:
I want to have a healthy body and energy to have many adventures and maximize my life experiences in every way, for as long as I can.
I want to be the best lover for my partner.
I want to set an example for my future children of what it means to be a self-responsible, conscious human being.
Find your reasons and make sure they will drive you.
Bonus Tip #8: Improve the interface
With all the heavy hitters out of the way, here is a small bonus one, that helped me a lot in the past couple of months. I have been using computers since childhood, learning how to use one as I went along. As a result, I developed some less than optimal habits.
As we have discussed earlier, we should always learn how to use our tools more efficiently. However, there is one more thing that stands in the way between our thoughts and the final code in the IDE - the interface between yourself and your computer.
Or your hands, for less technical folk out there.
It shouldn't be a surprise that your typing speed will impact your coding speed. However, there is one more benefit for typing faster.
Our brains are incredibly complicated biological machines, designed to process a huge amount of data. And when you force it to slow down, it will eventually become bored, disengage, and your thoughts will wander somewhere else. Just imagine reading a book one word at a time, with pauses in between.
On the other hand, when your hands are capable of putting information into your computer much faster, you will be able to concentrate on your code and more reliably achieve the flow state. You will not be distracted by typos and huge pauses needed for typing out the code. Imagine a master pianist. How good would their music be, if they had to focus on where to put their fingers?
So speaking of my childhood typing habits, I have recently noticed that my right hand is very passive while typing, and my fingers are very chaotic. So I started googling the correct typing techniques and found this incredible website typing.com to help me out.
After just a couple of months of training, my development speed improved a lot, so maybe it will also help you. It has a free version and I am not affiliated with them in any way.
And by the way, your brain will thank you for learning something new.
Before we part our ways...
... there is a last piece of advice I want to give you, especially, if you are just starting out as a developer. If the amount of information feels overwhelming, in this post or anywhere else on the web, don't sweat it. And don't even try to implement everything at once. Pick something, one small thing, and see if it works for you. And keep adding to it as time goes on. Remember - little by little, a little becomes a lot.
The main point is not to memorize these tips or perfect everything I talk about here. The main point is to constantly try out new things and see if they benefit you in any way. The above-mentioned tips are those that stuck with me and helped me tremendously.
Be curious and experiment.
See you next time.
To growth, and learning,
Did you find this article valuable?
Support Max Kim by becoming a sponsor. Any amount is appreciated!