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@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.
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 π 2Yup. 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 π 1The 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 π 0It'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 π 0I'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 π 1Since 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 π 0I 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
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
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 π 0I 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 π 0I 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 π 0Here'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.
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 π 0I 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!?!?!).
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 π 0Build 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:
I will raise you the NSRF Merchandising and Retail Sales calendar: nrf.com/resources/4-...
21.07.2025 23:15 β π 1 π 0 π¬ 1 π 0Yeah 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 π 0Looking 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)
> 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...
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...
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!
This is impressive! I particularly enjoy the data/param injection.
09.07.2025 00:57 β π 0 π 1 π¬ 0 π 0Thanks!
08.07.2025 22:54 β π 0 π 0 π¬ 0 π 0I'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!
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.
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)
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