Should You Learn This Programming Language First? Let’s C…
‘Where do I start? What should my first programming language be? In this age of high-level languages like Python and Ruby, should I still learn C?’
These are some of the many questions I had asked myself an year ago, when I was new to programming and knew little to nothing about it.
Programming languages are instructions written in a particular syntax to give desired outputs and implement algorithms.
Some of these languages are closer to what a machine can directly understand (that is binary) and are called as low-level languages, and some are closer to our human language and are called as high-level languages.
The medium to high level languages are written in a syntax which is somewhat closer to English. The code written by us in this language (source code) is then converted to machine code that the computer can understand and execute.
Now coming back to the question, when you are new to programming, it helps to learn a language which is close to the machine language, so that you can understand the underlying architecture of how stuff actually works, but not so close that it causes unnecessary confusions. Hence, I decided to learn C for a good foundation.
To learn ‘C’ by self-study, here’s a rough road-map:
If you are an absolute beginner, and need to become familiar with the concept of programming, watch the initial video lectures of Harvard’s CS50’s Introduction to Computer Science for a head-start.
- ‘Let us C’- by Yashvant Kanetkar is a great book when you are just starting out. The concepts are very clearly explained, plus there are a lot of programs for you to try out. You can also use a video lecture plan, I personally prefer studying with a book.
- Now, install an IDE (Integrated Development Environment). It is a text editor + compiler, for you to write your lines of code, and run them. An easy to use IDE is Codeblocks. Here’s the installation link — Download binary.
- After covering the initial topics, you’ll be comfortable enough to write your first C program.
Proceed topic by topic, note the syntax, understand the working, and make sure to try out the code yourself.
- Solve as many questions as you can. If you’re going by the book, do the exercises. Otherwise practice on platforms like Hackerrank. Try figuring out the shortest and simplest lines of code to achieve a particular output.
- Do not get disheartened by errors. Have patience, and look to resolve them one by one.
- Use Stackoverflow to ask questions, and clarify any problems you have in your code. (But only after trying to solve them by yourself.)
- Also cover ‘Data structures and Algorithms’, to fully gain command over the language, and write optimized and efficient code.
How would learning C help you? And what next?
After becoming familiar with C you would have knowledge about Computer networks, operating systems, computer architecture, and compiler theories which are four of the most important fundamental computer theories and almost all of the new techniques are built based on these four.
If you are just starting to program in the advanced programming languages, these machine-level details are usually hidden from you.
Now, with a strong foundation and a good understanding of code, you can move on to high level languages of your choice as per your requirement, according to the field you want to get into (eg. Web development, Machine learning etc).
Remember, the key here is to understand, write code, and be patient.
Happy coding!
Ps: This answer is completely based on my personal experience and the many reviews i took from people. It is strictly from the point of view of an undergraduate student who was new to programming. Your way of learning might differ, and might be equally reasonable, these are just suggestions. :)
by Amisha Singh | instagram: amixhaa