DEV Community

Cover image for Beginners guide to programming
Kaustav Banerjee
Kaustav Banerjee

Posted on

Beginners guide to programming

Introduction

Hello,this is my second post.And in this one I have decided to talk about programming.Nothing in particular,just how you can start learning to code as a complete beginner.
Well let’s be very frank,programming is difficult.As a matter of fact any new thing seems difficult at the beginning right?For someone like me even making poached egg can be difficult simply because I don’t visit my kitchen very often(except for munching on things from the fridge 😂).Anyways,the point is you will be good at something only when you are doing it on a regular basis.

Why you should code?

Yes,you read that right.Let’s talk about why one should be familiar with atleast the basics of programming even if he/she is not looking to choose a developer career.Well…coding is everywhere.Be it the social media you are scrolling on your smartphone(not to mention the smartphone itself!) or even the washing machine/air conditioner in your home.Everything is operating on some prewritten set of instructions(program) telling the machine what to be done. Infact the very website you are reading this blog on is running on code!
As I mentioned,even if one chooses to never touch code again, learning about it can still be helpful. Everyone will be using technology in one way or other no matter what he/she wants to do in the future, and understanding how technology is created and developed is important. Do you want to make video games? Learning to program is a great start. If you want to be an artist, being able to create your own beautiful portfolio website can be helpful. There are lots of jobs that can use coding skills,but one can also make a program just for fun!

Where to start?

This is possibly the most burning question among beginners.Where to possibly start!? There are so many resources be it youtube,online sites(like GFG,tutorialsPoint etc.) or even books! My answer would be a book(considering you are a beginner and looking to learn your first language!).There are many good books available which can get you started on any particular language you are looking to learn.Once you learn the basics you can then refer the internet for learning any additional topics on the way.

How can you practice?

As I have mentioned,once you get comfortable with the syntax, try solving some very basic problems(textbook problems) like finding prime nos within a range or maybe finding the max/min element in an array.Write down the algorithm if you feel uncomfortable with writing the full code straightaway.Once you have figured out the steps to solve the problem,you can then easily wrap it inside syntax.
Now don’t just stop there! Take a sample input,go through each step of your code and check on pen and paper whether your code gives the correct result(often called dry running the code).

Now if you feel you are done and can move on to solving the next problem…that would be a mistake.Always and I repeat always run your code on your machine even if you feel pretty confident about the code you wrote.

How to be good at this?

Well let us talk about a scenario first.Manu(fictional) a class five student is very afraid of Maths.Though he is able to manage other subjects, but somehow Maths tends to slip out of his grasps. To overcome this difficulty,his trainer proposed a quite simple solution. He asked him to do only two problems per day.But to do it everyday!. Manu listened to his trainer and very soon he could see the benefit himself! within a few months he started loving Maths more than any other subject!

I hope you got the point.It’s not about whether you are able to solve the next difficult problem on the internet, but on solving two simple problems everyday. But to keep on doing it everyday! that’s the most important part. Consistency is the key and being good at something,anything requires enough practice.Right?

While running code on your machine,you may wonder what might be the output if line X was omitted,or what if variable X was used instead of Y?Do that change and observe the output.Just by tweaking your code here and there you will be able to learn many concepts around your code!!

“For the things we have to learn before we can do them, we learn by doing them.” ― Aristotle

Conclusion

I hope this helped.Learning a new language can be very daunting and definitely difficult.But all you need to do is interact with it on a daily basis to overcome your fear! Just Do it!As a popular commercial says.

Feel free to drop a message if you liked this one! In my next blog I will try to talk about something more technical. Until then goodbye!🤗

Top comments (0)