Ravi 2020-07-02 12:03:26
In this article, we’ll see how to learn programming in a proper manner. This article would be useful for both, the job-seekers and students.
1. Get familiar with a programming language
Getting comfortable with a programming language is the first step towards learning programming. People often start with C, C++, Java, or Python. I personally prefer C++ in the beginning as it is neither too simple (like Python is), nor too deficient in terms of libraries (like C is). C++ is pretty fast and has a good library support too - best of both worlds! Also, C++ is a good choice for competitive programming because it is pretty fast and has the support of Standard Template Library (STL). The choice of the first language is highly subjective based on your interests and goals. You may be interested in front-end, back-end, mobile app development, game development, data science, etc. If your main aim is to get a job then do check out our article on which programming language is best for getting a job?
You can start with learning the basics - syntax, data types, variables, loops, arrays, etc. Try to solve simple implementation-based questions so as to get familiar with these basic concepts.
2. Learn Data Structures and Algorithms
Once you are comfortable with any of the languages mentioned in the above section, the next thing you should do is learning data structures and algorithms. Data structures and algorithms help in building the right aptitude required for programming. Knowledge about the data structures will help you in choosing the right one for the problem you are solving - not all data structures can be used everywhere. When you learn about the algorithms, you will be able to understand the working mechanism of many library functions, which, otherwise, would come across to you as black boxes.
There are many good online courses that you can study from. Algorithms part 1 and part 2 are good courses to start with. It is important that you spend time thinking about the implementation of these data structures and algorithms so as to get comfortable with them. You may think that learning their implementation might not be important as ultimately the library functions are used. This is one of the most common misconceptions people have. Understanding the implementation will help you in assessing the time complexity, which will help you in further optimizing your code. There is an amazing website, Visualgo, where you can actually visualize the working of the various data structures and algorithms.
3. Get your hands dirty with competitive programming
Once you have learned data structures and algorithms, you should start solving problems on websites like SPOJ, Codechef, Codeforces, Topcoder, Hackerrank, Geeksforgeeks etc. The more problems you solve, the better it is. It is better, though, to solve problems in increasing order of difficulty. You can sort the problems in descending order of the number of submitted solutions and start solving. After solving around 100 mixed variety problems, you will become confident about your programming skills.
After you have become comfortable with solving the questions and coding the solutions, you can then start participating in various online programming contests. Doing this will enhance your programming skills a lot.
4. Make a project
Now that you have enhanced your problem-solving and programming skills, it is time to create some useful applications. You can pick up some popular web development framework (Django, Flask, Ruby on Rails, etc.) and make a project using it. Making an application will give you a feel of actual software development, which is what most of the programmers do.
Once you have made some web development projects, you may like to try your hand at Android or iOS development. Don’t restrict yourself - learn whatever you want to!
5. Explore
Once you are confident about your programming skills and have made some projects, you should now go on to explore the various domains of Computer Science and see what fascinates you the most.
Computer Science is a vast and rich field, with many interesting sub-fields. Some of the popular domains of Computer Science are Artificial Intelligence, Machine Learning, Cryptography, Cloud Computing, Systems Programming, Computer Vision, Natural Language Processing, Blockchain, Virtual Reality, Web Development, Mobile App Development, and many more. You should try to explore as many fields as you can so as to know where your interest lies.