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””
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?
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! 🔴💎
Two things hit me today as big lessons I’ve learned over the years. They apply to pretty much any technology-related activity be it programming, application architecture, etc. They are:
Continue reading “Some Guiding Technology Principles”
Any sufficiently advanced SQL query is indistinguishable from magic.Arthur C. Clark (?)
I just feel sorry for the poor sap who has to maintain this…oh wait, that’s me… 🙁
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.
XYZ Company Voted Top 100 Workplaces For ABC City In 2019!
Hmm…I worked there for 2+ years and it really wasn’t that great – what gives?!
Continue reading ““Top” Workplaces”
Business and salespeople are optimists. Well, perhaps that’s painting with too broad a brush. Maybe it’s safer to say that, at the very least, their jobs require some degree of optimism regarding the raw probability of things like a sale closing or a business venture succeeding.
On the other hand, programming is an inherently realist (if not slightly pessimistic) endeavor. Well, maybe that’s painting with too broad a brush again and it’s safer to say that it should be a realist if not slightly pessimistic endeavor. (If you’re skeptical, just spend some time working on a behind-schedule software project and you’ll very quickly get in touch with your realist/pessimistic side.)
Continue reading “Optimism And Software Development”
var luke_skywalker – Very good. The true name of the parent class came as quite the surprise. However, the way this variable is used right before garbage collection is pretty inconsistent with its use throughout the rest of the program. Please revisit.
var princess_leia – Change. Too hard to spell.
var HanSolo – Please remain consistent with CamelCase or snake_case. Feels like this variable is a bit of a rebel…
const EP7_THE_FORCE_AWAKENS – I think this one is a duplicate. How’s it different from EP4_A_NEW_HOPE (see line 1977)?
Continue reading “Star Wars Code Review”
A programmer programmed in PHP. The code she wrote was legacy code as soon as her commits entered the git repo, and they provided gainful employment for many other programmers for years to come.
Another programmer programmed in Ruby. His code was also legacy code from its inception, yet his code prompted several developers to pivot to management careers and a complete application rewrite in Go.
Upon hearing of this, a wise programmer remarked:
How much better it is to work with Java written in PHP than Java written in Ruby!