I worked on a codebase that had taken the “skinny controllers” and “skinny models” idea to heart by putting everything into service objects. I think that is a great idea if you are purposeful with your service objects. The problem was we weren’t. The stack from controller receiving a request to models updating the database was a dozen or more service objects deep in some places. It was service…
I’ve been getting into lettering lately (gotta chase that dopamine). I soon realized that the first thing I needed was practice sheets to try out different letterforms and get my writing more consistent.
I have always liked Rubular. It is simple, focused, and does exactly what it says. You paste in a regex, you paste in a string, and you see what matches. I have used it for years.
I first encountered RoboWar as a teenager—a game where you program circular "robots" to battle in a small arena. I've been looking for an activity for my local programming club and thought it would be fun to revisit. Since most of the original documentation has vanished from the web, I wrote this article to restore it.
A few years ago I wrote about why Stimulus irritates me and how Vue can do the same thing, but better. It got me thinking about other tools that do a better job at being “JavaScript for the HTML you already have.” Two of them are Alpine.js and htmx.
A few years ago I wrote about creating a custom Jekyll plugin for code blocks. It served me well, but recently I dusted off this blog and decided to revisit the code. I found a few issues worth fixing.
Stimulus has a description top and center of its home page: “A modest JavaScript framework for the HTML you already have.” By “modest” I think it is claiming that: it won’t take over your routing, it won’t bury its view code deep in JavaScript code, it can be applied to the pages you choose (and won’t affect the pages that you don’t), etc. By “HTML you already have” I think it is claiming that you…
For the past 3 years I had been working on a Rails app with an Angularjs 1.5 front-end (SPA); I didn’t love it. It was much more complex than it needed to be. Our front-end permission management was CanCan implementd for the front-end that would interpret our backend’s CanCan permission object passed to it as JSON. The routing rules used a lot of regular expressions. The pages had deeply nested…
Ant Design is an incredibly thorough design system with a lot of useful React components. The trick is that all of the CSS is generated with Less and there are no plans to support Sass or anything else. Less support is really poor in the Rails community right now; the gems are largely abandoned. If you want to customize Ant Design with a Rails project you need to do it via Webpack.
My big project at work this year is to upgrade our codebase from Rails 4 to Rails 5 (and hopefully Rails 6 if we have time). The biggest obstacle is that we rely heavily on the Squeel gem; a gem that was abandoned 5 years ago and isn’t compatible with Rails 5. There is a newer alternative called Baby Squeel that doesn’t tie into the internals of ActiveRecord, but it is also undermaintained. My…