30 days of Elm: Intro
Tags: elm
Published: 2020-12-17 14:37:17

# 30 days of Elm

These aren't necessarily sorted by difficulty. 

I just come up with a challenge every day that fits my current level. I've also accounted for varying motivation, so any new Elm code or knowledge counts.

(01) 2020-12-17: [Range slider value in p tag](https://dev.to/kristianpedersen/30-days-of-elm-1-30-show-range-slider-value-in-p-tag-jdb)
(02) 2020-12-18: [HTML element for each item in list](https://dev.to/kristianpedersen/30daysofelm-day-2-html-element-for-each-item-in-list-3d20)
(03) 2020-12-19: [Random checkbox grid](https://dev.to/kristianpedersen/30daysofelm-day-3-random-checkbox-grid-29j5)

(04) 2020-12-20: [Toggle visibility](https://dev.to/kristianpedersen/30daysofelm-day-4-toggle-visibility-1141)
(05) 2020-12-21: ["Lights Out" game](https://dev.to/kristianpedersen/30daysofelm-day-5-lights-out-game-4b16)
(06) 2020-12-22: [Accessible background colors](https://dev.to/kristianpedersen/30daysofelm-day-6-accessible-background-colors-29ao)

(07) 2020-12-23: [Centered divs and content](https://dev.to/kristianpedersen/30daysofelm-day-7-centered-div-and-content-hfa)
(08) 2020-12-24: [Data from JS and auto-reload](https://dev.to/kristianpedersen/30daysofelm-day-8-data-from-js-and-auto-reload-1o4h)
(09) 2020-12-25: [Astronomy data from Python in Elm](https://dev.to/kristianpedersen/30daysofelm-day-9-astronomy-data-from-python-in-elm-deployment-difficulties-2i47)

(10) 2020-12-26: [Mouse coordinates](https://dev.to/kristianpedersen/30daysofelm-day-10-mouse-coordinates-1llo)
(11) 2020-12-27: [Next binary number with same number of 1's](https://dev.to/kristianpedersen/30daysofelm-day-11-next-binary-number-with-same-number-of-1-s-34gg)
(12) 2020-12-28: [Same as yesterday, but with elm-binary](https://dev.to/kristianpedersen/30daysofelm-day-12-elm-binary-4ijc)

(13) 2020-12-29: [Simple line charts from yesterday's project](https://dev.to/kristianpedersen/30daysofelm-day-13-simple-line-chart-1pkn)
(14) 2020-12-30: [Four CodeWars katas](https://dev.to/kristianpedersen/30daysofelm-day-14-four-codewars-katas-3nck)
(15) 2020-12-31: [Struggling with JSON :|](https://dev.to/kristianpedersen/30daysofelm-day-15-struggling-with-json-4hhm)

(16) 2021-01-01: [Struggling slightly less with JSON](https://dev.to/kristianpedersen/30daysofelm-day-16-struggling-slightly-less-with-json-38g7)
(17) 2021-01-02 [I decoded some JSON!](https://dev.to/kristianpedersen/30daysofelm-day-17-i-decoded-some-json-4na5)
(18) 2021-01-03 [Decoding JSON from a Python backend](https://dev.to/kristianpedersen/day-18-decoding-json-from-a-python-backend-4010)

(19) 2021-01-04 [Basic time](https://dev.to/kristianpedersen/30daysofelm-day-19-basic-time-ac)
(20) 2021-01-05 [Getting the browser's width and height](https://dev.to/kristianpedersen/30daysofelm-day-20-getting-browser-width-and-height-1nf9)
(21) 2021-01-06 [Planet list -> SVG drawings](https://dev.to/kristianpedersen/30daysofelm-day-21-planet-list-svg-drawings-3n96)

(22) 2021-01-07 [Simple codewars.com challenges](https://dev.to/kristianpedersen/30daysofelm-day-22-simple-codewars-com-challenges-557c)
(23) 2021-01-08 [Simple layout with elm-ui](https://dev.to/kristianpedersen/30daysofelm-day-23-simple-layout-with-elm-ui-274l)
(24) 2021-01-09 [msg vs. Msg](https://dev.to/kristianpedersen/30daysofelm-day-24-msg-vs-msg-2n1h)

(25) 2021-01-10 [Displaying a List (List String)](https://dev.to/kristianpedersen/30daysofelm-day-25-displaying-a-list-list-string-5bf4)
(26) 2021-01-11 [Debug.log, Debug.toString and the REPL](https://dev.to/kristianpedersen/30daysofelm-day-26-inspecting-values-with-debug-log-debug-tostring-and-the-repl-3k4k)
(27) 2021-01-12 [Using WebSockets+ports to control TouchDesigner](https://dev.to/kristianpedersen/30daysofelm-day-27-using-websockets-ports-to-control-a-desktop-app-4b00)

(28) 2021-01-13 [Chess board + intro to Knight's Tour](https://dev.to/kristianpedersen/30daysofelm-day-28-chess-board-intro-to-knight-s-tour-1eb4)
(29) 2021-01-14 [Basic map, filter and reduce/foldl](https://dev.to/kristianpedersen/30daysofelm-day-29-basic-map-filter-and-reduce-366l)
(30) 2021-01-15 [Closing thoughts](https://dev.to/kristianpedersen/30daysofelm-day-30-closing-thoughts-2oka)

Repo: https://github.com/kristianpedersen/30-days-of-elm

## About this challenge
Hi! My name is Kristian. 

The next 30 days, I'm going to teach myself the basics of Elm by making something new every day with Elm. Even the simplest things count. There's no structure or plan.

I was inspired to do this project after seeing Lars Lillo Ulvestad do 100 days of Haskell: https://twitter.com/larsparsfromage

30 days seems good enough to begin with, 100 would also be cool - I'm happy either way.

## Background

I've been writing JavaScript on and off since 2016, and I started learning React in November 2020.

JavaScript and React are great tools, but after my last few projects, I want to spend more time thinking about the problem at hand, and less time on runtime errors.

In the hands of more skilled developers, most of the errors I've gotten wouldn't have happened, or they would have been fixed much faster than I did, but I want to avoid them altogether.

## Why Elm?

Elm avoids runtime errors by design. Its error messages are really well written, its ecosystem seems cohesive, and I keep hearing good things about functional programming in general. 

Even if I don't end up continuing with Elm, I think this will be a fun and educational experience that will make me a better developer.

https://elm-lang.org/

## Thoughts on motivation and setting the bar low

Motivation and focus vary every day, knowledge gains happen in bursts, cool ideas come out of the blue.

Why am I setting the bar so low every day? Saying that "even the simplest things count" may not sound ambitious, but consider the following scenarios:

1. High motivation + setting the bar too high: <br>Even if I learn a lot, I can still end up viewing it as a failure because I didn't reach my goal.

2. Low motivation + setting the bar too high: <br>There's no success in sight.

3. High motivation + setting the bar low: <br>I continue - not because I have to, but because I want to, and I usually end up raising the bar in the process.

4. Low motivation + setting the bar low: <br>Although I don't want to, I understand that I can succeed just by getting one tiny thing done. This is better than outcome 1! Also, this often produces enough motivation to keep going a bit longer than first anticipated.