Welcome to My Blog.

Here, you will find posts, links, and more about code (primarily Ruby), business (bootstrapped SaaS), and a little of everything in between.

Ruby Enumerable#any?

At first glance, this is not what I was expecting:

[false, false, false].any? => false

But a quick glance at the docs:

The method returns true if the block ever returns a value other than false or nil

This can be handy for doing a bunch of small tests and detecting if anything passed.

#

In a similar vein to the Bill Gurley's video, Malcom Gladwell had a recent podcast highlighting the misinformation in bills that would ban AR-15's.

#

A truly fantastic talk by Bill Gurley on the regulatory landscape and the influence of special interests - 2,851 Miles

#

Suggestions For Not Forgetting To Remove Unused Code

I am working on a significant update/rewrite of part of KickoffLabs. I had a task to work through what we do in a Sidekiq worker. It was late on Friday when I got to this part of the code, and I decided to punt on it until Monday.

Monday morning, I grab a cup of coffee and sit down to finish this section off and see a comment I missed (and had missed for a long time).

Outside the screenshot, there is an if statement, ensuring this code was not executed in the last four years. Still, it was frustrating that we had missed removing it for so long.

I figured ChatGPT would have a good solution to stay on top of this, but it mostly just tried to explain to me how to use comments. :)

Next up, I asked on Twitter (and Ruby.Social):

Any suggestions (other than search) to ensure code like this gets cleaned up?

From there, I got a lot of good suggestions.

Two Ruby gems looked interesting:

If I had to choose, I would go with todo_or_die since it would cause a failure/notification locally. I would rather not wait until there was a pull request/etc.

The rest of the suggestions included if statements and date checks. My favorite, and the one I will likely adopt going forward, is to wrap it in a test that fails after a specific date.

#

Interesting break down of what people actually use ChatGPT for.

The last couple of days I have been working with TSRanges in PostgreSQL and it ChatGPT has made it extremely productive.

#

Fear is our true enemy

At the root of most fear is what other people will think of us. It's paralyzing. It's skewing. It distorts the very fabric of our reality -- makes us behave in such utterly insane and cowardly ways that it's hard to even describe.

- via Ryan Holiday in Courage is Calling

The older I get, the more I see this every day. Science says we only use about 10% of brains. But that is not what holds us back. We hold ourselves back because we are afraid of looking like a failure.

#