Thoughts on Interfaces for Models

I recently had to build an interesting model that stored values for a JWT in order to implement an allow list style revocation strategy. After some feedback from another developer it became clear the interface for that model needed to be optimized. Here’s a quick description of the “behavior” of that model: All of the columns are read only after creation It’s dependent on a User record assocation - thus requires a validation It has an expiration time that is also stored, but set to a pre-determined amount of time It’s jti column value is generated by the model itself since it is a “propietary” action per record Given this set of behavior we can infer that since the expires_at column and jti are both self generated in the model code, the only attribute required for creation is the associated User record. ...

February 11, 2021 · 2 min · JD

Using Run Command in Emacs for RSpec Watch Mode

Run Command is a really nifty Emacs package that abstracts away running arbitrary shell commands into a nice ivy or helm (or other completion frameworks) frontend. I saw a few of the examples and immediately got an idea for using it to build an RSpec watch mode. It’s a tiny optimization to my work flow as re-running the test command is just a few keystrokes in of itself, but getting automated feedback means I get to focus on other things while writing tests. ...

February 2, 2021 · 4 min · JD

Resolving client side routes in Rails

There’s a quick and easy way to satisfy client side routing in a Rails application. Rails will automatically try to resolve it’s routing on the server side and throw an immediate 404 if no valid pages exist. Since my main application at work is a React SPA I needed a way to resolve routes to the client and not let them get caught by the server and throw a 404. The (/*path) method route ‘helper’ allows through any route so it can then be handled elsewhere. ...

January 9, 2021 · 2 min · JD

Dockerize Create React App

I’ve used Docker quite a bit but I haven’t really dived into configuring my own dockerized app. I recently needed to build a quick proof of concept with a React app and needed to share it easily without worrying too much about build dependencies or anything of the sort. So here’s a quick guide on dockerizing an app created with create-react-app. The guide I’ll assume you already have a CRA app created. If you’ve never used create-react-app, I recommend checking out the docs here. This tutorial will work from the top down and both the Dockerfile and docker-compose.yml files will be at the end in full. ...

January 2, 2021 · 4 min · JD

Organizing Work is Hard

As an engineering team grows it becomes imparitive that the leadership among that team grows to scale as well. We all know that organizing work on a product is difficult, but the organization of the engineering team specifically plays the most significant role in the overall developer experience. My personal experience up till this point has been to work mostly on projects or features either by myself or with a single other more senior developer. Over the last quarter I was given the temporary title of technical lead on a project with 4 other developers, which presented an extremely difficult learning opportunity for me. ...

November 27, 2019 · 5 min · JD

Tips for Breaking into the Tech Industry

This is a repost of my original 2017 blog post. It maybe a little outdated. I recently got my first developer job as a Quality Assurance Engineer at a company called Modern Message and I want to share a few tips on things I did to help me eventually land this job. I’m a student at Bloc which is a remote, self-paced developer bootcamp. I managed to pick their longest track called the Software Engineering Track. ...

December 28, 2017 · 9 min · JD