Ruby on Rails Podcast

Christian Neukirchen

Monday, September 24, 2007

Christian Neukirchen, Ruby veteran and inventor of the tumblelog.

Interviewed by Geoffrey Grosenbach

Transcript

Friday, October 12, 2007

Geoffrey Grosenbach: Geoffrey Grosenbach at RailsConf Europe 2007 speaking with the legendary Christian Neukirchen, visionary, Ruby veteran. Now, I was talking to you last night and you said you haven’t even used Rails much recently and yet you’re here at RailsConf. Why?

Christian: Yeah, I’ve been using Rails a long time ago when it was first released. But I didn’t really have to do the kind of applications Rails is good for, which is like data entry and just crap stuff. I had very special web needs, so I couldn’t use Rails and I didn’t consider it very interesting at the beginning, but it’s gained a lot of momentum in the meantime. So lately, I’ve been to school and had some small RestrOps doing so I had to really learn the framework this time and get some stuff done.

Geoffrey: It’s a great opportunity just to meet and talk with people, and socialize.

Christian: Yeah.

Geoffrey: Staying on the web side of things, recently you’ve been working on Rack, and I have to admit, I know about Rack…

Christian: OK.

Geoffrey:... people are excited about it, but I don’t even know what it is.

Christian: Well, Rack is actually a very simple thing, it’s a kind of specification on how you can wrap up web applications in Ruby, because if everyone was using Rails there would be no problem, like you just download the Rails application and run it, but people want to use other frameworks as well. They have Camping applications, and they have old CGI scripts, and there is no… there’s a limitation of what web servers you can use.

For example, with Camping – actually Camping supports all of these – but every new web framework you would like to write needs to support all these web servers from FastCGI support to Mongrel or WEBrick, and so I’ve decided to make a unified API which is very simple. It has actually everything down to one method call.

So the essential Rack specification is that you have an object with this application in some state, and you call the method call on it, and pass the CGI environment, which is like the request environment in Rails, and then it returns an array which contains the HTTP status, the set of headers for the reply and the actual body.

And you can wrap up everything with this and actually the nice thing is that it is totally decoupled from the web. There is no sockets going on, nothing like that, and the really nice thing is that you can write applications which take other applications as arguments and pass on, or do some style of routing at this level already.

Or, for example, yesterday we heard on the Twitter talk about benchmarking Rails, and he used a filter to add the timings to the HTML document. So you would just write a new Rack application which takes the actual application as the parameter, then calls it itself with the arguments passing on, and benchmarks that, and then modifies the result, and adds this additional information.

Geoffrey: So Rack could, even simultaneously, run many of these different kinds of applications.

Christian: Yeah, it’s actually doing that.

Geoffrey: Similar interface.

Christian: And it’s very lightweight, so we have like 8,000 requests per second for a very simple Rack application, which is just HelloWorld. And every Ruby lambda can be in Rack application, that’s what I choose to call method. The actual inspiration for this is from Python.

Geoffrey: Do you have, I was going to ask, WSGI or the other… is that similar?

Christian: Yeah, exactly, they have WSGI, and I looked at the specification and simplified it a bit even more and made it more Rubyish. So essentially it’s WSGI for Python. And it’s very popular among Python circles and almost every real Python framework or Python application has WSGI support.

Geoffrey: Now, I have to think that could make it a little bit easier to test applications as well, if they have a standard interface.

Christian: Yeah, it is, it really is. To test Rack itself, I wrote a Rack mock-up requester, so you can actually test your applications without going through httpd sockets and just call the message, which is a large speed-up.

Geoffrey: Recently, or not recently, a while ago, I think, Mike Clark or Chad Fowler or someone said: “Hey, blog about all the gems you use, ” and you said: “I don’t use any.”

Christian: Yeah, that’s true. On my main development box I don’t use gems. I actually have the gems source downloaded and ready for reading and I actually needed to make the gems itself, but I don’t use gems for package management. Yeah, well, that’s kind of a long story.

Geoffrey: OK.

Christian: I used to be a proponent of the almost forgotten RPA. Do you know it?

Geoffrey: Was that for Ruby?

Christian: Yeah, it was for Ruby production.

Geoffrey: Sort of like RPMs, but…

Christian: Yeah, it was like Debian for Ruby, so we had like an advanced packaging system for Ruby with quality control and lots of advanced stuff, but it never really got as popular as we wished, and in the end it died because of lack of manpower. There was essentially one guy behind it, that was Mauricio Fernandez. Yeah, “The Batman”, yeah.

Geoffrey: So are there major features that you feel are missing in RubyGems, or is it just the whole design that doesn’t work…

Christian: Yeah.

Geoffrey:... with the way you want to write applications.

Christian: I notice slow down when you have lots of gams and want to require some files. So, I don’t like. There are kind of issues which have been outstanding for a long time. For example, there is no support to have configuration files or there is no storage so you can’t make them and install them, etc. Correct me if I’m wrong. Send email, but that’s the latest stage. So, yeah.

Geoffrey: Well, good. I won’t be surprised if in a few months we see a Ruby…

Christian: No.

Geoffrey:... Gem alternative…

Christian: Actually…

Geoffrey:... from Christian Newkirken or…

Christian: No.

Geoffrey:... or maybe not.

Christian: No, you’re not going to see that from me.

Geoffrey: No packaging. OK. Well, we can’t get too far without asking you about the TumbleLog.

Christian: OK.

Geoffrey: You invented it.

Christian: I invented the TumbleLog.

Geoffrey: Other people took it up.

Christian: Yeah.

Geoffrey: Now, there are even entire sites…

Christian: Yeah.

Geoffrey:... dedicated to helping people start their own Tumble Logs.

Christian: I know of at least two sites that allow you to use Tumble Logs, which is Tumbler and there is a new one which is called Soap I Owe. So, Tumble Logging has reached the masses by now.

Geoffrey: When you started Tumble Logging, you didn’t even come up with the name, right? Or somebody else came up with the name?

Christian: No, I didn’t come up with the name.

Geoffrey: Did you just think, hey, here’s how I would like to blog, there’s no software doing it or did you think this would be useful to other people?

Christian: No. No. Software’s never been a problem for me because I wrote my blogs and CMS myself as well.

Geoffrey: [laughs]

Christian: Yeah. I noticed I find lots of interesting stuff surfing the web that I had no idea where to put it to because you tell it on the ISC channels and you know other people which want to stay on topic and so I decided just to make a site and put everything I find on there and that’s essentially the beginning of the Tumble Log movement.

Geoffrey: Now, I have to admit, it’s hard for me to read a lot of Tumble Logs because…

Christian: Yes. I admit it too.

Geoffrey:... there’s so many posts. The quality varies. Do you have any advice for aspiring Tumble Log authors?

Christian: Yeah. The most important thing is to make it a daily routine, because if you have a very low-traffic Tumble Log, it probably could work. But if you have two links a day, it’s kind of boring for the readership. Most Tumble Logs don’t last longer than a few weeks in my experience.

Geoffrey: But yours has been going on for a couple of years?

Christian: Mine has been going on for two, one and a half year, I think. No…two and a half years. Yeah. It’s the end of March that I started it.

Geoffrey: Well, right over here is Aslak Hellesoy and I just talked to David Chelimsky, but we’ll try to protect you during this next question which is Test::Spec. You came up with a behavior-type framework for Test::Unit.

Christian: Yeah. Well, Test Spec is not actually that old. I’ve been at last year’s, a year ago, European Res Conf and there has been talk about testing Javascripts and someone came up with a BBD-like API for JavaScript and I really, really like that API, so when I was home, I decided to write it myself and I knew of AeroSpec but, at that time, it was kind of flakey or they changed lots of stuff there and it didn’t use Test Unit and I had a lot of Test Unit tests, so I decided to make it on top of Test Unit. And, so, I could use all the infrastructure from Test Unit.

Geoffrey: So, currently, there’s an actual file in rSpec you can just require it within a Test Unit test and you get all the matchers, and the “should this” and “should not.” Do you feel like that gives the same kind of functionality you were trying to achieve or is it so valuable for people to check out Tests Spec if they are using Test Unit.

Christian: Well, Test::Spec has some kind of nice features, like you have Test Unit Runner which can emit like rSpec outputs which is SpecDoc. It’s a Java-ish name for it. And there’s Extended Runner for, well, most test spec improvement work for plain test unit as well. So, you could even use Test Unit and you should in there, so there is no problem, and you can mix and match everything.

Geoffrey: Well, finally. You live in Germany.

Christian: Yeah. I’m living in the south of Germany.

Geoffrey: The south of Germany. What’s your impression of the German Ruby community?

Christian: Yeah.

Geoffrey: Is it growing? Is Rails making an impact?

Christian: There are lots of Germans using Ruby now. We’re having a European Ruby Conference which is EuroCo which…

Geoffrey: Coming up in November.

Christian: Yeah. It’s on the 10th and 11th of November this year. But it’s in Vienna. The last three times it’s been in Germany. No, the last four times. And I’ve been there twice. It’s constantly growing. If not at a very big rate, but that’s maybe because it’s pretty underground. Yeah, but there are lots of Ruby people and there are lots of Rails people now. So, there are some quite popular sites, German sites, done in Rails, so, it’s definitely growing.

Geoffrey: Well, thank you.

Christian: You’re welcome.

Sponsored by PeepCode Screencasts. There’s a new PDF called Rails Code Review and the three-part rSpec series is now done. Find it all at peepcode.com.

Supported by

Railsmachine