Responding to “Beware of ‘service objects’ in Rails”

I recently stumbled across Jason Swett’s “Beware of ‘service objects’ in Rails” blog post. While I appreciate the perspective, I think it gets a number of things wrong. I replied to this post in a comment, but wanted to post my thoughts here as well in the hopes of encouraging more dialog about this important topic.

If so inclined, please feel free to comment below with your take on this subject.

Continue reading “Responding to “Beware of ‘service objects’ in Rails””

Understanding unless in Ruby

I don’t know about you, but Ruby’s unless has always been kind of hard for me to grok, but I’m realizing that’s because I’ve never seen a great use of it, esp. one that made me go, “Oh wow – yeah I’d definitely use unless there vs. an if statement or something else.”

However, the deeper I’ve gotten into Ruby the more I’ve noticed one place where unless really shines – guard statements. Consider the following:

def update_book_title(book, title)
  return unless book.present?
 
  book.update(title: title)
end

Now there’s a place I would definitely use unless over other control flow constructs. It’s succinct, easy to understand, and honestly a pleasure to both write and read.

Nice job Ruby! 🔴💎

No Longer For Me?

Today’s (2021-09-14) WWDC announcements have got me wondering: Are Apple’s devices no longer for me? Every year, Apple unveils an even spiffier, more-powerful version of its flagship phone and every year I find myself cringing a little more as they rattle off a slew of new features and capabilities they want to put in our pockets.

Today however, it became apparent to me why I’ve increasingly cringed each year since the iPhone 7 was released and why it’s time for me to move on: My values when it comes to technology are very different from Apple’s.

Continue reading “No Longer For Me?”

Apple’s Proposed CSAM Scanning is a Mistake

If you’re unfamiliar with it, you can brush up on Apple’s CSAM proposal here (scroll down to the “CSAM detection” heading): https://www.apple.com/child-safety/

As an iPhone user since 2009, this move by Apple is very concerning. I can’t say it any better than the good folks here have already: https://appleprivacyletter.com

But Apple Already Scans Photos Uploaded to iCloud…

Yes, they do. And they have every right to scan their servers for illegal and/or abusive content. But this is a new technology we’re talking about, one that moves scanning to users’ devices, so it deserves its own discussion.

Continue reading “Apple’s Proposed CSAM Scanning is a Mistake”

Best Practice: Use Long-Format Flags in Shell Scripts

When working on the command line, it’s perfectly fine to use short-format flags. For example:

$ ls -al

This is memorable, easy to type, and helps you focus on accomplishing the task at hand.

However, when writing shell scripts that will be used over and over, it’s tempting to write in the same, comfortable short-flag style. However, compare the following:

Continue reading “Best Practice: Use Long-Format Flags in Shell Scripts”

Voice Assistant Or High-Tech Game of Telephone?

You tell me…


Me: “Hey Siri! How much money is one million pennies?”

Siri: …

Siri: “Here’s what I found on the web for ‘How much money is one million pennies’”

Me: 😒


I mean yeah I probably should have been able to do this in my head…but so should Siri!

SSH Is Wonderful!

Can we just take a moment to talk about how awesome SSH is! I’m out in my garage where the wifi reception is horrible and coding on my dev server via SSH. Even at ~120kbps down and ~50kbps up, I’m still able to use vim and screen productively. This is incredible to me!

Having grown up with 28kbps dial-up internet at home, it’s just amazing to me when I see technology in 2020 that still works flawlessly under dial-up-like connection speeds.