News for hackers. Stuff that matters.
Re:"Sequential programming is dead. So stop teaching it" by festivusr on Thursday November 13, 2008 @11:12AM (#363167)
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.
Re:"Sequential programming is dead. So stop teaching it" by jaydub on Thursday November 13, 2008 @11:57AM (#363216)
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.

Re:"Sequential programming is dead. So stop teaching it" by axod on Thursday November 13, 2008 @12:14PM (#363243)
if you believe it's going to be a parallel world in the future. I think that's still up for much debate.
Re:"Sequential programming is dead. So stop teaching it" by jaydub on Thursday November 13, 2008 @12:19PM (#363250)
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

Re:"Sequential programming is dead. So stop teaching it" by yan on Thursday November 13, 2008 @06:22PM (#363740)
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.
Re:"Sequential programming is dead. So stop teaching it" by scott_s on Thursday November 13, 2008 @01:52PM (#363412)
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.

Re:"Sequential programming is dead. So stop teaching it" by narag on Thursday November 13, 2008 @03:50PM (#363572)
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.

Re:"Sequential programming is dead. So stop teaching it" by orib on Thursday November 13, 2008 @05:29PM (#363680)
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.

Re:"Sequential programming is dead. So stop teaching it" by narag on Thursday November 13, 2008 @06:05PM (#363716)
Wasn't it enough to completely miss my point, you also had to put that annoying "you" all over the place. Sigh.
Re:"Sequential programming is dead. So stop teaching it" by orib on Thursday November 13, 2008 @07:16PM (#363772)
what was your point then, if not that programmers won't need to know concurrency because it will be in black boxes that they haven't written? (Bear with me, I'm a bit dense at the moment. I haven't had much sleep the last while)

I still think that programmers that are actually doing more than simply gluing together premade libraries will need to be familiar with concurrency, and that anyone taking a theoretical computer science degree to graduate and glue together libraries is probably overqualified.

Re:"Sequential programming is dead. So stop teaching it" by narag on Thursday November 13, 2008 @08:16PM (#363816)
>what was your point then, if not that programmers...

No, not "programmers", but "some programmers" or "a lot of programmers". Of course there we'll be always people that has to do the hard part of whatever, but it is a minority now and I'm afraid it will still be a minority in the future.

Don't think that everybody is as snart as you or your buddies. No sarcasm, I really believe that you get it better than my points ;-) In my experience the concurrency is written always by the same person (guess who), in the best case, that it.

That doesn't mean that I think it shouldn't be taught. Only that I'm skeptical it will solve anything.

Re:"Sequential programming is dead. So stop teaching it" by delackner on Friday November 14, 2008 @03:13AM (#364093)
I don't know if english is not your first language, but "you" in the context you are complaining about here does not mean YOU it means "ANYONE".
Re:"Sequential programming is dead. So stop teaching it" by narag on Friday November 14, 2008 @05:09AM (#364148)
It's still wrong. The point wasn't about individual perspective, but about what proportion of programmers' population does the hard work.
Re:"Sequential programming is dead. So stop teaching it" by orib on Friday November 14, 2008 @10:44AM (#364379)
It's a less archaic way of saying "one". 'when one does X' vs 'when you do x'
Re:"Sequential programming is dead. So stop teaching it" by axod on Thursday November 13, 2008 @12:35PM (#363279)
And as more things are run on servers, and less on clients, do we need to go faster on the client?
Re:"Sequential programming is dead. So stop teaching it" by jaydub on Thursday November 13, 2008 @12:41PM (#363289)
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.

Re:"Sequential programming is dead. So stop teaching it" by 13ren on Thursday November 13, 2008 @01:29PM (#363378)
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.

Re:"Sequential programming is dead. So stop teaching it" by gnaritas on Thursday November 13, 2008 @02:26PM (#363468)
Actually, I'd say the main benefit is that closing tabs actually releases memory because those processes die.
Re:"Sequential programming is dead. So stop teaching it" by Herring on Thursday November 13, 2008 @02:44PM (#363493)
New computers are coming with gigabytes of ram, I have 2. On the other hand, I rather enjoyed watching a quicktime crash take down only 1 tab. I kept loading it repeatedly.
Re:"Sequential programming is dead. So stop teaching it" by gnaritas on Saturday November 15, 2008 @02:58PM (#365495)
I have 4, that means nothing when the browser keeps bloating up and taking gigs itself because opening and closing lots of tabs all day long fragments the memory so badly that it can't release ram back to the OS when you close some tabs.
Re:"Sequential programming is dead. So stop teaching it" by Herring on Sunday November 16, 2008 @03:08AM (#365884)
Re:"Sequential programming is dead. So stop teaching it" by tlrobinson on Thursday November 13, 2008 @04:18PM (#363608)
In Chrome each tab is a separate process, which is mostly for stability (if one crashes it doesn't take down the whole browser).
Re:"Sequential programming is dead. So stop teaching it" by 13ren on Thursday November 13, 2008 @01:46PM (#363404)
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.

Re:"Sequential programming is dead. So stop teaching it" by coffeeaddicted on Thursday November 13, 2008 @02:20PM (#363456)
Pretty much anyone working with 3D, Image processing, AI and in many simulation areas will hope for more speed for a few more years.
Re:"Sequential programming is dead. So stop teaching it" by gaius on Friday November 14, 2008 @07:19AM (#364193)
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.
Re:"Sequential programming is dead. So stop teaching it" by crabapple on Thursday November 13, 2008 @01:10PM (#363337)
you need to stop fighting the future
Re:"Sequential programming is dead. So stop teaching it" by rogersm on Thursday November 13, 2008 @01:09PM (#363336)
Basically CS curriculums are woefully under-preparing students.
Re:"Sequential programming is dead. So stop teaching it" by palish on Thursday November 13, 2008 @01:53PM (#363414)
CS curriculums are woe
Re:"Sequential programming is dead. So stop teaching it" by apgwoz on Thursday November 13, 2008 @11:48AM (#363202)
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.

Re:"Sequential programming is dead. So stop teaching it" by stcredzero on Thursday November 13, 2008 @11:55AM (#363212)
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.

Re:"Sequential programming is dead. So stop teaching it" by orib on Thursday November 13, 2008 @05:32PM (#363686)
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.

Re:"Sequential programming is dead. So stop teaching it" by stcredzero on Friday November 14, 2008 @11:04AM (#364408)
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.
Re:"Sequential programming is dead. So stop teaching it" by lallysingh on Thursday November 13, 2008 @03:37PM (#363558)
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

Re:"Sequential programming is dead. So stop teaching it" by a-priori on Friday November 14, 2008 @07:24AM (#364195)
You should take a look at ddd. I've never used CodeWarrior, but from your description it sounds a lot like ddd.
Re:"Sequential programming is dead. So stop teaching it" by lallysingh on Friday November 14, 2008 @11:20AM (#364431)
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 :-)
Re:"Sequential programming is dead. So stop teaching it" by bdotdub on Thursday November 13, 2008 @01:38PM (#363395)
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.

Re:"Sequential programming is dead. So stop teaching it" by crabapple on Thursday November 13, 2008 @12:00PM (#363221)
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

Re:"Sequential programming is dead. So stop teaching it" by bdotdub on Thursday November 13, 2008 @01:46PM (#363406)
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?)
Re:"Sequential programming is dead. So stop teaching it" by apgwoz on Thursday November 13, 2008 @06:16PM (#363729)
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...

Re:"Sequential programming is dead. So stop teaching it" by bdotdub on Monday November 17, 2008 @12:27PM (#367102)
* 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.

Re:"Sequential programming is dead. So stop teaching it" by 13ren on Thursday November 13, 2008 @12:34PM (#363277)
Please elaborate.
Re:"Sequential programming is dead. So stop teaching it" by crabapple on Thursday November 13, 2008 @12:42PM (#363290)
search "shared nothing concurrency"...read sutter's "the end of the free lunch"...