Dave Copeland's Avatar

Dave Copeland

@davetron5000.com.bsky.social

Author of Sustainable Web Development with Ruby On Rails, https://sustainable-rails.com - former Mood Health, Stitch Fix, LivingSocial, Opower. I play bass and love to scuba dive.

508 Followers  |  62 Following  |  474 Posts  |  Joined: 30.05.2023  |  1.991

Latest posts by davetron5000.com on Bluesky

THE MYTH OF
CONSENSUAL Adulthood
I CONSENT
I CONSENT
I DON'T!
VISA
ISNT THERE SOME RANDOM
Payment Processor YOU FORGOT TO ASK?

THE MYTH OF CONSENSUAL Adulthood I CONSENT I CONSENT I DON'T! VISA ISNT THERE SOME RANDOM Payment Processor YOU FORGOT TO ASK?

I made this in 2021

24.07.2025 16:33 β€” πŸ‘ 916    πŸ” 276    πŸ’¬ 5    πŸ“Œ 2

Yup. ActiveRecord validations will not help you. Every single project I've worked on that didn't have foreign key constraints had orphaned records, even with Rails' validations correctly modeling the relationships.

24.07.2025 18:14 β€” πŸ‘ 5    πŸ” 0    πŸ’¬ 3    πŸ“Œ 1
Wrap Third Party APIs in Service Wrappers to Simplify Your Code Wrap Third Party APIs in Service Wrappers to Simplify Your Code

The best way to integrate this sort of code into your app is with Service Wrappers, which create an API exactly and only for your use case. No third party dependencies, no weird abstractions…except the ones you take with you (πŸ«±πŸ“¦).

24.07.2025 17:50 β€” πŸ‘ 1    πŸ” 0    πŸ’¬ 0    πŸ“Œ 0

It's especially important with "enterprise" vendors who are new to doing APIs and will be moving fast and breaking things. Having your code at the HTTP level, and the ability to easily debug literally anything that happens, is critical to resolving problems.

24.07.2025 17:50 β€” πŸ‘ 0    πŸ” 0    πŸ’¬ 1    πŸ“Œ 0

I'd use Faraday because it's a bit more ergonomic, but, after doing many many API integrations over the years, life is much better when you do it directly with an HTTP library instead of the vendor's library. Stripe is the only example I can think of where their library is better than just HTTP.

24.07.2025 17:50 β€” πŸ‘ 2    πŸ” 0    πŸ’¬ 1    πŸ“Œ 1

Since Twilio rejected my business license and won't allow me to send reminder SMS, this means my SendGrid account is inaccessible, too. So I'm looking at other options, and MailGun is my current pick. It's "Ruby code examples" just use Net::HTTP and I think this is the way(ish)

24.07.2025 17:50 β€” πŸ‘ 3    πŸ” 0    πŸ’¬ 1    πŸ“Œ 0

I do like that, too - you can "promote" your blob of args into a real object. I guess in Ruby you could sorta do it with deconstruct_keys?

But you are other point points out a real problem with Ruby linters - context of a method call matters a ton to the style one might want to apply

24.07.2025 17:44 β€” πŸ‘ 0    πŸ” 0    πŸ’¬ 0    πŸ“Œ 0

Turns out the web UI just doens't show this to me for some reason so I posted it twice like an old. What's next, singing my skeets?

-Dave

24.07.2025 14:05 β€” πŸ‘ 0    πŸ” 0    πŸ’¬ 0    πŸ“Œ 0

I guess Bluesky doesn't want me to post just a gif?!?! Neither JustCrossPost nor Bluesy web would post this Enzo gif I worked HARD on. Mastodon let me.

24.07.2025 14:03 β€” πŸ‘ 1    πŸ” 0    πŸ’¬ 2    πŸ“Œ 0

I think it would ruin all my beautifully typeset indentation :) But any team should probably be using it or standard for the only reason to use linters: to stop talking about linters :)

24.07.2025 13:59 β€” πŸ‘ 1    πŸ” 0    πŸ’¬ 1    πŸ“Œ 0

I have tried to do all kwargs in Brut, partly because I use them for automatic value injection but also because of the reasons you state. It's slightly more typing for methods that take e.g. one param, but seems way better as things change.

24.07.2025 13:57 β€” πŸ‘ 0    πŸ” 0    πŸ’¬ 1    πŸ“Œ 0
Preview
brut/lib/brut/front_end/components/constraint_violations.rb at main Β· thirdtank/brut The raw, standands-based Ruby web framework. Contribute to thirdtank/brut development by creating an account on GitHub.

Here's an example:

https://github.com/thirdtank/brut/blob/main/lib/brut/front_end/components/constraint_violations.rb#L26

I want it to be clear that one of these lines is negating something so you don't miss it. This typography (IMO) calls that out very clearly.

24.07.2025 13:37 β€” πŸ‘ 0    πŸ” 0    πŸ’¬ 1    πŸ“Œ 1

I went through all the rules and I was getting exhausted just reading them. So many of them are a level of fussy that I just can no longer bring myself to care about. And stuff I *do* care about - making blocks of code legible via typography? Rubcop has nothing - it can't really

24.07.2025 13:37 β€” πŸ‘ 2    πŸ” 0    πŸ’¬ 1    πŸ“Œ 0
Preview
brut/lib/brut/rubocop_config.rb at main Β· thirdtank/brut The raw, standands-based Ruby web framework. Contribute to thirdtank/brut development by creating an account on GitHub.

I despise Rubocop. But, you know what I despise more? lack of trailing commas, `unless`, def methods without parens, etc. So I added a minimal config to Brut:

https://github.com/thirdtank/brut/blob/main/lib/brut/rubocop_config.rb

This generates the ridiculous YAML format (WHY IS NOT RUBY!?!?!).

24.07.2025 13:37 β€” πŸ‘ 6    πŸ” 0    πŸ’¬ 3    πŸ“Œ 0

I feel fortunate that I was forced to use vi in college. I've used it since then, exclusively, and it supports every language that exists or will exist, same editing commands, etc. It def lacks features in some langs that some IDEs have, but I never have to switch or relearn anything.

24.07.2025 01:53 β€” πŸ‘ 1    πŸ” 0    πŸ’¬ 1    πŸ“Œ 0
Preview
GitHub - thirdtank/blog-demo: Blog app as demoed in the Brut intro video Blog app as demoed in the Brut intro video. Contribute to thirdtank/blog-demo development by creating an account on GitHub.

Build a Blog in 15-ish minutes with Brut!

https://video.hardlimit.com/w/ae7EMhwjDq9kSH5dqQ9swV

Source code for those that don't want to watch a video:

23.07.2025 15:04 β€” πŸ‘ 5    πŸ” 1    πŸ’¬ 0    πŸ“Œ 0
Preview
4-5-4 Calendar | NRF The 4-5-4 calendar is a guide for retailers that ensures sales comparability between years by dividing the year into months based on a 4 weeks – 5 weeks – 4 weeks format. The layout of the calendar li...

I will raise you the NSRF Merchandising and Retail Sales calendar: nrf.com/resources/4-...

21.07.2025 23:15 β€” πŸ‘ 1    πŸ” 0    πŸ’¬ 1    πŸ“Œ 0

Yeah however they are saying they’ll do smart caching to avoid repeated reinstalls and rebuilds. Seems like it’ll be good.

18.07.2025 02:17 β€” πŸ‘ 0    πŸ” 0    πŸ’¬ 0    πŸ“Œ 0
Preview
rubygems/doc/bundler/UPGRADING.md at ff473128011e7abe1eeb0414d9cd48677acb5487 Β· rubygems/rubygems Library packaging and distribution for Ruby. Contribute to rubygems/rubygems development by creating an account on GitHub.

Looking forward to Bundler 4 - in particular the "stop remembering things when you use a CLI flag one time only". It was such a strange default I just never learned those features.

Installing to local .bundle seems like a better default (see my recent hacks for getting LSP to work in containers)

17.07.2025 21:42 β€” πŸ‘ 3    πŸ” 0    πŸ’¬ 2    πŸ“Œ 0
Brut: A New Web Framework for Ruby Brut: A New Web Framework for Ruby

> Your database columns aren’t null by default.

> Your foreign keys will a) exist, b) be indexed, and c) not be nullable by default.

@davetron5000.com πŸ€›

naildrivin5.com/blog/2025/07...

10.07.2025 04:06 β€” πŸ‘ 5    πŸ” 2    πŸ’¬ 0    πŸ“Œ 0
Brut: A New Web Framework for Ruby Brut: A New Web Framework for Ruby

Wow I remember @davetron5000.com from the other site years ago

Cool to see he’s still got the fire

naildrivin5.com/blog/2025/07...

09.07.2025 17:58 β€” πŸ‘ 4    πŸ” 1    πŸ’¬ 0    πŸ“Œ 0
Preview
The Hippocratic License: An Ethical License for Open Source The Hippocratic License (HL3) is an ethical source license that specifically prohibits the use of open source software to violate universal standards of human rights.

firstdonoharm.dev

09.07.2025 13:54 β€” πŸ‘ 0    πŸ” 0    πŸ’¬ 0    πŸ“Œ 0

I found something more controversial than disliking HAML: The Hippocratic License.

Though to my amazement, some of the, shall we say "less sophisticated comments" on the orange site where actually flagged and downvoted!

09.07.2025 13:34 β€” πŸ‘ 1    πŸ” 0    πŸ’¬ 1    πŸ“Œ 0

This is impressive! I particularly enjoy the data/param injection.

09.07.2025 00:57 β€” πŸ‘ 0    πŸ” 1    πŸ’¬ 0    πŸ“Œ 0

Thanks!

08.07.2025 22:54 β€” πŸ‘ 0    πŸ” 0    πŸ’¬ 0    πŸ“Œ 0
Brut: A New Web Framework for Ruby Brut: A New Web Framework for Ruby

I'm not at #RailsConf, but I did just now release a new web framework I've been working on: BrutRB:

https://brutrb.com

Read about it on my blog, below. It's not like Rails at all. I had fun working on it, will keep working on it, and hope you like it!

08.07.2025 17:50 β€” πŸ‘ 24    πŸ” 11    πŸ’¬ 4    πŸ“Œ 0

A FIOS upgrade forced me to re-work my home network and now I'm all Ubiquity, baby! I've told my wife that if I die, call someone to rip it all out and replace with eero or whatever.

Meanwhile, I now have 5 fresh PoE ports in my living room.

03.07.2025 22:53 β€” πŸ‘ 1    πŸ” 0    πŸ’¬ 0    πŸ“Œ 0

I hate rubocop and related stuff but I might be ready to make a minimal setup to avoid this stuff.

27.06.2025 00:58 β€” πŸ‘ 1    πŸ” 0    πŸ’¬ 1    πŸ“Œ 0

β€’Β No yoda expressions
β€’Β Never `unless`
β€’Β Never use single quotes for strings
β€’Β Align equals signs and hashrockets

That's mostly it. And it drives me batty watching it still crank out require 'pathname' because why? Why would you use single quotes in Ruby every (please don't explain why)

26.06.2025 22:47 β€” πŸ‘ 1    πŸ” 0    πŸ’¬ 1    πŸ“Œ 0

I am particular - probably more than your average rank and file who don't care and probably shouldn't care and for whom caring will not get a promo and probably even keep them from getting promoted. But I want the code a certain way and I don't think it's that esoteric

26.06.2025 22:47 β€” πŸ‘ 0    πŸ” 0    πŸ’¬ 1    πŸ“Œ 0

@davetron5000.com is following 20 prominent accounts