You know what’s nice? When things go where they’re supposed to. Mise en place. I know keeping everything neat and tidy is an uphill battle but a little hygiene goes a long way. This is especially true with the oft neglected Gemfile. Dependencies are important and they shouldn’t be shoved in a junk drawer. Besides keeping around commented out gems, there is one sin that seems to be ubiquitous:…
“Can you tell me how many…” “Can you build me a report that shows…” “Can you run another report for August…” I know I’m not the only one who’s received these requests. Most of the time they’re not even sure what they want. Usually the answer to their question won’t actually change anything. Does it matter whether we have 1000 or 1001 customers? Does it change our priorities? Our strategy?
RTFM. I’m sure you’ve heard it before. Usually it serves me well. When something isn’t working it’s best to start from the assumption that you’ve overlooked something simple. >> TestMailer.hello.deliver_now => true This was my assumption when I ran into this issue with Postmark. A 200 response but no email sent. If Postmark said the message was sent then it must be somewhere, right? I tried…
When I created SnippetStash I did some research on the easiest way to deploy a new Rails app. The default answer used to be Heroku but times have changed. Based on my research, Heroku had become expensive and there were a few viable alternatives. Many suggested Fly.io or Render with various tradeoffs. I decided that Render would be the easiest to set up, and automatic deploys were ideal for a…
The Problem There are a plethora of articles and discussion on the pernicious effects of news feeds. They are so pervasive now that it’s easy to forget they’re even there. But time and time again they quietly suck you into a tightly controlled feedback loop design to “maximize user engagement.” Limiting their effects can be difficult. Designed and perfected through millions of man hours over the…
I’m not sure exactly where I picked it up but I have a habit of highlighting books that I read. It’s easy to forget some key insights after reading a book and highlighting provides a way to mark something that I want to revisit. The issue is I don’t revist. At best I might remember some connection a few months later and flip through the entire book looking for the section I was thinking of. After…
If you’ve used Ruby for more than 5 minutes, you’ve probably come across the IRB gem or it’s popular counterpart Pry. Both of these provide a REPL to explore and execute Ruby code. IRB is old - nearly as old as the language itself in fact. For a mature library like this, I would expect a slow development cycle mostly comprised of incremental improvements, bug fixes, and performance enhancements.…
Rail’s Enumerable module provides a number of time saving methods for dealing with array-like structures. The one that’s provided the most utility (for me at least) is index_with. I often find myself with an array of items I’d like to use as keys for a new nested hash. With index_with this is as simple as: months = ['Jan', 'Feb', 'Mar'] months.index_with({}) => { 'Jan' => {}, 'Feb' => {}, 'Mar' =>…