Is this still the number one book to study to learn C? Some fags say this is too old to be used for anything 'modern'

Is this still the number one book to study to learn C? Some fags say this is too old to be used for anything 'modern'

Other urls found in this thread:

cs.cmu.edu/~15122/schedule.shtml
cs.cmu.edu/~213/schedule.html
matt.sh/howto-c
cert.org/secure-coding/publications/books/cert-c-secure-coding-standard.cfm?
twitter.com/SFWRedditVideos

I recommend C Primer and then this. Or rather read them along side each other.

Just read it faggot, it may not be "modern" but it's the best foundation possible.

It's a good book. Of course, you can also learn C by writing programs or reading through source code and trying to understand it.

What are you going to use C for?

Studying Linux

I wanna learn device drivers and kernel development. Am sick of the flavor of the week

Is C still the most important language to know for anything related to netsec and OS sec?

I don't even know it, but if it recommends or shows how to implement linked lists it's shit.

Can you give a little explanation why that's bad?

bruh

>if it recommends or shows how to implement linked lists it's shit

wat

Do you have an unsupported flash drive in this day and age?

?

he's implying you need to write a driver for a device that's unsupported and that's why you want to learn C

OP go suck a dick and learn something useful like Java

> Doesn't know the DEFINITIVE c book
> must be shit if it recommends any data structures
So all Computer science, Electrical engineering and some physics degrees are shit because they have a data structures component?

try writing a c program if you want to learn c

novel i know

>So all Computer science, Electrical engineering and some physics degrees are shit because they have a data structures component?
No, all CS, EE and some phajeet degrees are shit because they don't tell them to use preallocated dynamic arrays instead which leads to C repositories being riddled with slow linked list implementations.

This literally never happens you faggot. Nobody uses Linked Lists nonetheless rolls their own.

The problem isn't bad linked list implementations, the problem is that linked lists are themselves inefficient and despite being babbies first data structure actually should only be used very very rarely.

Depending on what type of programming you do you may not EVER need to use a linked list.

Yes.

It's definitely a good place of reference. There are a few places that don't show modern code. For example, in section 1.1:

#include
main()
{
printf("hello, world\n");
}


Compiling that code with gcc throws a few warning but it still executes.

Despite that, I think it is a good starting point to introduce you to a bunch of topics. Plus, if you are lazy, you can just google for the book and find a PDF version. No reason not to start with it.

Why is C so hard to learn compared to Python and Java? Python has ten million free books and websites that are easy to use, fun to read, and if you get bored or stuck, you can just go somewhere else to learn the same thing. C, meanwhile, has maybe three shitty websites that are poorly designed and keep trying to shill C++ instead in the classic, "How do I do X?" "Lol why do X? Do Y instead! Thread locked" bullshit, and if you want something you can read offline, the books are all Stallman-tier unreadable crap that are all theory and no examples, so you never actually learn anything.

Why does the Internet hate C?

They're brainlets, that's why

protip: most online resources are complete shit and just a waste of time. Buy actual books. O'reilly has plenty of books for learning C.

If you think you actually learned a programming language from a hodge podge of random tutorials online you are probably mistaken and don't know the language anywhere near as well as you should.

Many modern programmers are used to lots of layers of abstraction with their programming languages nowadays. Nobody wants to think about an actual solution for a problem, they just want to stitch together libraries in high level languages and call it a day.

>Why does the Internet hate C?

memory management

fkn this, sometimes videos are useful, but for leaning big stuff like frameworks or lenguages the official documentation or books are the way to go

I throw C under those programming languages like python you learn and never use but sets you up for the second language which is the one you'll be programming in for a long time.

python is useful, wtf are you talking about? every major website and even scientific developers use python so stfu

Step 1: Read K&R, realize the style of declarations used in it won't be used today but it still is the definitive resource on how to read a declaration/bracket order operations ect.

Step 2: Read these lecture notes, slides/additional resources cs.cmu.edu/~15122/schedule.shtml

Step 3: Watch these lectures, read the course book (click on 'old lectures') cs.cmu.edu/~213/schedule.html

Step 4: Read this modern C guide matt.sh/howto-c

Final step: Read this and use for reference cert.org/secure-coding/publications/books/cert-c-secure-coding-standard.cfm?

That's all you need. K&R will teach you what is undefined behavior. 15-122 will teach you to write safe programs and how to analyze existing programs. 15-213 will teach you what C looks like at the assembly level, stack frames, two's complement representation, floating point ect. That 'How to C in 2016' guide will teach you how modern C is written to avoid classic C problems like throwing around char's and ints. The CERT guide is a good desktop book to have around to make sure the shit you are writing cannot under any circumstances lead to undefined behavior. Whatever project you decide to contribute to after doing all this to obtain base competence in modern C programming, they will have a contributor's style guide which you must read like the kernel.org style guide or OpenBSD man style

Java abstracts away the shit in C. Java devs never have to deal with pointers. Java devs never directly deal with memory management. Getting the JDK and an IDE setup going is stupidly simple compared to getting gcc or whatever going for C. Probably other reasons too but that's what I can think of off the top of my head.

That doesn't mean Java is better than C, it just means it is easier to work with.

>this is too old to be used for anything 'modern'
C is old already, anything after ANSI C is bs.

C Programming A Modern Approach by King is good.

Is C really that uncommon or mostly a meme?

Read it, nothing is better.

it's not uncommon at all. I have been working in the industry for a long time and managed one country wide server project and one AV engine for a major AV company. I coded in C all the time with an exception of python for simple scripting.

in systems programming, it's still the norm.

C is still everwhere, it's legacy. Even Kernighan doesn't use it anymore if he can avoid it. You will often find it these days in a library with wrappers in another language or careful API to prevent the quadrillion problems that have happened over the years. You should still learn it and how it is translated to assembly just for legacy reasons as something you own still is powered by The Eternal C.

And those AV engines are exploited routinely because of it, it's like installing a backdoor for anybody to jack your system.

C is just good to know full stop-
It forces you to learn about stuff higher level languages gloss over, like passing by reference or value.

many people ignore 40 years old practices and be smartass, that's the real reason here. I don't say C is a safe language, your code can exploited in many ways, maybe because of an external library you use, but you can minimize the possibility.

Every C programmer should read 'Writing solid code, Maguire' in every six month, but i don't know any.

Also 'Practice of programming, Pike, Kernighan' at least once a year. People are lazy.

I do my programming mostly in Go these days and avoid C as much as i can, but it still has use, mostly for legacy reasons though.

Pajeet detected.

>pajeet
>C
>practices

did you really have to work with a pajeet or are you just shitposting, maybe you are a pajeet?

They do, but also it's just trying to keep track of state in millions of lines of code and portability. "This cast to X is now a cast to Y on this architecture" type things. Like the dreaded arithmetic VS logical bit shift that has fucked up many portable programs.

C was great when there was just a few machine targets, and you could reason about a single program that only had a few hundred lines instead of 17million+ lines like today.