
High school programming taught in Haskell in Argentina - dustingetz
http://sawafaso.blogspot.com.ar/2013/07/why-haskell-at-school-matters.html?m=1
======
robomartin
My first reaction to this was negative. I immediately objected to choosing
Haskell. I've been teaching my own 14 year old son. I started him with C, then
on to Forth, Java and now about to move into Python.

Then I stopped to remember the process. It has been ridiculously hard. It has
required a ton of engagement on my part. Without me being a constant
cheerleader it would go absolutely nowhere. My kid likes programming but,
let's face it, today there are tons of distractions and you are in competition
with all of it.

I would imagine it is really hard to teach a random group of 14~16 year olds.
I would really like to learn more about this from others with experience in
this area.

~~~
chongli
The key to really _getting_ Haskell is learning to build a dialogue with the
compiler. Sure, the type errors are intimidating at first -- they pack a lot
of information and use precise technical terms -- but once you figure one or
two of them out you quickly begin to recognize the patterns. After that, you
begin to feel comfortable correcting the type errors and subsequently feel
confident about your program when it passes the type checker.

After a certain point in your progression, you realize that you can make
certain type errors _deliberately_ so that the type checker will tell you what
types it's expecting. This is when it all clicks! The type checker is a tool
that lets you query for information about your program. It's an immense aid to
reasoning and a powerful sanity check against your assumptions. This is a
capability that less strictly/statically typed languages lack and it can lead
to a lot of surprises and guesswork.

~~~
Kiro
I hope you realize we're talking about kids who has no prior interest in
programming. I don't think teaching them to build a dialogue with the compiler
is a key to anything in this case.

~~~
tikhonj
Au contraire: an interactive system with immediate feedback is perfectly
didactic. Haskell isn't quite there yet--the error messages are somewhat
cryptic and the interactivity isn't quite polished yet--but it's on the right
track. Certainly further along in this vein than any other language I know!

Some new features like deferred type errors and type holes are going to really
help with this. Especially once editors start taking full advantage of this. I
think that this is the future of programming: not writing a program and then
debugging it, and not even just working in a repl, but being actively guided
by your tools seamlessly as you write your code. Having a dialog with the
compiler.

~~~
pavelludiq
If you want an interactive system, clojure or common lisp will be much better
choices. Part of the reason I haven't gotten into haskell is because as you
said, it "isn't quite there yet". Common Lisp has the added quality that an
error trows you into the debugger, and that it makes errors much less
punishing. If there is one lesson I've learned from gaming is that hard games
don't repel the players if errors are easy to recover from and you aren't
psychologically punished for them. Haskell isn't exactly a shining example of
that, despite it's other great qualities. You want to make the teaching
material challenging, not punishing(a great example of this is the game super
meat boy).

Not to mention the traditional argument for lisp as a teaching language: the
extremely simple syntax. For somebody who hasn't seen code before, lisp would
look _just_ as weird as any other language, so the unfamiliarity argument
doesn't hold much water. Prefix notation isn't at all difficult to learn, (+ 1
2) would be just as weird as dividing using / or multiplying with *, and using
% for modulo division. You just tell the students that this is how you write
math with a keyboard(a white lie at worst:).

I'm currently working on a "try ruby" like tutorial to interactively teach FP
using racket to college students, as my last year project.

------
dysoco
I'm currently studying High School (In the Systems (sysadmin/programmer)
branch)).

Everything in Argentina can be awful, but for sure it's not education: even if
we are not learning Haskell I'm really pleased with the education I'm
recieving; we use free software when possible (LibreOffice, LibreCAD, MySQL,
etc.) and we learn languages like C or Java (OK, not the best in the block,
but at least it's not VisualBasic).

Sadly we can't get good programming books here (Such as O'Reilly, Apress or
books like CLRS, APUE or SCIP). So we either rely on our teachers or in
crappy, old books.

Teaching 15-16 years old to program is not easy, mainly because many of those
really don't care about school... we start by learning Algoritms as in little
pseudocode programs, then we move to a software called PSeInt which is
basically an IDE for writing pseudocode (Pseudocode in Spanish... ugh) and
finally we learn our first language, which is chosen by the teacher (We are
learning C).

I've been programing since I was 9. And it's interesting to see this from
other perspective, the teachers are young (26-36 aprox.) which is good,
because they know about the latest technologies are have similar hobbies to
us. But it's also bad because they don't have a lot of experience).

But so far, so good, the education in the Systems branch is really good: but
beware, not everything is like this, for example we are lacking a Chemistry
teacher and we only had like 4 classes of Physics in a year, not to mention
our Mathematics teacher is a disaster.

The school isn't in a good condition either, we have leaks when it rains and
we are lacking a few walls and windows... but hey, it does it's job.

~~~
juandopazo
> Everything in Argentina can be awful, but for sure it's not education

That's very much relative to where you look. There are very good high schools
and universities. Notably, there are very good <i>free</i> universities. But
that's mostly in Buenos Aires city. The education system as a whole is in an
awful state. Most schools in the rest of the country are in a very poor state.
And as you mention the state of the buildings in even dangerous in some cases.

~~~
dysoco
Yes that's true, I kind of contradict what I say in the last paragraph.

------
hosh
This is encouraging. I love Haskell. I think if a 14-year-old ask me to teach
him or her programming, I just might start with Haskell instead.

I think it also suggests that math concepts are not taught properly either. We
tend to focus on the mathematical operations rather than the abstractions.
(Khan Academy is a good counter example). It would be interesting to see a
combined CS (with Haskell) course taught in tandem with math. At the high
school I went to, there were several courses like that (calculus + physics, or
American History + American Lit).

------
octo_t
The first programming language I was (formally) taught was Haskell and it was
a joy, as long as the exercises are nicely written you can do a lot.

After 4 or 5 weeks we wrote a calculus solver (able to do a lot of pretty
interesting integrals and differentials, just from first principles).

However the best choice for learning to program (in my opinion) is a language
like Logo where you can immediately see your results and the concepts are
incredibly simple.

------
miloshadzic
I've held a 4 part workshop on Haskell to people new to programming and was
surprised how well it went. It's certainly hard to explain in depth how some
of the more mathematical concepts work, but you don't really need to.

------
abecedarius
[http://en.wikipedia.org/wiki/ProgramByDesign](http://en.wikipedia.org/wiki/ProgramByDesign)
has more on functional programming in high school. I'm surprised Haskell was
such a success here (although I've mostly not worked with that age cohort
since I left it) -- I'd expect a strict language to be more productive for
beginners, combining the biggest part of the thinking-about-correctness
advantage with an easier performance model. But if it's working, that's
fantastic.

Also in that vein
[https://www.coursera.org/course/programdesign](https://www.coursera.org/course/programdesign)
says it needs only a grade-school background.

------
rasur
When I was a kid at school (30 years ago!) we had some kind of assembly
language forced down us.. which was good, but most of the class didn't get it.
Luckily I was interested in computers anyway and already knew z80 assembly.

I think there are always only going to be a small set of kids in the class
that will get or understand programming anyway, without resorting to just
"simpler" forms (such as Scratch, for example).. whether this is a good thing,
is of course up for debate, but regardless..

These days, I think (as a parent) I'd be pleased if the school was teaching
Haskell, so from a personal perspective: +1 Argentina schools, keep at it!

------
solomatov
Why they didn't choose adga or coq.

~~~
happy_dino
That's the only valid “Why not X?” response. :-)

------
presto8
Looks interesting!

A long time ago, I had wondered if Lisp would be a better introduction to
programming for beginners. Now we can see some practical experiences from this
attempt to use Haskell.

I looked at the code samples provided; from a cursory review, the fourth class
code looks to be purely functional, although fairly simple.

The fifth second class code is more advanced code, but a lot of it is
procedural. I wonder if Haskell experts might weigh in here -- is it worth
doing Haskell with so much procedural code?

I am a novice in Haskell, but I have tried to embrace its functional nature
entirely. I think I would advocate learning Go or Python rather than Haskell
if the code is going to be procedural anyway.

------
runn1ng
If I taught young people with no experience in programming, I would begin with
PHP (after learning basics in HTML).

It is a horrible language, but you can quickly do stuff that you can see
everywhere on every browser, you can quickly show them to the world, you can
host them everywhere, there is no compilation/porting/deployment/etc. that you
have to go through to actually run your stuff and be excited.

That is, I think, more important than teaching a language with perfect object
model or perfect lambda calculus.

------
6d0debc071
Wonder how their ease learning this would compare with ease learning Lisp. I
found the latter much more intuitive.

------
ExpiredLink
Poor pupils. I hope the victims don't suffer harm for life.

~~~
tome
I'm delighted for them!

