DEV Community

Cover image for Why it's better to learn programming with C?
Arastoo
Arastoo

Posted on

Why it's better to learn programming with C?

Learning programming is and will be a challenge. Most of all for those who have no programming background in school or any other place. One of the main purposes of learning programming and of course one of its requirement is to get a better and deeper knowledge about computer science.

In my experiences learning programming with a very high-level programming language like Python or Javascript has never been a good practice to learning programming concepts in deep.

Why did I say that? Python or Javascript has a lot of abstraction features that help us to build our application faster. For example when we are trying to make an array or a list in this sort of language our works will be done by writing just a few commands.

I’m not concerned about how many commands you have to type, I’m worried about how deep and how non-abstract we can solve our problems with a step-by-step understanding of the behind process.

So, why should choose C instead of this sort of language?

There’s a lot of discussion about “Where we can put C in the term of high-mid-low-level programming languages?” C is a mid-level programming language created by Dennis Ritchie and the most vision he’s seeing was to create a Programming language to develop software for Unix operating system.

C is not like machine programming languages like Assembly but it’s not also like those programming languages that had some spaceship-like features.

Let’s show you an example: When we want to create a variable and print it out in Python, all we need to do is this:

name = 'Arastoo'
print(name)
Enter fullscreen mode Exit fullscreen mode

But in C our situation will be very different:

#include<stdio.h>

int main()
{   
    // declare and initialize string
    char name[] = "Arastoo";

    // print string
    printf("%s",name);

    return 0;
}
Enter fullscreen mode Exit fullscreen mode

There’s a lot of code, I know, but this will get you a better understand of how a variable will be created and how it’s going to be printed.

As I mentioned earlier, using C for projects like a Web application, Mobile Development, etc, will not be a good option, We can learn C to learn computer science and the art of programming in deep.

So I recommend everyone when she/he wants to learn programming concepts stick to C.

Why not Assembly? When you are reading this article you may assume that I’m trying to say that learn an old programming language as can as possible. No, this isn’t true. I think learning Assembly is more prior to those who are working on hardware, not software science. Assembly helps us to learn about how The CPU will understand our programs or how we can precisely manage our hardware resources. That’s not our first mission, so it’s better to stick with the C.

How we can start?

Well, learning C is much more different than learning languages like Javascript or Python, So you have to first have an objective vision on why you want to learn to program. If you are looking just for a simple job and do some sort of things (blog, e-commerce, etc) on a small scale you can just learn a CMS or a very high-level language and be a junior developer just in one month. But if you are seeking true knowledge and of course if you are like me perfectionist you need to learn about C, Algorithms, fundamental things about computer science, etc. For this reason, there will be plenty of resources, so you need to get back to college or any other place.

Harvard University lectures will be a great point for start, it’s free and available for everyone. You can watch their lectures and courses throw the edx.org website. If you are not interested in video courses you can use some valuable text-based courses like GeeksforGeeks. On this website, you can see all you need to get started step-by-step.

What is the process of learning C programming?

There are so many common features in many programming languages, but the difference is the way you can get that feature done. C like others has its own way, to do so you must learn the way that you can use the C to implement a Variable, Loop, Condition, Function, Constant, Data Structures, and a lot more stuff.

If you take a look at ( C Programming Language ) there will be a listed content that will reach you to the highest level of being as a C developer.

When can I program with Python or any other languages?

First of all, there is no need to pick C as our only choice for learning the programming concepts. There are a few other mid-level programmings that you can use them. Rust is another choice for us to work with. But let’s get back to our question. Surely C can not be a good choice for developing Web, Moblie Application, Office programs, etc. There will be a lot more languages for doing this works. Python, PHP, Javascript, Ruby, C-Sharp, Java, etc.

The basic reason why we should learn programming with C is to understand how the programs work and how to solve our problems without any shortcuts! First, we need to get a very good recognition of our “Main Streets” then we can learn about “Alleys and short ways”.

When we reach some level in Computer Science, then we can choose a career and of course a language and a package (tools, frameworks, libraries, etc) to work with. For instance, I wanted to be a Back-End developer so I chose Python for this reason. Of course, someday will be needed to learn something other than python but switching will not be quite difficult because I have a really powerful base.

original on: https://arastoo.dev/why-programming-with-c

Discussion (2)

Collapse
brandonwallace profile image
brandon_wallace

C is a great programming language.

Collapse
jenningsf profile image
JenningsF

I first learned C++ and agree that it teaches a lot of concepts you wouldn’t otherwise learn with Python or JS. Kind of like learning long division before using the calculator. Great article!