Live data from Hacker News

Poll: Do you know C?

news.ycombinator.com

171–180 of 208 posts

Re: Poll: Do you know C?

#171
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 program primarily in C and believe I know all there is to know about it. But I have never read K&R. A few weeks back, I started reading it, got bored and gave up. But I keep running into people who swear by K&R. Do you guys think it is worth a read after the fact?

I've been programming in C since 1990, and I still use K&R, although it's mostly Appendix B (the Standard Library) at this point (I find it easier to read than the man pages). The only other C book I have (and consider worthwhile) is Plauger's _The Standard C Library_, not only for his implementation but for the history behind the Standard Library.

Re: Poll: Do you know C?

#172
I selected 'none of these options apply to me.' I worked with C for many years (pidgin was written in C) and did some C at my first, second, and third jobs. However, I haven't had a need to write anything in C in about 7 years so I am more than rusty at it.

I didn't feel like "I learned some C" applied. That could be my awesome sentence parsing skills at work, though. :P

I wonder if I could get back into the swing of things easily. I should give it a shot.

Re: Poll: Do you know C?

#173
I'm on the younger end of the age-scale (23), and i would have to agree that less people are learning C as a matter of course these days. Over the whole programmer population the percentage would be very low, but the hacker population is almost defined by its use of C. Many notable and large hacker projects are based on C; Mozilla, Linux Kernel, GNU tools, etc. I think this is in part because the community has such a strong legacy and is driven to keep building and extending what has come before, but also because of the higher average programming ability in the hacker community compared to the general programming population.

From my perspective using Linux is one reason i know some C, but the greater reason is because my formal education included embedded C programming with microcontrollers. Programmers going through pure software engineering courses seem to focus much more on computer science and web development concepts, rather than systems design and programming. That said, i'm sure my experience is not typical, and other universities probably use C in some part of their courses.

In terms of actual programming, i haven't yet found a project which required the use of C, and in the cases where i have used it i've often stumbled more with the bulky IDE and build configurations than the language itself. My particular trouble is around external references and including code not in the standard library, and then the further dependency hell.

Searching around i haven't really found any C tutorial that really covers this sort of stuff really well, most tutorials focus on the language itself (which i don't really have an issue with). Does anyone know any good resources on how to set up an optimal and easy to manage C development environment?

Re: Poll: Do you know C?

#175
post #140

Earlier quoted context omitted.

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…

I was teaching one of my good friend C way back in undergrad(1999). After explaining him about loops among other stuff...i asked him to print something in loop. And this is what he wrote For(i=1 to 10) {then print i; } Today my friend is working as a techie ....senior mgr at his new company!

Seems like you need to improve your teaching abilities?

Re: Poll: Do you know C?

#176

Earlier quoted context omitted.

I'm 25 and consider myself very well-versed in C (though I still have to consult the C99 spec from time to time). When I was learning to program modern computers around the turn of the century, it was the only "serious" language for writing desktop apps (I had recently "graduated" from VB4). I then refined my skills over the course of my electrical & computer engineering degree and a short stint in the EE industry, w…

FPGA designer here. I don't think it's accurate to claim that SystemC is replacing VHDL and Verilog for ASIC/FPGA design. I view SystemC as a niche tool to allow software engineers to dabble in hardware design. I use C for embedded software, but would never dream of designing hardware in anything else except pure HDL. It's a bit like trying to write a letter in a foreign language using Google Translate-- the results…

Ah, that's good to hear. And here I was thinking HDL was going to hell in a handbasket :)

Re: Poll: Do you know C?

#177

C, if you want, can run completely without a runtime. Few modern languages can claim that. It's what gives C both its notoriety and power.

That's why C is used in embedded systems. A trick that I like is to write some critical code in C, compile with the -s switch, then optimize the assembler code and in-line it.

Re: Poll: Do you know C?

#178
post #13

C is the language I use when I just want to sit down and enjoy "resonating with the computer". Python, Java etc feel like I am "working", or "cheating" as the case may be in Python. With C you are conscious of the memory of the computer and the lovely datastructures you are forming on top of it and the whole elaborate dance. I hear that Lisp programmers get a similar feeling but I am not close to seeing that yet.

My experience is the exact opposite.

When writing C, I have to spend time thinking about the syntax and memory management.

Although I have spent much less time using Python, when writing Python I am only thinking about the problem domain and algorithms.

Re: Poll: Do you know C?

#180
post #159
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 wish there was a K&R like book for every programming language.

I liked The Ruby Programming Language book because they attempted to do just that. K&R is a good model for books to follow.
Post reply on HN