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
I quite like parens. Should I use the function operators anyway? (It is handy where you have ( open and ) close parens over a good number of lines (like this case statement)
⚠️ A word of advice: Get your software working first, then worry about profiling and optimizations. Many programmers get stuck in hyper-optimizing their code without first finishing to see where the true bottlenecks lie. You can spend weeks gaining a 1% performance boost utilizing arcane algorithms when it turns out that a 5-minute tweak could net you a 50% boost.
It will watch your code while it runs, and report back to you with information on which functions took the most time, which functions were called most often, etc. For Scheme, Dr. Racket is an IDE which has a built-in profiler.
For example, I wouldn't include anything about ports, decoders, complex types, << operators, and only use simple forms etc. There's really A LOT of explaining and examples needed for intermediate Elm. I'd probably stick to an introductory racket lang and elm lang and focus a lot of time on problem solvers and foundational thinking with a visual touch. Of course lots of books are on beginner subjects and you need a lot of support at the intermediate or "building" stage, but that's far more niche and contextual. ↩
The text was updated successfully, but these errors were encountered:
General
Don't do this
ComponentsJSON Decode
json
decoding in Elm blog post (talks about simplifying decoders)json
decoder recipesHttp.put
and.post
to the serverHttp.post
orHttp.request
Debugging your code
Browser.element
notBrowser.document
)Debug.log
(Stackoverflow)List recursion
Cons
and if it's necessary. (Provides more succinct code)Working with data
Records
Working with
Maybe
and "lifting".map
functions —Maybe.map
,Result.map
,Json.Decode.map
etcWorking with types
Asc
ending andDesc
ending)Working with
.classes
classList
instead of alet
expression (a bit neater)Working with tags and permissions
Do tricks with
case
expressions?Destructuring with
case
expressions0.18
)Understanding
Cmd
andgenerators
What's
_
underscore used for?Elm patterns
Using
<|
function operators<|
|>
<<
>>
)(
open and)
close parens over a good number of lines (like this case statement)Building URLS
⏳ Code performance and speed
How to Test for Slow Functions
It will watch your code while it runs, and report back to you with information on which functions took the most time, which functions were called most often, etc. For Scheme, Dr. Racket is an IDE which has a built-in profiler.
Things that are (more) difficult
Read/Write files and file- or folder-traversing
...
User input and sanitising
...
Ports, flags, subscriptions
Footnotes
For example, I wouldn't include anything about ports, decoders, complex types,
<<
operators, and only use simple forms etc. There's really A LOT of explaining and examples needed for intermediate Elm. I'd probably stick to an introductory racket lang and elm lang and focus a lot of time on problem solvers and foundational thinking with a visual touch. Of course lots of books are on beginner subjects and you need a lot of support at the intermediate or "building" stage, but that's far more niche and contextual. ↩The text was updated successfully, but these errors were encountered: