Since everyone here who writes code wants to get better in coding so as you see the title, I am sharing these 5 tips that I follow to get better in programming.
This tip is especially for beginners and that is to keep it small. Talking from personal experience, I've been coding for almost 3 years now, and a mistake that I've made is from the very beginning when I started learning to code (I started learning java), I learned the syntax and I jumped straight into making big projects and the same mistake I made when I learned react as well. I started watching tutorials and just started following them which also got me into tutorial hell. So if you are starting to learn to code, just practice the basics as much as you can and make small projects in the beginning. If you are learning react don't jump straight into any stack instead just make apps to print some stuff in the console. Make components and try to understand the workflow of your app and when you get comfortable with the whole concept, then you can choose to advance to the next level.
What do I mean by that?
Remember when you get into this field, you are going to see people writing better code than you. Their workflow would be well managed or they might be using more third-party libraries you might've never even heard of and you think they are better than you well of course they are but it doesn't mean you can't too. Everyone has a different approach to things so instead of thinking other people are better than you, start to read and understand their code and try to adapt those changes and implement them in your code.
As a developer, it is good to have the ability to google-fu but using too much google can also affect your logic building capability so try not to copy too much code from google instead just try to understand the concept and make your own logic according to the project you are working on.
The best way to learn to code is to apply the skills that you learn by making projects. You don't have to make fully functional web apps just from the beginning, just keep it simple. Make apps like a todo list, calculator, counter, or landing pages. When you get a better knowledge of the skills that you've learned, then you can easily upgrade your skills and make big projects.
Writing clean code is not an easy task!
When you write code, your code should be readable to others as well which can increase your value as a developer and it'll be easy for other developers to collaborate with you. There are a lot of practices out there on how to write clean code and it can be confusing to know which practice to follow.
- Use meaningful names for your variables and functions.
- Make one function do only one task.
- Divide your code into different files or if you are using a framework like react, divide your code into separate components.
- Use comments to clarify your line or block of code.
These are the tips that I follow to increase my productivity and I hope it might help you too✌️.