r/AskComputerScience • • 4d ago

Is learning coding in C still beneficial?

I hear from a lot of people that, with AI taking over most of the human work, learning to code in languages like C is still relevant? A few days ago, someone was laughing at me because I was coding by myself instead of using AI.

19 Upvotes

47 comments sorted by

31

u/Immediate_Form7831 4d ago

Well, you might learn things about how a computer works. It is always a good thing to know how things work.

-8

u/CS_70 4d ago

Though a computer works nothing like C 🙂

But yes, it’s very beneficial

16

u/cowbutt6 4d ago

C is the closest "high level" language to the underlying hardware. I've heard it referred to as "portable assembly language" by a detractor, which made me think "yeah, and that's why I like it!"

2

u/FoodMagnet 4d ago

Yes - for interview practice I would go through the examples in K&R and try them myself. While it taught me C & pointers... what you area really learning is ASM registers, instructions and details around how memory works.

-1

u/CS_70 4d ago

Yes, but that statement is misleading: it still have little to do with assembly.

The way you think and organize things is fundamentally different. It’s a procedural language with types,and control structures, memory alignment ,stack and scope and automatic stack management and a shitload more (thank goodness!).

You have direct memory block access (give or take), sure, but C is heaps more sophisticated (see what I did? 🙂) than dealing with just registries, arithmetics and jumps and stuff.

These things seems to get somehow romanticized by younger people who has never touched them.

C is very useful because it has the core of procedural ideas but does not sacrifice too much speed to achieve that (given a good optimizing compiler, that is), in opposition to other languages of the time.

A time when the procedural approach was a controversial and tradition-breaking novelty, which smart people like Ritchie took up because they recognized the advantages, over the moronic prejudice of their peers of the time.

(Bit like today with AI and the legions of group-thinking traditionalists, but I digress).

And pedagogically, while it does a lot for you and you can do serious stuff relatively easily, it still gives you enough rope that you need to be on your toes to not self destruct. This l helps developing attention and care for details, and a healthy dose of realism when estimating stuff. It’s character building.

9

u/Saragon4005 4d ago

I learned C a semester after assembly. As like the 4th programming language I learned. I was amazed how closely a C program resembles the structure of assembly.

3

u/am_Snowie 4d ago

People suggest C not because you learn abt computers from the language itself, it leads you to there, the lower the abstraction level the more chance you will learn one/two layers beneath it.

17

u/erikchan002 4d ago

I think the correct question to ask, is not whether "learning C" is relevant, or even "learning to code", but just "learning". Because I'm almost convinced that people who are all-in on generative AI is allergic to the concept of "learning".

1

u/TelevisionEconomy385 18h ago

They're not, they just want to know what to learn and where to devote their energy.

13

u/recursion_is_love 4d ago

Always, also applied to assembly language. Deep down there are wonder where no other place can provide. To understand the wonder, you need to see with your own eye.

1

u/dities 4d ago

I never learnt assembly cause it seems to be horribly specific of the hardware you use ... am i wrong ?

2

u/braaaaaaainworms 4d ago

Fortunately the CPUs have went through carcinization and the assembly for almost everything is comparable and the skills for one arch transfer to another

1

u/SylviaJarvis 4d ago

If you work with microcontrollers, you might use a different assembly language for every project. If you already know assembly language for one CPU, you can pick up a MCU's assembly language in a few hours.

1

u/recursion_is_love 3d ago

Beauty is in the eye of the beholder.

1

u/MitchAlsup 3d ago

Once you can read {S/360, PDP-11, PDP-10, VAX, 1108, 68000, x86, x86-64, MIPS, RISC-V, ARM A64} picking up another ISA assembly language is easy.

5

u/W31337 4d ago

The person laughing will be you when they can't find a job and you can because you put in the work.

Learning is good

4

u/ivanhawkes 4d ago

Is learning algorithms still useful?

Yes. Because C and algorithms are foundational to your understanding of computer science and without a strong foundation you won't notice when the AI takes shortcuts and makes bad design choices.

What you don't need to do any more is be a ninja in any of the lower level skills with the massive amounts of domain specific knowledge that used to be required...cmake files I'm looking at you.

You need to know the important of a CI pipeline, linting, static analysis, planning, big o notation, and a whole swag of other things. You don't need to know how to cleanly import all the different dependencies your project has and deal with making cmake builds bulletproof.

4

u/_giga_sss_ 4d ago

only depends on your endgoal

4

u/spiderzork 4d ago

C was important 50 years ago, it will be important the next 50 years as well.

3

u/Kempeth 4d ago

Yes and No.

C is popular in education because it forces you to deal with much of the nitty gritty computing concepts and it's one of the least inconvenient languages to do so.

You can learn these concepts in other languages just as you can become an airline pilot without becoming a glider pilot first.

It's never a bad thing to have more knowledge but realistically we're way past the point where experience in the C programming language is a critical skill to have.

3

u/baddspellar Ph.D CS, CS Pro (20+) 4d ago

I think it's beneficial to learn any new language that makes you think about problems in different ways.

I'd go with c++ instead of c, though. You can write functions with C linkage by using extern "C". Even thinking about that will teach you something

1

u/dities 4d ago

Cpp has more abstraction, wouldn't it be more confusing ?

1

u/baddspellar Ph.D CS, CS Pro (20+) 4d ago

You can use as much, or as little of the abstractions as you wish. Most C is valid C++ and the stuff that isn't is fairly esoteric. C++ gives you smart pointers, typesafe generics, safer memory and bounds constructs, etc. You can still write non-OO code in C++

1

u/NoAlbatross7355 3d ago edited 3d ago

if you were to use only the simple features of C++, you would basically be using C. So I don't see why you wouldn't just use C in that case. It keeps things less confusing starting out.

textbook focused on C is going to be way better at building a foundation than C++ where the majority of the learning is spent in high-level leanguage features that don't really have anything to do with how computers fundamentally work.

also, C++ is a behemoth, dumpster-fire with way too many featues and no real identity, you should skip it and go straight to Java or C# if you want to learn OOP. Smart pointers? go to Rust.

2

u/but_a_smoky_mirror 4d ago

Learn systems, and why and how C organizes concepts how it does.

Then you’ll understand why things break and have vulnerabilities as they do

2

u/for_work_prod 4d ago

Worth to learn math, if computers do all our math from the decades ago?

2

u/UroborosJose 4d ago

Learning yes
Working not much

2

u/Code_Monkey_Lord 4d ago

Yes. C is good to know even in the age of AI because it lets you better understand the relationship between code and the hardware.

2

u/NoAlbatross7355 3d ago edited 3d ago

I'm a college student success tutor, and I teach C programming. From my experience, it has the most prominent features of all programming languages. You get to see where certain syntax features started. For instance, array sub-scripting was syntax sugar for pointer arithmetic, which you would never get the opportunity to learn about in other languages.

Anyone's ability to firmly grasp the language imo shows they truly understand programming. You don't have more than what you need, and the language is small. It's perfect for learning.

Also, once you learn the syntax and basic mechanism of pointers, structs, and dynamic memory allocation, implementations of certain foundational data structures linked lists, stacks, and queues are far more elegant than in other languages.

1

u/EatTomatos 3d ago

You need C++ for the object orientation. C doesn't have it, without using either libraries or crazy macro manipulation. 

I learned C and made my own unix file creation program. But I don't really want to make things more complex in C. At some point, you end up with a huge web of functions and structs all referencing each other and it's improbable to improve your code.

0

u/Outrageous-Lab-2138 1d ago edited 1d ago

C++ OOP is a contagious gimmick and I avoid it as much as possible; based on a flawed philosophy. Functions are perfectly fine and analogous to how a computer works, and row-major memory layouts can be achieved with simple structs.

1

u/FourthDimensional 2d ago

This person laughing at you is a loser.

C is the most ubiquitous programming langauge of all time. It's the basis of all extant operating systems. It runs in your refrigerator, probably.

Learning it is absolutely worth. People who say otherwise don't know what a computer even does.

1

u/MpVpRb 1d ago

Yes

Also, learning processor architecture and assembly are useful.

Knowing the foundation helps understanding, even if you use powerful AI tools to actually create stuff

1

u/et_theextratestic1e 15h ago

Trusting an AI agent to code for you, when you have no idea what it is doing nor why, is dangerous and irresponsible, at best.

AI coding agents work best for developers who know what they're doing and what they are tasking the agent with.

If you can not critically think about your agent's results, you should not be using an agent for that purpose.

Ignorance is bliss (like your "someone"), it just annoys TF out of the rest of us.

1

u/throwaway563125685 7h ago

C is usefull to learn about low level concepts such as pointers and memory allocation.

It's worth learning for the same reason assembly is, basically. For most people assembly itself is useless but it'll teach you a lot about how computers work and that makes it worth knowing.

1

u/Drummerx04 3h ago

I'd say yes. You should know how C does things because it help teach you how the computer works at a bit of a lower level, and it can also help teach you really WHY other languages work the way they do. It can also really help you understand why C is correctly blamed for so many software vulnerabilities. (Answer: because it is trivially easy to introduce memory safety issues)

1

u/Several-Ad5345 4d ago

Nah dude you can just "vibe code" everything everywhere all the time nowadays. You barely have to know what coding is or what its used for (maybe just watch a 5 or 10 minute youtube tutorial or not). Just ask the A.I. what you want and bada bing bada boom, already done bro.

5

u/Xylozene 4d ago

hahahahha nearly had me for a second

-1

u/Objective_Buy_7235 4d ago

Exactly! With AI being capable of doing the writing, reviewing, and merging of code, you only need to learn to prompt it. No need to learn "languages" anymore. The AI knows all of that now.

1

u/nacnud_uk 4d ago

You can learn things that AI knows about how computers work. The idea of a CS / programming degree, in 2026, is a bit redundant, to be honest. 40 years ago. 20 years ago. Now...hmm. I'd get practical skills.

AI knows more than you could ever know. It can put it together better than you ever could. And in more combinations than you could in any allotted time.

I am not sure why anyone would try and get into programming just now, it's like a dead-end place. You can still be the one asking AI, until Ai can deal with generic concepts. And, it's nearly there.

Learn C if you find it worthwhile, like, fun and fulfilling. Don't learn it because you want a long term career.

If you're not using the latest tools, that's okay, but everyone else will. So, you're already too slow. Already behind the curve. That's just how it is.

2

u/FinancialTrade8197 3d ago

It can put it together better than you ever could.

Have you ever seen vibe-coded projects?

1

u/nacnud_uk 2d ago

Well, given that I guess your question is not genuine, I'll ask you; what do you mean?

What are you tyring to imply? You're not really conversing here.

Of course I've seen vibe coded project, that's why I've an opinion on them.

So, what's your point? Do you have one? And why did you make us wait before actually stating it?

1

u/Outrageous-Lab-2138 1d ago

You know what he meant, and you're playing dumb. Obviously his question was rhetorical.

-1

u/Active_Name5021 4d ago edited 1d ago

No, learning anything is no longer relevant, just lie down and stare at the celing or something, there's nothing left to do.

Edit: that was sarcasm, keeping seeing these "is it worth learning X?" posts. If you want to learn something, learn it, I don't understand why people need to come in here every day to ask. Learning is great, even if it's not immediately obvious how it'll be useful to you

3

u/DeadlyVapour 4d ago

Show me Wax on wax off