Readit News logoReadit News
throwawaaarrgh · 3 years ago
You should learn C because it's a gateway to deeper knowledge. The kernel uses it, about a thousand programs shipped with Linux use it, embedded programming uses it. It helps you understand how lower level network protocols have been designed, how to efficiently use memory, how to design algorithms and why they're harder than you think. There's a crapton of libraries in C, most higher level languages have some extensions to take advantage of them. Sensitive security software will use it, due to various attack vectors that are slightly easier to deal with at a lower level. It's handy and expands your brain. And it's not going away anytime soon.
Beltalowda · 3 years ago
I can't say I learned much by programming in C, if I even learned anything at all. Mostly I just grumble at the needlessly verbose and complex way of doing some things (e.g. anything with strings) and get annoyed by the syntax and quirks of the language and surrounding toolchain.

It is of course useful for a whole bunch of reasons, including being able to figure out "why does this do X?", but that's not really "deeper knowledge", IMO.

stevekemp · 3 years ago
Compared to writing code in assembly language it is a dream, though!

I think C lets you think about low-level details of how systems work, strings being arrays of characters with an explicit terminating NUL character, for example. Although again assembly language gives you _real_ lower-level understanding and insights if you use it.

ZephyrBlu · 3 years ago
Time is finite. Learning C is not necessarily aligned with everyone's goals or path. For example, if I care more about building products than low level software it's probably not worth learning C unless I happen to be interested in it.
delusional · 3 years ago
To me that seem akin to saying "if you just care about running it's probably not worth learning to walk"

It is always "worth it" to understand the machine you are manipulating, and no matter what you think about the C virtuel machine, the very real machine in front of me has been shaped by its relationship to C.

pjmlp · 3 years ago
I was able to learn that deeper knowledge without learning C, via Sinclair Basic, Turbo Basic, Turbo Pascal, Z80 and 80x86 Assembly, before eventually learning C.

And it wasn't even proper C, it was RatC at the time.

There are plenty of alternatives to expand our brain in systems programming, and even better they show we don't need to compromise on security to do it.

However, yes one needs to learn C, because it has snuck everywhere and as the COBOL of systems programming languages (ruffly 10 years younger), it isn't going anywhere.

thebytefairy · 3 years ago
Agreed, it helps you understand what’s been abstracted away from you in many higher level languages. From a security perspective I think you learn to avoid C wherever possible.

Deleted Comment

jimbob45 · 3 years ago
Isn’t that the same argument we used to use with Latin? It would be nice if we could all stop time and learn the fundamentals better. However, in the reality we actually live in, most of my coworkers don’t even have time to truly learn SQL, let alone C.
xboxnolifes · 3 years ago
I never happen across works written in Latin. I come across a lot of C code.
kensai · 3 years ago
"On my 18th birthday, my girlfriend asked me to drive to Barnes & Nobles. She strolled in, then strolled out at a much faster pace. Then she handed me a copy of The C Programming Language, which she had just stolen..."

Marriage material! :D

catiopatio · 3 years ago
(1) She didn’t plan his gift ahead of time.

(2) She made him an accessory to a crime.

(3) She stole his gift instead of investing actual effort to save up and purchase it.

I know the world will always have its share of thieves and liars, but I’m still always a little taken aback when people are shameless enough to celebrate it.

The bare minimum for “marriage material” would have been putting thought into his gift before his birthday, buying it, wrapping it, and surprising him with it.

the_jesus_villa · 3 years ago
I can settle this debate:

1. She turned out not be marriage material

2. Y'all are way too sensitive about a teenage girl who shoplifted one time.

jyscao · 3 years ago
you missed the point and/or joke, which is implicitly that crazy girls are great in bed
spoils19 · 3 years ago
I'm not entirely sure if I would want my future wife to be a shoplifter.
the_jesus_villa · 3 years ago
The story actually gets way crazier after that!
andi999 · 3 years ago
I am listening...
pksadiq · 3 years ago
> Programming from the Ground Up

> https://download-mirror.savannah.gnu.org/releases/pgubook/Pr...

There is an updated version of the book from the author: "Programming Under the Hood" or "Learn to Program with Assembly". See[0]

[0] https://github.com/johnnyb/programming_under_the_hood

justusw · 3 years ago
What a great book! It was my introduction to 32-bit assembly on Linux. Learning AT&T syntax has both its advantages as well as drawbacks. I've noticed a lot of GNU code uses it, whereas reverse engineering literature loves Intel syntax, which is an interesting cultural difference.
wodenokoto · 3 years ago
> Beej’s Guide to C Programming > It’s straightforward and to the point.

I'm not saying its a bad book/guide, but with sections like these:

>Before we go on, why would I even begin to bother pointing out that a pound sign is called an octothorpe? The answer is simple: I think the word octothorpe is so excellently funny, I have to gratuitously spread its name around whenever I get the opportunity. Octothorpe. Octothorpe, octothorpe, octothorpe.

It claims to be aimed at programmers who are already proficient in high-level languages, but spends a whole paragraph explaining what code comments are.

I'm not sure it qualifies as "to the point"

the_jesus_villa · 3 years ago
Ha! You've got me, "to the point" is going too far. But I should say that it's a relatively quick, light read. Moments like the octothorpe thing actually make the read easier, because the humanity of it makes my brain wake up a little.
habibur · 3 years ago
Learn enough C so that you can push your module written in Java/Ruby/Python/Node into C, and all the other high level language users can pick it, compile it and use it natively in their language.

Imagine you wrote a new 3D model file-format and all other language users have to load the Ruby interpreter to use it.

seibelj · 3 years ago
> Then she handed me a copy of The C Programming Language, which she had just stolen (though at $80, it’s not clear who was robbing whom to begin with).

Code of Dishonor

the_jesus_villa · 3 years ago
No, she wasn't dishonorable. She took the hard route, risking her own security out of love. I condemn theft, not because it's theft, but because it's harmful. In a utilitarian way, I feel like she helped me more than she harmed B&N. In terms of virtue, she displayed bravery and caring.

She just didn't care about B&N or property law. Maybe you do care about those things - I'm not condoning theft here!

Now, if you had said Code of "This Chick Turns Out To Be Completely Insane And This Should Have Been A Red Flag" you'd be closer to the mark, but that's for the next post!

seibelj · 3 years ago
The “$80 is too expensive” comment is dishonorable. You can choose not to buy something - for books especially considering the library is free.

If you think a corporation is evil, you don’t have to shop there.

Dead Comment

snvzz · 3 years ago
At least buy it second hand, like I did back in the day.

Deleted Comment

Deleted Comment

whateveracct · 3 years ago
If you want to be a Haskeller, learn some C too. They are fully complementary. The Linux tooling, gamedev libraries, etc you have available if you leverage C is great. And Haskell's FFI and C tooling making it simple.