Hey there! · Brian Hicks: Recent Episodes

None

Recent content in Hey there! · Brian Hicks

View Details

The State of Elm survey takes the pulse of the Elm community. What experiences do newcomers have, and are they learning at decent pace? What companies have Elm in production?

This year, the survey ran from the end of Janary to the beginning of March, and collected 1,176 responses (about the same as last year.) After the survey ended, I scrubbed each field for 17 of the questions to make sure we had good data, reduced five of the questions to tags, and performed the analysis below. I know it’s been a long wait; thank you for your patience while I did this, and to all the people who checked in and asked if they could help!

Let’s get going!


Continue Reading

View Details

This year at Elm Europe I gave a talk called “Let’s Make Nice Packages!”

It’s about research.

No, wait, come back!


Continue Reading

View Details

The State of Elm 2018 is on! We put on this survey every year to take the pulse of the Elm community. Where have we been, and where are we going?

The survey is open now and will close on March 1. You can take it below or in full screen mode (better for mobile users.)


Continue Reading

View Details

Last week, we covered how to break down decoders by starting from the innermost, or topmost, part. But what if you’re having trouble breaking things down from the top? (Or you’re dealing with a really complex JSON schema?)

This week, let’s look at it from a different perspective: the outermost structure in (or the bottom up!)


Continue Reading

View Details

A reader of the JSON Survival Kit wrote me with a question (lightly edited):

I’ve got a JSON string that works fine in JavaScript:

``` { "Site1": { "PC1": { "ip": "x.x.x.x", "version": "3" }, "PC2": { "ip": "x.x.x.x", "version": "3" } }, "Site2": { "PC1": { "ip": "x.x.x.x", "version": "3" }, "PC2": { "ip": "x.x.x.x", "version": "3" } } }

```

I really can’t figure out how to parse this–will your book help with nested JSON where the keys are different 2 or 3 levels deep?

If not, then I’ll just give up on Elm–as this is the first project that I’m trying to do, and something as basic as this, I’m finding impossible.

The biggest mindset shift you need to succeed with JSON Decoding is to think of your decoders like bricks. (I’ve written about this before, and it’s chapter 1 of The JSON Survival Kit.) You can combine bricks to build whatever you like; the same is true of decoders!


Continue Reading

View Details

The State of Elm 2017 results are here! I first presented these as two talks, one to Elm Europe and one to the Oslo Elm Day. I’ve embedded the Elm Europe talk below (it’s shorter) but the longer version is on also YouTube.


Continue Reading

View Details

So you’re sending dates through ports in your Elm application, and things are getting pretty confusing. You send in a date, and you get…

``` Err "Expecting a String a _.date but instead got \"2017-05-01T12:45:00.000Z\""

```

Wait, what? Isn’t that a string already? What’s going wrong here?


Continue Reading

View Details

How do you keep your JSON encoders, decoders, and model in sync? You can skip fields in your encoder, right? But should you? And what about when you add new fields? Decoders are a little easier, but you have to sync them up with your encoders or you’ll lose data. And the worst part is that we can’t rely on the compiler to catch these classes of errors… argh!

This is a perfect situation for property tests (fuzz tests in elm-test lingo.) The test system will keep us honest by giving us random values to test with. You can assert that encoders and decoders mirror each other, and add a bit more safety to your app.


Continue Reading

View Details

Working with ports can be awkward. You’re really limited as to what values you can send through, so how do you get objects? Easy: write a JSON Decoder!


Continue Reading

View Details

After the sets series finished, I got really curious… How fast were these sets, exactly? I had to shave a lot of yaks to answer that question, but to sum up: Elm now has a benchmarking library! Let’s take a look at how to use it!


Continue Reading

View Details

Our Set implementation is done! We just have a few things to wrap up.


Continue Reading

View Details

Now that we have filter and friends, we’re almost done with our Set implementation. Once we have map, we’ll be done!


Continue Reading

View Details

This time, let’s look at filter. It does the same thing as List.filter, except it operates on a Set instead of a List. We’ll have it take a function that checks whether we should include a value and use the output of that function to filter the values from the set.


Continue Reading

View Details

The State of Elm 2017 Survey is now live, please go take it. It will run through Friday, February 24, and the results will be available sometime after that.

Here are the results from last year, or as a slide deck.


Continue Reading

View Details

With folds done, our sets are shaping up. Folds unlock some more interesting things for us. Namely: unions!


Continue Reading