How to Become Better at Coding

These 5 steps can help you in ways you won’t find anywhere else

ShahZaib Mushtaq
4 min readSep 25, 2023
A person writing code on a laptop while sitting in the dark
Image by Robinraj Premchand from Pixabay

When people try to enter the world of IT especially coding without any much prior knowledge for a better career, they either start looking for bootcamps or e-learning materials.

There is absolutely nothing wrong in that. A working laptop, an internet connection and dedication are more than enough to begin this journey. I will do my best to explain which habits are most useful for learning to code.

Here are a few things to keep in mind if you or someone you know is considering a career change.

1) Code dirty

This is one of the favorite habit of children. They aren’t afraid to play in the dirt. I strongly insist on bringing this habit back when it comes to coding. Write as many lines of code as needed to solve a problem. Code to find the solution, not to learn best practices and good habits of coders.

Most importantly, write on paper first then type in code editor.

Open new project every time when you stuck somewhere. Do not copy and paste. Never think about writing clean code for a second. No shortcuts please.

2) Code alone

Book readers, lab researchers, athletes, innovators and doers deeply acknowledge this habit of being alone and reap its benefits. Recently I posted on X/Twitter to communicate the message behind it.

Learn 3 hours a day alone without interruptions from the outside world. Yes, you can go to the toilet. Avoid snacks. Must be deep work. Keep pen and paper close at hand. No fear please.

3) Code everyday

The urge to master something fast makes a person impatient. Coding everyday does not mean 7 days a week. Get into the habit of coding for 3 hours a day plus the number of days you can do it in a week. Stick to this for 6 months straight. Leave Sundays out of this because chances are you will ruin that coding habit and not enjoy your precious time. No immaturity please.

Practice makes progress, not perfection.

BTW I like the #100DaysOfCode challenge which is quite popular among new learners.

4) Code small projects

You will find dozens of small projects on the internet. Start small. Build them from scratch as much as you can. Type each line. Add your own twist.

Learn the hard way so you can understand the smart way to code.

To build logic, practicing small projects plays a vital role. Trust me, learn coding by doing. Big projects for practice cause anxiety and depression because of their complexity, but small projects improve coding skills slowly and steadily. No rush please.

From personal experience, during my software engineering degree my lab instructor didn’t bother to explain anything theoretically and assigned me to build a small project with two functionalities — Take input from the user and print that input on the screen. That’s how I learned the basics of OOP.

5) Pseudocode

After following all above mentioned steps only then pseudocode will help you to code the right way. This is an underrated habit among most programmers.

In simple terms, pseudocode is a recipe for how to code any task.

Pseudocode (assumed code) can be defined as a methodology for writing out code in a natural language such as English or of your choice. It is not the code itself, but rather a description of what the code should do. If you can write assumed code in plain language to construct algorithms and programs, you can write in any programming language of your choice.

The core objective is that catching errors during the pseudocode stage is less costly than catching them later in the development process.

Pseudocode has many advantages. Above all, writing code will become much easier and faster when the programmer goes through the process of developing and generating pseudocode.

Hence the term “think twice, code once.”

Final Thoughts:

These are steps like on the stairs. You can skip anyone you do not like. By skipping all these steps, you will never be able to climb the stairs.

Remember one thing, consistency is the key and discipline is the key chain. All mentioned steps will ensure how to be consistent to finish everything with discipline.

As a human being, I make mistakes and try to learn from them. If you find something wrong, please feel free to comment.

You can follow me on X/Twitter where I post daily about how to start, innovate and code.

--

--

ShahZaib Mushtaq

!an ordinary software engineer. I write for myself so that everyone can read it.