Building a Baby Age Calculuator with Phoenix/Elixir LiveView

In this article I share how I was able to create a Baby Age Calculator using Phoenix/Elixir LiveView.

If you just want to know how old your child is, jump over to babyweeks.herokuapp.com. If you want to download the source code, goto github.com/monkseal/babyweeks-phx-liveview

Building a Baby Age Calculuator with Phoenix/Elixir LiveView

LiveView - Phoenix/Elixir’s Javascript killer?

As described here and here — “Phoenix LiveView is an exciting new library which enables rich, real-time user experiences with server-rendered HTML. LiveView powered applications are stateful on the server with bidrectional communication via WebSockets, offering a vastly simplified programming model compared to JavaScript alternatives.”

If you don’t want to write Javascript to have a real-time web application, Phoenix LiveView provides an interesting alternative with server-rendered HTML.

Being one to avoid bold pronouments, I won’t commit myself to say that LiveView will deal a death blow to javascript in your app. For one, you may already have a lot Javascript in your app. Maybe some if you even like. However, if you are interested in managing state on the server, LiveView is quite compelling.

Read More

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