In this article, I will try to teach you the mistakes I’ve done on my recent project. This topic is quite subjective and can vary between people so, here are the mistakes that I wanna share which are common to most developers.
I know you heard this word enough times from other people not just from developers but the thing is apart from sleep helping your body to be healthy and reduce the risk of heart disease and more, it helps you fix bugs. Yup, I said it, you can fix a bug just by taking a nap.
That doesn’t mean you need to knock yourself every time you see a red squiggly line in your IDE, if you feel tired just take it easy… I believe in you, you can do it.
Distractions are not just Twitter/Instagram notifications it also includes people and things around you. Anyone who is actively asking you to fix their printers and the old window squeaking on the breeze… put a stop to it.
Clean your room, arrange your stuff in order, take care of other personal events before you start working. And try to use the focus mode feature on windows or DND in macOS to avoid any emails popping up. Yes, you will miss out on work emails too, so configure the focus mode to only allow certain emails (not sure if it's a feature). Listening to music isn't a distraction unless you are singing with the rhythm👍.
Serve on roti at a time
I know you wanna solve all the issues at once but it's hard and might become impossible this is one of the reasons people might give up on projects.
Take an issue, fix it. You have enough time, if you cant fix it go to the next step.
Working with a partner can speed up the amount of work done and as each person working on a different set of problems you can easily review each other code with a fresh pair of eyes and find issues before release. But you don't necessarily need a partner for every project just asking a friend will help, he/she doesn’t need to be a programmer… Just explain the problem and ask them how they would solve it. More reasons why this could help,
- They never saw the code so they will read the whole code without skipping on lines.
- Their way of solving a problem will be different than you, hence you gain new experience and get the problem solved.
- As the other person doesn’t have a perfect view of the problem they often bring more solutions (or dumber solutions) that could potentially lead to a better solution. The last statement might sound stupid but it works.
Learn the IDE
Its always been a debate on which IDE is the best for a particular language. My answer is it doesn't matter, just pick an IDE and start learning it, you might be wondering “I can't even learn the language how am I gonna learn the IDE”. Well don't do it in one sitting,
- Start by learning the key bindings
- Then try to navigate through the files just with the keyboard (believe me most IDE’s are capable of running just with the keyboard).
- Configure it for your needs… Set custom themes, fonts, alignments of the IDE components. JUST DON'T USE A LIGHT THEME😅.
Do it with moderation. Listen you are not a computer, you cannot learn everything and certainly not in one sitting. It takes time for development and you must accept it.
I wanted to put this topic here coz most of the newbie developers think that they need to learn a technology fully to be better developers. But in reality, is near impossible, coz for example you learned to eat… Now for me(as an Indian), we eat with our hands and maybe spoon if required. But I can tell someone that I know how to eat even tho I don't know how to use a fork, chopsticks, or spoon and knife. Like, I don't need to know EVERYTHING about eating for me to be qualified to eat.
Just like that, you don't need to learn every method and its arguments and its return type of TensorFlow or PyTorch library to be a NN developer. You learn what your project demands you to learn and that’s all that should matter.
DO NOT FOLLOW THE ABOVE STEP IF YOU ARE IN SCHOOL/COLLEGE
This depends on your project but can speed up your time spent on file explorer searching for a file or searching for a file with a specific line of code. Again, when I say learn the command line I didn’t mean you need to learn the whole UNIX/UNIX-like commands. Learn what you want, eg. Changing, creating, deleting directories and files, compiling source codes, and setting up aliases. Using the command line alone might seem wired but if you are using a budget machine for development you will thank me. If you are interested in command-line programming check this out.
Automation is not gonna replace your job and no, you are not going to forget how to do something just because you automated it. Just automate something if you feel like you are doing the same thing too many times. If someone asks just say it's your “CI process”.
- You always want to test your code and format it before committing so instead of typing out the e2e or unit testing and formatting commands just use git hooks.
- You want to send a preview version of the application to your testing and quality management team before exposing it to production. Automate it with a simple python script.
Read the DOCS
“You should read the documentation”. I wouldn't be the first person or last person to tell you this but reading it will help you in the long run. But nowadays Stack Overflow answers are demanding explanations so you will very less likely read the documentation but if you don't understand the Stack Overflow answer, just read the docs, it's free and safe.
- Follow the official style guidelines.
- Follow the official or most-used formatting tools/techniques.
- Follow the official coding conventions.
- Use comments only where it's necessary.
- Use proper names for folders, files, variables, functions, classes, and other stuff.
- Try to do all the above while you write the code rather than doing it later.
Get off your chair or toilet seat wherever you do the work and do something else. My suggestion: just go out and stare at the sky with no thoughts, trust me it is mind-opening.
Or do what you like for at least half an hour or until you get the idea to fix the bug or to implement the code. But make sure at the time of the break you don't think about the code… coz while solving a problem for long, we get into a loop where you start thinking too closely to the problem and might miss some obvious mistakes, and the more time we spend on the problem the deeper you fall.
Track your work
Use some software to track how long you spend on each application. This will help you fine-tune your work-life balance and can help you spot the times you wasted that you didn't realize. I use a software called Manictime it looks old but it gets the job done and I use Wakatime to track the time spent inside the IDE.
Don’t comment out the buggy line
As time goes, we tend to just ignore a faulty line of code by just commenting it out, which may seem like a good choice but it isn't. The more you offload the work to your future self, the more you gonna cry, so find the mistake and either fix it or remove the buggy line of code.
Use some kind of SCM to manage your versions other than creating many copies of the project named “To-do-List 1”, “To-do-List 2”, “To-do-List 3”, “To-do-List final 1”, “To-do-List final final”. Even if it is a small project it's better to manage its version to make sure if something goes sideways you have the opportunity to retrieve the old versions.
Without version control, I would’ve lost my mind and given up on the project a long time ago. I have reverted back to my old commits because I messed up the code so many times than I thought and without doing so, my development cycle would be a disaster.
There are other things to consider to be a better developer but this is all I got from my recent work.
That's all for now… Thanks for reading, Adios ✌️