Recent Posts by Ben Lewis

Ben is a Colorado native and a third-generation programmer. In his past lives, he was an organic farmworker, gardener, and elementary school music teacher. He started programming at the Turing School, where he focused on Test-Driven Development, Single-Page Apps, and Service-Oriented Architecture. He lives in Boulder with his daughter Lumin and enjoys cooking, hiking, yoga, and making music. Ben tweets as @fluxusfrequency and works for Twitter.

Using Services to Keep Your Rails Controllers Clean and DRY

We’ve heard it again and again, like a nagging schoolmaster: Keep your Rails controllers skinny. Yeah, yeah, we understand. But that’s often easier said than done—because things get complex. And we need to talk to other parts of our codebase or to external APIs to get the job done.

Mailers. Stripe. External APIs. All that code starts to add up.

Read More

Understanding Rack Apps and Middleware

Many web developers work on the highest levels of abstraction when we program. And sometimes it’s easy to take things for granted. Especially when we’re using Rails.

Have you ever dug into the internals of how the request/response cycle works in Rails? I recently realized that I knew almost nothing about how Rack apps or middleware works—so I spent a little time finding out. Below are my findings. 

Read More

Five Ruby Methods You Should Be Using

There’s something magical about the way that Ruby flows from your fingertips. Perhaps that’s why it was once said that “Ruby will teach you to express your ideas through a computer.” And it’s most likely the reason that Ruby has become such a popular choice for modern web development.

Just as in other languages, there are numerous ways to say the same thing in Ruby. I spend a lot of time reading and nitpicking people’s code on Exercism. And I often see exercises solved in a way that could be greatly simplified if the author had only known a certain Ruby method.

Read More

Inline Styles: Yes or No?

Recently, a team I work with has been porting some existing tools written with JavaScript to a new codebase using ReactJS. We were discussing how we should handle styling, and one member suggested using inline styles.

Read More

How To Write Code With Style: 7 Tips For Cleaner Code

Code is communication. It has two audiences: the computer, and the future maintainer. How we communicate with the computer is rather objective: you either gave it the instructions to do what you really wanted, or you didn’t.

Read More

How To Clean Up Your JavaScript Build With Tree Shaking

The world of JavaScript development can be frustrating and exciting.

Read More

Goodbye MVP, Hello v1

You’ve done it!

Read More

A Smooth Transition to ECMAScript 6: Using New Features

In part one of this miniseries, we talked about the timeline for ES6 rollout, feature compatibility in existing environments and transpilers, and how to get ES6 set up in your build process.

Read More

A Smooth Transition to ECMAScript 6: First Steps

I’m really excited about the newest version of JavaScript, ECMAScript 6 (ES6). But I’m also terrified. There’s already so much to do between mentoring, contributing to open source, and working on the projects that pay the bills. When will I ever find the time to learn a whole new version of JavaScript?

Read More

Happy, Sad, Evil, Weird: Putting Use Case Planning Into Practice

In part one of this miniseries, we introduced formal Use Case Analysis and a simplified version called Use Case Planning which fits a rapid, iterative development process. That post went over the high-level concepts, and explained how this planning method will help you catch problems with your design before you start to implement.

Read More

Subscribe Here!