I am Aaron Patterson (tenderlove), Core team member of Ruby and Rails, and Software Engineer at GitHub. Ask me anything!
My name is Aaron Patterson, aka "tenderlove". I am a Senior Software Engineer at a small startup company called GitHub. I'm on the Rails Core team, which is the team responsible for developing and maintaining the Rails web framework. I'm also on the Ruby Core team which is the team responsible for developing and maintaining the Ruby language.
I love programming, cats, and cooking (specifically meat curing). I am also a mechanical keyboard enthusiast and amateur / beginning hardware hacker. Please ask me anything!
As some ideas for stuff to talk about:
- I've been working on a compacting GC for Ruby so we could talk about that.
- I've been looking at speeding up template rendering so we could also talk about that.
- Concurrency and parallelism in Ruby
- Making stuff with AVR chips
- Which mechanical switches are best
- Cat stuff
- How puns are created
What's your opinion on Crystal? Is it a good idea to make a statically typed Ruby (if you agree with that description), is that something Ruby needs? Is a new language better than a gradual change like e.g. Typescript or mypy?
OMG!! Thank you for this question! I love Crystal! Honestly, if I had more time in my day I would love to mess with the internals. Crystal uses the Boehm GC, and I think it could benefit from a custom GC like Ruby's GC.
As for static typing in Ruby, it's a tough question. I understand the benefits, but as someone that came from the Java world (don't tell anyone I came from the Java world), my hands are tired from typing types. I personally would prefer a gradual typing system like Typescript (but for Ruby). I know the Stripe folks have been working on something that seems extremely interesting.
I'd prefer to keep the same language, but introduce gradual typing. But that doesn't mean I would not use a different language 😉
I hope this answers the question!
Hmmmmm, that is a good question. I really prefer to write as little JS as possible, so on personal projects I'll use Stimulus / Turbolinks. However, I have no opinion on what JS framework is best. I trust the front-end folks I work with to pick the best tool for the job, and I do my best to support their choice.
I have noticed several developers are migrating from ruby to new languages, not because these new languages are better, but because developers like to be trendy. Do you agree this is not good for a developer's career? Since the developer doesn't deepen their knowledge in the language details and never becomes a real senior in the field. Also, companies are hurt by the lack of senior professionals.
I do agree with this. I think it's still possible to be a good systems programmer even if you switch languages, you just have to study POSIX. You'll have to learn how POSIX stuff is handled in each new language, and that can be a barrier. But I do think that frequent switching makes it difficult to be a senior in that language.
What's the best part of being Rails core team member? Who do you admire the most in Rails community?
I guess the best part of being on the Rails core team is that I get to help shape the direction of Rails in the future. I admire many people in the Rails community for different reasons. DHH for his skill to cut through bullshit, Rafael for his patience and selflessness, Eileen for her drive and skill. I try to pick out the good qualities of the people around me and incorporate them in to myself. I feel lucky to be part of such a good community!
What is your favorite pun?
Can you share how you structuring your rails project?
It's nice to see the GC is getting improved 💖. There is some research suggesting that using malloc_trim(3) during garbage collection could limit fragmentation too (at the OS level). Do you think this could be combined with a compacting GC in the Ruby VM, and do you have an estimation of how much this would improve mem usage?
Good question! We actually use jemalloc at work, so the OS level fragmentation issues that Hongli pointed out don't really impact us. See this link:
I do think that combining this with a compacting GC would be helpful, but it's hard for me to estimate the improvement since it's very application specific. The next thing I want to work on is implementing a "variable width allocator" for Ruby. Right now Ruby's GC can only allocate fixed width slots. That means that things like string are allocated via the OS allocator, and that's what causes the fragmentation. If Ruby's GC could allocate various sizes, then the GC could control the fragmentation as well as compaction at the same time. This would fix the fragmentation issue and also be allocator independent. IOW it wouldn't matter if you use jemalloc or just glibc.
What do you think about people that say it Ruby is a magic language?
Thanks for the AMA!
What does your average day at work look like?
My average day is very structured. I wake up at 6:30, go to the gym, study Japanese, pet the cat, go to work. I work at home, so "going to work" is just going to my home office. The stuff I work on varies day to day, but it's typically working on Ruby, working on Rails, and supporting other developers at work. It's hard to say what I do because it's mostly just random stuff people need at that moment. Also I check email. I get too many email. 😉
What do you think about the JAM stack?
heya, do you know about the Hanami framework? have you worked with it? what do you think about their approach in terms of structuring apps and software paradigms?
also: i am glad you do the things you do, both on the ruby language, and on the pun twitters. thank you for your contribution :) also: friday hug, on a sunday :Pheya, do you know about the Hanami framework? have you worked with it? what do you think about their approach in terms of structuring apps and software paradigms?
also: i am glad you do the things you do, both on the ruby language, and on the pun twitters. thank you for your contribution :) also: friday hug, on a sunday :P
Hey Aaron, I just saw ya speak at The Traversal conference the Turing School hosted last week in Denver. You talked about keeping instance variables out of your views and it made me wonder what other ways can ya pass around state under the hood without using instance variables in ruby/rails. Also have ya played around with elixir/phoenix? Are there any projects at github that you know of using that language/framework?
At work we use view objects. We pass view objects around as a local variable, and we can maintain state inside the view object. Then we have a good idea where anything changes state because any state changes will have to be a method call on the view object.
I have played with Elixir and Phoenix! They are really great! Elixir is my second favorite functional language (next to Scheme). Actually that's not true, I like Elixir more than Scheme, but I think I'm required by law to say that Scheme is the best functional language.
I don't know of any projects at work using Elixir, but I'm pretty sure they exist somewhere. We have an Elixir channel and plenty of fans of the language at work!
Hey Aaron! Thanks for the AMA. :) What other languages do you use (and admire) besides Ruby?
Languages I use besides Ruby that I actually like: Elixir. I use many languages, but I was trying to think of other languages I use that I really like, and I think Elixir is the top. It's easy to use like Ruby, but functional like Scheme. I really like it.
What do you think about Ruby 3x3 ?. Matz had promised to add concurrency support in ruby 3. Do u think this will make significant performance increase?. How about the languages like elixir and go. Will the new ruby performance will catch up the performance of modern languages that are competing for speed.
So, this is a question involving a pretty harsh background story, so the weak of constitution might want to skip this...
You’ve been warned, so here it goes: Last year on ruby kaigi, I was kind of trotting around about a serious issue, but couldn’t muster the strength to ask you. No, it’s not “will you marry me”, but close in how serious it was.
I seriously needed a cat sticker, but you always seemed to be engaged in important conversations, so when I finally got around asking you for a car sticker, (and of course received it) I put it into my ruby kaigi visitors pass plastic wrapper thingy, but instead of heading straight home and putting it into the hotel save, I went to the Shopify karaoke party.
Long story short, I got drunk and lost the stickers! I know, I know... Please don’t blame me, I was young and I swear someone might have stolen them and sold them on the black cat sticker market.
So, here is my question: if you could, would you go back in time and approach me earlier about the stickers?
Hey Aaron :-)
How do you split (%) your daily routine? Between coding, code reviewing, playing games with your cat 🐱 and studying? (I really try to find a balance between these things).
Hi! Honestly it's really hard. Basically I just made a habit and then stick to it. But, I wake up at 6:30 go to the gym, get home at 8, study for an hour, work until 5 or 6, do some personal projects and cook. I don't always get to do personal projects, so sometimes I have to cut that. The rest is pretty consistent though. I have to pick the things that are important to me and the cut the rest.
What's that one feature available on Rails but not on other frameworks?
Hmmm, good question. I don't know all the frameworks that are out there, but one thing I like about Rails is that it comes with so much just baked in for you where many other frameworks require you to plug things together. I think this good "out of the box" experience is my favorite feature that Rails provides that most other frameworks don't.
Hi Aaron Patterson , thanks for AMA, Since I love to contribute in open source on github so I want to know about journey to become a developer at Github and also what makes you a better developer ?
It would be very inspiring for me .
Hi! Sure, I can answer this! I've been a professional developer for almost 20 years (I got my first job around December 1999). I first learned about open source because I wanted to learn to program and we couldn't afford to pay for commercial compilers like Borland's C compiler. I think this experience is what really inspired me to be part of the Open Source community. I love programming and would like it if all people had the opportunity to learn to code.
As for getting a job at GitHub, I can't say it was easy. I was programming for 16 years before starting at GitHub, so I had a lot of experience. I applied for a job, and fortunately I was qualified enough to do it!
My best advice for becoming a better developer is to practice. Don't be afraid to make mistakes, just try something and see if it works out. The most important thing to do is look back on the things you've tried and figure out what worked and what didn't. I think those experiences and self reflection make the best developers.
What do you think about future of Concurrency and parallelism in Ruby? How would be that in comparison to current state of concurrency and parallelism in other languages?
Good question, and I could talk about this for a long time (but probably shouldn't). Concurrency and parallelism are tough to get right. Anyone that has written threaded code knows this. Koichi has been working on a concept called "guilds" which I think can be thought of as kind of "actors". The idea is that most concurrency bugs come from mutating shared data. So Guilds don't allow that. If you want to share data, you have to copy it, or you need to make a read-only version of that data. I think one thing that would help push Ruby forward towards a more concurrent / parallel world would be if there was an easy way to declare deeply nested read-only data structures.
What are the upcoming Github contributions to rails ?
How are you handling multitenancy in Github ?
Is it based on any standard gem like "apartment" .. ?
Are you planning to contribute toward multitenancy as well to rails ?
Right now we are working on upstreaming custom Rails template compilation stuff we have. Template rendering in our application is much faster than the default, but the way we've implemented it, it won't work in all cases. We're currently working to eliminate those corner cases and upstream the work we've done.
We have custom code for dealing with multitenancy. Our goal is to upstream everything we can, so we'll contribute this as well (though we don't have any concrete plans right now).
What is your process to learn a new large codebase?
Oh this is a good question. The very first thing I do is open Vim in the codebase and run ctags. That way I can quickly jump around the code and figure out what's going on. From there, it depends on the project. For example, a Rails application, I will read the routes file so I can figure out what routes go to which controllers. For a C application, I'll jump to the
main function and read that. For a Ruby gem, I'll check a test file or the README and learn how the sample code works. I think the main, best tool though is to make sure to use ctags/Vim or some combination that lets you jump around code quickly.
Any tips how to get remote job in product based in USA, without living in USA?
(Secret question: 3 cats or 5 cats?)
To be honest, I'm not sure. I think it's becoming more common for US companies to hire remote workers, even outside the US. But I would definitely say it's not the norm. I would just suggest looking for US companies that have an international presence and see if they hire remote in your country.
(I have 2 cats, but I want 3)
Thanks for finding the time to do the AMA!
Which keyboard and switches do you use and can you give some tips to people who are just getting started with mechanical keyboards? Would you recommend those gaming keyboards or not?
Thank you for asking this question!!! The keyboard I use everyday is the ErgoDox EZ. I love it because I have to type a lot for my job, and the vertically staggered switches are much more comfortable than the horizontally staggered switches on regular keyboards. It does take time to get used to, but since I have to type all day for my job, it was worth it. My switches are Kailh Box Navy switches. I chose them because they are the loudest switches I could find. I love loud switches and I work from home 😉
A gaming keyboard could work, but I'm not sure I'd recommend it. From what I understand (I don't really play PC games), gamers seem to prefer Cherry Red switches which are linear switches. They don't give you the same feedback as you type. I think that feedback is important for typing tasks, so I wouldn't use those switches. If you can get a gaming keyboard with Cherry Browns, or Blues, that would be better, but I don't know if the keyboard would also be good for gaming.