-
Notifications
You must be signed in to change notification settings - Fork 41
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Explain the Elm Architecture in "Plain JS" before learning Elm Language? #82
Comments
@NeSonic , maybe this repo can help you with that task https://github.com/anler/elm-architecture-cover . |
Morning @gabrielperales, how are you today ? 😉 |
Wonder if you saw this repo with a few nice |
Hi @newswim, yeah the elm-guides are good, however they are still taught in Elm. |
JavaScript's dominance cemented for the foreseeable future: |
@nelsonic So the aim is to translate Elm concepts into the corresponding JavaScript concepts? If you write up a commentary on the JavaScript code implementing the Elm counter example, then I will be happy to read it, and ask no-nothing JavaScript questions. As for the learning curve, there are two basic approaches; to stay within your analogy of language learning: (1) The person could first learn how to structure essays in their own language. The person could learn from the ground up in the new language, starting with a small set of easily understood concepts, and then creating increasingly complex structures. I am more than happy to use your exposition as an exercise in learning more about JavaScript, by seeing how the concepts get translated (2) The person could learn from the ground up in the new language, starting with a small set of easily understood concepts, and then creating increasingly complex structures, with detailed explanations of the why and how at each step. In this case, I would just say bite the bullet and learn functional programming from the ground up, using the HTDP approach, primarily because they already have a large infrastructure of varied pedagogical materials, from middle-schooler to graduate level computer science, in which is embedded interactive programming within the functional style. The main reason why one gets these learning curves is that most folk are not skilled at teaching, of transferring information, though they may be excellent engineers; pretty much the best material I have seen were written by university level instructors with a lot of experience teaching, who have battle-tested their materials extensively. The main corollary of this situation is that there is rarely a good sequence of examples that escalate nicely in complexity, and in the examples that exist, there is often not too good an explanation of the thought process used to construct the final concept, which is why I tend to google for TDD materials, since breaking down a problem into tiny incremental steps is kind of the de-facto standard within that community, whether it be a tic-tac-toe game, or the game of chess. |
@YvesMuyaBenda the HtDP approach https://en.wikipedia.org/wiki/How_to_Design_Programs |
@nelsonic Looking forward to the ping man! Looking forward to the ping! It is is a bit difficult going from the initial idea to something coherent, no? But that is where the fun lies, the stretching out of one's mind. |
Done: https://github.com/dwyl/learn-elm-architecture-in-javascript Are the tutorial steps clear enough for complete beginners?
|
This is FANTASTIC, good work @nelsonic !! |
The issue of the "Elm Learning Curve" was raised in: #45
and scrolling down to to @lucymonie's list we see the Elm Architecture at number four ...
this
seems fairly logical (initially) because the Elm Guideuses the Elm Language to explain the Elm Architecture: https://guide.elm-lang.org/architecture
i.e. it assumes that people already understand the (Core) Elm Language...
This is a fair assumption given the ordering of the Guide however...
Hypothesis
I hypothesize that if we explain the Elm Architecture (in a bit more detail)
using a language people are already familiar with (i.e JavaScript)
before
diving into the Elm Language it will "flatten" the learning curve.tl;dr
Analogy
Let us briefly "reason by analogy": Picture yourself learning a
new
(human/foreign) language.Imagine (in this scenario) that you have never written an essay before (in any human language)
so you don't understand essay structure.
The teacher has just spent the lesson going through the basic vocabulary in the
new
language,and now gives you a homework assignment: "write an essay using all the words you've learned!"
If you have never written an essay before, this could easily overwhelm you.
I posit that (at least for
some
people) understanding the Architecturein a Language they already know (i.e. JS) might make it easier.
1If your first (human) Language is not english, substitute for your own.
First Principals
Axioms
e.g: Algebra skills aid in learning Physics.
or (simpler): knowing how to ride a bicycle will help with a motorcycle.
JavaScript is the most popular programming language on GitHub by every measure.
It could be argued that more code exists off GitHub in "Enterprise" (Closed Source) repositories,
but we have no way of reliably quantifying it.
We know that a vanishingly small number of people use/know
elm
(evidenced by "star count"),the idea that someone would learn
elm
as their first programming language is unlikely.Richard Feldman spends the first hour of his Elm Course comparing elm to JS (ES2015).
This is not "proof" that "everyone" learning Elm already knows JavaScript, but it's substantive.
I propose writing a separate tutorial just for the Elm Architecture in "Plain JavaScript".
I made an attempt to distil the Architecture in ES5 JS yesterday:
https://github.com/nelsonic/practice/blob/master/elm.html
But think it deserves a comprehensive treatment ...
The text was updated successfully, but these errors were encountered: