How to Start Programming and Begin Problem-Solving: Practical Methods
Ankit Kumar Jha
Global Rank 50 on GeeksforGeeks | Knight @Leetcode (1400+ problems / Max rating 1974) | Python and JavaScript Developer | Open to Software Development Opportunities
I've been getting numerous direct messages asking about how I earned the Knight badge on LeetCode in just five contests, alongside nearly 5-6 calls, each lasting over half an hour. I'm now writing an article on how to start programming and problem-solving using practical methods. In it, I'll also provide links for further exploration.
The article will outline practical strategies for starting programming and problem-solving, suitable for both tech enthusiasts and non-tech individuals. It's designed for those interested in building a strong problem-solving foundation.
1. Flowcharts & Pseudocode
While this may not be a common suggestion, I highly recommend learning flowcharts and pseudocode before anything else. Doing so will provide you with a solid foundation for understanding the flow of your program, as well as programming basic concepts like if-else statements, loops, and more.
I often find myself mapping out graphs and steps for every problem I tackle, whether consciously or subconsciously.
I suggest watching Kunal Kushwaha video on this topic: link.
Believe me, this is very, very simple to learn and very enjoyable as well as highly beneficial for your programming journey.
2. Language
So, to start, a programming language is simply a means of communication between you and the computer. You might have an idea represented by a flowchart, but translating that to computer code is where the language comes in. Most languages share fundamental principles, so you can start with any language. I understand that as a beginner, it might be overwhelming with everyone giving the same advice to select a language, especially when you feel you know nothing. Let me simplify the process for you.
This advice is for those who are confused about which language to start with. My recommendation is Java. While it could be any language, I prefer Java because it offers almost everything. Even if you later choose to learn C++, many students find themselves unsure about what to do next with it. That's why I suggest Java, as it gives you a clearer path towards creating software and more. However, it's not set in stone that you can't learn C++; this is just a personal suggestion. Your first language could be any language. If you choose Java, you have opportunities in web development, software development, full-stack development, and more.
If you're uncertain about which field to choose, whether it's data science, AI, etc., believe in yourself. With time and experience, you'll naturally figure out what you want to specialize in. Focus on the present rather than worrying about the future in the beginning.
I like Python as it was my first language. However, it's worth noting that sometimes Python can make individuals reliant on its built-in functions. and relying too much on its built-in functions can be a drawback. I was curious to learn from the basics, so even though Python was my first, I made sure to build a strong foundation. The main benefit of Python is its ease of starting, and it's very useful across various fields
3. Basics syntax
You need to learn the basic syntax of the programming language you've chosen. Remember, the basic syntax of any language is almost the same, including topics like for loops, while loops, input/output functions, etc. You can learn these basic syntax rules from any YouTuber or by referring to resources like W3Schools. However, it's crucial not to rely on copying and pasting code. Instead, make sure to write every character of your code with your fingers.
This process shouldn't take more than two weeks at most because there aren't too many topics to cover. For your understanding, focus on learning concepts such as input/output, loops (for and while), arrays, modules, etc. Every YouTube video/playlist covering the basics of your chosen language will teach you these concepts. You can even create simple notes on these topics; they don't need to be elaborate, just something you can easily refer back to.
4. Problem Solving
So, what's the difference between coding and problem-solving? It's like knowing how to cut tomatoes and fry them versus knowing how to cook a dish.
Everything you've learned so far is like your cooking utensils, but problem-solving skills are something inherent within you. So, how can you improve or start problem-solving?
Step 1) First, relax.
This is just the beginning. Don't compare yourself with others; your problem-solving skills grow over time. Be patient, and you'll improve gradually.
Step 2) ChatGPT
Don't worry; I'm not suggesting you use ChatGPT to cheat. Let us assume you learned array in Java so you can ask ChatGPT 'I learned about arrays today; could you provide me with some fundamental coding questions on arrays in Java?' If you can't solve a question, you can search for solutions on YouTube or even ask Chatgpt for an explanation like 'how to solve the 3rd question'.
You can also search on Google for basic array questions in Java. Remember, it's okay if you can't solve every question, especially as a beginner. Learning is a process, so don't hesitate to admit when you can't solve something.
Solve questions with a level lower than your capacity and some questions equal to your capacity to improve your problem-solving skills. Both types of questions are important in your journey. If you ask me what the ratio could be, I would say 80:20. And over time, try to solve complex questions that make you feel stressed, as that kind of stress and pressure is also important.
Try to solve as many questions as possible and adopt the mindset of a learner. If you come across something you don't understand, like a function, do some research on it. Don't give up; this is how you'll discover new things. There are thousands of concepts in coding, and no one will teach you everything.
5. Advanced
Before advancing, you should be like a talkative programmer. What does that mean? It means being fluent in converting your thoughts into code almost instantly. For example, if asked to input three numbers and print the maximum of them, or to create an array, take input from the user, and print the minimum and maximum of the array, you should be able to accomplish these tasks in your language.
领英推荐
i) DSA
Over time, you can delve into data structure topics like trees, graphs, linked lists, and tries, but focus on one at a time. Don't rush to learn more; aim for depth. For instance, if you learn linked lists, practice both basic and intermediate concepts before moving on to a new topic. Learn advanced algorithms to gain new perspectives on problem-solving. Take it slow and steady, creating a list of all DSA topics to learn gradually, and practice them over time. Feeling that you are constantly learning and upgrading yourself is very motivating.
For basic and advanced DSA topics, I suggest you refer to Anuj Kumar Sharma playlist here, which covers almost every topic you should learn, relieving you of the worry about what to learn and how.
ii) Development
After a certain period, begin development. Development involves creating projects. Don't hesitate to start with mini-projects initially. Sometimes, you may need to learn frameworks like Spring in Java. Learn the frameworks and begin creating projects. Creating a GitHub account is as simple as creating an Instagram account. Upload your projects on GitHub and share them publicly to establish credibility.
iii) Competitive Programming
Don't rush into competitive programming. If you feel confident in your basics and have some knowledge of DSA, you can begin. However, platforms like LeetCode may not be suitable for beginners. Start with HackerRank, then move to GeeksforGeeks, and finally to LeetCode. This way, progress gradually from easy to difficult problems. I followed this path myself, and if you know of any other platforms that are not built for advanced, you can explore those as well.
6. Curiosity
Explore new ideas with curiosity, but take your time to grasp them fully. Try to understand how things work on your own. Spend some of your free time researching topics like setting up a GitHub repository, writing a README file, learning in public, etc to broaden your understanding.
7. Handling Frustration
Programming is all about learning how to think in new ways. As you get more experience, you'll find it easier to pick up new tech skills. But when you're just starting, it can be pretty frustrating sometimes.
When working on programming projects, you're bound to run into tough spots that can make you feel stuck. It's important to face these challenges head-on rather than avoid them. Dealing with difficult problems can help you learn a lot quickly. Imagine spending several days figuring out a bug; solving it could teach you as much as you would normally learn in a month or two.
Knowing when to keep trying and when to take a break is a key skill. There isn't a set rule for this—it's something you'll get better at over time. Early in a project, try to push through the tough parts: do more research, ask for help, and try new things. If you decide to step away from a problem, that's okay too. Sometimes, taking a break is the best choice, and it can be a smart decision to wait for a better time to tackle a tough issue.
In short, see each challenge as a chance to grow. Learning to balance sticking with a problem and knowing when to take a break is part of becoming a good programmer.
8. Seeking Guidance and Support
Starting your programming journey can feel overwhelming, but you don't have to go it alone. Seek guidance and support from online communities, forums, or local meetups. Joining a community of like-minded individuals can provide invaluable encouragement, advice, and motivation as you navigate the learning process. Whether you have questions about a challenging concept, need feedback on your code, or simply want to share your progress, engaging with others in the programming community can help you stay motivated and inspired. Remember, there's a wealth of knowledge and support available to you—don't hesitate to reach out and connect with fellow learners and experienced programmers alike.
9. Embracing Failure and Iteration
In programming, failure isn't a setback—it's an essential part of the learning process. Welcome, failure as an opportunity for growth. When your code doesn't work as expected or you encounter a bug, don't get discouraged. Instead, view it as a chance to refine your understanding, debug your code, and improve your skills. Learning to iterate, troubleshoot, and adapt based on feedback is a fundamental aspect of becoming a proficient programmer. Remember, every mistake is a learning opportunity, and with each iteration, you'll gain valuable insights and become more adept at solving problems creatively and efficiently. So don't be afraid to fail—embrace it, learn from it, and keep moving forward on your programming journey.
10. Avoid Comparison
Comparing your journey with others is the worst thing you can do. Everyone has different pasts and paths.
11. Other
If you think programming or software engineering is all about coding, it's not. It contains a lot more than just making software, such as:
etc and many more,
So, I am not saying to rush everything, but with time, about 2-3 months, start exploring other subjects as well. For example, DBMS is very important and required for most jobs. Git is not necessary, but it takes only about 2-3 days to learn, and it has some significance, so why not learn it? Similarly, some subjects are very important, while others are not. Research them and learn accordingly.
Conclusion
Learning programming is a journey that requires patience, persistence, and dedication. There are no shortcuts on this path; each step forward is a valuable learning experience. Starting with the basics, practicing regularly, and improving observation skills are essential for every programmer. Instead of relying solely on others' guidance, adopt a mindset of exploration, research, and experimentation. Don't shy away from new technologies or challenges; they are opportunities for growth and innovation.
In the programming community, collaboration and support are key. Rather than being overly competitive, be open to sharing knowledge, helping others, and building meaningful connections. Think of programming as a team effort, not just a solo task. It's like being part of a family where we all help each other, support one another, and celebrate each other's successes.
As you navigate your programming journey, know that you're not alone. Reach out for help and support whenever needed, whether it's from fellow programmers, online communities, or mentors. Rest assured, I'm here to offer assistance whenever you need it—I won't try to sell you a course; I'm a developer just like you.
Let's face challenges, celebrate successes, and continue coding. Together, we'll overcome obstacles and build something incredible.
.NET Developer | MVC | C# | SQL Server | .NET Core | Web API
3 天前Thank you for such an informative and well-written article. I truly appreciated how you broke down the process of starting programming and provided practical tips for problem-solving. Your explanations were clear and easy to follow. ??
Software Engineer | Javascript, Angular, React, Next, Node, Typescript
2 个月It's absolutely on point and so instead of directly jumping into leetcode; i will be starting from HackerRank. Let's see how my DSA adventure goes.
Flutter Developer
5 个月You cover all the important aspects of learning programming languages and practicing it. And the suggestion you gave in this article is a good choice because I personally recommend Kunal kushwaha's videos. Great article you have written. Good luck ??
--
5 个月excited to read your article and learn from your experience! ?? Ankit Kumar Jha