Category Archiveruby



Questions & TechBiz & WebApps & php & ruby 09 Apr 2009 05:11 pm

My Favorite Coder Interview Question

What is your favorite algorithm?

My favorite algorithm right now is the merge sort.

v1: Nuno Nogueira (Nmnogueira), v2: edited by Daniel Miller (cobaltBlue)

v1: Nuno Nogueira (Nmnogueira), v2: edited by Daniel Miller (cobaltBlue)

I like it so much that I’ve implemented it in PHP and Ruby.

The problem is that as a web developer I’ve never had to use a merge sort. Back in the old days when pagination was tricky, I’ve had to use a linked list, but you really don’t have to use the merge sort anymore.

So at this point it’s really just academic.

What interview question should really count now?

More on that in my next post. As a clue, I’d like to say it has to do with Leibniz’s statement, “The present is big with the future.” A techie who believes that and the principle of sufficient reason is the kind of techie you want.

How-To & WebApps & command-line & ruby 30 Oct 2008 09:30 am

A Quick Guide to Noobwatcher

curl -O http://svn.collab.net/repos/svn/trunk/tools/client-side/showchange.pl
mv showchange.pl $HOME/bin
svn co http://codebelay.com/noobwatcher
mkdir watched_repositories
cd watches_repositories
cp $HOME/noobwatcher/trunk/noobwatcher.rb .
svn co

Create and edit a settings.yml file. Mine looksl like this:

path: /Users/barce/nooblive/trunk
repo: http://www.example.com/the_repo_I_am_watching
diffs: /Users/barce/nooblive/diffs
twitter_email: the_twitter_email_that_notifies_you@example.com
twitter_password: the_password_to_the_twitter_email_that_notifies_you
twitter_recipient: your_twitter_account
sleepseconds: 60

Start noobwatcher:

./noobwatcher.rb

ruby 26 Sep 2008 11:21 am

Part II of NoobWatcher: Automatically Reporting Server File Changes

With Noobwatcher, I’m now able to be really on top of subversion commits. But now it’s time to start working on part II, the part that keeps track of my server configuration and makes sure that it’s correct for all the servers that I want to use.

I’m taking a look at Tripwire. Are there any libraries that you use for automatically checking if files have changed?

Social Media & TechBiz & ruby 15 Sep 2008 10:45 am

Yahoo’s BOSS API Example and Notes on Yahoo’s Hackday

For Yahoo’s hackday, I was able to finish up this script in Ruby that returns back search results from yelp and chowhound from Yahoo’s BOSS API. The great thing about it is that you can hit the API an unlimited number of times!

Here are a few notes that should help anybody the next time they attend a hackday – Yahoo’s or anyone else’s:

  • The night before install libraries you think you won’t need. I really wish that I had prawnto installed. I got mired in prawnto idiosyncracies, and was out of the race pretty quick.
  • Good coders are fast. According to Eran Lahav-Hammer, one of the authors of OAuth, good coders can code an OAuth implementation in the language of their choice in less than one day. Are you a good coder?
  • Have fun! It’s a pretty rare opportunity to have so many folks in the industry in one spot.