Hacker News new | ask | show | jobs
by festivusr 6426 days ago
Aside from the inflammatory headline, what the article seems to be saying is "teach more about concurrent programming during early software programming courses," which seems reasonable enough. Like pointers, concurrent programming concepts seem to be a tough pill for some CS students.
2 comments

Let's also not forget that Paul, as an employee of Intel has interest in boosting his company's strategic direction (many-core). I think this may explain the ostensibly inflammatory headline.

Nevertheless, you can still see what Paul is trying to get at: CS curriculums are woefully under-preparing their students for a parallel world.

if you believe it's going to be a parallel world in the future. I think that's still up for much debate.
Since clock speeds have pretty much hit a barrier - the only way to go faster will apparently be to leverage parallelism.

It's worth pointing out that the "speed-of-light collides with 20+GHz serial processor" See http://www.hppc-workshop.org/HPPC07/Vishkin_HPPC07.pdf

When I realized that by the time the light leaving my monitor reached my eyes, my CPU already completed at least three more instructions, my appreciation for clock speeds hit a new high.
That hardware will continue to expose more levels of parallelism is almost certain at this point.

That most software will consciously need to exploit that parallelism is not as clear. It's possible that some applications will be able ignore parallelism, but overall system performance can still be improved by being able to schedule multiple processes in parallel.

Exactly. Moreover, most programmers will simply use high level primitives from some library where concurrency is deep buried, so they won't need to worry about it at all.

I suspect that people that talk about everybody using concurrency by themselves haven't thought what the future applications will use CPU power for. 3D graphics, IA, image and voice recognition... all these applications are susceptible to be encapsulated in some black box and used through a simple API. In fact, how many programmers are using right now complex APIs? I think it's a tiny fraction. It would be naive to think that suddenly the new generation will be full of highly skilled programmers.

Web apps is a clear example of heavily concurrent application where concurrency can be simply ignored most of the time by most programmers.

Exactly. Moreover, most programmers will simply use high level primitives from some library where concurrency is deep buried, so they won't need to worry about it at all.

And who writes the libraries? I'd suggest that if you're only gluing together libraries, much of a rigorous CS training is wasted anyaways. You could do just fine with very little formal training on algorithm design and analysis, and a rather shaky understanding of the fundamentals of algorithms, if that's all the programming you do is. You're probably better off with a trade school.

If you're going to be doing anything challenging in the programming domain, you'll want a good grounding in concurrency.

And as more things are run on servers, and less on clients, do we need to go faster on the client?
It's not necessarily all about speed (or what theorists would refer to as single-task completion). It's also about increasing throughput.

Google adds a pinch of concurrency to its web browser (each tab running in another thread) and it improves the client side experience.

I don't think throughput is a barrier at the moment.

The main touted benefit I've heard of Chromium's tab-threading is insulation, so if one tab crashes it doesn't bring the whole browser down.

In Chrome each tab is a separate process, which is mostly for stability (if one crashes it doesn't take down the whole browser).
Maybe we do: faster client-side AJAX would create a much better user experience... but how much this is needed, I don't know. Maybe it doesn't really matter?

At any rate, speed can be increased substantially without faster hardware, but with: (1) efficient implementations of javascript (Chromium); (2) faster Flash (AS3 + AIR); (3) web-friendlier Java (JavaFX); or even Sliverlight.

But the nice thing about faster hardware is you get faster apps without rewriting or learning new tech - opps, unless that faster hardware is many-core[⁎]...

Another reason to not need many-core is that desktop apps are already fast enough for the staples (word processing, spreadsheets). Hence the rise of sub-notebooks, the iPhone, and the best-selling games console being by far the least powerful (wii).

[⁎] many-core (as opposed to multi-core) technically means heaps of processors - tens or hundreds. It is a qualitatively different situation from one thread per processor.

Pretty much anyone working with 3D, Image processing, AI and in many simulation areas will hope for more speed for a few more years.
Extracting parallelism from rendering code is well-understood and has been for a decade or more. Intel is hyping all this as if it's something new but really it's well-understood stuff being implemented inside one box instead of being spread across many.
you need to stop fighting the future
Basically CS curriculums are woefully under-preparing students.
CS curriculums are woe
I'm not sure how you can talk about concurrency without talking about locks and other such topics, which I think is very ambitious for new programmers.

However, if universities start teaching programming with pure functional languages (which is highly unlikely), concurrency becomes a much easier topic for discussion.

Perhaps this is the sort of thinking that will lead to more universities adopting something like PLT Scheme, which in recent versions, has moved the notion of mutable pairs into a library. Doing this might bring functional languages out of academia and more into the mainstream, which would be fantastic.

I remember fellow students having trouble grasping pointers, even after a 2nd year architecture course, which I thought was completely absurd since they were writing assembly code without tremendous strain.

Often when competent programmers are having trouble grasping pointers, they are actually doing fine with thinking about pointers in abstract, but having trouble with the notation describing a particular instance of them. (Especially with C programs.)

One of the things that doing good OO and following the Law of Demeter does for you is to reduce the levels of indirection you have to deal with to one or two.

From what I've seen helping people I know handle pointers, they're really actually having trouble with the concepts of pointers. Getting them to draw the box diagrams with pointers correctly is challenging. The notation is an extra challenge, but it's not the main difficulty.

It's not the notation, it is the concept.

Only time I've seen difficulty with pointers in the abstract is when helping people in intro programming classes in C. Once you're past that level, programmers get it, but they get confused by what the code is actually saying.
What really helps in that situation is a good debugger, that lets you quickly look up blocks of memory (e.g. where the pointer references). Obviously it should be stable enough to handle bad pointers (giving an error message instead of crashing is nice).

The old CodeWarrior debugger was great for this. Lots of windows you could pop up for every in-memory object you cared about. sigh

You should take a look at ddd. I've never used CodeWarrior, but from your description it sounds a lot like ddd.
ddd's nice, but CW made it a lot easier to stay close to the machine-level. Nothing like a good window'd hexdump to browse :-)
I'm not sure how you can talk about concurrency without talking about locks ... which I think is very ambitious for new programmers.

I agree. I don't think it should start from CS1, but you can start with the Dining Philosophers problem in CS1 to introduce the ideas of locks and starvation.

I'm not sure how you can talk about concurrency without talking about locks

that is because you have slept through the entire revolution of share-nothing concurrency

I don't see how share nothing concurrency solves the "problem" of learning about locks. While locks in a share nothing concurrency architecture is not a problem, it is in other concurrency setups (you know, like threads?)
I think his point was that you don't need to learn about locks to learn about concurrency, which is a valid point. The problem with the point, at least as I see it, is that first year programming classes (at this point in time at least) do not teach languages that have concurrency models that really support it, nor do they eliminate the problem of synchronization by providing immutable data structures.

I, just this afternoon, heard Guy Blelloch give a talk about Parallel thinking today, and he seems to support the idea of teaching parallel programming throughout the curriculum almost instead of sequential programming--making sequential thinking the oddity. I think this makes sense, but it obviously has some flaws...

* do not teach languages that have concurrency models that really support it*

I don't know that I agree with that at all. My first college CS class taught Java, definitely supports concurrency. It's not Erlang-like concurrency, but concurrency nonetheless.

Theres a trend to start teaching Python as a first language, that supports it as well.

Please elaborate.
search "shared nothing concurrency"...read sutter's "the end of the free lunch"...