Write Code Every Day If You Can
Photo by Colin Watts on Unsplash
Yeah, your code doesn’t work, but it works. But the fact is, you need to write code every day, whenever you can, even for five minutes. There is a saying you might have heard, “Don’t be a coder, be a programmer,” or something similar like that. I have some disagreement with that statement. Actually, you need to write code almost every day to be good at it.
Let’s talk about something different before making any arguments about what I said.
Do you play guitar? If not, you may have a friend who is good at it. By “good at it,” I mean someone who can shred, not just play some simple rhythms and stuff.
Photo by Angel Balashev on Unsplash
Being Consistent is the Key Link to heading
So, I’m a guitarist myself, and I have been playing guitar for quite a long time, and I had those days practicing scales, runs, arpeggios, sweep picking, etc. with a metronome for 7-8 hours a day to reach a good speed (I didn’t do that for long :D). Now let’s say, after hours of practicing, a guitarist is able to play a pretty hard string skipping arpeggio (maybe one from Paul Gilbert or an arpeggio in his style). It usually takes a few days to play those kinds of arpeggios at a decent speed, like 100-120 bpm (beats per minute).
After 1 or 2 weeks of hard practice, the guitarist can now play at 120+ bpm effortlessly. After a month of practicing like this, it will become so easy that the guitarist will be able to play it without looking at it. But if that person stays away from playing guitar for a week, the accuracy and speed are gone. Even playing a few notes on the guitar fretboard perfectly hurts the fingers.
After reading this part, you might have got the point I’m trying to make. Be consistent! It’s so important and overlooked at an early stage of people’s careers that a lot of people like me ignore it, then get back to it when they realize it’s a bit late (it’s never too late to be good at it). And you will need strong courage to spend long hours of effort trying to learn something. Maybe developing a tool!
Reading code is one of the most essential skills for being a good developer. You need to read other developers’ code or some good open-source project that is well known to the community for its good coding patterns. But I always found that reading code kind of gives me the vibe that I’m not away from coding, but if I go to solve a problem right away, it’s taking time to build the logic.
To stay sharp while building the logic, you will need to write code consistently. You will see that if you solve a little coding problem every day for a while, you will find that you can build up the logic and debug in your head for some small problems. Or you will also find that you can sometimes debug the code in your head just by reading the code. This is such an important skill and can be achieved by just practicing effectively for a few minutes a day.
Photo by Luca Bravo on Unsplash
Practicing and Deep Work Link to heading
But don’t forget to take a break! Working in small sessions always works best for work that requires deep focus, instead of trying it hard for a prolonged period of time.
Deep work is different, though. Practicing, learning, or working on something with deep focus is different. So, I’m talking about practicing. Like playing guitar – maybe those beginner fingering exercises make you good at playing the notes on a guitar. But if you want to create music or learn how to play a good musical piece, you will need good concentration and deep focus. It is essential to have the skill – how to play the notes on the guitar – before you can play good music with emotion.
There is a saying that “practice makes a man perfect”! Alright, you get the point. Sometimes you just need to write code with or without much thought to build the memory muscle needed for building logic with coding.
So we don’t take a break? Of course we need to take breaks; that is another important part of the process of mastering a skill. Taking a break should also be a consistent thing to do. Every weekend or every month, you can keep yourself away from writing code. To grow the muscle properly or fix up the torn muscle, like the way it happens when you work out in the gym. You may know that for gaining muscles, the recommended way to do it is to take a 48-hour break after doing heavy weight lifting and working out.
However, for coding, it’s somewhat different, but the pattern is the same. You take short breaks every day and a longer break on the weekend. But the harsh truth is that if you are starting to learn something or mastering a skill, you should keep the break as short as possible. Save those longer breaks for your future self! It takes 10,000 hours to master a skill, you know?
Final thought: for learning something new or becoming a master at something, things work differently for different people. Figure out what works best for you; if you are not sure, just keep practicing and learning with consistency. It’s hard to figure out just by yourself if something is for you or not, at the very beginning. You will need some time to gain that knowledge and wisdom.