6 things missing from Rails

… That you will probably end up creating yourself …

When should you throw everything out and start over

After over 12 years of working with Ruby on Rails on multiple different codebases, I’ve some common themes. This is my list of patterns or types of objects you will see in Rails applications.

1. Query Objects.

ActiveRecord provides the scope macro which allows us to define queries related to that model. However, for larger, more complex queries that span multiple models, scopes can often lead to a patchwork of distributed logic. To address this, I prefer to build stand alone a Query object. I usually place this in a separate folder: `app/queries’. The following is an example of query object:

A simple base query object:

module Kenglish
  QueryResult = Struct.new(:data, :meta)

  class Query
    class << self
      def result(*args)
        new(*args).result
      end
    end

    attr_reader :params, :relation

    def initialize(params, relation)
      @params = params
      @relation = relation
    end

    def build_result(data, meta)
      QueryResult.new(data, meta)
    end
  end
end

Read More

When should you throw everything out and start over?

… TLDR; Almost never

When should you throw everything out and start over

I have worked with a few engineering teams and managers that expressed something like this:

Our current system is so buggy and problematic, if we could just throw the whole thing out and start over we wouldn’t have all these issues!

This sentiment expresses a common human desire for a fresh start, a do-over. Our legal system accommodates this through personal and corporate bankruptcies. For a brick and mortar business like a Salon or a Restaurant, this might take the form of moving locations or wall-to-wall demolition. Why can’t we do with this our software projects?

Read More

My Favorite Podcasts of 2018

Driving, walking, doing dishes, I always seem to be listening to something. Most of these are non-tech but here’s what I’ve listened to the most last year: EconTalk One of the first podcasts I ever subscribed to, this year the host, Russ Roberts, has brought on a wide range of guests. Revolutions I found this one on vacation when I was looking for something long to listen to. I started from the beginning and I’m still on the episodes from 2017!

Read More

6 Health Care Companies That You Probably Didn’t Know Use Ruby on Rails.

Rails is dead! Long live Ruby on Rails!

A recent discussion on the Ruby Rogues podcast reminded me that since I started doing Ruby on Rails in 2007, the platform really hasn’t lost any momentum. Companies continue to reach for this product to build custom web applications. With the right talent on a team, it can be a very productive endevoru

Here’s a few companies that I know use Ruby on Rails for some of their products if not their main product.

1. Doximity

A pioneer of mobile health apps to connect health care professionals and make them more productive, Doximity’s dynamic team delivers with Ruby on Rails alongside whatever other technology they need to get the job done. They promote growth among their developers and this is one of the key assets of good Ruby on Rails development team. Doximity

Read More

5 Essentials for Software Engineering Team Success

5 Essentials for Software Engineering Team Success

TLDR;

  1. Continuous Integration and Continuous Deployment

  2. Automated QA and Full Product Regression Test Suite

  3. TDD - Unit Testing

  4. Code Reviews and Automated Code Quality Checks

  5. Mentoring

Alternate Title: 5 Things that your company or agency should be doing to get the most out of your Software Engineers

1. Continuous Integration and Continuous Deployment

Continuous Integration (CI) is a development practice where engineers integrate code into a repository several times a day. Each check-in is verified by an automated build. This allows teams to detect problems early whereas Continuous Deployment aims to reduce the time elapsed between writing a line of code and making that code available to users in production. Ideally, a passing automated build means the product is deployed to production. Numerous tools exist to help teams accomplish this: CircleCI, Codeship, Docker, etc

Read More

Minesweeper React Redux Screencast Tutorial - Parts 11-14

Looking for the game? Play It Here!

Final Episodes of my React/Redux Minesweeper Screencasts!

These are the final and maybe most interesting episodes of me live-coding a React/Redux version of Minesweeper. You can also checkout Part 1-5 and Part 6-10. These episodes aren’t as rough as I have improved my editing of the vidoes. You can also see the final source code.

React Redux Minesweeper Part 11 - Wiring up RESET_BOARD action to the game interface and building a GameMenu jsx/container pair.

Read More

Minesweeper React Redux Screencast Tutorial - Part 6-10

Looking for the game? Play It Here!

More Minesweeper built in React/Redux Screencasts - the journey continues!

As I mentioned in Part 1-5, a React/Redux version of Minesweeper is something I wanted to flush out. Creating these screencasts took longer than expected. They are very rough as I’m more or less live coding. Feel free to jump around to the parts you are most interested in and follow along with the source code.

React Redux Minesweeper Part 6 - Building actions in Reducers for opening a cell and flagging a cell.

Read More