Potter
Good tidings
Joy
Found in toys
Sundries and comforts
Confrontation brewing
Hot cocoa too
A people made a people
Birth pangs, curled bangs
Good tidings we bring.
Good tidings received.
To you and your kin.
Solitude as reprieve.
Forget what unwrapped.
Package it neatly.
Solstice virgin birth.
Cleansing briefly.
Hosanna
Hosanna
The highest we’ve seen you
Buckshot celebrations
Here we find you
Welp. You did it.
Deploying Rails to Netlify
Working Around ActiveRecord Callbacks (supergood.software)
This is a great pattern for opting out of named callbacks. Never underestimate the versatility of an attr_accessor!
aniftyco/react-provider-tree (github.com)
“Break out of provider tree hell.” As I move more state management into the React tree with hooks and context, this is becoming increasingly useful.
"Paradox of tolerance" on Wikipedia (en.m.wikipedia.org)
The paradox of tolerance states that if a society is tolerant without limit, its ability to be tolerant is eventually seized or destroyed by the intolerant.
How to Carve a Turkey (nytimes.com)
This is the hard hitting journalism I need: a short video about how to effectively carve a turkey. Solid advice for Thanksgiving day.
On The Shoulders of Giants (invisibleinkblog.blogspot.com)
“Sometimes it takes a long time to sound like yourself.”
A refreshing challenge to be unoriginal, and pay tribute to those who do well what we want to do well.
Gall's Law (principles-wiki.net)
A complex system that works is invariably found to have evolved from a simple system that worked. A complex system designed from scratch never works and cannot be patched up to make it work. You have to start over with a working simple system.
A Tweet about virgin births (twitter.com)
Christians believe in the virgin birth of Jesus. Materialists believe in the virgin birth of the cosmos.
Choose your miracle.
At some point, we’re all putting our faith in something.
Happy Hues (happyhues.co)
“Curated colors in context.” A beautiful little site for previewing a color palette in the context of a web application.
Refactoring Ruby with Monads (codon.com)
A great introduction to the scary-word that is “monads”. Monads have never felt more useful, usable, and approachable.
Flow Focus and Break Timer (apps.apple.com)
A minimal macOS app for working the pomodoro method.
pure: Pretty, minimal and fast ZSH prompt (github.com)
Very useful now that macOS has transitioned to zsh by default.
Tyke (tyke.app)
A small scratchpad in the MacOS menu bar. Great for removing formatting, and freeing up your clipboard.
January February honorary actuary
March and April death tax, pulmonary
May June July August faux church visionary
September October social call luminary
November thankful overtired kinda scary
December slant rhyme no try four score
Seven years ago
Seasons were the hardest
Scratch hardest write harshest
Scratch harshest write harvest
Reaping what was
Consequence of love
Choices made sincerely
Worked out weirdly
Mental health gym day
Gains earned heartily
Hands trained to obey
Thanks automatically
Default embracing
Tweaking procrastination
Abraham axe sharpening
Reforestation
Christmas Milk
A Five on the Enneagram and Other Myths I Tell Myself
lynnandtonic.com (lynnandtonic.com)
One of the most inspiring personal websites I’ve ever seen. A lot of gems in all the things Lynn has shared over the years.
Chartkick (chartkick.com)
Create beautiful JavaScript charts with one line of Ruby. There’s many a Rails CRUD project where I can imagine having benefited from knowing about this library.
Carbon (carbon.now.sh)
Create and share beautiful images of your source code.
Planning advice found on Twitter (twitter.com)
Every time I make myself write out
We are doing _____ Because we see the problem of _____ We know it’s a problem because _____ If we don’t fix it, we’ll see _____ We’ll know we’ve fixed it when we get _____
the rest of the conversation/project/doc goes SO much easier.
Analogue Pocket (analogue.co)
One handheld gaming hardware to rule them all. Accepts a slew of cartridges to play all the games I regrettably traded away years ago.
Let's hash this out (blog.testdouble.com)
A compelling case for sticking to Ruby’s plain old Hash as much as possible. I’ve lived the pain of serialization errors in higher level of abstractions, so I’d vouch for sticking to low level primitives as much as possible when it comes to persistence.
Awesome list of open source applications for macOS. (github.com)
A GitHub repo with links to a bunch’a open source macOS apps.
Scripting OS X (scriptingosx.com)
I found this site because macOS Catalina transitioned the default shell from bash to zsh and I am always trying to embrace defaults. A lot of great information for becoming more useful in the macOS Terminal.
Causes and symptoms (twitter.com)
The secret to being a senior engineer: Focus on causes rather than symptoms
The secret to being a staff engineer: Enable your group to focus on causes rather than symptoms
The secret to being a principal level engineer: Enable your org to focus on causes rather than symptoms
Destroy all Docker Containers and Images (gist.github.com)
This gist was very helpful when I needed to obliterate everything that Docker had ever built.
spleeter (github.com)
Command line tool to extract voices, drums, bass… anything from a song.
Tricks and Tips for using Fixtures effectively in Rails (blog.bigbinary.com)
The biggest takeaway: don’t use ids unless absolutely necessary. Rely on the autogenerated, deterministic ids, and you get a bunch of behavior for free.
Nostalgia for brokenness (twitter.com)
Whatever you now find weird, ugly, uncomfortable and nasty about a new medium will surely become it’s signature. -Brian Eno (1995)
Focus Entirely on Execution and Not on Result (daringfireball.net)
Daring Fireball offering commentary on the idea from Christopher McQuarrie. You can control the inputs, but not the outputs. Focus on consistently delivering inputs.
Hooks for fetching, caching and updating asynchronous data in React (github.com)
This appears to be a well thought out solution for fetching data in a post-hooks, pre-Suspense world. A lot of hand rolled patterns codified into consistent solutions seems worth a shake.
Good Enough to Ship
Capitalism has admitted defeat on Thanksgiving. Giving thanks for the intangible gifts in our lives cannot be monetized, so the seasonal shelves jump strait from Halloween to Christmas. Take or leave the dry turkey and family politics. Being thankful cannot be commoditized.
Taming Large Rails Applications with Private ActiveRecord Models (kellysutton.com)
A compelling idea for sticking with ActiveRecord and making explicit domain objects. I’m eager to kick the tires on this idea.
Rails 6.0 new framework defaults: what they do and how to safely uncomment them (medium.com)
I would love to see a post like this come with the release notes of every Rails version. Extremely helpful.
Rails 6 introduces a new auto loader called zeitwork. The literature has me convinced transitioning to this new loader will be worth the effort. The legacy of the Rails apps we’ve built has us opting for the :classic loader in the immediate.
A nice thing about using :classic, is that Rails provides some deprecations that point toward getting ready for :zeitwork. As an example, autoloading constants in an initializer (config/initializers/[something].rb) emits a deprecation warning in Rails 6.
DEPRECATION WARNING: Initialization autoloaded the constants Sortable, Foldable, and Launderable.
Being able to do this is deprecated. Autoloading during initialization is going to be an error condition in future versions of Rails.
Reloading does not reboot the application, and therefore code executed during initialization does not run again. So, if you reload Sortable, for example, the expected changes won't be reflected in that stale Class object.
`config.autoloader` is set to `classic`. These autoloaded constants would have been unloaded if `config.autoloader` had been set to `:zeitwerk`.
Please, check the "Autoloading and Reloading Constants" guide for solutions.
Following the Autoloading and Reloading Constants guide, and some supplementary Duck Duck Go’ing, I learned about the Rails.configuration.to_prepare API. Where initializers run once when the app is booting, blocks passed to to_prepare will be run before every request in development, and once before eager loading in production.
For a handful of constants that are being autoloaded in an initializer, using to_prepare did the trick.
-ActiveRecord::Base.send :include, Sortable
+Rails.configuration.to_prepare { ActiveRecord::Base.send :include, Sortable }
Linux directories cheat sheet (twitter.com)
A tweet sized cheat sheet of what all those abbreviated directory names mean.
Server-generated React Responses
I’m intentionally slow to script things away in my day-to-day development. I understand the benefits of scripting away repetitive tasks. But I’ve found that they come at the cost of empathy.
I used to have an alias of be for running bundle exec. When I’d pair with newer developers, they’d begin to think that be is a command they should know, when in fact it was a customization they’d need to borrow. So I’ve formed the habit of always typing out bundle exec.
It takes a little more time. But when someone is looking over my shoulder, they’re learning how to do do the thing rather than learning my abstraction about how to do the thing.
Ask for advice, not feedback. (twitter.com)
The word “feedback” encourages people to think about the past, not the future. Asking for “advice” instead triggers others to think specifically about what might help someone improve in the future.
htmlhead.dev (htmlhead.dev)
A handy reference for all the things that can and should be placed inside the html <head> element.
Creating multiple models with form objects in Rails (johnmaddux.com)
I’m a big fan of leaning into ActiveModel::Model to build form objects. This is one of the more strait-forward explanations I’ve seen.
Map Redis types directly to Ruby objects (github.com)
I’ve built toy systems that wrap Redis types with Ruby objects. This solutions seems more substantial than I ever dreamed of.
I particularly appreciate the emphasis that it is not an ORM.
Using React Context for Suspenseful Data Fetching
While authoring a very boring HTML form I learned that you do not need a for/id pair on a label that is wrapping a radio input.
-<label for="radio_option_1">
- <input id="radio_option_1" type="radio" name="cheese" value="cheddar"> Cheddar
+<label>
+ <input type="radio" name="cheese" value="cheddar"> Cheddar
React Native’s <StatusBar /> component behaves similarly to <Helmet /> from react-helmet. Render them anywhere in the tree. Every time an element is rendered, it’s props get pushed onto the top of a stack that will reconcile as a cascade of props for imperatively updating outside values.
The source of StatusBar.js was particularly helpful, because I discovered it just as I was arriving at a near-identical solution for doing something similar in an app I’m working on.
git rebase --exec is a handy tool for ensuring that each commit is keeping the tests passing.
Ensuring that each commit keeps the tests passing is in service of an ideal I’ve been pursuing. I don’t like submitting commits with the phrase “fix tests” in the description. I like refactoring old functionality or introducing new functionality under green tests.
To do this, I tend to work in two phases lately.
Phase one is an exploratory branch where I’m figuring things out. This is me thrashing through the jungle with a machete.
Phase two is a refined branch, where I’m communicating to others what I figured out. This is more surgical with detailed commits, explaning what changed, why, and alternatives that were considered in my exploratory thrashing branch.
Before submitting phase two for consideration, I’m starting to get in the habit of making sure the tests passed each step of the way.
$ git rebase --exec "bin/rails test" master
That will run the Rails tests on every commit that contributed to the current branch.
Unfollowing Everybody (anildash.com)
Anil Dash’s write up about why and how he unfollowed everybody on Twitter is compelling.
Just Delete Me (backgroundchecks.org)
Self-billed as a directory of direct links to delete your account from web services. It also provides useful information about the relative ease of deleting those accounts.
Popup pump (matthewrayfield.com)
A fun experiment with popup windows by Matthew Rayfield. I’m excited to see small tinkering like this that make the Internet fun again.
chart.xkcd (github.com)
A library for creating charts in the style of xkcd. Uses canvas in the browser.
Why Your Privacy Is Worth More Than You Think (vimeo.com)
A video by Duck Duck Go making the case for privacy. Explicitly calls out Facebook and Google for their shady practices. Communicates the concerns in a way you can share with your non “tech” friends.
Consume less, create more (blog.tjcx.me)
My dotcomrade Jeremy Ricketts linked to this post that will strike a nerve with a whole lot of folks, myself included. It’s not about screen time vs non screen time. It’s about consumption vs creativity.
Using a headless browser to capture page screenshots (bitsofco.de)
Take screenshots of web pages using headless Chrome.
chrome --headless --disable-gpu --screenshot https://bitsofco.de
A React component for playing a variety of URLs (github.com)
A React Component that can play videos from YouTube, Facebook, Twitch, SoundCloud, Streamable, Vimeo, Wistia and DailyMotion.
Fast Software, the Best Software (craigmod.com)
Craig’s observations about the trust and reliability implied by the speed of software are spot on. Make it work. Make it fast. Make it faster.
What if I called FLUSHALL on your Redis instance? (honeybadger.io)
Great piece for architecture introspection. Redis has established itself as rock-solidly-reliable in my experience, but there’s always user error to protect against!
React’s Developer Tools are accessible from Safari!
For the last three years I’ve been developing day-to-day in Safari. Whenver this practice comes up in conversation the first question is “what about React Developer Tools?” Until today my answer was to drop into Chrome.
Today I discovered that react-devtools can be launched as a standalone application that can be connected to.
I wired this up in my Rails app with some development only logic.
<% # app/views/application.html.erb %>
<% if Rails.env.development? && ENV["CONNECT_TO_REACT_DEVTOOLS"] == "yep" %>
<%= javascript_include_tag "http://localhost:8097" %>
<% end %>
With this in place, starting a Rails server with the appropriate environment flag does the trick. bin/rails server CONNECT_TO_REACT_DEVTOOLS=yep
Updating for security vulnerabilities with yarn can be tricky. For example, I got a Github warning that my version of js-yaml needed to be updated. js-yaml does not appear in my package.json. It is one of my dependencies’ dependencies.
yarn update js-yaml@secure-version adds js-yaml into my dependencies, which is not what I want to communicate to the team.
Trying to solve for this communication problem brought me to Yarn’s selective dependency resolutions. This seems to fit the exact bill of what I’m trying to achieve. Among the reason’s to use selective dependency resolution is listed:
A sub-dependency of your project got an important security update and you don’t want to wait for your direct-dependency to issue a minimum version update.
Force yarn.lock to update appropriately, without communicating to a future maintainer that this is actually a dependency of our app. Works on my machine.
Deconstruct Conference 2019
Free to Ignore
I Built a Hook
Use date.to_s(:db) when you need to use a date in a Rails YAML fixture. My muscle memory reached for date.format(:db), but that’s wrong. It’s .to_s
cookie_monster:
last_wanted_cookies_at: <%= 1.second.ago.to_s(:db) %>