LWN.net Logo

Where have the universities gone?

Where have the universities gone?

Posted Jul 24, 2007 22:05 UTC (Tue) by ms (subscriber, #41272)
Parent article: Where have the universities gone?

I'm hoping the Editor may follow up on this: look around for projects that are coming out of Universities. Now look at the languages they are being written in.

I'm at Imperial College, London. There is the tiniest course on C which we all hated. In fact, now I think about it, I can't name a single University in the UK that teaches C in any great detail. Sure, I've done a couple of courses on Operating Systems; I've run RISC OS, BeOS, GNU/Mach/Hurd, Debian/Linux and messed about with L4 for a bit. I know the principles and always read the LWN Weekly kernel section carefully and thoroughly - it is interesting stuff.

But it's in C. I plan to die before ever touching the damn language. Imperial College, Computing degree. First 6 weeks: Haskell. I'm reasonably sure Edinburgh do something similar with ML. The best Universities do not in any way at all care whether or not their students can program, and any languages taught will be far removed from C. Personally I love to program, I really enjoy it and I write lots of code. But there's just no way I'll ever write anything more than 5 lines long in C.


(Log in to post comments)

Where have the universities gone?

Posted Jul 24, 2007 22:50 UTC (Tue) by JoeF (guest, #4486) [Link]

C is pretty much high-level assembly language. That's why it is well suited for things like an operating system kernel. Try writing a kernel in Haskell...
Programming languages are nothing more than tools. Professionals use the tools that are best suited for the task at hand. If C is best suited for a task, it is the language that should be used. If Haskell is best suited for a task, use it.

Where have the universities gone?

Posted Jul 24, 2007 23:03 UTC (Tue) by ms (subscriber, #41272) [Link]

Absolutely, I'm in complete agreement with you JoeF - using the right tool for the right job is a great idea. The problem is the job is normally bigger than one tool can cope with. I would think that where you need to chuck bits in and out of registers, actually writing device drivers etc, that's C's domain. Writing millions of lines of code adding abstractions and interfaces to that isn't.

But this is besides the point - few lecturers at Universities are themselves competent C programmers and even fewer are going to teach courses in it.

Where have the universities gone?

Posted Jul 24, 2007 23:55 UTC (Tue) by bfields (subscriber, #19510) [Link]

I don't know how important it is that universities teach C. It's not as though it's a particularly complicated language, and I suspect a lot of kernel hackers picked it up as they went along.

Where have the universities gone?

Posted Jul 25, 2007 1:05 UTC (Wed) by JoeF (guest, #4486) [Link]

Teaching of programming languages to CS majors is IMHO rather unimportant.
The important stuff wrt to programming languages is the teaching of programming paradigms (procedural, object-oriented, functional, etc.)
The rest is just syntax of specific programming languages.

Where have the universities gone?

Posted Jul 25, 2007 1:56 UTC (Wed) by allesfresser (subscriber, #216) [Link]

I sort of agree with you in that teaching any one flavor-of-the-month (in my distant youth: FORTRAN; in college: C and these days: Java) as the main course in CS is getting the cart before the horse. Personally I'd like the major to begin with a course in debugging, and then everything else is variations on that theme. :)

Where have the universities gone?

Posted Jul 25, 2007 5:38 UTC (Wed) by dlang (subscriber, #313) [Link]

my High School CS teacher had it right,

the first class was an intro to BASIC (on TRS-80's), teaching you enough to be comfortable writing software.

the second class was advance algorithms, and half of the final was "here's a program (about a page and a half), it doesn't work, it has no documentation. figure out what it's supposed to do and fix it"

after that you went to to assembly and other things, starting by flipping switches on an Altair 8000 and moving on from there.

by the time I got to college the classes all seemed do boring, 10 min of useful info for each hour of class (if I was lucky)

Where have the universities gone?

Posted Jul 25, 2007 8:48 UTC (Wed) by jmoellers (subscriber, #29863) [Link]

> Personally I'd like the major to begin with a course in debugging, and then
> everything else is variations on that theme. :)

You're joking, right! The smiley is way too small.

Anyone getting involved in CS should start with a course in analysis and design, then follow that by a course in analysis and design, topped by a course in analysis and design.
Too many code is produced by starting to code and the throwing a debugger at it. Few "programmers" spend any time sitting down and *thinking* about the problem, *analyzing* the requirements, *desiging* a solution.
*Implementing* it in some language (C, C++, Java, Perl, Haskell) is the very last step. *Debugging* should hardly be necessary.
Oh yes, I almost forgot: please teach your students how to write. *Documentation* seems to out of fashion nowadays. BTW Writing down how and why the code works tremendously helps in getting it to do what it should do.

Where have the universities gone?

Posted Jul 26, 2007 0:28 UTC (Thu) by ronaldcole (guest, #1462) [Link]

Surely you're referring to The Mother Of All Debuggers: printf. I still shake my head when I fire up a GNOME app from the command line and see all the debug spam that splashes on my terminal.

Where have the universities gone?

Posted Jul 26, 2007 6:51 UTC (Thu) by jmoellers (subscriber, #29863) [Link]

> Surely you're referring to The Mother Of All Debuggers: printf

No, I'm not. I'm referring to the Mother Of All Debuggers: Brains(tm).
Too much software is written without it, too much software is produced without thoroughly thinking before writing and then it is tested and debugged into some semi-final state before being shipped.

I do agree that debugging is necessary in certain cases, but putting it first is like requiring every car owner to have a fully equipped garage.

Where have the universities gone?

Posted Jul 25, 2007 14:15 UTC (Wed) by zooko (subscriber, #2589) [Link]

Indeed, I strongly suspect that teaching C to people who are not already proficient in saner languages makes them worse programmers. They understand algorithmic abstraction worse, they are more fearful and less self-confident, and they think that programming is an awful chore and not much fun.

Using C (or even worse, C++) as a teaching language is a terrible idea for both pedagogy and for practical skills.

On the other hand, someone who is already proficient in other languages would be made a better programmer by learning C.

Where have the universities gone?

Posted Jul 25, 2007 4:09 UTC (Wed) by mikov (subscriber, #33179) [Link]

Let's be objective here. Today knowing C is one of the most fundamental requirements for being a programmer, software engineer or a CS. C may be a terrible language (in certain contexts), but _everything_ is written in C and there is no way (in hell) of achieving an understanding of how computers work today without a very good knowledge of C.

Let's be practical. Regardless of our opinion of C (I am not a big fan :-), I see zero chance of this changing, say, in the next decade.

For example even when our company is hiring Java programmers, they wouldn't touch one who doesn't know C well with a ten foot pole.

So, if teachers and students in universities don't know C well, that means only one thing - that they are both sadly incompetent.

I remember my own unfortunate CS education 12 years ago. We hard courses in ML, Pascal and a tiny bit of C and C++. It was ridiculous, and I can say outright that I learned zero about programming during my days in the university. Today there are just a few of us, from the entire class, that work in the field of computers at all, let alone as programmers.

In my opinion nowadays it is far too late to learn how to program in the university. I don't think it is something that can be _taught_ from scratch. Obviously most good programmers who now are in their 30s started programming much earlier on their own. (It wasn't like that for previous generations, as they simply didn't have access to computers that early)

Where have the universities gone?

Posted Jul 25, 2007 6:18 UTC (Wed) by khim (subscriber, #9252) [Link]

So, if teachers and students in universities don't know C well, that means only one thing - that they are both sadly incompetent.

Why so ? C is easy, almost trivial. The CS is hard. Pointers are hard (and you can conjure classical pointer-related problems in FORTRAN with one array). I know of one guy who was hired as C++ programmer by Google who knew nothing about C (let alone C++) - but he knew CS, Pascal+Assembler and little Lisp. And Google's standards are pretty high.

I remember my own unfortunate CS education 12 years ago. We hard courses in ML, Pascal and a tiny bit of C and C++. It was ridiculous, and I can say outright that I learned zero about programming during my days in the university.

That's not a problem of language. The important courses learn about algorithms and basic principles. You can learn any language by just buying book and reading it. But paradigms - these are harder. These must be taught.

Where have the universities gone?

Posted Jul 25, 2007 6:29 UTC (Wed) by roelofs (subscriber, #2599) [Link]

Today knowing C is one of the most fundamental requirements for being a programmer, software engineer or a CS.

Absolutely. And I'd add that knowing assembly language (for any processor, not necessarily x86) is a highly desirable bonus; if you don't have a clue what the compiler is doing under the covers, how are you going to understand even basic performance issues like branch (mis)prediction and so forth? Hearing about them in some lecture is one thing; understanding what's going on at a gut level is entirely another.

It's sad that one of my standard interview questions, involving a certain aspect of CPU architectures, is known to no more than 25% of interview candidates. Assembly programmers would tend to do much better on it, I suspect. (I should go back and correlate resume skillsets with performance on that question and see...)

Greg

Where have the universities gone?

Posted Jul 25, 2007 7:01 UTC (Wed) by ms (subscriber, #41272) [Link]

if you don't have a clue what the compiler is doing under the covers, how are you going to understand even basic performance issues like branch (mis)prediction and so forth? Hearing about them in some lecture is one thing; understanding what's going on at a gut level is entirely another.

I fail to see how that has anything to do with C. I've done two courses on hardware - I have the P&H and the H&P books on my shelf and I've read them. I can talk for hours about the different types of branch prediction, superscalar design, different tradeoffs in cache design etc etc etc. I've written compilers. I can recite algorithms for garbage collection.

But I would not claim to have any knowledge of C. Some of the brightest programmers I know are similarly inclined. The London Banks certainly don't care about knowledge of C and I can't think of many companies in London that really do...

Where have the universities gone?

Posted Jul 25, 2007 16:53 UTC (Wed) by mikov (subscriber, #33179) [Link]

There are exceptions, of course. Perhaps for financial programming in Cobol, or for mainframe development, or simply for very smart people who can grasp the principles without actually using them, etc.

But look at it this way: 99% of all PC software, not to mention _all_ PC OS-es, system libraries, etc, are written in C or C++. Can you explain how someone can understand and program reasonably in this environment without knowing C ?

Additionally, C is not _that_ hard. Refusing (or worse - not being able) to learn it, strikes me as very surprising given C's absolute dominance. One doesn't really need to be a C wizard. It is like not being able to read, because there are audio books. Or like developing software without having any knowledge of English. Simply cannot happen.

You say that you don't know C yourself, but I strongly suspect you actually do. Even if you don't actually develop software in C, you probably can read and understand C source code, no ?

On a practical note, what language would a hypothetical professional programmer in a PC environment use ? There are not that many choices. Further, it is actually impossible to develop any sufficiently complex piece of software in a different language without ever falling back to C. C#, Java, Python, Lisp, Haskel, ML, whatever - none of them have 100% of libraries and operations that would ever be needed.

Where have the universities gone?

Posted Jul 26, 2007 4:29 UTC (Thu) by roelofs (subscriber, #2599) [Link]

I fail to see how that has anything to do with C.

Perhaps you missed the first response to your comment: C is pretty much high-level assembly language. I further opinionized that assembler itself is a highly useful thing to know, and then connected that to a more fundamental understanding of the underlying hardware.

I can talk for hours about the different types of branch prediction, superscalar design, different tradeoffs in cache design etc etc etc.

That's wonderful, but it's also highly unusual, in my experience. Most CS grads (or whatever, but looking for a job that includes doing high-performance system programming) do not have that background--or, if they do, it's all theoretical, and they're unable to make the connection between the hardware concepts and actual code. It's lamentable, but I can't say I'm terribly surprised; others have written about it over the years, and I've personally witnessed an analogous phenomenon with EEs (i.e., graduating without ever experiencing a hands-on, Horowitz-and-Hill-style lab course).

The London Banks certainly don't care about knowledge of C and I can't think of many companies in London that really do...

Banks are a world unto themselves, so that doesn't surprise me. Other companies? That does, but perhaps London really is unusual in that respect. Silicon Valley jobs (beyond scripting/web development) tend to emphasize C/C++ and/or Java experience, with less-frequent mention of C# and other languages. (Of course, maybe we're the weird ones...)

Greg

Where have the universities gone?

Posted Jul 26, 2007 11:08 UTC (Thu) by nix (subscriber, #2304) [Link]

London banks definitely do care about C. A lot of new code is written in Java, but C is still heavily used (and not just for legacy stuff, either).

The employment phase often emphasises Java because it's a buzzword, but get down to the actual work and C is still everywhere.

Where have the universities gone?

Posted Jul 25, 2007 2:37 UTC (Wed) by dw (subscriber, #12017) [Link]

I've never attended university myself, but I have got roped into helping others who have attended with their various projects. Of my local universities, I believe CS is almost exclusively Java.

The only time I've helped someone with C was for, wait for it, a music technology course. I suppose it could be construed that C is the best language for dicing MIDI, but it all seems a little arbitrary to me. :)

Where have the universities gone?

Posted Jul 25, 2007 10:38 UTC (Wed) by brinkmd (subscriber, #45122) [Link]

Actually, the current seL4 kernel from NICTA is written in literal haskell and is attached to an ARM emulator with a trap gateway. See http://www.ertos.nicta.com.au/research/sel4/.

Of course this is more useful for prototyping and formal verification than for actual use. Also, this is only feasible for modern microkernels. Still, it is done, and it is useful.

Where have the universities gone?

Posted Jul 26, 2007 10:16 UTC (Thu) by rwmj (subscriber, #5474) [Link]

Try writing a kernel in Haskell...

Programming languages are nothing more than tools. Professionals use the tools that are best suited for the task at hand. If C is best suited for a task, it is the language that should be used. If Haskell is best suited for a task, use it.

Unfortunately "professionals" generally choose very unsuitable tools for the tasks at hand. While I might not want to write the kernel in Haskell, there are lots of occasions where using (say) OCaml, Perl or Erlang would be by far the best choice. Programming professionals on the other hand know one thing and are deeply resistant to learning anything else. So there's an awful lot of rubbish written in C/C++, particularly on Linux. Look at GNOME (see the horrors of "OO" in glib), all the GNU tools (string handling in C anyone?), and a complex parallel messaging system which I'm involved in, written in C++ -- just plain crazy.

Rich.

Copyright © 2008, Eklektix, Inc.
Comments and public postings are copyrighted by their creators.
Linux is a registered trademark of Linus Torvalds