Live data from Hacker News

Ask HN: Do CS students enjoy C anymore?

news.ycombinator.com

71–80 of 101 posts

Re: Ask HN: Do CS students enjoy C anymore?

#71
I'm a student at Stevens Institute of Technology...

As an introductory language, you are taught Java but when you move up to higher level courses such as Algorithms, Data Structures, etc you will us C.

I've also taught myself C++ and I prefer it over C but I have no issue working in any language provided I learn the syntax.

Re: Ask HN: Do CS students enjoy C anymore?

#72
post #68
post #62

Earlier quoted context omitted.

I had never heard of IDA Pro before, so I just took a cursory look. I don't think it provides significantly more information than objdump does, which we explicitly tell the students to use.

All the information is in the binary, sure, but IDA makes the process a lot less tedious. objdump doesn't give you the pretty "graph view," showing the basic block structure of the code. (In particular, this is really nice for switches and other jump tables.) It doesn't make it trivially easy to see where certain rather important-looking strings are referenced in the code. It doesn't show strings that are being refer…

The Hex-Rays decompiler would probably make short work of the bomb lab, but I don't think IDA Pro would make much of a difference.

For disassembling a large program, sure, but the program and the functions themselves are relatively small. They already know the basic structure of the bomb because we give them a C skeleton that calls all of the functions. The string pointer fetching would probably be the most useful, but once they figure out how to do it once, they only need to do it four or so more times.

Re: Ask HN: Do CS students enjoy C anymore?

#73
post #59

Earlier quoted context omitted.

I used that book 5 years ago (2nd year system course). I love it (except the part where it teaches some weird language called HL or something...) I love the bomb lab exercise! LOVE LOVE LOVE LOVE! At my university, we split the book into two courses if I'm not mistaken. We moved away from a typical OS book (Albert S., Andy T., Stalling, type of book) to this. There are side effects though. The MOS, OS Concept, OS Con…

I really believe that hacking is a good way to get students excited about systems programming and working at the systems level. I also noticed a stack smashing lab. Good stuff.

Definitely, it's more like a game for me.

Re: Ask HN: Do CS students enjoy C anymore?

#74
post #22

Did anyone ever enjoy writing C, especially data structures? Here is what I remember from college: ./program Segmentation fault.

I took a (mandatory) class on C as part of my degree ten years ago. Your description matches what I saw around the lab. They dropped C the following year.

I think the reason for this is that coding in C involves knowing a lot about the insides of a computer (eg. what memory even means, how it is addressed, why allocating a string isn't trivial at the machine level and thus requiring pointers in C, indirection, etc). In other words, there are many prerequisites coming from various other classes.

Another example of the sort of thing I mean, although it doesn't directly apply to C: it's hard to understand space and time complexity (ie. big O) without understanding the complexity of basic steps that requires knowledge of the types of things a CPU can do (eg. that memory is effectively a vector, changing a location in memory is O(1) but inserting data into a vector is far more expensive).

IMHO, there simply isn't time for classes to cover all these prerequisites thoroughly (ie. to a level needed for practical coding in C) before a C class can commence. With something like Java or Python you can ignore the complexities until you have had time to learn them. With C you can't.

Thus, it isn't sensible to teach C in college. At least not as a mandatory thing for a CS graduate. And the moment it isn't mandatory the hard classes will get dropped (I took harder classes because I found them interesting, but that lowered my average compared to what I might have achieved otherwise).

Re: Ask HN: Do CS students enjoy C anymore?

#75
I'm a CS student over in Pittsburgh at Carnegie Mellon. While the intro courses are currently in java (and transitioning to an in-house pared-down C) Our 2nd year systems course is taught in C using the "Computer Systems:A programmers perspective" book (its actually written here), and our OS class is in C, while the other upper level systems electives use C++ for the most part. Come out to CMU and you'll find plenty of C lovers and systems hackers. Our OS class kicks your ass when it comes to OS level stuff and use of C/pointers/stuff. I don't know anyone who got B or better in that class and came out of it a novice with respect to C.

Re: Ask HN: Do CS students enjoy C anymore?

#76
Look for schools that teach primarily in C. At least when I was a student, Santa Clara University (Computer Science and Engineering department, then two departments: "Computer Science/Math" and "Computer Engineering") did that (with the exception of one Haskell-based course and several courses which gave students a choice of language to use). Not sure if it's still the case.

My local community college (where I started) - De Anza College did that as well. I am sure there are many others, just they may not be the most well known ones.

Not all the top graduates will want to go into systems programming, however. Great chunk of user-level systems programming (e.g., network services, distributed systems) is also being done in languages other than C. I suspect, many no longer view having real-world C experience (as opposed to just knowing it) as imperative for their career.

That said, I am not sure exactly what level of C proficiency are you looking for. I am guessing, strong knowledge of UNIX Systems Programming (IPC, interfacing with the VM, etc...) and BSD sockets? You can only learn this through experience and/or working meticulously, through Richard Stevens' books (I _highly_ recommend the former, even if you don't intend to touch C again). You can't expect to hire people with that knowledge straight out of college, but you can hire students with "good C programming ability and strong understanding of operating systems internals, who are interested in learning systems/network programming" (to put in terms of a job description) i.e., they should know what producer/consume problem is, but they may not always know all about UNIX signals, IPC mechanisms and the Linux VM.

[Edit]

Others have suggested to look for students who took an operating systems course. That's likely the best bet.

Re: Ask HN: Do CS students enjoy C anymore?

#77
I think students aren't offered the opportunity to see what a language like C can do for them. Their are plenty of examples of cool webapps and mobile apps out there for them to see. C isn't sexy anymore. I enjoy C because I like working close to the machine level, without having to do assembly. Not a lot of people want to code up apps for hardware anymore. It's all about webapps and mobile apps right now, and this is what they see.

Re: Ask HN: Do CS students enjoy C anymore?

#80
I enjoy C because I like strongly typed languages, explicit code as apposed to ambiguous typeless languages. I haven't, however, found many companies hiring C programmers. I've been working for web startups in San Francisco for a while and have talked with a lot of developers at events and it seems to me that there is less and less focus on optimization in general, which is why there is less interest in C. The fact is that C becomes less relevant by the day. Rails and python developers are in high demand - C not so much.
Post reply on HN