Scaling and Tools Diversity: Google vs. Facebook

Steve Yegge in one of his posts talks about Google’s policy of standardizing on the use of only a few programming languages. He mentions how he, as a guy interested in different languages, was at first annoyed by that fact, but later came to realize it was the only sensible way of building systems as scalable as theirs have to be.

In what seems to contradict that view, in Facebook’s recent discussion of the decisions they had to make when designing Facebook Chat, they mention choosing Erlang because, well, it was made to do distributed, realtime systems with… message passing. Can’t get a better fit for a Chat project than that.

To make that code interface with their existing codebase, they used Thrift, their free software “framework for scalable cross-language services development”, whose white paper begins with the strong remark:

“In our implementation of these services [Facebook], various programming lan-
guages have been selected to optimize for the right combination of performance, ease and speed of development, availability of existing libraries, etc. By and large, Facebook’s engineering culture has tended towards choosing the best tools and implementations available over standardizing on any one programming language and begrudgingly accepting its inherent limitations.

Now, of course Google and Facebook have very different needs (crawling, storing, rating and indexing the whole web on a regular basis must be a bit more challenging than showing user profiles — even if it’s showing many of them, many many times a day), and playing safe has surely worked out well for Google so far. But sometimes that requires reimplementing Ruby on Rails in Javascript just to suite a company requirement.

It’s good to see there is a place in the monster-traffic world for programming language enthusiasts :)

Making Vlad copy database.yml to shared folder

Found this at http://topfunky.net/svn/shovel/merb/vlad_config.rb

Also good example of how to make vlad tasks.

# config/deploy.rb
# ... 
set :config_files, ['database.yml']

 namespace :vlad do

   desc "Copy config files from shared/config to release dir"
   remote_task :copy_config_files, :roles => :app do
     config_files.each do |filename|
       run "cp #{shared_path}/config/#{filename} #{release_path}/config/#{filename}"
     end
   end

   desc "Deploys"
   remote_task :deploy do
   end

   task :deploy => [:setup, :update, :copy_config_files, :migrate, :start]

 end
end

As you can see, I couldn’t find a way to make :copy_config_files be called after :update by just using

namespace :vlad
  task :update do
    Rake::Task[:copy_config_files].invoke
  end
end

so I ended up just creating an all-encompassing task, and that takes care of my needs at least for now. If you have any ideas on how to make this better, plesae pitch in.

Global or local?

Lately I’ve been thinking ’bout wether I should write in Portuguese or in English. I mean, my “tech contacts” right now are all either abroad (with English as the only common language) or right in my backyard.

The latter group I go to college with and we talk and I tell them about stuff over a beer anytime. So there’s no need to write in Portuguese for them.

The few people I talk to ever since I’ve started out on this “let’s start coding for real” thing are the ones who in fact need me to write in English and since they’re the only audience this blog has I’m set, right? Just gotta write in English.

But then I ask myself if I shouldn’t start, along with trying to be more prolific in coding, also start being more verbose about code and about community issues and stuff, as a way to motivate more people to do the same.

Caio recently told me that he is resurrecting his blog so that he “would have to post something every once in a while and that’d push him into actually doing something he could then write about.”

And I think that does not only serve to motivate himself but to motivate others as well. At least for me, watching people do cool stuff makes me wanna do cool stuff. And the more contact I get with what people are doing the better. That’s why I want so much the idea of our little geek talks adventure to go on and on and to frutify into bunches of little free software hackers.

But that brings me back to the initial point. The hacker scene here in Brazil is still small and we need to get more people to “code for real” and build the kind of critical mass to establish a hacker ecosystem with high throughput and cooperation and exchange. I can’t even call myself part of that “scene” yet, but that’s where I wanna be and, when I’m there, I wanna see more people by my side.

I feel a bit disconnected with the people in here since I read mostly about what’s going on out there (which is where the heat is, unfortunately) , but I’ve watched the efforts of at least one guy who’s trying to motivate people in Brazil into building a tight community of hackers — more specifically, in the context of Ruby and Rails. He writes in Portuguese to be accessible, and interviews important people from out there and publishes the interviews in Portuguese and all. I feel like I have to take a part in that too.

What do you think?

Pushed into design?

Here I was, cruising through Agile Web Development with Rails in the hope of finally wetting my toes in the web coding sea, thankful that it looked more and more like i’d have to do little to no design (html/css always freaked me out) when, suddenly, I bump into this essay from Getting Real saying I should design the interface first.

It even quotes some guy saying how awesome it was that when he was to build his web app he got all the html/css done first and how much that helped him.

I think I really don’t have this gift of making things pretty. I mean, I thought that I’d flip another page and find out that Rails beautifies things for me and all I have to do is enter the code. Can’t one just code and be left alone?

Alright, I can make paper sketches of things but, really, doing graphical design looks like somuchwork.

Posted in Uncategorized. Tags: , , . 1 Comment »

Scooped by Google

I’m trying to start this good habit of going around writing software for no particular reason but for learning and personal pleasure. Not too easy though, given how lazy I am. I usually enjoy writing software but only do it on demand. Either course assignments or work. Since none of these deal with Ruby or Rails (yet), and I’m trying to get my hands dirty on those, I have to leave the couch.

The thing then, as people always say, is to find something that bothers you, something you want for yourself. A personal itch.

I’m a heavy browser user. Lots of tabs all the time on lots of subjects. Some frequent breadth-first-search on Wikipedia articles. The problem is that I use browsers all over. Especially now that my computer is momentarily dead (found the culprit already, waiting for replacement part), I have no fixed internet place. So I start digging up some subject and, before I get to the later tabs (there’s an endless supply of them!), I have to go and leave them unread. And next time I log in, it’s on another computer, and I can’t restore those tabs until I get back to the original computer.

So I thought “hmm… I mustn’t be the only one. This might be a nice idea for a pet project, a little app to synchronize closed tabs between computers, perhaps even expand it into some web-service with social whatever just to practice. Perhaps (my imagination was flying here) even make it a killer product for some niche and make money with it.”

Well, I got scooped. The need is gone. The itch has been scratched. And my laziness once again gets indulged. But hey, there’s the Bayesian Networks for Ruby project! More about that in some later post.

Posted in Uncategorized. Tags: , , , , , , . 1 Comment »

Learning Ruby (poignantly)

Since I started reading about web applications, next generation web, Web 2.0 or whatever you want to call it, I’ve been itching to get my hands dirty, go on and do something myself.

(When I say “do something” I mean getting a hang of the technological aspects involved in its implementation because, although the rest of the concept – social software, writeable web and all – interests me greatly, I’m sure not up for starting something up right now)

Bad thing is, I have no talent for design and my coding skills stop at some basic-level college C. And as I haven’t really decided to become a full-blown web developer all of a sudden, I think diving into HTML, CSS, Javascript, XML and all that would be a little too much to learn just to start playing around.

Then Ruby came to mind.

From what I’ve heard, Ruby is at once a great language for system administration – like Perl – and has that nifty Ruby on Rails framework for developing web software. And since I’m a loving Linux user and might get a kick out of getting a bit more into the server admin business, writing scripts and all, I thought I might get a good start at both (server admin and web dev) by learning Ruby.

That’s when I found this great, wacky and surprisingly fun tutorial: Why’s (Poignant) Guide to Ruby.

Ok, if you already know the basics of any other programming languages some things might feel a bit patronizing. And if you’re in a rush to learn it all very quick you’ll find it a bit dragging and miss the fun. But it’s sure a very entertaining read, it’s free (as in beer and speech), and besides giving you a good laugh (with cartoon foxes), it also actually teaches you the language.