Live data from Hacker News

Poll: Do you know C?

news.ycombinator.com

141–150 of 208 posts

Re: Poll: Do you know C?

#141

Earlier quoted context omitted.

Reminds me of some C-code I was told to port to Linux (if I remember correctly) some years back (probably in 2003). The code was from 1981 (it said so in the comment header). Except for the fact the code was almost as old as I am (born in 1976) it turned out that the security check that the code was supposed to perform didn't actually execute. Yepp, that's right, the code had been running for 30+ years doing nothing.…

This reminds me of an interesting event that occurred in my C++ class. During one of the assignments I looked at a peers code. I became convinced that the code was wrong. His code looked a little like this: bool operator He ran the code and it worked. I was confused. Another student saw the teacher pass him and copied his implementation. His code didn't work. It gave the stack overflow error that I was expecting. It…

In gcc this would not give a stack overflow error.

Re: Poll: Do you know C?

#142
post #98
post #38

I've been programming in C for longer than my current manager has been alive. :-)

I think it's actually funny that the question, whether we know C. A few years the question would have been if people know assembler. That's how times change.

Sadly, all the assembler I know is from fighting Core Wars.

Re: Poll: Do you know C?

#143
+1 to the non-existent poll entry that says:

"I know C thoroughly, though I barely ever use it these days. I used it for so long and during such a formative period of my overall programming career that I can read/write C code with virtually no spin-up time even though I find myself touching C code very rarely. Oh, and btw, when I find myself coding C on a nix box, I am still amused at how I have muscle memory for all those old emacs commands I also haven't used regularly in about a decade though I wouldn't be able to tell you what they are without doing some keyboard mime exercises."

Yeah, well, I guess that is a bit too long to be a poll entry.

Re: Poll: Do you know C?

#144
post #104

Earlier quoted context omitted.

Au contraire, a modern C++ developer probably knows nothing about C. Good C is like good assembly language: dense and performance-obsessed. No objects, no exceptions, no STL, bare bones and riddled with pointer manipulation and macros.

No objects = no structs?

There are structs in C, as well as unions, but they are data only - no methods.

Re: Poll: Do you know C?

#145
post #76
post #55

Earlier quoted context omitted.

You don't know C. Coding in C and C++ has diverged significantly enough that they are two completely different languages. That said, answer #3 or #4 makes sense.

Precisely! It always is a red flag when new graduates have "proficient in C/C++ " in their resumes. I've found that these people tend to write code in a combination dialect of C and C++ that I call C+.

The fewer C++ features you use, the more likely it is that you will eventually write a computer program that actually runs.

Re: Poll: Do you know C?

#146
post #130

I wish more languages had books equivalent to K&R. Here's how I learned C. 1. Buy K&R. 2. Read it. Maybe 2 or 3 times during the process of reading it, I would go write a program to try what I had just learned. This was was around 1980, so trying a program meant walking across campus to a terminal. I could either head to the computing center and use a public terminal, or to the high energy physics building (where I h…

I spent more than a decade (from the age of about 10) learning to program from a wide variety of books, about a variety of languages. I'd written software in Basic, Pascal, C, Amiga E, ARexx, and assembly. It wasn't until I read K&R in my mid-20s that it all actually started making sense (especially C, but everything made more sense after K&R). Up to that point, I'd been copy-paste programming, imitating, etc.

K&R is simply a brilliant programming text. It might just be the right learning model for me, and maybe others can learn as well from other books, but I'd read a dozen C programming books (all much thicker than K&R, but much less valuable) before K&R, and it never really took until K&R.

Re: Poll: Do you know C?

#147
post #130

I wish more languages had books equivalent to K&R. Here's how I learned C. 1. Buy K&R. 2. Read it. Maybe 2 or 3 times during the process of reading it, I would go write a program to try what I had just learned. This was was around 1980, so trying a program meant walking across campus to a terminal. I could either head to the computing center and use a public terminal, or to the high energy physics building (where I h…

Check out this previous thread: 32 years on, K&R's "The C Programming Language" still stands alone

http://news.ycombinator.com/item?id=1245255

Re: Poll: Do you know C?

#148
post #130

I wish more languages had books equivalent to K&R. Here's how I learned C. 1. Buy K&R. 2. Read it. Maybe 2 or 3 times during the process of reading it, I would go write a program to try what I had just learned. This was was around 1980, so trying a program meant walking across campus to a terminal. I could either head to the computing center and use a public terminal, or to the high energy physics building (where I h…

here is a link to the book tzs is talking about, for those who are interested

http://ifile.it/vo6ezb

Re: Poll: Do you know C?

#149
I learned draft ANSI C++ before C. Actually there wasn't that much to learn outside of the definition of NULL and where you could stick variables declarations.

The only time I use it these days is when I go into random open source projects to fix bugs or occasionally add a feature.

Post reply on HN