Live data from Hacker News

Dijkstra on Haskell and Java (2001)

chrisdone.com

71–80 of 253 posts

Re: Dijkstra on Haskell and Java (2001)

#71
post #63
post #42

Earlier quoted context omitted.

I disagree. The whole point of abstraction is that you don't have to care about the underlying mechanisms (although most non-trivial abstractions are leaky as Joel Spolsky has written about). For instance, someone who writes assembly should not have to know how a transistor works. A course in introductory programming similarly should not be about how a processor works.

It's trivially easy to write perfectly valid looking Haskell programs that are abysmally slow because of how they are actually executed, and since the reason for this can't be explained at a level of abstraction of such a course, people learn to treat the language as a closed black box, while you can't really competently use any language without understanding its execution model. Abstractions are fine, but you have t…

It's worth noting that Djikstra (to my understanding) thought almost none of that was even contained in the field of CS. His perspective was that CS was about process and verification and proof and thus while the current implementation of computers is interesting, it didn't deserve any privilege.

So being able to prove certain nice properties about algorithms without worrying about the underlying implementation is exactly what Djikstra believed important and something that Haskell does allow you to do... even if the result is abysmal performance.

It's worth noting as well that there's a whole wonderful book [1] that provides a great glimpse of good Haskell style with the conceit that one should program the most abysmally slow correct thing first and then use algebraic theories to transform it along obviously correct paths to something highly performant.

[1] http://www.amazon.com/Pearls-Functional-Algorithm-Design-Ric...

Re: Dijkstra on Haskell and Java (2001)

#73
post #51
post #39

Earlier quoted context omitted.

It may be turning around now, but applicants for compsci at Cambridge were apparently getting pretty dire by 2006, and this formed a significant part of the motivation for the Raspberry Pi ( http://www.raspberrypi.org/about ) > The idea behind a tiny and cheap computer for kids came in 2006, when Eben Upton, Rob Mullins, Jack Lang and Alan Mycroft, based at the University of Cambridge’s Computer Laboratory, became co…

Strangely I found myself struggling to pick up Standard ML despite having experience in C++ compared to my peers with no programming experience. It seems that they just treated it as math, while I had trouble changing my imperative programming mindset. Also Larry Paulson is a legend.

It's an incredible experience when the bit flips in your brain and you start understanding recursion and top-down design. I don't use ML any more, but it's definitely affected my coding and problem solving style :)

Also, I once heard that Larry Paulson stopped going to a certain college's annual computer science dinner because he was hit with a pineapple during a food fight. Bastards.

Re: Dijkstra on Haskell and Java (2001)

#74
post #43

Earlier quoted context omitted.

The C of statically typed functional languages is OCaml.

Which is more complicated and less expressive than haskell? That seems like a pretty bizarre choice.

When I used OCaml, I almost never used the object system. I didn't need it.

The "full" OCaml is pretty complicated, but most of the libraries don't force the "O" on you. (That said, if you're going to use OCaml, you should use the Jane Street libraries, which are far better than the standard library.)

Re: Dijkstra on Haskell and Java (2001)

#75
post #65
post #16

Dijkstra assumes that students will already have been exposed to imperative languages before joining university, and will appreciate the change. I think that this assumption might leave behind students that have not yet been exposed to any programming (that stuck). Over in the UK I certainly hadn't encountered anything more complicated than html before I hit university, and was very happy with sticking with Java for…

Please, don't get me wrong, but why would someone with no programming experience pick compsci? It's not exactly a sexy career (for every übergeek in shorts with a Macbook Air there is an army of corporate drones with comporate-issue desktops using whatever tools corporate IT mandates, wearing corporate-standard neckties), it's difficult (to do it right) and financial return is far from assured.

I went to search for the data to throw in the face of these assumptions, and found some corroborating evidence :)

http://www.studentbeans.com/student-money/a/degree-courses-w...

According to these numbers, of the 2006/2007 graduates in the UK, Computer Science had the highest unemployment rate after 6 months (10%).

Re: Dijkstra on Haskell and Java (2001)

#76

Around the same time, my alma mater was switching from Scheme to Java for their introductory courses. Last time I went back to homecoming, it seemed that most the professors were feeling pretty dissatisfied about the decision. One of the big reasons mentioned was that Java's just too big and hairy of a language. They end up spending all their time teaching API quirks and software engineering principles (such as prett…

I had my formative education based on SICP and I can confidently say it made me a better (Java and other) programmer. I work with Java every day and I am very productive with it, but teaching it as a first language is foolish imho.

Re: Dijkstra on Haskell and Java (2001)

#77
The worst thing I have observed is colleges choosing Java (and C#) "because that's what the market demand".

When I was in college (1986, engineering, not compsci) students started with 8-bit BASIC and FORTRAN (I mostly skipped classes on BASIC because I had learned to program on my Apple II). One year later, they switched from BASIC to Pascal. Later on, one of the teachers decided to teach APL. It was a wonderful experience because it was a different take on my previous paradigms.

I am not sure what is the best way to teach someone how to program. When I was a kid, you turned your computer on and immediately got to a REPL (one Dijkstra would strongly disapprove, but still a programming environment). IMHO any programming language that demands an IDE or a build system more complex than make (even if hidden behind a shiny GUI) should not be used as an introduction. Paraphrasing Dijkstra, it could damage the young minds beyond repair.

If my Apple II booted into Eclipse, I'd have gone into cinematography.

Re: Dijkstra on Haskell and Java (2001)

#78

Earlier quoted context omitted.

> Actually, if your students cannot understand what this line is after one full class of Java, then the problem is with the teacher, not the students. I think you're dead wrong about that. Assuming somebody with no programming background at all, here is a (definitely not exhaustive!) list of things that must be learned in order to understand that line: Method visibility, what is a "method", what is a "function", what…

Plus, each of those concepts needs a motivation and a context in order for it to stick in their minds.

Yeah, maybe you can get through slides with all the basic data about all those topics, but you have no chance of actually teaching them.

Re: Dijkstra on Haskell and Java (2001)

#79

Around the same time, my alma mater was switching from Scheme to Java for their introductory courses. Last time I went back to homecoming, it seemed that most the professors were feeling pretty dissatisfied about the decision. One of the big reasons mentioned was that Java's just too big and hairy of a language. They end up spending all their time teaching API quirks and software engineering principles (such as prett…

Get a clean OOP environment http://www.pharo-project.org/home

Or this one that runs on your browser: http://amber-lang.net/

Re: Dijkstra on Haskell and Java (2001)

#80
post #67
post #34

Earlier quoted context omitted.

That's not really a bad thing. First, no beginner is going to be learning about coding OSes so teaching the basics isn't a problem. Secondly, Java OSes are far more common than you'd think, although this was more true of 5 years ago when many phones/smartcards/etc used Java in their OS internals. A lot of the topics in OS concepts would probably be useful if you wanted to hack on OSS Android too. So I don't think the…

> It's a shame more classes don't actually just have all 100 students work together on a single code base - it would be incredibly beneficial I up-voted your comment as a whole, but I really disagree with this statement. It's reality in many situations, but I think it's a shame that anyone has to work together with a team of 100 on anything, ever. You deal with it, and you solve the problems associated with it, but t…

You could go halfway, and have the student's projects all expose / consume web APIs to one another.

Of course then you'd have the student that forgot to include SQL injection protections getting their project goat.se'd during a demonstration.

Post reply on HN