Imagine that you’re sitting in front of a computer for hours, looking at strings of text that would seem like jargon to the inexperienced eyes. Imagine that you have transcended the need to sleep, forgotten that it was far past your dinner time, and you don’t even remember what day it is.
Suppose you’re so engrossed in that little world of 1’s and 0’s that you’ve forgotten to call back your significant other, or your family.
If you were able to picture yourself in that state of disarray, then well done. That is what you’d look like, if you were to start coding as a hobby.
Sounds really unhealthy and bad, right?
Not to sound condescending in that little voice in your head you have given me but, let me tell you how you’re wrong, and point out exactly why.
When I see people who start coding, they don’t approach the field in the way I would want them to. They start reading books and watch videos. Download and start using Codeblocks with shaky hands, while smiling at every bit of success (no pun intended).
There is nothing wrong with that.
But if you were to start and continue like that, you would eventually lose interest in this beautiful thing, you see? It is like cooking. If you start to measure the ingredients down to the very grams and milliliters, you would end up with a beautiful dish, no doubt. You’d get praised. But after a while, you would get bored of measuring cups.
On the other hand, if you were to cook whatever your heart wanted, and continued to do that regardless of what people say about your cooking, you’d be happier. More satisfied, and eager to …”cook”.
(Please don’t accidentally poison people, though)
“Well”, you might be asking, “If not by books and/or Youtube videos, how am I supposed to learn?”
Actually, I would suggest taking up problem solving.
If you read books, that is okay. Watching videos is also great. But if your skill remains unused, would you feel satisfied to learn something? No, of course you wouldn’t.
It would be insanely boring.
So, to start things off:
1. Get a basic understanding of the syntax of the language you want to practice with.
Many start with C or Python. Books help. Get suggestions from a veteran, or Google resources. Youtube videos get you going with a basic crash course as well. Personally I support starting with C, and learning the basics of the language from a book, as you can read at your own pace. Tonnes of places like Khan Academy, Coursera, EdX, Data Camp etc, offer amazing free resources for beginners.
2. Go to codeforces.com
Visit codeforces.com, make an account. See the problem sets, and find something that you know you can solve with your current skills. Remember that the problems challenge your ability to ‘think’, not your ability to ‘code’, properly.
In most cases, the first submission you make, will probably fail the confirmatory tests (automated by the site). If it passes, don’t worry. You’ll eventually hit a block. They will show you that your submission was not acceptable, something that IS designed to make you feel disheartened. You checked all the syntax, and tested it out on Codeblocks, but you didn’t find any issues with it.
Then, with a heavy heart, you go to the test results, and try to see why your code failed. If you still don’t get it, you ask a friend to inspect the code for you. (Don’t be shy to ask. In the world of coding, newcomers are gladly appreciated!) When you find out the problem with your code, you’d see that the reason why the code failed, was not at all because of your syntax, but because you failed to think of every possible scenario.
The corner cases, the dead ends, the exceptions. These are the tests in which your code will probably fail.
After your code has been properly corrected and shaped into the perfect solution, and after submitting that code again, your submission finally gets accepted.
You feel happy. Some of you feel overjoyed. Some smile just a bit.
And that is where the fun begins, believe me. That is how the train leaves the station. It starts out slow, but once it gains momentum, no one can stop you.
3. Try new problems
After that, you see new problem sets. You think and find a solution to each of them. If it fails, you try to think of new techniques. You see more efficient solutions to the same problem you just solved.
Before you know it, you’ve become a junkie. You’ve become someone who gets a certain ‘high’ whenever your code works.
More time passes, and at one point, you aren’t satisfied with problem sets anymore. You need something that challenges you on a higher level.
4. Now that you’re getting better, what next?
Worry not, for options there are, young Padawan. Marathons and Contests. Made for the best of the best.
After you’re done with a session, I would suggest taking a break. This will help with retention, and would also make you sharper.
5. Make the journey with a friend or two
If you want, I suggest starting this journey with a friend or two. A small group. This will accelerate your progress and continuously motivate you to achieve more as a programmer in training!
Now, when you think of coding, you aren’t afraid of the huge amount of information and the learning curve. Rather, you get a pleasant sensation. Power. Strength. Aptitude.
You can now think of a dozen ways to solve daily life problems, find ways to automate boring tasks, even jump into some fun projects on Github.
see also: Case Solving Guide (Tips and Tricks)
All the while, having fun on each step. Goosebumps on each success!
You may be asking, “If it was so easy and fun, why don’t all the people my age do this?”
The answer is simple.
Remember the first time your code didn’t work? They were not strong enough to find the motivation to go forward. While you were able to take that first step, into a magical new world… or maybe its because they have grown sick of measuring cups, if you know what I mean.
Now, what are you waiting for? A beautiful journey awaits you!
Visit 10 Minute School’s website www.10minuteschool.com
If you want to unleash the writer in yourself and contribute for 10 Minute School, simply send your write-up to the following e-mail address: [email protected]