dwyl / learn-elm

:rainbow: discover the beautiful programming language that makes front-end web apps a joy to build and maintain!
https://github.com/dwyl/learn-elm
483 stars 43 forks source link

"Teaching Elm to Beginners" by Richard Feldman #97

Open nelsonic opened 7 years ago

nelsonic commented 7 years ago

image https://youtu.be/G-GhUxeYc1U

YvesMuyaBenda commented 7 years ago

@nelsonic The man is on point! But come on! SWBAT is just user-stories for teachers ;) Anyways, my main way of looking at information like this is to (1) ask how does this information help in the writing of technial texts (writing out is a form of self-teaching) and (2) how can this be adapted to become a more efficientt self-learner (stuff like SWBAT is useful for scoping out self-learning projects). Anyways it was fun to have a different angle to the topic; it helped me clarify a few things about consciously designing learning.

nelsonic commented 7 years ago

Yeah, it's always good to get a different angle. Richard has taught Elm to more people than anyone else so he has the most insight into the most common "beginner" questions. I'm finding it especially useful as I'm trying to teach Java Devs how to a) write front-end code and b) write functional front-end code!! 😉

YvesMuyaBenda commented 7 years ago

@nelsonic You are too hard-core for me!

YvesMuyaBenda commented 7 years ago

@nelsonic There is a basic principle that he does not explicitly state which is often used in teaching programming concepts: learning by refactoring. This is where one refactors (rewriting code while keeping some defintiion of external behaviour) code using a new concept based upon a perceived problem-solution pair; e.g. his explanation of union types: "imagine if we added 20 more things ..." It can be used at any level: hey, do you see how these expressions are similar but slightly different and they all solve the same underlying problem? Yay, functions, functions sort that out mate! Write some functions! This is what abstraction is all about, etc, etc!

YvesMuyaBenda commented 7 years ago

@nelsonic So just thinking out loud (and my knowledge of Java is not even cursory) applying the above thoughts, you might start with a GUI Java app in all of its full OOP glory, and rebuild it on the front end solving the problems from a front-end FP point of view, while comparing how similar problems find different solutions in different paradigms and the different contexts of desktop vs browser.

Heck the app could be a simple counter, and there you might start with how OOP and FP model differently, not object with methods which are instantiated from classes (data + functionally being binded together in one concept with objects being abstracted within classes), but data being transformed through a pipline (one essetially models the concepts algebraically, and there is no need as yet to have an abstract counter, one could just model it with an integer). I am just thinking out loud, it would be an excellent exercise to spell out the details and it is similar to what you did with the tutorioal in the Elm architecure but ..

My main thought is a simple easily understood problem which allows you to take a nice slice out of the necessary programming concepts is the simplest approach I can think of. Anyways that was fun! Hope you have fun being hard-core!

YvesMuyaBenda commented 7 years ago

Yet more thoughts! For me, it all hinges upon the concept of state and how different paradigms form different interpretations of how it should be modeled/implemented; but I have only seen a handful of places (including the issue on the 'Computational Thinking in Elm' book in this repo) that even start talking about it coherently. State is a concept that would have to come really early methinks.