My first encounter with Python came in the break between my first and second semester of engineering. I was desperate to learn some cool skills to show off on my resume and almost everybody I knew recommended learning Python to me. At first, I was awestruck with all kind of things you could do with a single tool - wrangling data, websites, making games, and all other stuff. However, after a while of struggling through Python tutorials in my first attempt, I gave up and didn't even touch programming for at least half a year.
Here's what went wrong.
Ask yourself why do you want to learn to code? Is it to implement a project idea? Is it a requirement for your job? Or maybe something else which is compelling enough to keep you motivated. If you simply dive in without any concrete aim in your mind, you'll end up like me when I first started. I had no clear picture of why I wanted to code apart from the fact it seemed cool to me, and for some reason, I picked up a Django tutorial to be my gateway to the world of programming. This was a gross mistake which brings us to the second point.
It is not advisable to write code without learning the basics first. The theory has to precede the practical unless you don't care about actual learning and no, you will not pick up everything as you copy-paste the code mindlessly.
I didn't know how to write even pseudo-code and I had zero knowledge of how websites worked as I shamelessly imported Django all over my code without having an ounce of idea on what I was doing. In the end, I managed to finish up the project, but when asked to explain how it worked? I couldn't come up with anything.
My second homecoming to Python.
After around 6 months of sabbatical from coding, I started exploring ideas and products instead of what languages to learn to put on my resume. I stumbled upon a couple of GitHub repos of projects based on machine learning and I got an idea of appending more components to them.
That's when I first got into machine learning and after some dabbling, I started the famous Andrew Ng Machine Learning course on Coursera. I was finally learning the basics this time. While doing the course, I was always looking to relate the lectures with my personal objectives. I tinkered with the code with an aim this time around and finally amended the mistakes I had made earlier.
Later in my sophomore year, I did a project where I had to build a prototype software which required me to learn computer vision. This was an immense boost to my programming journey because I had a specific target set in my mind. It was no more about looking cool or whatever, it was about delivering a tangible result.
Programming is overwhelming and the reason most beginners quit after a first few videos on the tutorial is not that they're lazy, but because they don't see a point of continuing once they get the "feel" of it. There is no intrinsic factor that tells them to carry on even if they don't feel like it.
Are you getting into programming for superficial reasons? Think again.