DEV Community

Dwayne Crooks
Dwayne Crooks

Posted on

How to Design Programs in Elm

I wish I knew. Sorry! Bye!

All kidding aside, I think I may be able to steer you in the right direction if you're willing to take the time to build a strong foundation.

After reading The Structure and Interpretation of the Computer Science Curriculum and How to Design Programs I came to the understanding that we teach programming poorly by conflating domain knowledge with program design and we never explicitly show our students how to design programs.

Ok cool, but HTDP is for beginners and it uses Racket teaching languages. How can that help me with Elm?

That's the surprising thing. It's relevant because all the concepts it teaches is 100% transferable to any programming language but especially to Elm.

Read "A Graphical Editor" to see what I mean.

Or, read about how to design a function that sorts to see how the design recipe causes the implementation to just fall out.

In fact, read about "Designing World Programs" to see how similar it is to Browser.

The only thing I don't like about the book is that it's not in Elm.

But my claim is that if you want to learn how to design programs in Elm then you should read HTDP (until something like it that's Elm specific comes along).

Finally, for those interested in teaching programming I leave you with "Matthias Felleisen: The First Year".

Latest comments (1)

Collapse
 
nickwalt profile image
nick walton

Thanks for pointing to HTDP. I've been trying to distill the following subjects into an essential approach and applying it to Elm:

Scott seems to be the rare person who has combined most of these subjects into a cohesive view and approach.