This week we interview Carl Lerche and talk to him about his new gig at Strobe, Bundler and JRuby Danish: All right, today on Cloud Out Loud we have Carl Lerche with us. Carl, can you introduce yourself please?
Carl: Hey I’m Carl...Lerche. Just a Ruby Developer, any old Ruby Developer, I guess, coding for fun and profit. There we go.
Carl: Simple and true.
Danish: Sounds good. Alright. So now the next question is, who is Carlhuda?
Carl: You’re not supposed to ask that question.
Danish: I’m not supposed to ask that question?
Carl: No. If I tell you, I’d have to kill you. That joke’s not old. But. So history behind that is, I used to work at Engine Yard. Yehuda as well. We were both working on Ruby on Rails full time. We were actually the only people at Engine Yard that worked on it full time and we paired. So we had a pairing machine that we worked on together and when we committed we just committed from a Carl plus Yehuda at EngineYard.com. Then one of the comments on the GitHub repo, Mislav I think, said “Hey its Carlhuda” and it stuck. So we switched the account to Carlhuda and there we go.
Carl: Still together til this day.
Danish: It seems like nicknames run pretty big at Engine Yard from what I’ve noticed.
Danish: Alright, so like you said, you were working on Rails at Engine Yard. Now you’ve changed your role. You’re working on SproutCore at Strobe. So I’m just curious how that move has gone for you.
Carl: It’s gone great. My favorite thing is actually--I was working on Ruby on Rails, like you mentioned, and it was fun. It was great the entire time I was doing it but in the end I was just working on the framework without really using it. I wasn’t using it for anything serious. A few side projects here and there but nothing that important. In the end I just like to build things. So I moved to Strobe. One of the reasons is I thought, what we’re doing there, there’s a huge opportunity. This is kind of where things are going and that excited me. Also, being able to build something big, hard, and just use Rails for it I guess, and start from zero and use what I’ve been building for the past year and a half I think it what really enticed me.
Carl: Something new.
Danish: Have you enjoyed, I mean, you’re one of the few people that I know I consider lucky, being able to do open source while getting paid to do spen source so one--How did you get to do that so I can learn?
Carl: Interestingly enough, when you get paid to work on open source, you get to do everything else nobody else wants to do. So, it was still really fun. I don’t know, I think the way to do it is to contribute to open source for fun. Just lots of it. And I guess eventually, if somehow stars align where there’s a company that wants to do what you’re contributing to, then it all works out. To be honest, also contributing to open source is fun, you don’t need to be paid to do it. Working on closed source problems and applications is also really fun.
Danish: Yea definitely. So you’re one of the guys I was involved with building the Bundler Project. So can you just tell us a little bit about that and you know, what are the benefits of Bundler. I know a lot of people ask me, especially what’s the difference between using Bundler and the RVM, I believe its the gem stuff in RVM.
Carl: So, Bundler is a great example of getting paid to do something that nobody else wants to do for free. Who in their spare time is like, “I’m going to build a package management solution”?
Danish: That’s true.
Carl: But it was something that was needed. Alright, I’m sure by now people are starting to forget what it was like before then but managing dependencies back before Bundler was a pretty big nightmare. This was also before RVM which helped in a different way. Actually RVM and Bundler just complement each other pretty well but I’ll get to that. Well some of the benefits of using Bundler is simply that, for the most part you just don’t have to think about dependencies anymore. It just works like magic almost. You have a manifest file that you include with your application that has a list of all your dependencies. Like you can say, “I need this gem and this gem and that gem” and can cherry pick what you need. And then it looks at all the dependencies of the gems you asked for and pulls those in and keeps pulling in til it has everything you need and it looks at the entire thing and figures it all out at once which is something we discovered after we started and the complete problem BUT there are ways to work around that. Which we obviously have something that somewhat works. It embraces you in its warm, warm, warm embrace and hides you from the scary world of dependencies. So....then you asked, how does that work with RVM. So RVM is a project that manages multiple versions of Ruby on your system. It does more than that. It has a feature called gemsets which is--you can create separate profiles of gems. Its similar to Bundler in the sense that you can isolate the gems you want to use at a single time. It differs in the sense that RVM is, for the most part, system wide. Like, its kinda like, “I just want to kind of switch profiles while I’m hacking” or do something different. The whole point of Bundler is, like--you make a Bundle around a certain application and you share that Bundle--the Gemfile and Gemfile.lock with other people that use that application. I guess the key difference is that RVM is mostly just system, global, I just want to change my profile on my single system and Bundler is for working, well you can use it on your own but it helps you when you deploy and working with other developers.
Carl: I couldn’t imagine not using it anymore.
Danish: Ok, interesting. So, I know crazy Dr. Nic likes to ask this about everything cuz he’s just the random Windows lover, but does Bundler work on Windows?
Carl: No. For the most part, it works. There were some errors made specifically with Windows, with handling Windows, specific things that if anybody is willing to put the resource and the time to understand the problem and fix it, it’ll get fixed. But personally, like, right now I’m at the point where I’m building applications and I’m going to contribute to open source where I need it.
Danish: Yea, definitely.
Carl: And I don’t use Windows. Maybe Engine Yard can sponsor somebody to solve the Bundler/Windows issues. I’m sure one of the Bundler dads, like Terrance, Andre, Yehuda or I would help with that.
Danish: Alright, well, Dr. Nic there ya go. So you were talking today at the SF Ruby Meetup and you said that for the last 3 months you actually switched to JRuby. You explained to us why but if you can explain to the listeners why you decided to make that decision.
Carl: So.....again, for the past year and a half I was mostly just focusing on Rails so I didnt have the luxury to just pick one Ruby or another. Now that I work on just a Rails app I guess, it’s pretty, like--its got its own like specifics and things I do outside of Rails but its mostly a Rails app. I have just the luxury of just choosing the Ruby I want to use. So I came into the problem, I know MRI that’s what I’ve been using, you know, it should be fine. Its--MRI, it works fine for what most people use Rails for. But they’re going to be edge cases where you have concurrency, like a concurrent request--for example, the exampe I gave in the talk today was specifically, I need to upload a 100+ files to S3 before the Rails request ends. I had a very specific need for that. So, I was in a situation where I had to deal with a high level concurrency sending requests out to S3. And then those requests were just blocked for a while and then I had a need for being able to handle a lot of requests that just sat around idle for a while. I had basically JRuby’s perfect sweet spot. The more I use it the more i kind of--well, for server work, if you’re using Ruby on the server, there’s really--I’m sure people will argue with me and I’m sure I’m not necessarily right but I think, for doing Ruby on the server, JRuby is the best option. For a large number of reasons: Java threads, running of JVM....lots of reasons.
Danish: Ok, so I know you talked about a few of the projects you’ve been working on with JRuby, so I wonder if you could tell us a few of those as well as maybe ones other people have done that have interested you.
Carl: So I’m new to the JRuby and Java world cuz like I just started looking at it recently, but when I first got into it. It was like oh, you should try--like run your Rails app with Trinidad which is a Ruby wrapper around the Apache TomCats Java Server. And you know that worked great for the longest--for the most part. At a certain point, again this is like pretty much my first exposure to using JRuby and Java that at a certain point i needed to go tweak something that happened failry deep down in the internals. Like how JRuby rack handled the requests stream from the Java Server, I needed to tweak something. So, I go in there and see like a bazillion lines of Java, it was like way more than I expected. So I kinda looked into it and was like, “I don’t know what’s going on here” and then I found a Jetty.rb project which is again, a Ruby wrapper but for Jetty this time but it was entirely written in Ruby because JRuby actually has a pretty amazing Java to Ruby bridge. So that was kinda how I got exposed to using Jetty, it was Jetty.rb and again that needed customization but it was all Ruby so I could do it so now I’m starting to get familiar with it. I just started working in a project that I’m calling kirk which is again a Ruby wrapper for Jetty but also supports zero down time deploys. similar to something like Unicorn or Passenger. I’m sure there are a lot of really nice JRuby and Java projects out there that I have yet to discover, but I’m new to it.
Danish: Ok, cool. So recently I decided to move to MacVim myself and everybody at Engine Yard told me to go find this MacVim distro called Janus that you and Yehuda created so I’m curious, are you still using Vim or have you switched in the battle between Vim and Emacs?
Carl: So I still am using Vim. So actually, I will say, Janus started with me-- like, “I’m gonna try out Vim” and I put out a project with--these are my like .Vim files and these are like--basically it started where I built a Rake file that fetched the Vim extensions from GitHub and installed it. So all I could do is clone it, run Rake, and got the latest. I could run Rake and I could update it and it was like very minimal. Then, I got Yehuda into Vim and then he was like, “I’m gonna turn this Vim project into an amazing Vim starter kit” and I was like, “Alright” I will admit that it was a great project, I just did not contribute that much to it. But I still use it and I still update it and it works great. Anyway, this question has been asked because recently I started looking at Emacs, I just started. Now that I’m on the JVM, let’s look at what other JVM languages are there, ah Closures, maybe--I just want to experiment with Closures. So I talked to a few people who use it and they said--well these people are Vim users--but they use Emacs when they worth with Closure because, well Emacs is really....ok I can’t talk Emacs but its--you use Lisp, its built for Lisp. Closure is Lisp so it makes sense that its optimized for working with Lisp. So its like well, maybe I’ll take this, I’ll start--and I just started doing this. Maybe I should try to use Emacs for bit and see how it sticks and see maybe, maybe in the end I’ll like Emacs better than Vim. I kinda just picked Vim and ran BUT now that I’m familiar with Vim, I won’t lie, its hard. I don’t know if I’ll be able to stick with it.
Danish: So we’re not gonna see any Janus version of Emacs coming out anytime soon?
Carl: No...but there is a project that’s technomancy GitHub page. It’s Emacs starter kit that’s what I started with and it works pretty well. Although I can’t do anything with Emacs yet.
Danish: Yea...I mean I never liked key bindings--I like keeping my hands in one little section and using the J, K, L and all that.
Carl: I know, I can’t get away from that.
Danish: It’s so much better. I really hate doing Control-Alt, I need to do C, K....why.....I know people are gonna hate me for saying that.
Carl: Let’s stay politically correct here.
Danish: Alright, so the last question I have is....so today you were saying during the Meetup that the talk was going to be about everything you hate. That’s the jist of where the question is coming from. So I was told to ask you why you’re so emo.
Carl: I don’t know. It the source of all my power. There you go--you know, its like, don’t be happy with the status quo, there we go. Always--nothing’s ever perfect.
Danish: Do you feel like that’s what drives you to do all these projects on your own and everything?
Carl: Definitely I think. There’s always going to be something that bugs me that I’m driven to fix. BUT at the same time, working at a start up, I actually got to move past that too. It’s like....there’s always going to be things that bug you but its knowing when its something that you should do something about or something you should just complain about then forget,
Danish: Have someone else try to fix it for you.
Carl: There ya go