TopImage

I started to teach myself how to program a few years ago. Since then, I have built three WordPress sites, one landing page, one e-commerce site, one desktop app, and one web app. I still see myself as a mediocre programmer, but I have learned many along the way. This writing is simply a list of things that I try to keep in my mind when I program. I hope this can help somebody who just started to program.

1. IT IS ALWAYS YOUR FAULT

Computers do exactly what we tell them to do. I really wanted to blame the computer(well, I did), but 99% of the time, it was my fault. There is always a reason why it doesn’t work, and that is because you failed to program properly.

2. STAY CURIOUS

Programming is intimidating. You will want to get emotional and swear a lot. But do NOT do it because it is gonna make your mind narrow. It will just slow down the process of problem-solving. Instead, be curious. Ask “Wooooow, what is this? Why is this happening?” with a sense of wonder.

3. LOOK FOR ALTERNATIVE WAYS

If you get stuck, ask yourself “How can I do this differently?”. Look for alternative ways to get the same result. Usually, there are several ways to program. Some people might argue that we should choose the most elegant way, but if you were a beginner, start with making it work. Worry about the elegance later.

4. ERROR IS YOUR FRIEND

It is good that we know there is an error. Otherwise, we don’t even know that there is a problem.

5. BREAK DOWN THE PROBLEM

When something is not working, don’t try different solutions randomly. Figure out where the problem is at first. Is it this JavaScript file or another one? Is it this function or that one? Identify the problem first, and then cure cancer. Don’t just throw darts in the dark.

6. START BUILDING SOMETHING

Programming books are incredibly boring. Online courses are so much better than books but still lame compared to actually building something. Start building, and learn as you go. If you don’t have anything you wanna build, get a contract work. Fake it until you make it. Or, you can work for free. Put yourself in the situation where you HAVE TO program.

7. TALK TO YOURSELF OR TO YOUR YELLOW FRIEND

When we don’t know what the hell program means, we are more likely to be distracted. The trick to avoid this state of mind is to talk to yourself. I talk to myself even out loud(I know it’s weird). Or you can try the rubber duck programming. Get the cute yellow rubber duck, put him next to your computer, and talk to him(yes, this is even weirder). Talk to him about the issue you have and discuss how to solve that problem. You will notice the problem becomes clear as you talk to your yellow friend.

8. HAVE A LONG UNINTERRUPTED TIME

If you were interrupted while you are playing a chess, you will have to think from the beginning again. Programming is the same. Programming requires long hours of focus without interruption. Usually, keep a few hours of uninterrupted time is good, in my opinion.