You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
π Start splitting these out into proper repo examples
π§βπ Intermediate Elm is difficult. There's lots to learn. Keep practicing and persevere.
Here we're trying out some examples from books. Often if you've reached the fourth chapter, the first chapter stuff has evolved or is "hidden" because our app has become complex. It's handy to have both a simplified version of the code, and the code in context.
Code isn't that important. Limit what you do and live a full life!
What happens if Ellie app disappears? You've lost all your examples!
This list is already feeling a bit narly, write some code stories!
ELi5 for beginners. Can you understand it after 5 years?
Split code into manageable chunks.
Some problems will come back around. Leave them out.
Esoteric stuff is maybe not as urgent. Leave that out too.
The stuff that's simple and always crops up, you can probably skip that too!
Below we have different versions of the same problem.
Consider only adding the accepted or "one way to do it" version.
Unless it's a gotcha that you've got to be careful with.
Programming Elm's refactoring tasks are quite useful to teach with.
However, the npm dependencies make it an absolute chore.
Drastically simplify this into a nice little story. Possibly Draw!
Wherever possible, reduce state and javascript dependencies.
Keep any Javascript (ports, flags, subs) as simple and small as possible. See the limits of Elm and javascript interop
Image filters using custom element, ports, flags and subscriptions (Elm in Action)
Simplify and create notes
npm
dependencies make it an absolute chore.Other complimentary cards
type
sΒ #38 (simple rules to follow)It's different from React
The easy stuff (or easier)
Simple recursion
(0, "string") :: (1, "string") :: []
(you can do that!)List.filter
functions
andaccumulators
(foldl
,reduce
, etc)Random package
Cmd
andMsg
withRandom
Cmd.batch
with a weighted randomised dice (and the unweighted version)Model Int DieFace DieFace
and ...Random.map2
or something.Fixing bugs
List.map
orList.filter
the culprit?)Slightly bigger programs
Splitting out modules
Msg
in different modules (and passing messages between modules)Dealing with strings
Dealing with JSON
expectJson
)json-server
anddecodeString
)case
anddecodeJson
)decodeJson
)postDecoder
to usepipeline
(with anoptional
field)pipeline
(db.json
now has more info forauthor
)requiredAt
βΒ same asJson.Decode.at
)Dict
(Elm In Action)Photo
data as a testing method (initialModel
without server)Folder
s data (using a recursive type/viewFunction
)Stuff for later/never
Footnotes
Wherever possible, simplify!! The original problem was a simple
case
statement on a bunch of days. You might not need any more than that! Also, the longer the functions/definitions the harder it is to look through and see how it works. Don't make life complicated for your future stupid self :) β©An even more concise version from the
List.Extra
package. This isn't as performant as acase
statement it seems. You might also want to consider converting this list of tuples into aDict
for faster lookup. β©Be sure to use Console to check for errors with the server. It's complaining when trying to connect to the server using
http
β it must behttps
. β©What's the simplest way to handle an error message? β©
The text was updated successfully, but these errors were encountered: