

Codeworld: An open-source educational programming environment using Haskell - cnbuff410
https://github.com/google/codeworld

======
drcode
Wow, this is very impressive- Very clean, Haskell-like code in the programming
examples. I'm still looking for the right tool to get my young daughter
started on programming, and this is probably the best option I've seen so far
(gotta start 'em early with that Hindley-Milner type inference :-)

The main weaknesses I see are (1) the sample programs are all 20+ LOC long...
a young child doesn't want to write more than ONE line of code without a
meaningful result. (2) The syntax is so unforgiving... I think the ideal tool
for learning programming would follow the mantra "do what I mean not what I
say" and fill in gaps to generate a result (sort of like how web browsers will
go to great lengths to render even the most flawed html.)

These are not really limitations in your software, just additional
enhancements that could be added to your software that would really make it
shine!

~~~
krat0sprakhar
Not sure why kp25 was downvoted. I've been working with a 12-year old for the
last couple of months to teach him programming and some web development.

> a young child doesn't want to write more than ONE line of code without a
> meaningful result.

This is something that I completely agree with and found to be true in my
experience. To this end, I've found IPython to be an excellent way of giving
feedback while coding. The notebooks have a nice UI, documentation is readily
available and its much easier to edit mistakes by simply editing the cell.

I'd recommend you give IPython a shot.

------
bjz_
It's interesting to see that the drawing functions are defined using tupled
parameters: [https://github.com/google/codeworld/blob/master/codeworld-
ba...](https://github.com/google/codeworld/blob/master/codeworld-
base/Internal/Picture.hs#L139)

Is this to make it easier for beginners?

~~~
cdsmith
Yes and no... not to make it easier, per se, but to make it more like math. I
built CodeWorld, not to teach Haskell, but to teach middle school math! So the
main motivation was to make it easier for students to see the connection
between the functions they write here, and the f(x,y) that they see in
algebra.

That said, uncurrying functions also has a huge benefit when it comes to
understanding error messages in Haskell. I love currying in Haskell, and it's
very powerful... but it's one of the features that sometimes leads to obscure
or misleading errors -- especially when you leave out type signatures... which
I do for the first month or two.

------
pathikrit
Reminds me of Elm: [http://elm-lang.org/](http://elm-lang.org/) Example:
[http://elm-lang.org/edit/examples/Intermediate/Pong.elm](http://elm-
lang.org/edit/examples/Intermediate/Pong.elm)

------
kp25
Amazing stuff to dive into Haskell..

Wish there exists a similar environment for other languages like Python,
Javascript.

