RailsConf Europe: Jacqui Maher, Pat Allan and Intridea
Developers from Intridea discuss hacking Rails internals, UI design, and mid-end development.
From RailsConf 2008 in Berlin.
Interviewed by Geoffrey Grosenbach
Geoffrey Grosenbach: It’s the Ruby on Rails Podcast. I’m Geoffrey Grosenbach. October 2008.
In Berlin at RailsConf, I met all kinds of people from all over the world, who had been all over the world, who were going all over the world, including Jacqui Maher and Pat Allan. I also sat down with the members of Intridea.
Over at PeepCode Screencasts I’ve recently published a new video on CouchDB, the document-oriented database that’s highly scalable, fault-tolerant, powered by Erlang, JSON, REST, and all your favorite acronyms. If you do any work with any database of any kind, you should check it out.
[new recording begins]
So here in Berlin with Jacqui Maher who has worked on an interesting Rails project in Malawi. Apparently it was presented here last year. Tell us about it.
Jacqui Maher: I worked with a group called Baobab Health and they’ve been using Rails for maybe a year and a half now. They presented at RailsConf last year in Berlin and my friend Josh, here, saw the presentation and knew it would be right up my alley because it’s public health-related. So I got in touch with them and gradually made plans to go down there and visit them.
Geoffrey: So it was because you saw them here at the conference that you decided to go. Did you volunteer, or you were contracting for a while, how did that work?
Jacqui: I volunteered, yeah. I combined it with a trip to climb Mt. Kilimanjaro. That was fun, yeah. [laughs]
Geoffrey: So what kind of things… It manages medical data, people with HIV? What are they doing with it?
Jacqui: They have a couple of applications. The main one is used by clinicians, nurses, doctors in the field at various clinics throughout Malawi. It’s used to record patient data, drug interaction, prescriptions, when they need a refill on certain things. All sorts of stuff.
Geoffrey: It sounds like they have some special challenges. Limited Internet access, trying to find information. That must be a rough situation.
Jacqui: They definitely have to think outside the box, to use a clich. Let’s see, what have they done? They built their own cell towers to make their own wireless network. They do Power over Ethernet onto a modified circuit board, I think. The whole setup kind of works like the Prius, if you know how that works. When they have power outages, they start getting power off the batteries they have, otherwise they’re charging the batteries. It’s pretty interesting.
Geoffrey: And is this mobile, or just for keeping the local clinic running that they need all that?
Jacqui: No, they have this kind of setup at every clinic. I think they’re at three or four clinics now and 165 doctors, all using their application on modified iOpeners that they put touchscreens on.
Geoffrey: Pretty high-tech and super creative to do all that within the limitations, but it sounds like it’s helping people out quite a bit.
Jacqui: It definitely is, and I know that all the people working with it really love it. They get instant feedback. They use Capistrano to deploy, and when they deploy, it’s right in the clinics. Provided the network’s up. [laughs] Otherwise they have to drive with the laptop.
Geoffrey: Good stuff. Do you think you’d go back there at all, or was it just a one-time thing you’d like to keep hearing news about from time to time?
Jacqui: I’m going to continue working with them. They’re hosted on GitHub so I can definitely work from anywhere and work with them, but I do want to go back. They’re really nice and Malawi’s a great place.
Jacqui: Sure, no problem.
[new recording begins]
Geoffrey: RailsConf Berlin. We’re talking here with Pat Allan who does happen to be writing a book for me on Sphinx, but the real reason I wanted to talk to him is to talk about something you mentioned at RejectConf. Namely, Rubyists getting out of their own world and trying to help people in the rest of the world. You’re doing that yourself in a couple of months, going to Cambodia. What kind of things do you suggest that people should do to help the world, improve the world with Ruby?
Pat Allan: There’s different levels you can approach this on. From a basic level there’s just open-sourcing your code. Letting other people learn from your knowledge, learn from your mistakes, just getting that stuff out there.
Geoffrey: Seems like people do have a very generous nature to begin with, wanting to give code out for people to use.
Taking that another step, you can look at the groups in your local community who might need a geek to help them set up a local network or get a basic website running or stuff like that.
At the far end of the scale is doing something like working overseas for a year in a developing nation, helping local NGOs out in places like Southeast Asia or Africa. Really helping them get their technical systems up to scratch or just teaching kids how to use a computer or stuff like that.
Geoffrey: Sometimes when I’ve volunteered in the past, two problems. One is I think I’m going to go help by designing some fascinating new data structure, UI, or something. And it turns out the things they need help with are connecting to a printer or pasting images together or something like that and it feels so basic. I want to be asked to do the extent of all that I can do.
The other thing is that people, now they become reliant on you. But it still seems like there’s a place. Have you experienced those things at all? How can one volunteer in a way that is what one can offer but not getting too involved—more than you want to be?
Pat: Well, I haven’t really had that problem. I haven’t done much of it myself just yet. I know in the US they’ve got the Peace Corps and Australia has Youth Ambassadors and other countries have their own things. They are fixed placements at specific organizations. You’re given a brief of what you are expected to do over that three-, six-, 12-month period. So you are walking into this kind of position in a different country with some expectation of, “you will be building a website,” or, “you will be maintaining school’s computers,” or teaching kids how to use Microsoft Word. It could be something that basic.
You generally won’t find the really big, complex stuff because these are places where Internet is really limited. They might have mobile phones, but we’re not talking iPhones, here. We’re talking your very basic Nokia with SMS and calls and that’s pretty much it. I know in Cambodia you’ve really got to pay a hell of a lot of money to get just 512 kilobits down on an ADSL line. And that’s definitely not unlimited like you get in the States. So the technical situation is extremely limited.
Geoffrey: If you don’t mind, tell us what you’re doing in Cambodia. You’re going to be there for a couple of months.
Pat: Yeah, I’m going to start off with two months there and then I’ve got to come back to Australia, but I might head back after that.
My current plan is to spend a few days doing paid work for international clients or whatever, my normal freelancing kind of thing. And then another few days a week I’m working for the local communities there. I’ve got a friend who works with one or two already so she’s lined up some work for me building websites or helping them with their computer stuff. The details are still a bit fuzzy at the moment, but there’s definitely several opportunities there and that will be pro bono work.
Geoffrey: Well, I’ll warn you to be careful. One time after I volunteered, by the end of the time I knew the ins and outs of a Windows 98 network. Never, ever wanted to learn that, but if you need any help, call me up, because I’m an expert.
Pat: That’s good to know. I’ll keep that in mind.
[new recording starts]
Geoffrey: Ruby on Rails podcast in Berlin. RailsConf 2008. Talking to some of the developers from Intridea: Michael Bleigh, Pradeep Elankumaran, and Chris Selmer.
So, Michael and Pradeep, you just had a tutorial this morning about hacking Rails internals. Was that pretty well-attended? How many people were there?
Pradeep Elankumaran: I think it was about 100-plus, 120 people. It was pretty well-attended.
Geoffrey: In the last couple of weeks it sounded like they were still selling tickets and the thing hadn’t sold out, but it seems like there were quite a few people in the different tutorials, so maybe it did end up selling out.
Pradeep: Yeah, it seems that way.
Geoffrey: It seems like it can be dangerous hacking the Rails internals. Especially as often as Rails changes for the developer who wants to stay on the stable versions. You must either think that’s a good idea, to try to hack the Rails internals, or found some way around it to make it more maintainable over the long-run.
Pradeep: That’s why it’s the Renegade’s Guide. [laughs] It’s good to know the internals at the very least so when the situation arises that you do need to hack it, you know how. Or the situation arises that you need something that Rails doesn’t allow you to develop quickly, then you know how to do it. You don’t have to worry about it.
Geoffrey: What kind of things did you tell people about or what kind of things have you done that you think are useful as far as knowing the internals?
Pradeep: We actually went through how to load app slice plugins. Plugins that are actually complete Rails apps in themselves. We ran through that in the tutorial. Michael, you want to tell them about SubdomainFu?
Michael Bleigh: Yeah. I just ran through a couple of the plugins that I had written where they, at least on the surface, dealt with Rails internals. I walked through the basics of how I wrote SubdomainFu. I also walked through the basics of how I wrote UberKit, which is a UI helper toolkit. Pradeep has by far the more expansive experience with the internals.
Geoffrey: It seems like using subdomains is something that a lot of people want to do. Initially people think, “OK, I’m going to create a new database for every user, and I’m going to create a new Apache instance,” or something. But no, with Rails you have the ability to just wildcard the DNS and then you try to pull that apart. Is that what SubdomainFu does, try to help that process?
Michael: Yeah. SubdomainFu is just a plugin. The entire idea is that there were various solutions. There was DHH’s Account Location from quite a while back and there were a few other things. I just tried to take my idea of what a best practice would be for a simple way to handle subdomains in Rails apps and extracted it out into a plugin.
Geoffrey: Do you think for hacking Rails internals that it’s something that everybody should do, or is it just for rare situations and maybe stay on the publicly-documented APIs, otherwise…
Pradeep: I would say stay on the stable side, but you have to keep your skills sharp and you have to know the tools that you’re using. So I think it’s good to learn it if you can.
Geoffrey: Since both of you have looked through most of the source code of Rails, I would ask: what do you think is left for Rails?
I almost get the impression that it’s stable, it’s got all the features that we need. The big changes seem to be just moving with newer tools, like being able to install plugins from git repositories. Not really a new feature, just accommodating other software out there. And other than that, it seems like Rails does what it needs to, why does it even need to have a major release for a while?
Pradeep: It does do what it needs to, but it can definitely use a nice coat of polish on the internals. ActionView can be reimplemented. I think somebody from Fusion is actually working on that. The plugin loader can also be extended a bit. Merb, for example, supports app slice plugins, which is a lot more DRY than rewriting the same code over and over for each one of your apps. So, for example, some blog’s code, you can pull that out and share it amongst five different apps instead of rewriting it over and over.
Geoffrey: We almost had Components at the very beginning, right? Is that just trying to reimplement Components, or is it a different idea?
Pradeep: It’s sort of like that. It’s more like having your own migrations and your own separate comp, I guess. We’re not using the Components framework, but it’s essentially monkey-patching the plugins to add more support for controllers and views and migrations and such.
Geoffrey: Completely off-topic, but I do like the way the Django framework is kind of built that way from the beginning. You basically start a project and then you build little apps inside of that. There is no default application, it’s just a bundle of different, separate applications. Do you think that’s almost a better way to go, or is Rails? Is it good that we have a default app folder?
Pradeep: Well, it’s good that we have a default app folder. App slice plugins are something that you don’t necessarily need to be a standard feature. It’s something for the power users. Rails is a convenient framework. If you want power, you can modify it to be as powerful as you want. If not, then you can just stick with the defaults.
Geoffrey: Sitting over here as well is Chris Selmer. You’ve done a lot of more front-end stuff. You’re going to talk soon about unobtrusive scripting and advanced UI topics. I read an article on the Intridea blog about Colorist, a new gem that you’re putting together for adding, subtracting, working with color information. Did you start as a designer or start as a developer, and how’d you end up connecting the two?
Chris Selmer: Well I started as a developer. Michael actually has been involved with most of our front end type development lately. I’ve been moving from the developer side to more of the client relations, project management type piece.
Geoffrey: So in the whole multi talented jack-of-all-trades. [laughter]
Chris: Yeah, I guess so.
Geoffrey: Now I do have one beef as I looking up some of these things. Crowd sound – did you guys copy Lighthouse or did Lighthouse copy you? That’s like the exact same shades of blue. [laughter]
Michael: I would actually be responsible for that, and blue is not copyrighted. [laughter]
Yeah, blue is not copyrighted. I mean, you know, definitely that was coming out around the same time as Lighthouse too. I’m guessing there was subconscious influence to some degree, but it wasn’t explicit. [laughs]
Chris: Well so there is a layer kind of between the back-end and the front-end that involves both back-end programming and then integrating it with the front-end. So, you are doing stuff like block accepting helpers to really separate out the back-end development and the front-end. So the front end guys can go in and make the changes to the wrappers. And then developers can go in and use whatever they need to put in the inside there.
Geoffrey: It seems like there is a real challenge to keep things separate enough that individual people can work on it and stay in the areas in which they are confident, and yet still trying to consolidate the functionality together. Seems like some plugs like the UJS for Rails unobtrusive plug in tried to do that, where you can just use the regular Rails Ajax helpers, but then it would actually spilt that out into different files for you. But then it seemed like it was too much going on behind the scenes. People didn’t really like it.
What’s the balance between giving people extra power that Rails can do, and even things like adding colors together in your style sheets, but then still allowing people to work separately on different things?
Chris: I think there’s definitely layers of abstraction that you kind of want to avoid whenever you extract stuff too far out from the end people who are going to be using it. It really makes it difficult I think for them to understand what’s going on. Is that kind of what you are asking?
Chris: I’ll let Michael go.
Geoffrey: Well, talk briefly about Intridea. It sounds like you guys are doing quite a bit of different things. Hosting, scaling applications on EC2, providing some different applications of your own and then providing social networking applications that people can customize for their niche. Is that what intridea is – then everything, all of the above and plus some consulting.
Chris: Sure. We started out basically as a consulting company. And based on all of the applications we’ve built for our clients, we’ve extracted out several core products. We’ve seen common needs from all the different clients. Social networking, needing to do media trans-coding of some sort, difficulty scaling websites and need for user feedback on websites in kind of a interactive way.
We are still doing consulting. That’s probably half of our business and then half of it is with our product development side.
Geoffrey: I still like EC2, but the full reliance on it – we’ve seen S3 go down a couple of times in the last year. I use S3, but I also have other backups as far as ways to serve content if I need to. It seems like pretty soon the whole Internet just to be hosted on Amazon and Google AppKit or Web Kit or whatever it is. Seems like that’s putting all of one’s eggs in a single basket. Why do you guys feel like that’s still a good way to go for scaling as opposed to maybe having more personal control over the actual machines running it?
Chris: Sure. Well our scalar product, actually, we are rewriting it to allow you to use any number of cloud computing platforms.
Geoffrey: Simultaneously, or you just choice one and go for it?
Chris: I believe that in the long term goal is to be able to say, “I want my storage on this platform, and I want my actual servers to be here. But the next version is just going to allow you to pick one – one of several different options. So you could choice Amazon. You could choose, I think, Joyent, and several other different options.
Geoffrey: Well thanks for taking a few minutes to talk about that. A lot of different things happening at this conference. Seems like a different crowd. I don’t see a lot of the people or at least the people I am used to seeing from last year, and yet, every year new startups coming up, and developers and developing interesting projects.