How to be a good programmer?
What successful developers have in common?
In this post, I will tell you about how to be a better developer.
Keep in your mind the list below to become a good developer.
How to be a mature developer
1. Say goodbye to egoistic
- Life is a boomerang. What you give, you get.
- The more you share your own knowledge and experience, the more you get it.
- Seek and accept input from others, especially when you think it’s not needed.
2. Be responsible
- Don't just get the job assigned to you and forget all about it, forget your stakeholders when the clock hits 5 PM.
- If you make a fatal error in production server, do everything in your power to fix it as soon as possible, even if it takes all night long.
3. You are not perfect person
- Understand and accept that you will make mistakes, so you need to find them before other people see it =)).
- Fight for what you believe, but gracefully accept defeat. Understand that sometimes your ideas will be overruled. Even if you are right, don't take revenge or say "I told you so."
- Software without bug is not a software. So every criticism should be listened to and learned from because that's what makes you better at what you do, especially if you're criticized by people who have more experience than you.
4. On estimation
- Deadline is a goal so make your feature "done" before it comes.
- Create a work order and use 80-20 rule (use 20% effort to make 80% done).
How to write beautiful code
1. Read source code of famous libraries/frameworks
- You can't write good code if you don't know what is good code looks like.
- Reading code will help you quickly find other developer's mistakes too and this helps a lot if you do a code review or pair programming.
2. Slow down
Take more time for evaluating the problem you try to solve. It helps you have an overview of your problem, so you can cover more case of business, faster coding and don't do a job twice.
3. Know your tools
- Today, many tools (IDEs, extensions, libraries, frameworks) can give you solutions for your scenario, help you generate code, check your code or make it readable and so on.
So you just need to know (understand all feature and use their hotkey instead click on it) and find what tool you need then you can speed up and make more productivity.
- The best code is no code at all.
- Comment your code.
Make your code as readable as possible. The best comment is no comment at all.
If a code block really complex, you need to write some comments for other or for yourself can understand it quickly when working on it.
- Always prepare for the future.
Make your code easy to maintain (less code, less complex, less bug) and upgrade.
Apply good architecture for your project to make it easy maintain, upgrade, fix bug such as MVC combine with 3 Layers and Dependence Injection.
- Log exception and important information from request to trade your bug.
- Always validate 2 slides: client site and backend site.
- Write unit testing for main cases of important features: unit testing take not a little effort. So if you don't have enough effort, just test main cases of important features.
- Split each feature in a separate branch and write a useful comment when you commit your code.
- Configuration your project
Make it easy and fast to build.
Using solution folder to readable your architecture
If your team using ReSharper, make .dotsetting file configure ReSharper for your project
Use README.MD file to guide newbie
5. Learn new techniques
Always be open to learning new techniques and decide how they can help you be a better programmer.
Be open to new things all the time, don't just dismiss the latest trends because you think they'll pass. Everything is cyclical, but what's constant is the knowledge you're left with by opening your mind to it.
A good developer never stops learning, even with 15 – 20 years of practice behind him.