Live data from Hacker News

Teenage Haskell

twdkz.wordpress.com

31–40 of 93 posts

Re: Teenage Haskell

#31

My brother (a Haskell programmer) and I (a teacher of high school CS) have talked about this often. He's postulated that teaching Haskell to kids with no programming experience would be an interesting experiment. Their lack of preconceptions regarding programming might make Haskell much easier for them to pick up, than it would for a student with experience in another language. What would be more interesting however,…

I think it's pretty great. I didn't start programming until relatively late, but the more I study Haskell the more it feels like [an evolved form of] what I imagined programming to be when I was just a kid– busy syntax and all. Admittedly my misconceptions (I'll call them that because had I begun programming as a kid it probably would've been in Smalltalk, HyperCard, or C depending on where I was at the time) are one of the things that scared me away from exploring that path, but I one of the key factors would most certainly have been the tooling. The OP came up in my news feeds earlier today and I took a look at codeworld for the first time. Had that existed while being shown something like Haskell as a kid, I think I would've come back for more.

Re: Teenage Haskell

#32
post #23

My brother (a Haskell programmer) and I (a teacher of high school CS) have talked about this often. He's postulated that teaching Haskell to kids with no programming experience would be an interesting experiment. Their lack of preconceptions regarding programming might make Haskell much easier for them to pick up, than it would for a student with experience in another language. What would be more interesting however,…

That's what my university did (Masaryk University Brno). It taught Haskell in the first semester. I, already programming in other stuff, was delighted to see a new interesting thing. Other students who already did some coding (PHP usually) reacted more like W.T.F. I'd this. I can't tell about the total newbs but in the end, only 30-40% passed. But that was mostly caused by their laziness because when they repeated th…

If your class has a 30-40% pass rate! you have to blame it more than just on laziness. Actually, I thought laziness was a virtue in Haskell.

Re: Teenage Haskell

#33

Earlier quoted context omitted.

Did they have pure intentions in that move? I thought it was more out of popularity than any good metric.

Who knows, everyone has their own opinion about it. Perhaps it was just too many parentheses for students to deal with.

MIT switched to Python because they believe modern basic CS is about controlling complex systems (web APIs, robot APIs) not walking through the history of CS from scratch and bare metal.

Re: Teenage Haskell

#34

Earlier quoted context omitted.

> Their lack of preconceptions regarding programming might make Haskell much easier for them to pick up, than it would for a student with experience in another language. Or traumatize them forever away from the field of programming. > Would they think Python was stupid or would they be grateful that all of a sudden they could use a for loop? I would love to know the answer to this, regardless of my own biases. But Ha…

It's an experiment that I'll never run. CS exam requirements are geared towards OO languages. Students have to analyse and write pseudocode using traditional programming constructs.

In which countries?

Just had a look at the curriculum of the Portuguese university I graduated from, a couple of decades ago and they still teach OOP, FP, LP across multiple languages.

Re: Teenage Haskell

#35

My brother (a Haskell programmer) and I (a teacher of high school CS) have talked about this often. He's postulated that teaching Haskell to kids with no programming experience would be an interesting experiment. Their lack of preconceptions regarding programming might make Haskell much easier for them to pick up, than it would for a student with experience in another language. What would be more interesting however,…

I learnt (somewhere around 15 years ago) Haskell as 6th programming language and I remember finding it very confusing while my friends who had never programmed before didn't have as much issues with it. The second language they got taught was Java and after Haskell they very much disliked it. All of them (of course...) ended up as Java programmers in boring banking (etc) projects, but I do remember how they liked Haskell over it. Now, Java isn't exactly Python...

Re: Teenage Haskell

#36

Earlier quoted context omitted.

> Their lack of preconceptions regarding programming might make Haskell much easier for them to pick up, than it would for a student with experience in another language. Or traumatize them forever away from the field of programming. > Would they think Python was stupid or would they be grateful that all of a sudden they could use a for loop? I would love to know the answer to this, regardless of my own biases. But Ha…

It's an experiment that I'll never run. CS exam requirements are geared towards OO languages. Students have to analyse and write pseudocode using traditional programming constructs.

At the TU-Berlin, our intro courses were held in FP languages, and we were indoctrinated as to the incomparable superiority of the approach...and could see for ourselves how the reality diverged from the hype.

That was a good 20 years ago, but I just ran into a current student who told me that's still the case, and they still hate it as much as we did.

Re: Teenage Haskell

#38
post #37

(&) :: Picture -> Picture -> Picture Can someone explain this line?

It's a type declaration saying that the & operator takes two Picture as arguments and returns a picture.

So, if "a" and "b" are pictures "a & b" is typechecking.

To be more precise, if you account for currying, it says that the & operator takes a Picture and returns a Picture -> Picture function. This function can then be applied to a Picture to yield a Picture. It's as I explained above but with an intermediate step.

Re: Teenage Haskell

#39
How about http://elm-lang.org/ ? It is very similar to haskell but a bit less daunting and all its libraries are focussed on building inbrowser games. Sounds like something kids would love.

Now that i am brainstorming anyway. Something like http://scratch.mit.edu would be so much nicer if it were a functional language! Instead of confusing blocks that maintain state every block is just a standalone welldefined function and combining blocks is just functional composition and application! I think it would be reaallt easy for a kid to digest mentally: blocks have inputs and outputs, thats it.

Does anybody know if there are projects tjat accomplish this?

Re: Teenage Haskell

#40

Earlier quoted context omitted.

It's an experiment that I'll never run. CS exam requirements are geared towards OO languages. Students have to analyse and write pseudocode using traditional programming constructs.

At the TU-Berlin, our intro courses were held in FP languages, and we were indoctrinated as to the incomparable superiority of the approach...and could see for ourselves how the reality diverged from the hype. That was a good 20 years ago, but I just ran into a current student who told me that's still the case, and they still hate it as much as we did.

Seems like your university is doing it wrong. While I do believe that the principles used in FP languages are vastly superior I don't think this is really a matter of debate. The advantages are obvious and if you didn't realize it you probably weren't taught well enough.

On topic:

I sometimes wonder if the wins from FP languages are lost on the people not already scarred by the pitfalls of imperative programming. I wonder the same about someone starting with Python instead of something more wordy and cumbersome. I don't think you really can appreciate the ease of use if you haven't already written tons of boilerplate or type information because the compiler is stupid.

At the same time you don't know the price of the ease you're getting, so there is a warped perspective on both the ease of programming and the performance of languages.

Haskell, I think, exists in a sort of middle ground where it's actually really fast but extremely expressive. Maybe someone uninitiated in programming won't have as many problems formulating functional solutions to problems in Haskell too.

Post reply on HN