Skip to content
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

Try, try, try again! #25

Open
17 of 29 tasks
badlydrawnrob opened this issue Jan 31, 2024 · 0 comments
Open
17 of 29 tasks

Try, try, try again! #25

badlydrawnrob opened this issue Jan 31, 2024 · 0 comments

Comments

@badlydrawnrob
Copy link
Owner

badlydrawnrob commented Jan 31, 2024

Simplify and create notes

🌟 Start splitting these out into proper repo examples
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.

  1. Code isn't that important. Limit what you do and live a full life!
  2. What happens if Ellie app disappears? You've lost all your examples!
  3. This list is already feeling a bit narly, write some code stories!
  4. ELi5 for beginners. Can you understand it after 5 years?
  5. Split code into manageable chunks.
  6. Some problems will come back around. Leave them out.
  7. Esoteric stuff is maybe not as urgent. Leave that out too.
  8. The stuff that's simple and always crops up, you can probably skip that too!
  9. 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.

Other complimentary cards

It's different from React

The easy stuff (or easier)

Simple recursion

Random package

Fixing bugs

Slightly bigger programs

Splitting out modules

I think I need a proper tutorial to understand this

Dealing with strings

Dealing with JSON

Stuff for later/never

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

  1. Image filters using custom element, ports, flags and subscriptions (Elm in Action)

Footnotes

  1. 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 :)

  2. An even more concise version from the List.Extra package. This isn't as performant as a case statement it seems. You might also want to consider converting this list of tuples into a Dict for faster lookup.

  3. 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 be https.

  4. What's the simplest way to handle an error message?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant