Aaron Patterson
tenderlovemaking.com · Personal blog · on HN since 2008
Aaron Patterson, a Ruby and Rails core contributor, writes about Ruby performance, Rails internals, debugging, and side projects.
What HN saysCommenters describe him as an influential Ruby community figure and a fantastic writer with a quirky, sincere style.
78HN people shared it
29linked it in comments
72stories submitted
2.7Kstory points
3 months agolast shared
2008people per year2026
Most-shared posts
- 1I am a puts debuggerer9 people · 165 points · first shared 2016 · 59 comments on HN
- 2Fast Tokenizers with StringScanner (2023)5 people · 56 points · first shared 2023 · 8 comments on HN
- 3Why config.threadsafe should be enabled by default in Rails 45 people · 3 points · first shared 2012 · discussion on HN
- 4Speeding up Ruby5 people · 3 points · first shared 2010 · discussion on HN
- 5Making ActiveRecord 2x faster3 people · 159 points · first shared 2014 · 44 comments on HN
- 6Live Streaming in Rails 4.03 people · 141 points · first shared 2012 · 38 comments on HN
- 7Predicting Test Failures3 people · 23 points · first shared 2015 · 9 comments on HN
- 8Tenderlove on Rails security exploits3 people · 20 points · first shared 2013 · 3 comments on HN
- 9My experience with Minitest and RSpec3 people · 11 points · first shared 2015 · 1 comments on HN
- 10Protected Methods and Ruby 2.03 people · 9 points · first shared 2012 · discussion on HN
- 11In Memory of a Giant3 people · 7 points · first shared 2022 · discussion on HN
- 12Can Bundler Be as Fast as Uv?3 people · 6 points · first shared 2025 · discussion on HN
- 13I am a puts debuggerer (2016)3 people · 3 points · first shared 2024 · discussion on HN
- 14Visualizing Your Ruby Heap2 people · 135 points · first shared 2017 · 23 comments on HN
- 15I put rails docs on my Internet pad. Thought I would share2 people · 35 points · first shared 2010 · 11 comments on HN
What HN people wrote when they linked it
d4mi3n · 2021-09-23
For those unaware: Aaron Patterson, aka tenderlove, is an influential and longstanding personality in the ruby community who’s made many significant contributions to Ruby and Ruby on Rails over the years.
He’s also a fantastic writer with a quirky style, highly recommend perusing his technical writing: http://tenderlovemaking.com/
tenderlove · 2010-08-10
I wrote this article like I am every day. Please read my personal blog or my twitter if you don't believe me:
http://tenderlovemaking.com/
http://twitter.com/tenderlove
I'm sorry. I will try to sound less artificial in the future. :-(
vegansxe · 2010-08-10
It's totally not artificial. That's just how Aaron (yc user tenderlove and author of the article) talks and writes. It's totally sincere. See his blog and twitter for further evidence. http://tenderlovemaking.com http://twitter.com/tenderlove
jbarnette · 2010-10-15
Aaron's real blog: http://tenderlovemaking.com
0x54MUR41 · 2026-01-04
ghiculescu · 2025-06-18
I’m a debugger guy too, but print statements can be very powerful. I keep this bookmarked https://tenderlovemaking.com/2016/02/05/i-am-a-puts-debuggerer/
brunoarueira · 2024-10-04
vidarh · 2023-09-09
I think a parser is perhaps the example of very resorting to a compiled extension can be beaten by something more JIT-favourable, in a language like Ruby it tends to be heavily dominated by scanning text, and creation of objects, and 1) you can often speed it up drastically by reducing object creation. E.g. here is Aaron writing about speeding up the GraphQL parser partly by doing that, 2) creating Ruby objects and building up complex structures in the C extension is going to be almost exactly as slow in the C extension as in the Ruby, 3) the scanning of the text mostly hits the regexp engine which is already written in C.
[1] https://tenderlovemaking.com/2023/09/02/fast-tokenizers-with-stringsca…
ptoomey3 · 2023-04-07
https://tenderlovemaking.com/2016/02/05/i-am-a-puts-debuggerer.html is ruby gold for this kind of stuff. As a Ruby developer, probably one of the most impactful "quick tips" I've ever picked up is this:
foo.method(:bar).source_location
That is wildly useful when debugging/figuring out where the actual code for some method is at runtime.
lcnPylGDnU4H9OF · 2023-01-04
> I hate that I can't easy determine where a given method of an arbitrary object is defined.
https://tenderlovemaking.com/2016/02/05/i-am-a-puts-debuggerer.html
The relevant bit is under the heading:
> I’m calling a method, but I don’t know where it goes
def index
p method(:render).source_location
render params[:id]
end
It sounds like this is the answer to your monkey-patching woes.
my_object.method(:my_method).source_location # returns path/to/file:[line number]
sicromoft · 2022-12-07
Tenderlove wrote a nice tribute, "In Memory of a Giant":
http://tenderlovemaking.com/2022/12/07/in-memory-of-a-giant.html
vlunkr · 2021-12-04
This post by Aaron Patterson made me realize it's fine to debug with print statements
https://tenderlovemaking.com/2016/02/05/i-am-a-puts-debuggerer.html
In rare cases I pull out a real debugger, but most of the time the right prints in the right places are just as good. I can also iterate much faster because I'm not jumping between the code the the debugger, or pulling the debugger out of the loop it's stuck in.
horse666 · 2021-04-27
Heh. Aaron Patterson (aka tenderlove), core Ruby and Rails contributor, agrees with you. Although maybe not as forcefully :)
https://tenderlovemaking.com/2016/02/05/i-am-a-puts-debuggerer.html
fphilipe · 2019-05-09
Aaron Patterson (aka tenderlove), Ruby and Ruby on Rails contributor, has a good post titled "YAGNI methods are killing me" where he points out the problems when inheriting from builtin classes such as String or Hash.
https://tenderlovemaking.com/2014/06/02/yagni-methods-are-killing-me.h…
aboutruby · 2019-02-24
I did some basic testing (capture an image on a warmed up macbook webcam) and the LED lights up for ~1.6s for each capture. The bigger problem is that if you are looking elsewhere / not in front of your computer you wouldn't notice the capture.
Did it using this script: https://tenderlovemaking.com/2014/03/26/webcam-photos-with-ruby.html
pfg · 2015-03-29
@tenderlove was experimenting with this idea for ruby/rails:
http://tenderlovemaking.com/2015/02/13/predicting-test-failues.html
Here's hoping someone will make a gem for this stuff.
bradleyland · 2015-03-04
This is a nitpick, but this isn't entirely accurate:
"This is a function of how Rails does concurrency, which is by using multiple processes."
Multi-process vs multi-threaded is an application server architecture matter, not a Rails matter. Yes, your application must be thread safe, but this has been available in some form for Rails apps since a long time now [1]. The biggest problem in recent history has been Gems and their thread-safetyness (is that a word). The number of threaded Ruby application servers has been on the rise for a long while now, and even Passenger (traditionally the multi-process front-runner) is going threaded in version 4.0.
1: An interesting blurg post related to Config.threadsafe! (which was a huge source of confusion): http://tenderlovemaking.com/2012/06/18/removing-config-threadsafe.html
aturek · 2015-02-05
Here's an optimization that one of the maintainers of rails is doing (has already done?) on #find
http://tenderlovemaking.com/2014/02/19/adequaterecord-pro-like-activer…
mercurial · 2014-06-24
> About 14 months ago, it caused some of the most serious vulnerabilities in the Ruby on Rails world ever: http://tenderlovemaking.com/2013/02/06/yaml-f7u12.html
Live by eval, die by eval. But more seriously, nobody is forcing a Rust YAML library to support arbitrary structure deserialization (or maybe as an optional switch). I don't think you'd want such a switch on in a build system configuration file.
steveklabnik · 2014-06-24
> I don't know about the security vulnerabilities,
About 14 months ago, it caused some of the most serious vulnerabilities in the Ruby on Rails world ever: http://tenderlovemaking.com/2013/02/06/yaml-f7u12.html
> why not just use JSON?
JSON is not really human-editable. Those quotes and commas, ugh! Also, JSON lacks comments.
The vulnerabilities in YAML (which is a superset of JSON, by the way) point at why YAML and JSON both aren't appropriate for configuration: they are _serialization_ formats. Configuration isn't what they're built for.
And you're right, it's really just not a huge deal in any way. Especially once we have `cargo project` to autogenerate the basics.
1qaz2wsx3edc · 2014-02-24
1. Rails + SSE (server sent events) - http://tenderlovemaking.com/2012/07/30/is-it-live.html
2. Rails + Pusher
Those are the best solutions, at hand that would work well with Rails.
I wouldn't advise smashing a Rails app and a Meteor app together unless you have a solid case to do so (like migrating).
Rails, aside, I'm happy to here oplog has landed. 1.0 feels imminent, the tension is growing, even here in Toronto. Stop waiting sheeple, Meteor is great as is, and it's only getting better.
evilduck · 2013-08-27
Tenderlove has a blog post about SSEs using Puma. http://tenderlovemaking.com/2012/07/30/is-it-live.html
cookrn · 2012-07-06
Great question. It's starting to gain a more mainstream following. Here are a few resources:
* https://github.com/celluloid/celluloid
* https://github.com/mperham/sidekiq (built on Celluloid)
* https://github.com/puma/puma
* http://tenderlovemaking.com/2012/06/18/removing-config-threadsafe.html
raggi · 2012-03-11
The efficiency aspect can creep up on people easily though, regardless of language. It's the standard concern: you don't know how your code will be used in future.
One example: http://tenderlovemaking.com/2011/12/05/profiling-rails-startup-with-dt…
boundlessdreamz · 2011-12-22
Gemsets are still useful. see http://tenderlovemaking.com/2011/11/30/psa-the-number-of-gems-installe…
gregwebs · 2010-11-20
Just released for ruby. http://tenderlovemaking.com/2010/04/12/rdoc-on-your-ipad/
mattjaynes · 2009-02-26
Great point. I haven't looked, but I think nokogiri fixes that bug. I think that was one tenderlove's motivations for creating nokogiri. He talks about it more on his blog:
http://tenderlovemaking.com/2008/10/30/nokogiri-is-released/
"I just want to tell you that you shouldn't worry about that old legacy code that uses Hpricot. Nokogiri can be used as a drop in replacement! Really! Nokogiri doesn't reproduce the bugs that are in Hpricot, but should work in most cases. Just use "Nokogir::Hpricot()" to parse your HTML. Of course, I've tried to keep the syntax of Hpricot that I like."