How to be a better programmer

How to be a better programmer

Few tips on becoming a better programmer and improving your craft

“Anyone who stops learning is old, whether at twenty or eighty. Anyone who keeps learning stays young.”
- Henry Ford

Let me start by saying this - you do not need a fancy degree in computer science to start a career in programming. If you are really passionate about coding, you can easily get started. All you need is a computer and an internet connection. With so many high quality tutorials on the net, it is easy to get hold of the basics of any programming language. But it is not just about watching tutorials that make you a good programmer later on, there are other ways in which you go from a “beginner” to “good” programmer.

This is going to be a long post, so here is the tl;dr:

  • Start with the basics
  • Take your time
  • No worries
  • Read and watch
  • Personal projects
  • Try a Unix based OS
  • Get into the community
  • Find a mentor
  • Share your code
  • Practice! Practice! Practice!

Not satisfied with the tl;dr? Moving right along!

I first started coding in school where had C++ as a part of our computer science curriculum. I was instantly hooked to it. The idea of making the computer do what you want by giving it instructions, was fascinating. Thought it was very far from any professional application development, it was really fun and joyful experience. Just a few command line programmes, little bit of coloured text etc. That ridiculous blue background in Turbo C++ seemed geeky those days. But those were the humble beginnings. It was also the time when Microsoft Frontpage was a hit. I remember creating a Formula 1 website on my local machine with images from the F1 2002 game. It was just a collection of pages for different circuits around the world. Buttons with ridiculous colours and hover effects. Those were the days when web applications were slowly taking over the world.

First time I ever coded professionally was after getting a job. It was an application on .NET. Though it was not a great complex app, I learnt ventured a bit deeper into programming. I did not want to pursue .NET for various reasons. It was around this time I started learning serious HTML, CSS and PHP etc. Throughout my programming life, I have learnt few things which I shall list down here which might be helpful in choosing the right path to grow and excel in programming. Few of the tips can be applied to learning in general as well.

Start with the basics

Like with any field of study, always start with the basics. You always learn ABCD… before you learn Shakespeare’s sonnets. Same with programming. Do not venture into frameworks and libraries before you get a hold of the basics of the language that you are trying to learn. If you are planning on becoming a web developer, start with basic HTML and CSS. These will help you in learning how to structure a web app and create various user interface elements like buttons, text boxes etc. Or else if you are learning any particular language like python, php etc, start from the basics. There are few very good resources online to learn the basics of computer languages. To name a few, The New Boston, PhpAcademy are awesome channels for beginners. Darek Banas’ YouTube channel has videos where he teaches the fundamentals of languages in one single video, which should be good enough for you to get started.

Take your time

Do not try to rush things while learning. You might hear someone talking about few things you might not have yet learnt. Do not get overwhelmed. Accept that there are people who have started much before you and know more than you. Slowly but steadily, you’ll also reach there. Remember, Rome wasn’t built in a day. Be focused on your core subject and do not get carried away. It is very possible for you to get carried away and put yourself into trying to learn multiple things at the same time.

For example, you might be trying out HTML and CSS and suddenly you hear people talk about jQuery and how awesome it is. Your mind starts racing thinking that you need to see what it is. And before long you see yourself deviating from learning what you need to and getting distracted a lot. Do not do this. Programming is an endless ocean and there are many many things that you can try and learn, but you don’t need to. Being good at few things is better than trying to learn everything and getting stuck. Once you have mastered something, then move on to the next one. It is always good to know JavaScript, jQuery and little backend languages to support your development career and give more dynamic nature to your application. But take your time and venture into learning them.

Similarly, if you are trying to be good at a language, go to the basics. Do not get into a framework directly. If you want to be good in PHP, start with basic PHP and not Laravel. Want to learn HTML and CSS, do not start working on Bootstrap. Though as incredible Laravel and Bootstrap are, they are not ideally a good starting point. You end up missing a lot of behind the scenes action. Once you have built up some experience with the basics, you can venture into frameworks as you’ll have a better understanding of everything.

No worries

There might be many moments where you feel like giving up completely. Like with any skill, it takes time and a lot of patience to excel in programming. Consistency is the key. It is a really good idea to document your progress. Simplest way would be to have a journal or a blog. It can be private or public. Keep a track of your daily progress. In few months, when you look back, you’ll realise you’ve come a long way. I remember having a private blog which I used to document my progress with PHP and web development. Read and watch

Reading about coding and watching good tutorials help you take your skill to the next level. There are tonnes of tutorials on various subjects on the internet including free and paid content. Trust me, it is always worth paying for a good programming class rather than college. My first investment on learning which I am truly satisfied is Laracasts. Watch and learn and move on.

Personal projects

The importance of doing personal projects can hardly be undermined. I always advice my juniors to have a personal project which they hack on during their free time. Learning is one thing, but when you try building a real application is when you learn how to implement those ideas into real life solutions. When I first started learning PHP, I decided to build a simple social network (I heard of the Facebook story, so choice was obvious). As I started, I realised that it was not an easy task and that there were lot many concepts which I still had to learn. When you go and look for a feature, you understand the concepts behind it. For issues which you run into, you check Stackoverflow or related websites for answers. Trust me, Google will be your best friend!

Try Unix based OS

This is from my personal experience. I have been a windows user since I first got a computer many years ago. But it was a moment of enlightenment when I tried out Linux (could’ve tried Mac OSX, but was too expensive). It was a turning point in my development life. For various reasons, its better than a windows system for development. I am sure many will disagree but it stays the truth. I will list the reasons in coming blog post in future. Terminal will be a very useful tool if you care to try.

Get into the community

Every technological platform has a community around it. There are a group of developers who dedicate their time and effort in maintaining and improving it. Get in touch with them and be a part of that community. Join the twitter network, forums etc. For example, Laravel has a thriving community around it and I started by following key people around it like Jeffrey Way and Taylor Otwell. I knew Jeffrey from Tutsplus network. Since I followed him from there, I knew he was a part of Laravel community as well. You learn a great deal from these people. Some communities even have podcasts. Listen to them. Get involved in active conversations.

Find a mentor

Find someone from the community who can be a mentor. Developers are very social and if you ask nicely, they’ll help you out. All you need to remember is that everyone is busy, so don’t be demanding to them. Having a mentor is a priceless as you have someone who is experienced and can show the path to being better in what you do.

Share your code

Practice social coding. Do not be afraid to share your code with someone else. If you don’t, you’ll never know if you are in the right path. It’s like creating a lovely piece of music and not letting anyone else listen to it. When you share, you get feedback. It may be negative or positive. Accept it and strive to be better. People who have more experience and are smarter than you, can tell you exactly the path to take.

Practice! Practice! Practice!

I don’t think this needs to be explained. Happy coding!