Get Started with redux-form

The redux-form library bills itself as the best way to manage your form state in Redux. It provides a higher-order form component and a collection of container components for dealing with forms in a React and Redux powered application. Most importantly, it makes it easy to get a form up and running with state management and validations baked in.

redux-form sign in

To get a feel for what redux-form can do for us, let's build a simple Sign In form. You can follow along below or check out the resulting source code directly.

Start with React

We are going to start by getting the React portion of this application setup. The easiest way to spin up a React app is with create-react-app. Install it with npm or yarn if you don't already have it globally available.

$ yarn global add create-react-app

Let's generate our project.

$ create-react-app redux-form-sign-in

The create-react-app binary that is

Continue reading “Get Started with redux-form”

Announcing Heroku ChatOps for Slack

Today we’re making our Slack integration generally available to all Heroku customers through the release of Heroku ChatOps.

ChatOps is transforming the way dev teams work, replacing the asynchronous communication and context-switching of traditional operations processes with a shared conversational environment so teams can stay focused, communicate in real-time, gain visibility, and speed joint decision making.

Having seen the benefits of Slack integration for managing our own apps, we wanted to make ChatOps easier to use and accessible to every dev team. Heroku ChatOps handles the complexity of user onboarding, authentication, and accountability between Slack & Heroku, and provides users with an intuitive slash command interface and curated Slack notifications to improve your team’s efficiency and transparency. Heroku ChatOps is easy to set up and works out of the box with just a simple click installation.

Our initial release supports the integration of Heroku’s popular Pipelines continuous delivery workflow with


Continue reading “Announcing Heroku ChatOps for Slack”

Create Your Successful Agile Project: Collaborate, Measure, Estimate, Deliver

Writing Prettier JavaScript in Vim

JavaScript is an incredibly powerful and fickle language. In the face of
quickly evolving frameworks and tooling, it can be cognitively challenging
to grapple even with a familiar codebase. Even just having one less thing to
think about goes a long way in helping us deal with the rest. Figuring out
how to format each line of code is accidental complexity and one less thing
we ought to think about.

As Brian Dunn put it, "Once you stop formatting your code, life becomes
beautiful." And so does your code, but without any of the effort.

This is where Prettier comes in.

Using Prettier in Vim

At Hashrocket, Vim is an essential part of our development tooling.
neoformat makes it easy to
incorporate prettier into our existing workflow. As you can see in the
above gif, Prettier formats the file on save.

Here is how we set it up.

Step 1

Install prettier if

Continue reading “Writing Prettier JavaScript in Vim”

Using Heroku’s Expensive Query Dashboard to Speed up your App

I recently demonstrated how you can use Rack Mini Profiler to find and fix slow queries. It’s a valuable tool for well-trafficked pages, but sometimes the slowdown is happening on a page you don't visit often, or in a worker task that isn't visible via Rack Mini Profiler. How can you find and fix those slow queries?

Heroku has a feature called expensive queries that can help you out. It shows historical performance data about the queries running on your database: most time consuming, most frequently invoked, slowest execution time, and slowest I/O.


Recently, I used this feature to identify and address some slow queries for a site I run on Heroku named CodeTriage (the best way to get started contributing to open source). Looking at the expensive queries data for CodeTriage, I saw this:

Code Triage Project Expensive Query Screenshot

On the right is the query, on the left are two graphs; one graph showing

Expensive Queries Screenshot 2

Continue reading “Using Heroku’s Expensive Query Dashboard to Speed up your App”

8 things I look for in a Ruby on Rails app

As a consultant, I’ve looked over a shitload (how many? probably ~150-200) over the last 12 1/2 years in the Ruby on Rails community. I haven’t worked on most of them, but I do get invited to look over, review, audit, and provide feedback on a lot of those.

Over on the Planet Argon blog I’ve shared my quick hit list of a few initial things that I look for when looking over an existing code base.

Read Ruby on Rails Code Audits: 8 Steps to Review Your App

Do The Shuffle

How should we break up teams for this game? In what order should we do
presentations? Which lunch spot should we go to this week? The need for some
randomization arises often. With irb at our fingertips, we often reach for
Ruby's shuffle.

But have you ever wondered how shuffle works?

I can imagine writing a loop that randomly shuffles around the contents of
an array, but what would I need to do in order to sufficiently and
efficiently shuffle an array? What I need is an algorithm.

An Algorithm

When I do a google search for "algorithm to shuffle a
, the first result
is a Wikipedia article on the Fisher-Yates shuffle.

The Fisher–Yates shuffle is an algorithm for generating a random
permutation of a finite sequence—in plain terms, the algorithm shuffles
the sequence. The algorithm effectively puts all the elements into a hat;
it continually determines the

Continue reading “Do The Shuffle”

Rails & Angular; Developing With Elixir/OTP Online Course

On the Rise of Kotlin

It’s rare when a highly structured language with fairly strict syntax sparks emotions of joy and delight. But Kotlin, which is statically typed and compiled like other less friendly languages, delivers a developer experience that thousands of mobile and web programmers are falling in love with.

The designers of Kotlin, who have years of experience with developer tooling (IntelliJ and other IDEs), created a language with very specific developer-oriented requirements. They wanted a modern syntax, fast compile times, and advanced concurrency constructs while taking advantage of the robust performance and reliability of the JVM. The result, Kotlin 1.0, was released in February 2016 and its trajectory since then has been remarkable. Google recently announced official support for Kotlin on Android, and many server-side technologies have introduced Kotlin as a feature.

The Spring community announced support for Kotlin in Spring Framework 5.0 last month and the Vert.x

Continue reading “On the Rise of Kotlin”

Habits of a Happy Node Hacker 2017

It’s been a little over a year since our last Happy Node Hackers post, and even in such a short time much has changed and some powerful new tools have been released. The Node.js ecosystem continues to mature and new best practices have emerged.

Here are 8 habits for happy Node hackers updated for 2017.

1. Lock Down Your Dependency Tree

In modern Node applications, your code is often only the tip of an iceberg. Even a small application could have thousands of lines of JavaScript hidden in node_modules. If your application specifies exact dependencies in package.json, the libraries you depend on probably don’t. Over time, you'll get slightly different code for each install, leading to unpredictability and potentially introducing bugs.

In the past year Facebook surprised the Node world when it announced Yarn, a new package manager that let you use npm's vast registry


Continue reading “Habits of a Happy Node Hacker 2017”

Node.js 8 the Right Way: Practical, Server-Side JavaScript That Scales

Announcing Release Phase: Automatically Run Tasks Before a New Release is Deployed

You’re using a continuous delivery pipeline because it takes the manual steps out of code deployment. But when a release includes updates to a database schema, the deployment requires manual intervention and team coordination. Typically, someone on the team will log into the database and run the migration, then quickly deploy the new code to production. It's a process rife with deployment risk.

Now with Release Phase, generally available today, you can define tasks you need to run before a release is deployed to production. Simply push your code and Release Phase will automatically run your database schema migration, upload static assets to a CDN, or any other task your app needs to be ready for production. If a Release Phase task fails, the new release is not deployed, leaving the production release unaffected.

To get started, view the release phase documentation.


A Release Phase Example

Let’s say you have

Screen Shot 2017-05-09 at 10

Continue reading “Announcing Release Phase: Automatically Run Tasks Before a New Release is Deployed”

Programming Clojure, Third Edition; June PragPub Magazine

Introducing Heroku Shield: Continuous Delivery for High Compliance Apps

Today we are happy to announce Heroku Shield, a new addition to our Heroku Enterprise line of products. Heroku Shield introduces new capabilities to Dynos, Postgres databases and Private Spaces that make Heroku suitable for high compliance environments such as healthcare apps regulated by the Health Insurance Portability and Accountability Act (HIPAA). With Heroku Shield, the power and productivity of Heroku is now easily available to a whole new class of strictly regulated apps.

At the core of Heroku’s products is the idea that developers can turn great ideas into successful customer experiences at a surprising pace when all unnecessary and irrelevant elements of application infrastructure are systematically abstracted away. The design of Heroku Shield started with the question: what if regulatory and compliance complexity could be transformed into a simple developer experience, just as has been done for infrastructure complexity? The outcome is a simple, elegant user experience that


Continue reading “Introducing Heroku Shield: Continuous Delivery for High Compliance Apps”

Writing Again

A while back I changed the stack I used for publishing this blog with
the hope that I would write more because it would be easier to publish.
Looking back at how little I’ve written since I’ve made that change, I
can see that that didn’t work out so well. 🙂 I’m not going to change
my stack again (just yet), but I am going to try and write a bit more.
Hopefully it won’t be another year before my next post.

One cause of the lack of my writing is how busy I have been running my
error tracking service. It has been a lot
of fun, but it has also been a lot of work. The good news is that the
business continues to grow, and we just passed the five-year mark. My
co-founders and I are definitely living the bootstrapper’s dream, doing
work that we love, and Continue reading “Writing Again”

Announcing DNS Service Discovery for Heroku Private Spaces: Microservices Communication, Made Easy

Today, we are excited to announce DNS Service Discovery for Heroku Private Spaces, an easy way to find and coordinate services for microservice-style deployments.

As applications grow in sophistication and scale, developers often organize their applications into small, purpose-built “microservices”. These microservice systems act in unison to achieve what otherwise would be handled by a single, larger monolithic application, which serves the benefit of simplifying applications’ codebases and improving their overall reliability.

DNS Service Discovery is a valuable component of a true microservices architecture. It is a simple, yet effective way to facilitate microservice-style application architecture on Private Spaces using standard DNS naming conventions. As a result, your applications can now know in advance how they should reach the other process types and services needed to do their job.

How It Works


DNS Service Discovery allows you to connect these services together by providing a naming scheme for finding individual

Continue reading “Announcing DNS Service Discovery for Heroku Private Spaces: Microservices Communication, Made Easy”

Announcing Platform API for Partners

Heroku has always made it easy for you to extend your apps with add-ons. Starting today, partners can access the Platform API to build a more secure and cohesive developer experience between add-ons and Heroku.

Advancing the Add-on User Experience

Several add-ons are already using the new Platform API for Partners. Adept Scale, a long-time add-on in our marketplace that provides automated scaling of Heroku dynos, has updated its integration to offer a stronger security stance, with properly scoped access to each app it is added to. Existing customer integrations have been updated as of Friday May 12th. All new installs of Adept Scale will use the more secure, scoped Platform API.

Opbeat, a performance monitoring service for Node.js developers, is using the Platform API in production to sync their user roles to match Heroku. It is also synchronizing metadata, so that its data stays in sync

Continue reading “Announcing Platform API for Partners”