I'm a Floridian web engineer who planted his roots in Paris. Some of my favorite past-times are analyzing and optimizing development processes, building solid APIs, mentoring junior devs, and long walks on the beach.

Magic Ruby 2011 02-13-2011

The Talks

Nothing speaks to people like the word 'free'. It is a good reason to attend Barcamps. And while Magic Ruby is free, that is not the only reason I went (though it made it hard not to). I've been developing in Ruby for a little over a year and I'm still amazed at what a good community it has.

I enjoyed all of the talks, though the keynotes were definitely the highlights. Probably because they involved relatively little code detail, focusing on concepts and kept the momentum going. I think that one of the most difficult things to do is give a speech and have it involve a good deal of code but still not be too dry. Also, the talk length was around an hour each, which means that the speakers have to maintain the audience's attention that entire time. Not a small task.

Lightning Talks

For anyone who hasn't given a lightning talk it is somewhat of a shocking experience(har) if you have to prerecord them. For Magic Ruby, they had you record your slides prior to giving the talk using Jink , then during the talk the slides change without your prompting. So if you time things wrong, you can potentially end up with ten or twenty seconds to kill before you can move on to the next topic. I just used that time to complement my audience.

I ended up giving a lightning talk on a tool I've been using more and more over the past year, Pivotal Tracker.

Git Hooks + Pivotal Trackers

In my development environment I had been taking advantage of their API. It lets you do just about anything you can do from their site, only from the command-line. Seriously, if you're not using it, stop what you're doing and make an account. End of plug. Ok, so I had been using a script in my git hooks that pulls in the current stories that I'm working on and prepends them to my commit message so that it is easy to associate a commit with the ticket that you're working on. In my personal time, I've been working on a gem that uses this idea. I hope to have it finished in time for the Orlando Barcamp.

Make Backspace Reverse Chrome History 02-03-2011

Where's the love?

Can Nodejs be Used to Make a Website? 01-11-2011

Derp. Yes. So this week I got the chance to play around with nodejs. I was using expressjs, sequelizejs and some other libraries all via npm. It was all very familiar feeling coming from a rails background. npm works pretty much like ruby's gem package manager.

Expressjs

Expressjs has a boat load of features that you would come to expect from any web framework. It comes with a templating system. Currently, it supports haml, ejs, jade, and jQuery templates. Personally, I'm a pretty big fan of haml and because of which jade also seems pretty nice. It deals with routing by associating a path to http request verbs. This is pretty standard if you've ever used something like sinatra. Here is an example:

  app.get('/', function(req, res){
    you gotta do some stuff here
  });

It also offers a pretty straight-forward way of configuring your application:

  app.configure('development', function(){
      // executed for 'development' only
  });

Sequelizejs

Sequelizejs is a nice orm library. I have a few minor complaints about it. For one, the query data is manipulated via a callback. So for instance, the following is not kosher:

people = Person.findAll({where: "name = 'Francis' or name = 'Jeff'"});
people[0].some_cool_method();

instead you would do the following:

Person.findAll({where: "name = 'Francis' or name = 'Jeff'"},function(people){ people[0].some_cool_method(); });

I suppose this is fine if your'e happy doing things this way but I for one, do not appreciate being forced to work within the constraints of a callback.

In the end, there's definately enough features to go around for anyone who would actually want to make an entire application in javascript. For anyone who wouldn't want to make an entire app in javascript, at least playing around with nodejs is a way to hone your skills in working with it. I've found that working with nodejs has done at least that.

Coming soon: Should nodejs be used to make a website?

Tags: nodejs

Rails 3 Routing: Use match in a Block 12-19-2010

I was trying to set up an easy route that would let me use the following url: "posts/tags/:tagname". As I was playing around I realized that you can use match inside of a block. More importantly you can also give it a path name so that it can be easily referred to. Here is what I did:


  resources :posts do
    collection do
      get 'display'
      match ":name", :to => "posts#tags", :as => 'by_tag_name'
    end
  end

This is nice because in my code I can now call:

=linkto name, bytagnameposts_path(:name => name)

Tags: routes Rails

Finding out if data has changed Rails uses changed? 12-14-2010

Unfortunately, tainted? doesn't seem to work for activerecord objects.

Tags: Rails