Sign in

Ross Kaffenberger

@rossta.net
632 followers 310 following 153 posts

Father of 2 boys. Ruby on Rails and JavaScript developer. Triathlon on the side. Hacking on joyofrails.com

PostsRepliesMedia
Reposted by Ross Kaffenberger
Joel Drapper 🇬🇧❤️🇺🇦 @joel.drapper.me · 27/01/2025
I’m available for hire. I’m an experienced Ruby, TypeScript and CSS engineer looking for a new full-time position. I can help you with performance, concurrency, testing, architecture and API design problems on tooling or product teams. I’d really appreciate any personal introductions. DMs open. 🙏
511167
Ross Kaffenberger @rossta.net · 23/01/2025
One thing I loved about DarkSky is to get an idea of what the weather is usually like in some location at a given time of year. What’s a good app for that these days?
010
Ross Kaffenberger @rossta.net · 19/01/2025
What a game. Whatever happens in the second half, it has been awesome to see my hometown Washington Commanders good at football again. #Commanders #Lions
150
Ross Kaffenberger @rossta.net · 17/01/2025
To give you some idea on how fast I am to adopt new tech, my car has a CD player
020
Reposted by Ross Kaffenberger
Kasper Timm Hansen @kaspth.com · 13/01/2025
If you want to take your Rails career to the next level, you need to start digging into Rails. Don't sleep on becoming a better code reader, it's a force multiplier (ask me how I know lol). Sign up here: lu.ma/dv5yvj4n
lu.ma
Guiding You through the Rails Source · Zoom · Luma
What problem does this guided tour solve? Rails is your app's biggest dependency and you probably don't know what's going on in there. There's features you're…
34912
Ross Kaffenberger @rossta.net · 08/01/2025
I made a thing to help you visualize how Ruby’s Lazy Enumerator works, so your code can do less work. joyofrails.com/articles/sim...
joyofrails.com
A simple trick to understand Ruby’s lazy enumerator
Where you get to play with an interactive demo to visualize how Enumerator::Lazy helps avoid unnecessary work
4285
Reposted by Ross Kaffenberger
JP Camara @jpcamara.com · 04/01/2025
2024 ended up a pretty solid writing year for me. Here are the top 10 posts by views. Of them, 8 were written in 2024 (tanstack and pgbouncer have had alot of staying power, they're from 2023). I'll link to each after this, in case you'd like to check them out!
2194
Ross Kaffenberger @rossta.net · 02/01/2025
A few seasons in and my biggest takeaway so far is pretty much everyone in The Sopranos is a horrible person.
150
Ross Kaffenberger @rossta.net · 24/12/2024
All Hans really wanted was to be sitting on a beach, earning 20%
020
Ross Kaffenberger @rossta.net · 21/12/2024
This was fun. Not bad considering my place of work doesn’t use GitHub. git-wrapped.com/profiles/ros...
git-wrapped.com
GitHub Wrapped 2024 - Your Coding Year in Review
Like Spotify Wrapped, but for your GitHub activity! See your top languages, commit streaks, most productive days, and more in an engaging story format. Get your 2024 coding year in review now.
020
Ross Kaffenberger @rossta.net · 21/12/2024
100% I say both “sequel” and “S-Q-L”. Context matters.
050
Reposted by Ross Kaffenberger
Konnor Rogers @konnorrogers.com · 19/12/2024
Edited the post a little to provide a little more context and be a little less harsh. www.konnorrogers.com/posts/2024/e...
konnorrogers.com
Examining Hotwire Spark
A short dive into Hotwire Spark
1102
Ross Kaffenberger @rossta.net · 18/12/2024
Currently working on an in-browser demo to help visualize the difference between eager and lazy enumeration in Ruby
GIF to visualize how eager enumeration works in RubyGIF to visualize how lazy enumeration works in Ruby
240
Reposted by Ross Kaffenberger
Lucian Ghinda @lucianghinda.com · 18/12/2024
Interested in learning test case design? Discover how to identify what to test, reduce the number of tests, and write less code while covering more logic. Join my #GoodEnoughWorkshop on January 23 or 24, 2024.
153
Reposted by Ross Kaffenberger
JP Camara @jpcamara.com · 17/12/2024
More Ruby/Rails hacker news!! Also I am blown away with what @nodunayo.bsky.social has done on her own. Her RubyConf keynote was so good too! youtu.be/pOW4vepSX8g
youtu.be
RubyConf 2024 Keynote by Nadia Odunayo
YouTube video by Ruby Central
171
Ross Kaffenberger @rossta.net · 17/12/2024
Rails really is the One-Person Framework
Nadia Odunayo’s Brighton Ruby talk "Getting to Two Million Users as a One Woman Dev Team" is #1 on Hacker News
1211
Ross Kaffenberger @rossta.net · 17/12/2024
And today, @nodunayo.bsky.social is #1 on HN for her Brighton Ruby @thestorygraph.com talk. Congrats, Nadia for your software, business, and speaking accomplishments!
192
Ross Kaffenberger @rossta.net · 17/12/2024
Great to see @adrienpoly.com and @marcoroth.dev with Ruby Video trending on trending on HN today after the Ruby Concurrency talk by @jpcamara.com hit the top spot yesterday. Ruby’s having a good run right now and it’s not even Christmas yet!
Ruby Video trending on HN
1167
Ross Kaffenberger @rossta.net · 14/12/2024
Powered by Rails and Hotwire! github.com/rubyapi/ruby...
051
Ross Kaffenberger @rossta.net · 14/12/2024
The new Ruby docs are looking great. The search feature is fast. New experimental features appear to be in the works too, like type signatures and runnable code examples. Awesome stuff!
Ruby Enumerator docs screenshot
1111
Ross Kaffenberger @rossta.net · 13/12/2024
Made some nice improvements to the Lighthouse score for the Joy of Rails homepage today. Biggest different was optimizing the article illustrations.
Lighthouse score for Joy of Rails homepage BEFORE improvements: 

Performance: 79
Accessibility: 82
Best Practices: 96
SEO: 83Lighthouse score for Joy of Rails homepage AFTER improvements: 

Performance: 100
Accessibility: 88
Best Practices: 96
SEO: 100
030
Ross Kaffenberger @rossta.net · 11/12/2024
The source of the twitter-ruby gem was where I first discovered Ruby’s to_enum and Enumerator. A cool detail of the gem: you can iterate over paginated resources with Ruby .each while pages are fetched transparently. This still blows my mind 🤯 github.com/sferik/twitt...
github.com
twitter-ruby/lib/twitter/enumerable.rb at 5c8c1224980d4b6e1117f09c23d521e9b82deeef · sferik/twitter-ruby
A Ruby interface to the Twitter API. Contribute to sferik/twitter-ruby development by creating an account on GitHub.
080
Ross Kaffenberger @rossta.net · 09/12/2024
I love Ruby so much that I write my HTML in Ruby. I’ve got nothing against ERb, but after a year of writing Phlex components, I’m not looking back.
Example Phlex component in Ruby code:

render CodeBlock::Body.new(data: {controller: "snippet-editor"}) do
  div(class: "grid-stack") do
    render CodeBlock::Code.new(source, language: language, data: {snippet_editor_target: "source"})
      label(class: "sr-only", for: "snippet[source]") { "Source" }
      div(class: "code-editor autogrow-wrapper") do
        textarea(
          name: "snippet[source]",
          data: {snippet_editor_target: "textarea"}
         ) { source }
      end
    end
  end
end
4260
Ross Kaffenberger @rossta.net · 09/12/2024
It’s such a simple thing, but I love that Ruby treats the backslash character as a line continuation, similar to a shell. I often use it to omit parens and group keyword arguments on new line.
Ruby code:

def self.from(sitepress_resource)
  Resource.new \
    request_path: sitepress_resource.request_path,
    body: sitepress_resource.body,
    title: sitepress_resource.data.title,
    description: sitepress_resource.data.description,
    image: sitepress_resource.data.image,
    # ...
130
Ross Kaffenberger @rossta.net · 08/12/2024
Let’s see how Solid Cable on SQLite holds up. I spent this week building realtime polls. I embedded the first one in my last article (unfortunately after the publish date). joyofrails.com/articles/wha...
Screenshot of a realtime poll embedded in an article on Joy of Rails
010
Ross Kaffenberger @rossta.net · 08/12/2024
Cuprite is a really good driver for system tests. I haven’t been able to blame my Capybara driver for a flaky test in the past few years now since I switched. Say no Selenium. @janko.io wrote more about it. janko.io/upgrading-fr...
janko.io
Upgrading from Selenium to Cuprite
When I joined my current company, the system tests for our Rails app used Selenium as the Capybara driver. I didn’t have good experiences with Selenium in the past, mostly it was tedious to have to ke...
2133
Ross Kaffenberger @rossta.net · 08/12/2024
I used Current Attributes in my Rails project today to avoid some “prop drilling”. It felt dirty but it worked. “Current” is a bit like React Context. Good tool to know but shouldn’t be overused. api.rubyonrails.org/classes/Acti...
api.rubyonrails.org
ActiveSupport::CurrentAttributes
Current Attributes Abstract super class that provides a thread-isolated attributes singleton, which resets automatically before and after each request.
270
Ross Kaffenberger @rossta.net · 06/12/2024
I was hoping someone would show how Ruby can do better than bddicken/languages indicates with optimizations like YJIT. @jpcamara.com delivers with this deep dive into Ruby nested loop performance complete with JS visualizations, exploration of machine code, and proof that Ruby can be faster than C.
052
Ross Kaffenberger @rossta.net · 06/12/2024
Choose 20 Ruby gems that you've used time and time again, or have inspired you in some way. One gem per day for 20 days, in no particular order. (1/20) github.com/sporkmonger/... #20DayGemChallenge #ruby #rails #distilled.rb 💜
github.com
GitHub - sporkmonger/addressable: Addressable is an alternative implementation to the URI implementation that is part of Ruby's standard library. It is flexible, offers heuristic parsing, and addition...
Addressable is an alternative implementation to the URI implementation that is part of Ruby's standard library. It is flexible, offers heuristic parsing, and additionally provides extensive sup...
2100
Ross Kaffenberger @rossta.net · 04/12/2024
Hotwire docs at hotwired.dev are really good for understanding its features in vanilla HTML and JS. But I would love more Rails-focused content in the Hotwire docs or Rails guides. I currently need to jump between various sources incl. the turbo-rails ruby docs: www.rubydoc.info/gems/turbo-r...
050
Ross Kaffenberger @rossta.net · 04/12/2024
I like organize my Tailwind classes by function with line breaks and tabs. I find it easier to read for excessively long class names. But I find ERB formatting support in VS Code a bit lacking at the moment. What do you use?
Embedded Ruby (ERB) snippet demonstrating multi-line formatting of html attributes
242
Reposted by Ross Kaffenberger
Ross Kaffenberger @rossta.net · 02/12/2024
Just because I think SQLite works great for Joy of Rails doesn’t mean it’s right for you. You may be wondering: "Is SQLite a good fit for my next Rails app?" I’ve set out to help you answer that question here: joyofrails.com/articles/wha... #sqlite #rails
joyofrails.com
What you need to know about SQLite
A compilation of lessons about what the SQLite database engine can and cannot do, how Ruby on Rails helps you work with SQLite, and why it may, or may not, be a good choice to back your Rails 8 app
4145
Ross Kaffenberger @rossta.net · 02/12/2024
Just because I think SQLite works great for Joy of Rails doesn’t mean it’s right for you. You may be wondering: "Is SQLite a good fit for my next Rails app?" I’ve set out to help you answer that question here: joyofrails.com/articles/wha... #sqlite #rails
joyofrails.com
What you need to know about SQLite
A compilation of lessons about what the SQLite database engine can and cannot do, how Ruby on Rails helps you work with SQLite, and why it may, or may not, be a good choice to back your Rails 8 app
4145
Ross Kaffenberger @rossta.net · 29/11/2024
I am toying with a triple-nested route in Rails. I feel so alive. I am Kramer and the car salesman playing "beat the empty" on Seinfeld.
Kramer and a car salesman are filled with joy who, while almost out of gas, go "farther to the left of the slash than anyone has gone before"
210
Ross Kaffenberger @rossta.net · 29/11/2024
To give you an idea of how quick I am to adopt new tech tools, I have started watching The Sopranos
140
Ross Kaffenberger @rossta.net · 27/11/2024
I’m working on a new article to summarize what I think you need to know before choosing SQLite to back your Rails app. Joy of Rails runs entirely on SQLite. I‘m really happy with my choice but that doesn’t mean it‘s a good fit for everyone. Are you considering SQLite? What do you want to know?
8124
Ross Kaffenberger @rossta.net · 23/11/2024
I feel like it’s only a matter of time before one of you all makes a pghero for sqlite
000
Ross Kaffenberger @rossta.net · 21/11/2024
I’m alway learning new things about Rails. Just today I discovered ActiveRecord’s "excluding" and "with"—I already have a use for both in the Joy of Rails related pages query!
An ActiveRecord query (Ruby): 

select("pages.*", "similar_embeddings.distance")
  .with(similar_embeddings: PageEmbedding.similar_to(page))
  .excluding(page)
  .order(distance: :asc)
120
Ross Kaffenberger @rossta.net · 18/11/2024
I managed to get OpenAI vector embeddings to work with SQLite for querying “similar articles.” Time for another blog post?
010
Ross Kaffenberger @rossta.net · 18/11/2024
If you want in on the most popular Ruby/Rails starter pack, here’s what you need to know
000
Ross Kaffenberger @rossta.net · 17/11/2024
The best part about being away from my kids for a few days is hearing “Dadddddddddddy” and giving them big hugs when I come back home.
010
Ross Kaffenberger @rossta.net · 17/11/2024
The back button on my Garmin watch stopped working. The support staff has suggested soaking it in warm water for 10min which I can only assume means my watch has rheumatoid arthritis.
000
Ross Kaffenberger @rossta.net · 09/11/2024
Finally getting around to exploring AI to analyze content for Joy of Rails. Let’s go!
120
Ross Kaffenberger @rossta.net · 08/11/2024
Rails 8.0 is out! Upgrading is as easy as 1, 2, bundle update && rails app:update. 😜
000
Ross Kaffenberger @rossta.net · 07/11/2024
@konnorrogers.com Thanks to your nudge, I’ve gone down the rabbit hole of making my custom combobox more accessible. Is it a big improvement? I hope so! Is it perfect? Probably not. Did I learn a lot? Yes! Joy of Rails in a nutshell. github.com/joyofrails/j...
dropbox.com
130
Ross Kaffenberger @rossta.net · 31/10/2024
Allowing user input for full text search on Rails? It may be tempting to use a regex. Try writing a query parser instead. It may sound crazy, but Parslet provides a DSL for constructing your own text parsers and transformations. +1 recommend. kschiess.github.io/parslet/
kschiess.github.io
parslet - About
040
Ross Kaffenberger @rossta.net · 31/10/2024
Ok, this is cool. The latest iteration of my nascent search feature for Joy of Rails are "snippets". Matches with SQLite’s full text search extension (FTS5) can include excerpts containing markup which translates to visual indicators in the search results.
130
Ross Kaffenberger @rossta.net · 31/10/2024
Great discussion about Fibers vs Threads in Ruby
020
Ross Kaffenberger @rossta.net · 28/10/2024
My weekend project for joyofrails.com was to build a (very) basic Command+K search dialog with Hotwire and the SQLite FTS5 virtual table extension (for full text search indexing). Amazing what a solo developer can accomplish with Rails these days.
2113
Ross Kaffenberger @rossta.net · 25/10/2024
I don’t know who needs to hear this but 1. Next time 1. You write 1. An ordered list 1. In markdown 1. Just use 1.
010