DEV Community

Cover image for Hacktober: From Exercism to elm-pages
leojpod
leojpod

Posted on

Hacktober: From Exercism to elm-pages

So, at the beginning of last month, I asked my boss at Zeit.io if it was ok to push some PRs around for Hacktober while waiting for the compiler which he, of course, accepted and encouraged.

The all-time excuse for slacking off at work

No excuses for not doing this year then!

Exercism

Exercism is a great platform to learn a programing language and owning your skills. I was feeling kind of bad for not having time to review people's submissions on the elm-track as I used to a while back. So I decided that I could at least use Hacktober to give back to this platform by implementing a few problems for it.

It was a rather interesting experience as porting a problem includes several steps:

  • RFTM ... (a step I clearly missed at first which lead to my first PRs failing tests because I hadn't set up properly my exercises). The Generating setup part was really helpful to repair my dive-in-first-read-the-readme-after approach.
  • The first step I always took after setting up the folder for the new exercise was to grab all the data from the canonical-data.json file from the exercise specification and turn it into a test suite with elm-test (I was more than glad to use vim and to have become decent at making macros to turn each entry into a test case without having to write too much code myself)
  • Once I had the test suite it was time for the really fun part: Make the first solution for the actual problem! For some exercises it was rather straight forward, for other it was actually more complex (looking at you bowling exercise)
  • Clean up! An important part of making nice exercises is to make sure that the solutions are clear enough as they might be de-facto examples for a while, one should make sure that the code looks nice enough.
  • Push the PR and collect a T-shirt :)

Elm-pages

I have recently discovered this project on the elm slack (join us here: http://elmlang.herokuapp.com/). Since I'd read a few days before about the possibility to sync dev.to and something like gatsby I was quite keen on looking up this project. One of the issue I had originally was that it forced me to use the port 3000 to work with locally which was already quite crowded by work stuff.

So I've made adding an option to specify the port my last Hacktober PR. It allowed me to dive into a really interesting project made by the same guy who is behind elm-pages ((Dillon Kearns)[https://github.com/dillonkearns]): (elm-cli-options-parser)[https://github.com/dillonkearns/elm-cli-options-parser]. It's a project that allows you to use elm to define a CLI interface. It's simple yet powerful. If you want to build a CLI tool with elm or node definitely have a look.

To sum it up, it didn't take very long to participate and hopefully help out and it was rather fun. Also, right after that, we completed our migration from elm 0.18 to 0.19 so no more "it's compiling" excuses from now on!

Top comments (0)