Integrating Elm with Rails 5.1

May 12, 2017

Rails 5.1 makes it easier to sprinkle bits of Elm into your Rails app, or even to go all in with Elm! Here's a quick rundown of how to start using Elm with Rails:

  1. First, create a new Rails 5.1 app using the --webpack option:
    rails new elm_on_rails --webpack
  2. Next, change into the generated application directory and install everything needed for Elm with the help of Webpacker:
  3. rails webpacker:install:elm

    This runs elm package install which downloads and installs the Elm packages elm-lang/core, elm-lang/html, and elm-lang/virtual-dom. ...

    [Continue Reading…]

Transforming Data with Elixir

May 02, 2017

Elixir has really changed the way we think about programming. Instead of thinking about objects and calling methods that change their state, we now think more in terms of functions that transform data.

An HTTP web server is a great example of the Elixir way of doing things. At a high level, a web server takes a request and, through a series of transformations, produces a response. In this video from our new Developing With Elixir course, we set up a pipeline for those high-level transformations so we have a basic outline of our program.

The program doesn't do anything interesting yet—the functions simply return hard-coded data. But we like to start this way as it helps us think through the program as a series of data transformations.

In the video, we started by sequencing the three transformation functions in a traditional style using intermediate variables: ...

[Continue Reading…]

Up and Running Elixir

April 27, 2017

Creating an Elixir project and running code is straightforward thanks to good conventions and solid tooling. It's impressive when you consider what's going on under the hood: compiling Elixir files into byte code that is then run on an instance of the 20-year-old, battle-proven Erlang VM.

In this video from our new Developing With Elixir course, we walk through setting up a project and various ways to run Elixir files:

Here's a quick recap of the commands we used in the video to run an Elixir file:

  1. Run the elixir command with the relative path of the Elixir file:

    elixir lib/servy.ex

    The file gets compiled into bytecode (in memory) and then run on an Erlang virtual machine.

  2. Fire up an iex (Interactive Elixir) session and then use the c helper function to compile and run the file:

    iex> c "lib/servy.ex"

    The c helper function compiles the given file in memory, the module (Servy in this case) is loaded into the session, and any code outside of the module is interpreted.

    To exit the iex session, press Ctrl+C twice.

  3. Alternatively, you can tell iex to interpret an Elixir file while starting by passing the relative path of the file: ...

    [Continue Reading…]

Rails in 2017, For Reals?

April 12, 2017

Based on all our talk about Elm and Elixir recently, you may be wondering if we've kicked Ruby and Rails to the curb. Absolutely not! We continue to use Rails every day for the same reasons we created our first Rails app 13 years ago and taught our first Rails course 12 years ago.

When it comes to Rails, all the batteries are included. Out of the box, it just works. Any 5-year old will tell you that's a huge selling point.

Crack it open and start building an application that matters. It doesn't force us to start by making arbitrary decisions about external libraries and tooling. That's a recipe for procrastination. We want to make real progress.

Now, perhaps more than ever, Nicole and I appreciate software that's designed with intelligent defaults and sensible conventions. And you might think that after more than a decade this would be the norm. Surely any modern web development framework would deliver a similar out-of-the-box experience, right? And yet that doesn't seem to be the case.

Rails continues to set a high bar in terms of fulfilling the promise of an integrated, full-stack framework. Equally impressive after all these years, Rails is still being actively developed and improved while holding true to the same core principles that guided its creation.

We will always look for the right tool for the job, and while Rails is no longer the media darling it once was, in many cases it's still our go-to web development framework. So although we come at this from a different perspective than Rails' creator David Heinemeier Hansson, we're both bullish on Rails in 2017 and beyond....

[Continue Reading…]

Integrating Elm at Clarity Voice (Part 2)

April 05, 2017

When we last left Mike Onslow, he had rolled out two small, but successful, pilot Elm projects at Clarity Voice. (Part 1) Now he was eager to try a bigger project. But bigger would mean more visibility and, up to this point, he had flown under the radar.

Starting with small, low-risk projects, Mike had been able to get hands-on experience with Elm and he'd discovered:

"When we built our initial Elm apps, they compiled, and worked right away. And then, when we updated these Elm apps, not only could we do it faster, but again, they just compiled and worked. Elm gave us such a good development and deployment environment!"

But Mike knew that management would still be reluctant to move forward with Elm on larger projects. They were likely to ask:

"Do you want to use Elm just because it’s the latest thing?"

Sometimes the shiny new things are actually better. But no, that wasn't the reason Mike wanted to use more Elm. "New" and "latest" do not qualify a technology for adoption. Good developers know to be skeptical of hype and rely instead on actual experience.

That's what Mike did. From his experience with the first two pilot projects, he collected data points:...

[Continue Reading…]

Integrating Elm at Clarity Voice (Part 1)

March 22, 2017

"We were tired of silly runtime exceptions breaking our souls."

That's how Mike Onslow responded when we asked him why he made the decision to start using Elm at Clarity Voice. He was a software developer facing the need to replace a 10-year-old internal system that was showing signs of its age. And Mike was tired of working with a broken soul.

But you won't sense any exhaustion in Mike these days. He is cheerful, optimistic, and brimming with creative ideas. This spring they're excited to kick off a project rebuilding the frontend of their ERP system.

So how did they go from crushed souls to happy coders? What was Mike's simple, yet brilliant, strategy for introducing Elm? And how did he "sell" Elm to his management such that it's now the language of choice at Clarity Voice?

It's a great story and we're pleased that Mike and Clarity Voice have given us this opportunity to share it with you.

"We had Javascript fatigue."

In 2013, Mike and his small team built a large JavaScript UI library for Clarity Voice’s internal ERP system. The UI library used jQuery/jQueryUI and had a lot of nice features:

Their library worked well… for a while. But then their requirements grew and they needed to deal with more complex workflows. As they began to layer in more state changes and dependencies, two things happened at the same time: their app got more difficult to develop and less reliable....

[Continue Reading…]

How Long Does It Take?

January 10, 2017

In yesterday's inbox, from someone we'll call "Rudy":

"Hi, I've been putting together an Angular 2 video course and I'm wondering how much work/hours was put into your Elm video course, I've been considering doing one but I'm not sure if it'll be simpler than Angular 2 / React."

Hi Rudy,

I appreciate your due diligence. Your question reminds me of the time Bob Landis, a legendary wildlife filmmaker, was asked how many days he spent in the field to capture the footage for one of his hour-long documentaries. A humble man, he chuckled a simple reply: "Years".

I don't mean to sound flippant. I wish I could quantify how much work I've put into the Elm course. Back when I started making courses I tried to track my hours in hopes of calculating the development cost. And the detail-oriented (ok, let's call it obsessive) part of me wanted to analyze those metrics so I could more accurately estimate the cost of future courses. Alas, I soon realized that tracking my time was futile.

For this Elm course in particular, it literally has taken years. I first started learning Elm over the holiday season in 2014. Six months later we released our first Elm course. Being a relatively new language, Elm continues to change and so we continually update the course. Then, late last year we spent several months completely redesigning and expanding the course to use the latest version and techniques. As they say, it's not a sprint, it's an obstacle course.

So, if I were to count my hours, I'm not sure where I'd begin. Do I count all the hours spent gaining experience with the language before even considering developing the initial course? What about all the time I'm doing something else but can't stop thinking about how to explain a concept in the course? Honestly, once I start working on a course it kinda takes over my brain....

[Continue Reading…]

Giving Hope: 30% of January's Sales To Go To Preemptive Love

January 03, 2017

"Violence unmakes the world,
but preemptive love has the power to unmake violence."

Update: Thank you for giving a lot of hope this year! Your purchases in January made it possible for Preemptive Love Coalition to feed 100 families for a month and provide sleeping bags for 100 people. There is still so much hope and help to be given in 2017. Find out more about their inspiring and courageous work in their 2-minute video. Thank you for standing with refugee children and families in Syria and Iraq!

Photo credit to Preemptive Love Coalition.

Violence unmade the world for families in Syria and Iraq last year. The terror, slavery, separation, extortion, hunger, fear, heartbreak, poisoning of water springs, and cold nights were widespread. There was no discrimination or favoritism shown when it came to the loss of children, parents, husbands, wives, homes, businesses, and communities for Syrian, Iraqis, Kurds, Christians, Muslims, Yazidis. The young and old, the rich and poor, the rural and urban were all victims in the Middle East violence.

And while we know we cannot singlehandedly change the situation for all the families in Aleppo, Mosul, Damascus, or Fallujah, we are striving to resist the temptation to divide the situation into "us" versus "them" and turn away. Collectively we can actively give hope. Just maybe we can give enough hope and love to unmake the violence and forge peace. ...

[Continue Reading…]

Thanksgiving Sale: Save 25% On Ruby & Rails

November 21, 2016

Fill up on the good stuff this Thanksgiving with 25% off our Ruby and Rails courses! You can feast on our confidence-filling courses without any extra calories.

No coupon code necessary. Prices are slashed today through Monday, November 28.

Announcing New Course for Elm 0.18

November 16, 2016

Elm is rapidly changing the front-end game! Are you ready?

We've totally redesigned and re-filmed our popular Elm course to get you up to speed with the latest version, advanced features, and cutting-edge techniques in Elm 0.18! In our new course Elm: The Pragmatic Way, we'll show you how to confidently build feature-rich Elm apps from scratch with a deep understanding of both the "how" and "why." Check out the intro video.

Get Started Today

We're releasing video modules for this new course incrementally as they're ready. The first eight modules are available starting today! More videos coming soon including effects and commands, talking to a backend API, decoding/encoding JSON, multi-page design, and more. See the full 22-module course outline.

FREE for Alumni

If you bought the previous version, then this updated course is yours absolutely FREE. Simply go to your account to get started. We'd be very grateful if you would help us spread the word about this course. Enjoy!

Early Access Price

If you're new to learning Elm with us, this course will quickly get you up to speed on a modern, reliable way to create web apps in a delightful language. And for a limited time, you can get the early access price.

We hope to see you in the Studio soon!