Ruby Rogues
140 RR Heroku with Richard Schneeman
The Rogues talk to Richard Schneeman of Heroku.
January 22, 2014
1:12:28
Episode 140
Hosted by
Special Guests
140 RR Heroku with Richard Schneeman
Ruby Rogues
1:12:28
0:00
1:12:28
Speed:
Share This Episode
Show Notes
The Rogues talk to Richard Schneeman of Heroku.
Special Guest: Richard Schneeman.
Transcript
CHUCK:
I contracted for a company and one of their security measures was to occasionally send you deliberate spam. And if you clicked on it, you fail. [Laughter]
CHUCK:
Iâm not kidding.
JOSH:
That is hilarious.
[Hosting and bandwidth provided by the Blue Box Group. Check them out at BlueBox.net.]
[This podcast is sponsored by New Relic. To track and optimize your application performance, go to RubyRogues.com/NewRelic.]
[This episode is sponsored by Code Climate. Over 1,000 organizations trust code climate to help improve quality and security in their Ruby apps. Get 50% off your first three months for being a Rogues listener by starting a free trial this week. Go to RubyRogues.com/CodeClimate.]
[This episode is sponsored by SendGrid, the leader in transactional email and email deliverability. SendGrid helps eliminate the cost and complexity of owning and maintaining your own email infrastructure by handling ISP monitoring, DKIM, SPF, feedback loops, whitelabeling, link customization and more. If youâd rather focus on your business than on scaling your email infrastructure, then visit www.SendGrid.com.]
CHUCK:
Hey everybody and welcome to episode 140 of the Ruby Rogues podcast. This week on our panel, we have Josh Susser.
JOSH:
Good morning.
CHUCK:
David Brady.
DAVID:
Hi. My name is Warner Brandis. My voice is my passport. Verify me.
CHUCK:
Avdi Grimm.
AVDI:
Hello from Pennsylvania.
CHUCK:
Iâm Charles Max Wood from DevChat.TV. And this week, we have a special guest, and thatâs Richard Schneeman.
RICHARD:
Howdy from Austin, Texas.
CHUCK:
So, before we get started, we do have a couple of announcements. The first one is that we had several people let us know that they couldnât buy T-shirts on the Booster campaign that we did, either because of international shipping or because it only went up to 2XL or it didnât go small enough. I think there were a few of those too.
DAVID:
So, fat Americans and foreigners. [Laughter]
CHUCK:
Or fat foreigners.
JOSH:
Chuck, maybe you can talk about what Booster campaign youâre referring to.
CHUCK:
Right, so that was for our t-shirt campaign. Weâve actually gone ahead and started another campaign. This oneâs on Teespring and they do international shipping and they have a few more sizes. So, if you are looking for those.
DAVID:
And they have hoodies.
CHUCK:
Oh, yes.
DAVID:
They have hoodies.
CHUCK:
Yeah, I had to order me a hoodie. So anyway, if you want a hoodie, you want a bigger shirt, or you want it shipped somewhere thatâs not the US, or if you want to ship somewhere that is the US, then you can get it. Itâs at TeeSpring.com/RubyRoguesTee and you can pick that up. Weâll put links in the show notes so that you can find it. The campaign ends in about a week. So, we didnât have as long a campaign on this one just because of the way that they work over there. But we know people want them, so go sign up. Go get one. Anyway, and then Dave, donât you have something that you wanted to bring up as well?
DAVID:
I do. And Iâm a little distracted because Iâm actually in, what I should have said in my introduction is Iâm in Denver. And Iâm actually sitting in Katrinaâs seat where she podcasts. And her audio setup is so much better than mine. And Iâm really, really distracted by that. So, I just wanted to point that out, that Iâm out in Denver visiting with Katrina and itâs awesome. But yes, I have an announcement today. So, hey guys, are you unemployed?
CHUCK:
Nope.
JOSH:
No.
RICHARD:
Nah.
DAVID:
I know. Me too. Do you hate your job?
CHUCK:
No.
JOSH:
No.
DAVID:
You betcha. So do I. Are you worried about where your next rent check will come from if you get laid off?
CHUCK:
Uh-uh.
JOSH:
No.
DAVID:
Yes, me too. And thatâs why Iâm writing The Job Replacement Guide. Find your next job or gig in record time by using tricks and techniques that Iâve developed over a lifetime of being insufferable. Find out more about it at JobReplacementGuide.com where you can sign up for the mailing list to get advanced content, updates on the book, and a discount when the book launches. Job Replacement Guide because oh, crap.
JOSH:
You know Dave, I wasnât dissatisfied with my job before. But I am now. [Laughter]
DAVID:
Thatâs excellent. Thatâs excellent. So, all joking aside, my record is four hours from getting fired cold to reporting for work at my next job. So, I do know a little bit about what Iâm talking about. But Iâm hoping to have as much fun with talking about it as, itâs a panic-laden subject. But Iâm hoping to have a lot of fun with it. And so, thatâs my announcement. JobReplacementGuide.com, check it out, please.
CHUCK:
Now Iâm sad.
DAVID:
Why?
CHUCK:
Because my recordâs six hours and Iâve never met anybody who had one shorter. [Laughter]
JOSH:
I guess things move fast in Utah.
DAVID:
Yup. Yup.
CHUCK:
Yup.
JOSH:
So, hey Richard, howâs it going?
RICHARD:
Itâs going well, having a great morning.
CHUCK:
We should let Richard introduce himself.
JOSH:
Yeah.
CHUCK:
The Heroku guru guy.
RICHARD:
Okay. Iâm the Heroku guru guy apparently. I work for Heroku. I am a Ruby task force member. I also teach at the University of Texas down in Austin. I teach a Ruby on Rails class. And I donât know. I play StarCraft or something.
JOSH:
[Laughs]
CHUCK:
You donât sound sure about that.
JOSH:
Are you good?
RICHARD:
It might be Tetris. Iâm not sure.
[Laughter]
RICHARD:
See, itâs StarCraft or something. Yeah well you know, you throw out the professional stuff and then you throw an oddball, like Iâm a space camp graduate. So, I couldnât quite pick. StarCraft, Iâm going with StarCraft.
DAVID:
Okay.
JOSH:
And youâre schneems online.
RICHARD:
Yes, schneems online. I have a bunch of videos on YouTube under schneems.
JOSH:
And Iâve seen you speak at a bunch of conferences that you write a bit.
RICHARD:
Yeah.
JOSH:
So, youâre all over the place.
RICHARD:
From time to time. Iâm a wildcard.
JOSH:
Youâre a wildcard. Does that mean you need a special kind of [cert] for the nick lookup? [Chuckles]
CHUCK:
They cost more.
JOSH:
Cool. So, youâre a wildcard, great. So, does that mean that we donât know what weâre talking about today?
RICHARD:
So, at Heroku, I work on the Ruby buildpack. And this is the special piece of software that actually accounts for installing everything you need on the system to actually run your Ruby program. So, you see the bundle install flying by, the assets precompilation crawling by. I along with Terence Lee am responsible for that. So, weâve been doing a lot of performance optimization. And Iâm interested in talking a little bit about that.
DAVID:
Richard, you just went from âWhoâs this Richard guy?â to âI love you.â [Laughter]
RICHARD:
Mission accomplished.
DAVID:
Yup.
JOSH:
Texas is home to a lot of very loving men.
DAVID:
Yes.
JOSH:
They just put it out there. Okay. [Chuckles] Okay, so buildpack.
DAVID:
This episode is already so weird, itâs so awesome. [Laughter]
DAVID:
Iâm running on three hours of sleep. This is great.
JOSH:
Yeah, and weâre lost without James.
CHUCK:
[Laughs]
DAVID:
Yes. Oh, James.
JOSH:
Okay. So, tell us a little more about buildpack, because that sounds interesting and I think many of us donât really know much about it, or have never heard of it before.
RICHARD:
Yeah. So, take a little trip down memory lane. If you used the original version of Heroku, or the Aspen stack as it was called, whenever you deploy to Heroku, all you could do is deploy Ruby apps. And it basically, just the way that they accomplish not having to install dependencies or install a version of Ruby or anything is literally everything was preinstalled. You had one version of Ruby. You had only this handful of gems that were installed. And if you wanted anything else, too bad. You could open a support ticket and request that they gem install on every single system, which in some ways it was cool because deployment was insanely fast. You didnât have to do anything. And over the years, we worked on making it a lot more flexible. So, after Aspen came Bamboo where you could do, and new tools developed, the ecosystem bundler came about. So, now you can install dependencies and actually practically declare dependencies. And now with our latest platform, I think we released roughly about two years ago, youâre no longer even just limited to Ruby. Weâve got support for JVM languages, Java, Python. We actually just recently hired a buildpack maintainer for PHP, so thatâs going to be pretty exciting. I know a lot of Rubyists like to dig on PHP. But thereâs a ton of webpages and web apps powered by PHP these days.
JOSH:
And also, think about the awesome opportunities for Drupal and Rails integration. [Laughs]
RICHARD:
Drails. Railspal.
JOSH:
I really want to make a RuPaul joke, but I canât quite figure it out.
[Laughter]
RICHARD:
There you go. So, basically what happens whenever you deploy is the platform essentially hands the buildpack all of your code. And so, itâs a blank slate. We have to figure out what we need to do. So, we take a look in your gem file and we pull out your version of Ruby. We install that version of Ruby. We install of your dependencies via your gem file. We also take a look at what version of Rails or Rack or different frameworks that youâre using. And thereâs just a ton of special casing. Anytime youâve ever gone to a forum post and theyâre like, âOh yeah, hey everything works except for thereâs this one weird little side edge case.â We have to handle that for every app on the platform ever. So, itâs definitely interesting. Iâve seen more than my fair share of really weird Ruby bugs. And whenever youâre handling the volume of Ruby deployments, the one in a thousand or even one in a million code edge cases actually happens relatively frequently. So, itâs a lot of fun. DAVID: So, do you just read the gem file and bundle install everything or, Iâm hoping this is the case because theyâre called buildpacks, do you figure out what the gem dependencies are and then go find something thatâs prebuilt that you can just slam in as the first three quarters of the slug or the dyno or whatever and then build on top of that?
RICHARD:
So, actually, this works really well into one of the performance patches that weâve been working on. So, in the last couple of months, weâve managed to actually get deploy speeds, or the perk 50 of deploy speeds up by about 40%. So, essentially on average, the deploy speeds are 40% faster today than they were a couple of months ago. We do a bunch. What I gave earlier was the oversimplification. After we install your gems, we do cache them. So basically, if you install Rails 4, you never have to install Rails 4 again unless you do something like upgrade Ruby versions, which could potentially poison that cache. You need a different version of the atomic gem since itâs compiled. But one of the really neat things that weâve done is actually taken a little bit of analysis and seeing some of the most common installed gems on the system and already had those available on the very first push. One of our usability goals is to just have Rails be able to work. Rails new, and then git push heroku master, thatâs our golden, what weâre driving for. And weâre also working for we would like your first push to be basically within 95% speed of your second push, for as possible as that is. An example, the postgres gem, or even if youâve ever had to install the nokugiri gem, both can take a little bit of time. So, on certain versions of Ruby on the Heroku platform, weâve preinstalled those and make those available as a cache. And if your app needs them, great. Itâs already there, doesnât have to install it. Boom, just works. If it doesnât need them, it gets cleaned up after the first push and thereâs no real loss in speed. So, thatâs one way that weâve been working at getting back some of that awesomeness of just having a bunch of stuff preinstalled on the system, but also allowing a lot of flexibility. So currently, thatâs only for our default version of Ruby which is also 2.0.
JOSH:
Okay.
RICHARD:
Yeah.
JOSH:
Thatâs a pretty good recap.
[Laughter]
JOSH:
So, my takeaway from all that was that deploys are going to get a lot faster and there are going to be some nice new features [inaudible] for.
RICHARD:
Oh yeah. Weâre doing lots of stuff. Just shipped the ability to parallel install gems this morning, thatâs why Iâm having such a good morning besides being on the show.
JOSH:
Parallel gem install.
RICHARD:
Yes.
JOSH:
But you canât install perpendicular gems though.
RICHARD:
I tried. Didnât work, didnât work.
DAVID:
Perpendicular gems are the only normal gems though.
[Laughter]
RICHARD:
Oh, physics orthogonality joke.
CHUCK:
So, when youâre talking about parallel installation though, youâre talking about installing more than one at the same time?
RICHARD:
Exactly.
CHUCK:
And we keep hearing about the concurrency issues with Ruby. So, are you using something other than MRI or is there some other thing that Iâm just overlooking here or what?
RICHARD:
Nope. It works on all versions of Ruby that I know of. Itâs a feature that was merged into Bundler itself. So, you can now run, if youâre using the most recent version of Bundler, you can run bundle install âj which was a really weird flag for me until somebody pointed out that it was jobs. So, j4 will give you install up to four gems at the same time. And weâre basically just using good practices, using the queue for anytime weâre trying to pass data in between any kind of threads or I guess processes and locks and just code reviews, good tests, all that jazz. Yeah. So, Iâm --
DAVID:
You can bundle install with multiple jobs?
RICHARD:
Yeah, yeah. Itâs
DAVID:
Hang on. I got to go do something. Iâm back.
[Laughter]
RICHARD:
That was quick.
JOSH:
Yeah. Yeah, yeah, thereâs a lot of cool stuff that theyâve been working on for Bundler and Ruby gems and their integration. And weâll have to have an episode for that in a couple of months once that all settles out. But it sounds pretty exciting, all the stuff thatâs been going on.
RICHARD:
Oh yeah, yeah. And with installing gems, itâs a perfect candidate for doing parallel things with MRI because a lot of your time is spent doing things like network traffic and working with disks. And so, anytime youâre doing I/O like network traffic or working with disks, we donât have to have that lock, that global interpreter lock. So, you still get a pretty decent speed improvement even if youâre not using JRuby or Rubinius.
JOSH:
Okay, thatâs cool.
DAVID:
Yeah.
JOSH:
Great. Okay. So, what else? So, youâve been talking about Rails 4.1 changes and compatibility and the bold new world of secrets.
RICHARD:
Oh yes. Yeah, are you all familiar with the secrets YAML conspiracy?
JOSH:
[Laughs]
DAVID:
No.
JOSH:
Well I didnât know about the conspiracy.
RICHARD:
Tonight at nine. So, okay. This is a thing thatâs been going on in Rails for a while, the security thing. I donât know if youâve heard of it. Itâs up and coming in the community where people care about secure apps. And one of the ways that Rails used to get nailed, before all of the remote code execution, was cross-site request forgery where somebody can actually make a request and make your Rails app think it came from your own trusted webpage. So, secrets.YAML was a way to combat that and say, âAlright, weâre going to do it right. Weâre going to be really secure. Weâre going to make everything secure by default.â And so, there is a token in there where we will actually sign all of our secrets. And as long as this token is secure, itâs just a random string, abcdgoldfish, then everything is secure and everythingâs golden.â But when it got implemented and shipped into Rails 4.1, there was an issue. The secrets.YAML, which is really similar in structure to a database.yaml where youâve got your production, your development, your test environment, itâs just plain text and itâs not in the .gitignore file. So essentially, everybody who created a new Rails 4.1 and then just did git on it, git add . now had this token in their source control. And then if they do something silly like open source their app, then theyâre completely open to attack. That was the big kerfluffle. Thatâs my word of choice for the day.
JOSH:
I believe itâs pronounced kerfuffle.
RICHARD:
Kerfuffle. Oh, you know I think Iâve gotten into a couple of Twitter arguments on this.
JOSH:
Over kerfuffle?
RICHARD:
A kerfluffle is just so much gentler and friendlier and funny.
[Laughter]
RICHARD:
You do it at slumber parties, all of the above. So, thereâs a really long thread on GitHub where they were like, âHey yo, put this in the .gitignore. Itâs obviously secure. We should be secure by default.â And they went back and forth and it was like, âOkay well database.yaml isnât in a .gitignore by default. So, what are we going to do?â And at the end of the day, we came to the conclusion, âOkay well hey itâs a YAML file. We can put ERB in it.â So, if you want, you can read an environment variable from your YAML file. You can just put an environment variable there, which is something obviously Heroku is a big proponent of. And itâs actually interesting now with a lot more ability to run these containerized apps locally. So, using something like Docker, itâs a lot easier to actually just be able to set things via an environment variable where itâs not going to mess up your entire system. So now by default, itâs actually going to be reading in your production config from this environment variable. So yeah, I donât know. I feel like I went a little fast there.
JOSH:
Can we get a TL;DR on that?
RICHARD:
So, whenever you push to Heroku, youâre going to be secure by default. And even if your app is open source, nobody can just view your source code and hack your app.
JOSH:
Oh, that sounds good.
RICHARD:
Yeah, yeah.
DAVID:
Nice.
RICHARD:
My favorite security is the security I donât have to think about.
JOSH:
Right. So, I did hear that the next Rails release is going to have the secrets.yaml in gitignore by default.
RICHARD:
No.
JOSH: No?
RICHARD:
No.
JOSH:
I thought that that patch got accepted.
RICHARD:
Well instead, by default theyâre actually reading from an environment variable.
JOSH:
Oh, okay.
RICHARD:
Yeah.
JOSH:
So, at least the default isnât your secret goes in your Git repo.
RICHARD:
[Chuckles] Exactly, exactly. So, it gives you the option. If you did want to put it in gitignore, totally, do it. If youâre going to be using some sort of containerized deployment like Heroku Docker, whatever, then do that. It just works by default, out of the box.
JOSH:
Okay.
AVDI:
I really like the dotenv gem for that stuff.
RICHARD:
Oh yeah. Brandon Keepers?
AVDI:
Yeah. You put your secrets in a .env file which basically looks exactly like a bunch of environment variable assignments. And environment variables take precedence, but otherwise theyâre loaded from there. You can add that to your gitignore.
RICHARD:
Exactly. The dotenv gem is a way of life for me.
AVDI:
Yeah. Yeah, Iâve been using it on all my projects.
RICHARD:
Awesome.
AVDI:
I even wrote an Elixir version because I couldnât stand not having it. [Laughter]
RICHARD:
Is that open source?
AVDI:
Yeah.
RICHARD:
Okay, cool, very cool. Yeah, so the similar thing with database.yaml. So, now are going, so a little backstory. The only way previously to configure Rails to work with Heroku was to actually essentially inject a file into your codebase. So, we would overwrite your database.yaml file, which if youâve been around the block a time or two that doesnât sound like fun. That sounds like pretty nasty hacks with unexpected, âWhy doesnât this work?" until you actually do heroku run bash and then cat your database YAML file and realize itâs not what you wrote. So, we actually did a bunch of work to get rid of the need to do that. So, now it is also checked in by default and it will be defaulting to an environment variable and under a URL subkey. So, you can say production and then underneath it you can say URL and then pass it an actual connection, a connection URL to a database, which is pretty cool.
JOSH:
Yeah.
AVDI:
I did something. It sounds like what Iâve been doing in the app Iâve been working on, again using dotenv. And Iâm pushing to Heroku so I noticed that youâve got the database URL all conveniently in an environment variable so I just figured, âOkay why not just do that locally as well?â
RICHARD:
Yeah.
AVDI:
So, my local database URL which is postgresql:// or postgres or whatever, ://user@host et cetera, et cetera. And thatâs in my .env file. And then when I push it up, itâs using the one from Heroku. It works great. I donât know why we werenât using database URLs all this time.
RICHARD:
Well, itâs funny. So, in this job, being all the different languages that we support were all grouped together in one team. So, I actually get a lot of exposure to how things work in say Python or Node. And most of the other languages or most of the libraries actually prefer database URLs for connection instead of this hash syntax.
AVDI:
Yeah, well thatâs the classic way to do it.
RICHARD:
Yeah.
AVDI:
There are stuff I guess that you probably canât get into the URLs. Iâm sure there are configuration variables like, I donât know, number of connections or something.
RICHARD:
Yeah.
AVDI:
You canât get in there, but for the most part yeah, the URL gives you what you need.
RICHARD:
Recently I was alerted to a Rails 3.2 bug where in active record, you can actually specify a database URL and you can put some query parameters at the end of it. So, you can say pool=5 and it just does the right thing. But one of the things, if you say prepared statements = false, it comes back as a string. And the string of false is true.
AVDI:
Itâs true. [Laughs]
DAVID:
Awesome.
RICHARD:
So, youâve got prepared statements.
DAVID:
JavaScript would have gotten that right. [Laughter]
JOSH:
Yeah, why arenât we all using Node? Okay, so Richard, is there any other new cool stuff coming along? So, I donât know how many people know about the association between the Twelve-Factor App design and Heroku. But the stuff weâve been talking about fits in there, fits in that whole twelve-factor design of decoupling things and using environment variables. Is there more about the twelve-factor that is getting supported more?
RICHARD:
So, I definitely say yes. In terms of when that will actually go in or how it will look, I have no clue. One of the things that Iâm really interested in is fixing logging. So, right now, if youâre deploying Rails 4 under Heroku, you actually need a gem. Or you can manually just say, âHey log to standard out,â because the Rails default is logging to a file. And that works really great for locally, but as soon as you start running one, two, ten, a hundred different machines and you start saying, âAlright now how am I actually going to group all of these files together in a time-sequenced order?â it becomes a nightmare. And then you have log rotate to make sure that your logs donât crash your machine. And so, getting logging, I guess. Iâm not going to say fixing logging because itâs not really broken. But making logging just a little bit more able to be compatible with a platform so that you just donât have to worry about it is something Iâm interested in. Also, definitely this is not twelvefactor related. And the website Josh was referring to is 12Factor.net so you can go there. Itâs sort of a manifesto, might be a little hard to grok. Iâve got a talk actually that covers a lot of it called âMillions of Apps: What Weâve Learnedâ that more or less handles that. So, one of the other things that are coming is better integration with sprockets. And when I say better integration, I donât really mean better integration with Heroku. I just mean better integration between development and production. So, that is something that we care a lot about in twelve-factor where your production environment should closely match your development environment or vice versa. DAVID: Nice.
RICHARD:
Yeah, if youâre going to be deploying to postgres, donât develop locally in Mongo. Been there, done that, anybody? No? [Chuckles]
RICHARD:
Okay.
DAVID:
Iâm smart enough to [inaudible] avoided it. [Laughter]
JOSH:
Wait, wait, wait, wait, wait, youâre building an app with postgres [inaudible]? Can you do that?
RICHARD:
So funny, thereâs actually a project called Mongres, since postgres supports JSON data types. Mongres actually implements the Mongo wire protocol basically and allows you to have your app think itâs using Mongo but itâs really secretly using a postgres database. [Laughter] DAVID: Thatâs awesome.
RICHARD:
Do not do this. [Laughter]
DAVID:
This sounds like James Golickâs Friendly ORM, which was he got so mad at Mongo that he went and wrote a NoSQL adapter for Rails that would just stick blobs into, well not blobs, I think JSON, into MySQL.
RICHARD:
Oh.
DAVID:
Yeah, same idea.
RICHARD:
Sounds friendly. So, I donât know if you all have run into this problem, but with sprockets, thereâs this whole idea of they will only precompile certain files. So, application.css will be precompiled. So, you can reference application.css from your HTML and youâre fine. But if you try to say, âOh I need this one specialized CSS file for this one specialized page, like search.css,â if you do that it blows up because you didnât tell sprockets to essentially precompile this file. So, itâs not even available. And that was done in interested of speed because everybody doesnât like how slowly it takes your sprockets to generate. So, this is by far, in a way, the most common support ticket that we get at Heroku. Another interesting thing about just being able to work with such a large platform is just seeing the common types of issues that come in regularly. And a lot of them arenât really Heroku issues but rather, âOkay it worked on my machine but it doesnât work on production.â And thatâs not necessarily a Heroku problem but itâs more of a, well the tools didnât necessarily point you in the right direction in development to let you know that you were doing something wrong. So, I
have a gem called sprockets_better_errors, I think itâs actually merged into master on the sprockets rails integration, that will raise errors in development if youâre doing something that will cause errors in production.
CHUCK:
I was about to say if you see these problems, why donât you fix them? And it sounds like you are. [Laughter]
JOSH:
That sounds like itâs like lint for your sprockets.
RICHARD:
Yeah, almost, sprockets lint. Every time I say sprockets, I just think of George Jetson.
JOSH:
Yes, Spacelyâs Sprockets, yeah. [Chuckles]
RICHARD:
Jane, I pushed the button twice today. [Laughter]
AVDI:
So, apart from sprockets --
JOSH:
Hey, hang on, before we move on from sprockets.
AVDI:
Yes.
JOSH:
Richard, did you get to listen to the episode when we had Ilya Grigorik on recently talking about HTTP 2.0?
RICHARD:
I did not, unfortunately. Sorry.
JOSH:
Oh okay, so sprockets was a bit of a topic on that show. And we were talking about how, Ilya was saying that sprockets is an insane solution to the problem. [Laughter]
JOSH:
And HTTP 2 is going to fix all that. And one of the things that we talked about was the Google and the Facebook, giant companies that have all these big scaling issues, they have an interest in making or in solving problems a certain way that helps them. But itâs like all these people who are just doing tiny little websites donât have the same kind of scaling issues. So, a lot of the binary protocol aspects of HTTP 2 might not necessarily be the best thing for your little indie website. So, Herokuâs in an interesting position because you have a big-scaled platform that youâre working. So, a lot of those same kinds of things are going on, but the kind of things that HTTP 2 is doing to bundle together all of your downloads, I guess thatâs not something that will work across your whole platform of all of your clientsâ apps. Anyway, at some point we got to come back and talk about that, when HTTP 2 is more of an issue.
RICHARD:
Oh yeah, yeah. Weâre very much customer focus driven. If everybody is saying, âOkay we really care about,â and it sounds silly, itâs like, âOkay we really care about availability,â then thatâs where we put the majority of our effort. Itâs increasing that or increasing speed, getting these kinds of things. Recently one of the biggest thorns in my side was that we didnât support WebSockets. So, Iâd talk to somebody and theyâd be like, âOh whatâs Heroku? Iâve heard it was kind of good. And hereâs what my app does. Can I run on Heroku?â But they were using WebSockets and Iâd have to say no. But now weâve recently allowed that through a beta feature. And itâs one of those if there are enough voices using it then it becomes something that we can prioritize and work on. Iâm not going to say that I guarantee that we will be solving and working on all those problems. But I think the HTTP 2 case is definitely interesting. I was recently reading an article which was saying that on over something like a 3G connection, mobile connection, using HTTP 2 is relatively negligible. The speed benefit just doesnât, like the things itâs optimizing for on say a desktop experience, you donât even run into those in mobile. Unfortunately [chuckles] after I brought that up, Iâm totally not an expert in HTTP 2. So, definitely maybe after that comes a little bit more into the limelight, I could come on the show again, maybe.
CHUCK:
So, you talked a little bit about not having a feature and then adding it in. There are some pretty common restrictions that you have with Heroku, especially the three-tier. And I understand why you have restrictions on the three-tier. But one of the things that bother me sometimes is not being able to write to the file system. And thatâs a global thing.
AVDI:
Wait, you canât?
RICHARD:
Well, boom. I just fixed it. You totally can.
AVDI:
Yeah.
CHUCK:
Oh, you can?
RICHARD:
Yeah, you totally can, unless youâre using an older, unless your app is using Bamboo. That was a read-only file system. Now youâre on Cedar, itâs an ephemeral file system. You could read to it, you could write from it, or backwards. You can read and write. But itâs not guaranteed to persist to disk.
If your app restarts for any reason, then you lose everything youâve written to disk.
CHUCK:
Okay.
RICHARD:
Yeah. And that is good. Most people, they start with one app and then they start doing things like writing images of avatars to that one box. And then they say, âOh now I need to scale out.â And now they have two boxes, but they only have images on half of them. So, half of the requests come back with images and half of them donât. So, if youâre using, if you actually really, really care about that thing that you want to write, then you should write it to something that can be globally accessed through a data store postgres, Redis, or even a blob store like S3.
CHUCK:
So, my answer to your âBoom. I fixed that,â is âBoom. You rocked.â [Laughter]
CHUCK:
Because Iâve been in a position where itâs like I go download a file that I need to parse. And so, Iâve got to pull it in and pull it apart before it gets to the disk because I canât really write it. So, thatâs definitely a good thing. One other thing that I want to bring up is that with most of the apps that Iâve deployed to Heroku, the dyno spins down. And so, then I have to come back and spin it up or Iâll tell my client, âOh well I set up a little staging environment over on Heroku and you can go get it here,â and they go hit it and they come back and they go, âItâs not there.â And Iâm like, âWell it will be now because you went and warmed it up.â
RICHARD:
Mmhmm. So, this is all part of our free tier offering. We actually call that action sleeping. For those listening along at home if youâre not familiar, Heroku gives you 750 hours, which are more hours than exists in a month per month to run an app for free. And this is great as Chuck mentioned for doing things like staging, sending it over to your client just verifying that things work. And one of the ways that weâre able to offer this amount of free things basically for forever, if you go with some other platforms they might say, âOkay well itâs free for a really small amount for a year.â But because we actually know whether or not your app is getting network traffic and if it doesnât get network traffic for an hour then we basically spin it down and wait for it to get another request. And then we spin it back up. So, we call that sleeping. If you really cannot sleep right now, thereâs only one way to disable that and thatâs actually adding an additional resource onto that app to make it no longer free. So, that is one way. Or some people will actually just build insanely lightweight rackbased applications. And I want to say in just my own personal metrics, it takes roughly about ten seconds maybe, -ish, plus or minus to actually spin up your app. And then plus any time it takes to actually load your application code. So, every time you do rails server, if it takes five minutes, then itâs going to take five minutes plus ten seconds to un-sleep your app. So yeah, totally, the one way you can get around that is by bumping up your limit or if youâre really popular and you have somebody hitting your website once an hour, then thatâs a way too.
DAVID:
Is now a bad time to point out that I have multiple times written cron jobs on other servers to check my page every 30 minutes? [Laughter]
DAVID:
Just so that the Herokuâs app, the dyno doesnât spin down.
RICHARD:
So, I wonât point out that Heroku also has a scheduler feature that allows you to basically run cron jobs on an app.
[Laughter]
RICHARD:
And you can do things like curl in that.
[Laughter]
RICHARD:
But I will say, with great power, great scheduler ability comes great responsibility. If everyone, and their cousin, abuses this, then weâre going to have to take the feature away.
DAVID:
Tragedy of the commons, yeah.
RICHARD:
Yeah, totally. So, I personally would love for there just to be a button to be like, âOkay listen. Iâm not going to scale out to a hundred thousand dynos. This isnât going to be a Facebook. This isnât going to be whoever. I just donât want it to go to sleep.â
JOSH:
I just want to be able to pay for one dyno.
RICHARD:
Yes.
JOSH:
I donât want to have to pay for two dynos just to pay for one.
RICHARD:
Yes.
CHUCK:
No, your first oneâs free. Youâre only paying for one.
JOSH:
No, no, but I want to be able to pay.
[Laughter]
RICHARD:
So, what youâre saying is because we give you one for free, you want the second one at a
discount? [Laughter]
CHUCK:
No, he wants to be able to --
DAVID:
Josh is mad that you have scaling.
JOSH:
I guess I canât do math anymore. I thought that when you started paying for dynos you were actually paying for two.
RICHARD:
No. So, you get that number of free hours on your app no matter what.
JOSH:
Yeah.
RICHARD:
So, whenever you start paying, itâs weird math. And weâre an engineering company run by a bunch of engineers which is why I love working for us because I love eating my own dog food every day.
JOSH:
But we all know engineers canât do math.
CHUCK:
Or eat dog food.
RICHARD:
But the math thing, so yeah. Basically if you say, use four dynos which is how we measure usage, four should theoretically give you 4x number of server processes.
JOSH:
Yeah.
RICHARD:
Then you are paying for three of them. You actually still get that first one for free.
JOSH:
Oh, okay.
RICHARD:
Yeah, yeah, yeah.
CHUCK:
Yeah, well I think what Josh is saying is he wants to be able to pay for a donât go to sleep flag on his single dyno.
RICHARD:
Yes.
JOSH:
Yeah, especially since like you said, there are issues that you only have to solve when youâre scaling up to multiple servers. So, sometimes it would be nice just, let me just pay to get this thing up and running all the time, but I donât want to solve those problems yet.
RICHARD:
Right.
DAVID:
Yeah. Can you guys implement a feature where the second dyno just redirects to the first?
CHUCK:
[Laughs]
DAVID:
And then I donât have to solve the scaling problem. Boom! Done. I donât know how that works. [Laughter]
AVDI:
Okay, so I want to know --
RICHARD:
No, no, no, to solve your scaling problems, everybody just knows use Node, right? Rewrite all your code.
[Laughter]
RICHARD:
Active record has callbacks. Node has callbacks.
CHUCK:
MEAN stack. Woohoo!
[Laughter]
AVDI:
Alright, so I want to know what other dumb things are people doing in their Ruby apps that are on Heroku?
RICHARD:
What? What dumb things?
JOSH:
Oh, oh, oh, oh, oh, oh
AVDI:
You get to see so many apps.
JOSH:
Oh, oh, how many apps on Heroku are running WEBrick?
RICHARD:
Oh my, gosh. More than I care to say. So, if you donât --
[Laughter]
RICHARD:
Background. [Chuckles] If you ever just run rails server locally, youâre probably on just, you run rails new rails server, youâre using WEBrick which is a default built-in server that comes with Rails standard library. And itâs actually surprisingly not a bad little server. But itâs not exactly a production grade server. I donât know. How would you all define WEBrick?
JOSH:
Itâs simple and reliable, but not necessarily scalable.
RICHARD:
Hmm. If WEBrick was a cartoon character --
[Laughter]
RICHARD:
No, so anyway, if you just --
JOSH:
Papa Smurf? I donât know.
[Laughter]
RICHARD:
Yeah, so I mentioned previously, weâre driving towards that idea where you can just do rails new, git push heroku master, boom. But if you do that, youâre basically still using WEBrick. And we want to be able to support this because thereâs a lot of people, if youâre trying to push out a demo in 30 minutes or you have a client meeting coming up and you just want to get something working really quick, really fast, or you just want to show your student project, or you really literally do not care about performance, youâre just mocking something up. Convention over configuration, right? Just use whatever is available. But if you need that performance, originally we were recommending using Thin just because itâs super simple to use. You just drop it in your gem file and weâll automatically use it. Or now weâre actually using, weâre recommending multiple process backends. One of them is Unicorn. And the other one I really like that Iâve been playing around with is Puma.
We donât have official documentation for Puma, but I would like to get some. I saw a tweet by Evan Phoenix saying heâd be interested in working whatever kind of edge cases we had there. So, to answer your question, a lot. We have a lot of people using WEBrick. And some of them are like, âHey my app is really slow and I donât know why.â And itâs like, âWell donât use WEBrick.â [Sighs]
JOSH:
Is that the kind of thing that would, it seems like perhaps a little education, a little feedback from when you do git push heroku, that it would just say, âHey dude, youâre using WEBrick. Is that what you want to do?â
RICHARD:
Yeah. So, we have a couple of different ways to communicate with our users. So, we do have a developer zone, developer center that has all these articles thatâs like, âPlease donât use WEBrick, please.â But you canât necessarily count on people to read the docs. And my mental model of this is I want it to be obvious. I just want it to be in your face, kind of almost information on demand. So, we can do things like actually see, âOh hey you arenât specifying a different server.â On Heroku, we actually have, itâs called a Procfile and thatâs how you tell us how to run your web server. And we can do things like say, âHey you arenât using a Procfile. Therefore youâre using WEBrick. Therefore itâs going to be slow.â Weâre slowly getting there. Weâre doing some things like, mostly Iâve been focusing on errors. So, if you try to install SQLite, if you try to use SQLite in production, thatâs just a bad idea, trademark bad idea. And so, if you try to do that, instead of just blowing up and saying we donât have the SQLite headers installed on the system, we actually give you a comprehensible, reasonable error message that tells you why youâre getting it, how to fix it, a link explaining more. And definitely down the road, I do plan on, or together Terence and I, we plan on adding more of these helpful nudges in the right direction. But you also can swing both ways, right? I donât know if youâve run the Rails test suite recently, but itâs impossible to see the actual tests because there are literally so many warnings in the output. Yeah, so itâs like too much information is also a bad thing. Weâre already putting a couple of different warnings in the output and people miss them. Even if you have docs and you give it to them on a platter, I actually would be interested in going maybe even a step further and being able to profile an app and say, âOkay here are the, whatever, ten things that could be improved about this app.â And maybe sending that person a casual email and say, âHey did you realize this is a way?â A lot of times when people are deploying, theyâre in the heat of the moment. They just want to get it out there. Or even worse, people donât read warnings, even if it says warnings and is rolled up in a nice pretty package at the bottom, that people just see, âOh okay it worked.â And this also I think comes with time. The more senior someone is, the more likely they are to see those. And even if not, itâs okay. Weâre human, or some of us are, most of us. Robots? [Chuckles]
JOSH:
Hey, Iâm wondering if thereâs some sort of opportunity for a plugin with New Relic. I know that thereâs a free level of New Relic that you can get on Heroku and that youâve pretty much offloaded all of the app reporting stuff to New Relic. I like the little dashboard that you get for an app. You could probably put in app status things and more things about the Procfile warning or youâre using WEBrick over there. Or New Relic lets you do plugins and things like that. You could probably also somehow do some kind of integration with reporting exceptional app status through the New Relic interface.
RICHARD:
Yeah. I think something like that would be great. One element that we are pretty passionate about is visibility. So, do you guys know ryandotsmith?
JOSH:
Oh yeah.
CHUCK:
Yeah.
RICHARD:
His nameâs just Ryan, but I have to call him ryandotsmith because thatâs his Twitter handle. I donât know. So, one of my favorite quotes of his is, âYou donât have a performance problem. You have a visibility problem,â because if you knew what was slow, you would just fix it. And itâs the same. If you knew you were using WEBrick in production, you would just fix it. Itâs a two-second fix. So, one thing that we have been interested in is how to aggregate that data. And one of the ways weâve done that is actually through logging. Basically Heroku, so when you say log to standard out, but other things even add-ons can actually send information to your logs. And depending on how theyâre set up, other add-ons can actually be set to read information out of your logs, just certain information. So, if we did, we could actually just pipe some data in there that says, âHey hereâs the five things you need to be fixed,â and then not just New Relic but anybody, if you wanted to create a startup or whatever that did that. And you can make those. Also the way that we are set up, Heroku is set up is weâre very, very distributed. People say service-oriented architecture. But whenever you say that, a lot of people think, âOh okay. You just take each model you have and make that an API. And then I donât know, and then magic. And itâs service-oriented architecture.â So, the Heroku dashboard is a completely separate app from our API endpoints. Itâs a separate app from our logging. And if you did something like that, we might even say if thereâs enough people asking for it, asking for that visibility, we can actually build something into our dashboard. So yeah, it would be totally awesome.
JOSH:
Cool.
RICHARD:
Total plug for something nobody knows about is itâs called log-runtime-metrics. That was why I even spun up the whole logs thing. The log-runtime-metrics will actually take memory usage and data off of your dynos and stick it into your logs. And you can then use something else that will pull that data out and can actually graph system usage of your apps. And so, itâs a way to get a really, really low level amount of information without having to actually get it yourself. If you donât want it, who cares? Donât look at it. If you do, itâs right there.
JOSH:
Cool. Okay. So, weâve been talking about performance a lot. Got to ask you about the router performance, or the routing performance. And this was an issue a year ago with all the Rap Genius stuff and all the drama around transparency, communication around whatâs going on with router changes, and how to deal with them in your app and how not to lose requests. And I know you guys have been working on that behind the scenes and making things better. And every now and then we hear something about it. So, Iâm just curious, whatâs the state of the world today and whatâs coming at us?
RICHARD:
The state of the Heroku union. So, funny enough, I was actually on vacation when all that happened. And then immediately from vacation went to Australia RubyConf where I added in an extra ten minutes worth of slides to my presentation addressing that. And I started getting phone calls in the middle of it being like, âAre you talking about this in public?â [Laughter]
RICHARD:
Send us your slides immediately. And then I sent them and they were all like, âOh okay. Yeah, thatâs fine. Thatâs all valid.â Part of it is an expectation issue and I think that that was one of really the biggest problems were we werenât setting up the right expectations on how to be successful as a customer and a user of our platform. One of the things that weâve done since that is very proactively go after a lot of our largest applications and say to them, âWhere are you experiencing pain? What is slow?â Then they can actually come back to us and say, âOkay well, hey. Iâve got this weird request queuing metric inside of New Relic. Whatâs going on there?â So, this is definitely something in terms of just performance on the platform period. We are 100% dedicated to, weâve now [chuckles] itâs kind of fun. Inside of Heroku, if you really want to work on this project, youâre just like, âOh Iâm going to work on this,â and people are like, âEh.â And youâre like, âOh but itâll get performance,â and everybodyâs like, âYeah, yeah, yeah, do it.â So, something weâre gung-ho about.
But specifically with the request queuing, one of the biggest mitigators is I guess I need diagrams and stuff just to, there are so many analogies. You could think of it in terms of youâre running a supermarket and youâre trying to check out the most people as quickly, or have the least amount of weight for each person. And so, some supermarkets actually have somebody telling you which line to go into. But thereâs actually a good amount of overhead in doing that, actually having to find out which line is short, which line is not. And sometimes, have you ever gotten into the wrong line? Youâre like, âOh that line is totally shorter.â And then somebody -- JOSH: Richard, is there a way not to get the wrong line?
DAVID:
[Chuckles]
RICHARD:
Oh, yeah.
DAVID:
The other line always moves faster.
RICHARD:
Yes, the other line always moves faster. So, basically this is the same problem we run into with distributed queuing. And it is literally a really hard problem. People have PHD theses and white papers to spend years of their lives looking at this thing and then come back and say, âWell, we werenât able to get any better than random.â So, if youâre using something along the lines of ELB which is elastic load balancer or like Nginx to do load balancing in your apps, youâll get this style of round robin routing wherein say basically instead of picking what you think is going to be the fastest line, you just get the next line. So, even if one line is slower or another line is slower, over time itâll just average out. And it actually works pretty well provided you donât get too many slow requests backed up inside of one another. If you get one really person behind another slow person behind another slow person, as opposed to you start looking at, âOh hey our average is low,â but then you start looking at, âOh well then this one person had to wait ten minutes to just buy a grapefruit,â or something. So, if you can do something intelligent at the end of that, if you actually know whether or not a line is available, a line is open just waiting and ready, then it speeds it up quite a bit. So, using a parallel backend like Puma or Unicorn is something that people can do right now. They can do this today to really, really mitigate the problems that you will see with a style of routing that, Iâm not going to say necessarily itâs industry standard, but it is used in a lot of different places. And this is something. So, I know everybody in Ruby is massively in love with Erlang right now. Youâll be happy to know that all of our routing is written in Erlang. And weâre adding more people to our team and doing things like actually running simulations on whether or not something like a parallel distributed lock system would be faster or actually just these kinds of questions. Hey, we have this problem, how are we going to solve it? What can we do? Education is totally one of the things. But also, Heroku tends to be above and beyond platform. If we can just take care of this problem for you, we would love to be able to. Right now it doesnât look like thatâs going to be, weâre going to be able to just snap our fingers and make it go away. It is just a fact of reality. But definitely we have some really cool stuff in the pipeline that I totally cannot talk about right now that is going to be pretty helpful there.
JOSH:
So, you could just tell us and weâll leave it off the air. [Laughter]
CHUCK:
Yeah, itâs not like weâre recording this or anything.
DAVID:
Get the serum.
JOSH:
[Laughs] Yeah, just between us.
RICHARD:
Node.js. There, I said it. [Laughter]
DAVID:
No!
JOSH:
Node! Okay.
DAVID:
Youâre not my father. That is impossible!
[Laughter]
RICHARD:
So, weâre going to use Ruby code to generate PHP code, throw it through HipHop, turn it into
C++âŠ
JOSH:
And then run it on the JVM.
RICHARD:
Thatâs true, yes.
DAVID:
So, I have a quick callback to the performance, but in a specific implementation.
RICHARD:
Yeah.
DAVID:
I needed to throw up just a one-page app recently for a website I may have mentioned on todayâs show. And I was frantic because the episode before this one went up a day before I thought it was going to and DNS was broken and the server was, yeah, it was just this huge frantic, âI just need to get this index page placeholder up right away. What should I do?â And I ended up cargo culting. Iâm going to take Heroku and Iâm going to put my index.html and the images and all that stuff like that, but Iâm just going to write a config.ru, a rack app, that just does file [inaudible] open on index.html as the action in the rack. And I just cargo culted it. Is that a bad idea or an awful idea? [Laughter]
RICHARD:
Anytime youâre trying to speed something up, number one is visibility and logging. Number two is just if youâve been doing this for a while then you learn certain things are âslowâ or slower than other things. And almost by definition, touching the disk or any kind of network operations is going to be slow. So, if youâre doing something along the lines of using maybe caching that somewhere, if it is literally just a static file and then you can cache it in the memory and then just serve it directly out of memory. Or even if you canât do that and itâs just a marketing page and you have a ton of them and you can put them into memcache, that is going to be so much faster than just reading, actually touching your disk. Just going into memory is going to be a lot faster. Or something that Iâve seen a couple of people do with these static sites is, so thereâs a website by the name of NSHipster that Mattt Thompson publishes. And he actually uses I believe, itâs either Jekyll or Middleman, I want to say itâs Jekyll, and uses that to generate the static HTML and then just puts in onto S3 somewhere and then just routes the DNS directly to that. And that is actually surprisingly performant. If you want to even go a step above that put it behind a CDN, like Fastly or CloudFront.
DAVID:
Thereâs only going to be 14 people that [will] open the link.
AVDI:
You can set up page rules in CloudFlare. You can stick in front of it.
RICHARD:
Yeah.
AVDI:
Set up a page rule that just says cache everything. And thatâs on their free level.
RICHARD:
Oh yeah, totally.
DAVID:
Yeah. Thereâs only going to be 14 people that click on it, but Iâm just worried that theyâre all going to click on it at the same time, so you know.
[Laughter]
RICHARD:
Hate to be that 14th person.
DAVID:
Yeah.
JOSH:
So, weâve been going at this a while. Is there anything that has been in the queue a long time and is about to timeout for topics?
CHUCK:
So, the only other thing I wanted to bring up was just that there are certain things that are I guess really simple to do on a system like a VPS with a static IP address that you donât really get out of Heroku. And you can use plugins for those. But I found that sometimes, setting up the plugin people have concerns about the cost because sometimes you have to pay for those. Sometimes, thereâs just a little bit more of a barrier to using them. Have you found that that causes people trouble sometimes? Or for the most part are people pretty willing to just try out whatever service and plugin that is available?
RICHARD:
So, we were just talking about static sites the other day. And honestly, if youâre running a static site, Heroku is not the best thing. We would love to be the best platform for everything. But pick the right tool for the job. Rails, Ruby, all these kinds of things, you start to talk about sprockets, making really complicated problems even more complicated by adding SAS and appending all these dependencies and all these other things, then thatâs where we really shine, is making a complicated system easy. But if youâre working with a simple system, then I recommend that. We do take stock of peopleâs pain points. And I said previously that what the crowd wills, what people are asking us for, what we are getting feedback. I mentioned previously weâre actively going and working with some of these larger customers to find ways to eliminate some of their pain points. Maybe we might find, okay well you mentioned static IP addresses. Maybe if that is a really common pain point, then that might be something that we could either, if we can solve it in a general way without too much coupling then that might be something we would address. But I also wouldnât be foolish enough to just say, âNo use Heroku for everything regardless.â We want to be the best tool for the job, but if weâre not then maybe bare metal with a dedicated IP address. Is that reasonable?
CHUCK:
Yeah, that makes sense. One other question I have for you is that a lot of apps use background jobs.
RICHARD:
Yes.
CHUCK:
You know, like Resque or whatever. And it seems like the way to deal with some of those things has been to set up another dyno basically, to run that. Is that the way that you typically have people do that and is that just not an option then on the free level?
RICHARD:
With the free level, you get 750 hours. Thatâs shared across however you want to use that. If you wanted to spin up 750 dynos. Oh no, actually, that wouldnât work. [Laughs] So, theoretically, if you could do this without us automatically charging you for it, spin up 750 dynos for one hour, you would get that for free. Donât do that, you canât. But anytime you run the scheduler, thatâs actually counting against your hourly usage. So, if you really just need to run this background job infrequently, I actually wrote a gem called threaded_in_memory_queue and it pretends to be a background worker but it really just runs things in your local memory. Itâs not a great solution if you need things like persistence [chuckles] of those items, of those jobs youâre enqueuing. But you could use something like that. Or there are some external services. One of them is called HireFire where if you donât need a persistent background worker, itâs like what weâre talking about right? We just need to do some things in the background sometimes, but not all the time. With a tool like HireFire, you can actually just tell it to spin up a, I donât know exactly how it works, but you can tell them, âOkay hey, Iâm going to throw something in the job. Spin up one dyno and then shut it back down just as soon as possible.â So, thatâs one solution. Or like I said, doing it in memory just using threads. Thatâs not idea, but itâs at least better than having to do it sequentially in the actual request.
CHUCK:
Yeah, that makes sense.
RICHARD:
Alright.
CHUCK:
Alright, thatâs all my questions. Nobody else is piping up. Should we get to the picks?
JOSH:
Yeah, I guess so.
DAVID:
Time for picks.
JOSH:
Yeah, weâve covered a lot. Itâs been really good. Thanks, Richard.
DAVID:
This has been a great show.
CHUCK:
Yeah, absolutely. David, do you want to start with the picks?
DAVID:
Sure. Iâm going to reuse a pick. Katrina picked âSo Good They Canât Ignore Youâ a couple of months ago. And I started talking about this Job Replacement Guide stuff and James just went nuts. Heâs like, âDave go read this book. Go read this book. Go read this book.â And itâs my pick. It is a fantastic book. And I was worried about halfway through the book that it was going to basically make my book useless and supplant it. About halfway through, I figured out what the key secret behind his book was. And it is basically that you want to build up career capital that you can then use to acquire more control and autonomy in your job so that you can be happier at what you do. And the Job Replacement Guide is actually the reverse of that, which is to basically say thereâs all this control and autonomy that you want and it causes you to filter out all of the options that you think you have. And so, if you can learn to take those filters down, you can find out that youâre just surrounded by opportunities. Iâm not actually pitching my book as my pick. But just by way of comparison. So yes, âSo Good They Canât Ignore Youâ is a fantastic book. I highly recommend it if you want to cultivate your career. He makes a challenging assumption statement at the beginning which is that âFollow your passionâ is bad advice. And if that offends you, you need to read this book because he will give you a really compelling case for understanding passion and work and being good at stuff way, way better than you thought you had. So, that's my pick.
CHUCK:
Okay, sounds good. Sounds so good I canât ignore it. Avdi, what are your picks?
AVDI:
Well, Iâve been doing some coding lately. I know that sounds crazy. But I have. And so, I thought Iâd just quickly run down some of the gems that Iâve been using that have been serving me well and that I havenât picked before. First of all, Iâve been doing my own object-relational mapping. I havenât been using an ORM for that. So, I wanted a library that would just make it really easy for me to talk to the database without trying to layer on a bunch of object mapping on top of that. And I have been using the Sequel library. Itâs the word sequel spelled out instead of SQL. And itâs really, really nice. I think Ruby used to have a DBI library like Perlâs that abstracted all different databases. And I think that long ago fell into disrepair. And it feels like the new DBI. It does have an ORM layer but you donât have to use it. You can just totally ignore it. So, Sequelâs very, very cool and it has support for a bajillion databases. Letâs see, what else? Iâve also been using the pony gem. Iâve honestly never understood action mailer. And pony is just a really, really simple way of sending emails from your application. You can do it, send an email with a single method call. And so, Iâve been using that for my emails. And finally, letâs see. Oh yeah, the email-spec gem, the flipside of sending emails from your application is if youâre doing TDD you really want to be able to test that youâre sending the right emails to the right people at the right times. And the email-spec gem reaches its sneaky fingers into action mailer or pony and basically makes them send, stubs them out and makes them send their emails into the email-spec system instead of trying to send them out into the world. And then you can very easily test to see what emails were sent and you can easily do things like simulate clicking a link inside the email that was sent and fun stuff like that. So yeah, lots of good gems. Those are the ones Iâve been using lately. And I think Iâve been talking long enough so Iâll just cut it off there.
CHUCK:
Awesome. Josh, what are your picks?
JOSH:
Cool. Okay, I got a couple today. My first pick is, okay thereâs this object-oriented programming language called Self. Itâs been around for quite a while. Late 80s, early 90s, they were doing a lot of development. It came out of Stanford and Dave Ungarâs group. And they just had a new release, the 4.5.0 version of Self. The Mallard release or Majestic Mallard just got dropped. I think itâs pretty exciting. I love Self. Itâs a really interesting take on object-oriented programming. It was the first I think really industrial strength prototypical language. And thereâs a lot of cool stuff in it. And whatâs really interesting is that if youâre using the JVM, the Java Virtual Machine, to run JRuby or Java or Scala or what have you, a lot of the VM performance technology came from the work that was done on Self. I think itâs a great language. Itâs like the Scheme of object-oriented programming. Thereâs a half-dozen concepts in the language and thatâs it. So, the Mallard release, it runs on OS X. Thereâs a disk image you can download to install binaries. And itâs pretty simple to get going. And I think itâs a lot of fun to play around with. So, that was a long rambling pick, but there you go. And then I have a gadget pick. Iâve had an iPhone 5 for a year. And every now and then I drop it a small distance and itâs usually just, itâs never really suffered any damage which is a testament to their new design. But I really like having a bumper case just because I like the way it feels. And I found a good one finally. There werenât really any good ones. But I think itâs pronounced Spigen, SP-I-G-E-N is the company. They have a lot of really nice cases. And I found one that I like a lot. Itâs a bumper case. And one of the things I like about it is that itâs two pieces. Thereâs a rubber bumper and then a plastic case or frame that goes around that. You keep it on and they have, I donât know, two dozen different colors of those frames. So, itâs super customizable. And then I have a completely fun pick, which is a TV pick. So, HBO has a new series that by the time you hear this, just premiered over the weekend. Itâs called Looking. And itâs the story of three men, three friends living in San Francisco looking for love. And itâs surprisingly good. I was really lucky and got to go to the premier of it here in San Francisco this week. And it really exceeded my expectations. Itâs the first show Iâve seen that I think shows gay characters on TV that felt real. Itâs a short series. Itâs eight episodes or something. But it looks really good, so I think itâs going to appeal to a lot of people. And Iâm looking forward to seeing the rest of the series. Okay, thatâs it for me.
CHUCK:
Alright. Well, Iâll throw a couple of picks out there. When we went out to Disneyland with the kids, there were some things that we got that were really, really nice to have. And so, Iâm just going to pick a few of those. The first one was that we got them these tablets. Now, the first tablets we got, we got them off of a local deal site. They turned out to be crappy. Three of them donât work. One of them never worked. The other one died within an hour of coming out of the packaging and being turned on, and the last one died after about a day. And then the other one still works for some unknown reason. So, we sent those back and we got some from Amazon that had some better reviews and they have been awesome. So, Iâm going to put a link to those in the show notes. Also, there is this RAVPower wireless streaming device that I picked up. And you can put an SD card into it or you can actually plug a USB hard drive or USB key into it. Then you can put movies and music on there. And it will actually stream the media to up to five devices with no glitches and itâs really handy. It transmits its own wireless signal so you can actually just get onto its wireless and then get the media. And so, it was nice to have in the car because then the kids could just get on and watch whatever movies we had on there. And then I bought a 64GB SD card to go in it. And I filled it most of the way up with movies. And amazingly, thatâs quite a few movies. And so, then their little tablets, the ones that worked anyway even though they only had 8GB of memory in them, they had access to 64GB worth of movies. So, they could just pick and choose what they wanted to watch. So, it turned out to be just this super-duper way to go. And I canât say enough good things about it. So, really, really happy with it. So, Iâm going to pick those. Incidentally, the RAVPower wireless streaming device, if you get in and configure it, you can configure it to actually connect to another wireless for its internet connection. So, then you can be connected to it and get the audio and video files off of it and you can still connect to the internet. But when we were driving down the road, obviously that wasnât an option. So, we just did it the other way. And it worked really, really well. So, anyway, those are my picks. Richard, what are your picks?
RICHARD:
Alright. You all have a book club right now, right?
CHUCK:
Oh, yes.
RICHARD:
Is it âRuby Under a Microscopeâ? Is that correct?
CHUCK:
Yup, by Pat Shaughnessy.
RICHARD:
Alright, I have a complementary pick to that. My pick is âK & R, The C Programming Languageâ. Lots of Ruby programmers these days are going polyglot and I see no reason why we canât go back to the basics. Itâs what MRI is written in. And Iâve been going back through it and itâs fun. Itâs also nice to be reminded of why I love programming in Ruby, some of the niceties that it gives me. Another pick, totally self-serving, is CodeTriage.com. So, this is a service. If youâre interested in helping out more with open source then you can go on to CodeTriage.com. So, letâs say youâre interested in helping out with Rails, you can go to CodeTriage.com/rails/rails and actually subscribe to get unresolved issues where then you could either lurk and just see, âOkay what kinds of things are happening in Rails these days?â or you can actually go on there and help. If itâs a bug, you can verify it. You can check version numbers. You can reproduce it. Maybe even pick up some pull requests there. I know a couple of who have gotten into core contributors groups using this tool, so CodeTriage.com. And I donât know if I can do this, but Ruby 2.1 is totally a pick of mine. Iâm picking this so hard. If you look at the Rails test suite, it runs on a bunch of different versions of Ruby and the Ruby 2.1 version runs 25% faster. Itâs just speed, pure speed. So, I guess those are, thatâs about all the⊠Oh, oh actually, I have a book as well. This is another self-serving pick. âHeroku: Up and Runningâ. You can totally edit that out if you want. But that is a book that I wrote and I think itâs pretty good.
CHUCK:
Alright, cool.
JOSH:
Weâre all in favor of shameless self-promotion here. Itâs fine. [Chuckles]
CHUCK:
Yeah, is anyone else writing a book? [Laughter]
DAVID:
Yes. [Laughter]
RICHARD:
Oh, oh also recently Aman Guptaâs blog has had some amazing stuff, especially about Ruby 2.1. If youâre not reading that, then youâre missing out.
AVDI:
Yeah, I second it.
JOSH:
Yeah. Aman, weâre having a chat with him these days about how soon we can get him on the show to talk about some stuff.
RICHARD:
Excellent. I will be tuning in.
JOSH:
Okay.
CHUCK:
Alright. With that, I guess weâll wrap up. I do want to remind you about our book club book as Richard pointed out. Weâre doing âRuby Under a Microscopeâ by Pat Shaughnessy. So, be reading that. And if you want to get more of us, canât get enough of us, then go to RubyRogues.com/Parley and sign up for our community forum. Thank you for listening.
DAVID:
And remember, youâre our favorite listener. [Whispers] Donât tell the other listeners.