Archive for the 'Development' Category

What’s New In Rails 2.1 - A Great Reference

Monday, June 23rd, 2008

I found this today - kudos to Carlos Brando for putting together an awesome reference! It’s a summary of all the new features rolled into Ruby on Rails 2.1.

Ruby on Rails 2.1 - What’s New

Bad Design: Catch All Exceptions

Saturday, April 19th, 2008

I might be getting a little geeky on everyone here, but I have to share something very important to programmers. I recently noticed this in a recent Rails project I was working on (method names changed to protect the guilty)

def do_something_really_important
  #lots of complicated implementation

  rescue ApplicationError
end

Why is this some of the worst code I’ve ever seen? If something unintended goes wrong the developers would be none the wiser. Nor the potential user for that matter. If this is a crucial method this really could have disastrous effects.

Defensive design is great when it comes to exception handling, but make sure you are handle for specific exceptions intentionally. Also if you’re catching an exception, actually do something! Email an admin, log the error - create some way for the developers to get insight on what is happening. In other words, if you’re expecting a “File Not Found Error”, do this instead:

def do_something_really_important
  #lots of complicated implementation

  rescue FileNotFoundError
    #actually do something useful
end

It’s not rocket science - it is good design. Good design is what separates architects from hackers.

Are You Busy or Productive? On the Subject of Sustainable Pace

Saturday, April 12th, 2008

Kyle del.icio.us’ed me this article and I really dug it. Work has been really crazy lately - we’ve been ramping up development efforts so both coding and project management needs have increased.

Have you ever asked yourself the question: “Am I busy or productive?”. I’ve been asking myself that lately. Sometimes, less is definitely more. In the Agile Software world, there’s this whole idea of sustainable pace.

How productive are you as a developer after 60 hour workweeks and a lack of sleep? Every good developer should know when quitting is actually more productive than staying busy. If you’re burning the midnight oil and making frequent mistakes give these ideas some thought:

  • Am I introducing flawed code that is going to haunt me later?
  • If I’m observing many mistakes that I’m making, is it possible there’s many more I’m not realizing?
  • Am I really contributing to burndown/velocity effectively?

Know when to quit! Your team members and your supervisors will thank you.

PeepCode: The Best $150 a Rails Developer Can Spend

Saturday, April 12th, 2008

Most Rails developers know of PeepCode but I know only a few that have actually purchased a screencast from them. I’m really happy that they’ve reintroduced their year subscription. There’s no excuse now - go and buy this! After watching two or three I can say it’s already paid for itself.

Interestingly, I’m enjoying the pdf’s just as much as the screencasts. Keep it up PeepCode!

If you’re a cheapskate, start out over at RailsCasts - but if you like them, help Ryan out and buy some PeepCode material.

Find an alternative to Ruby-Amazon

Sunday, October 28th, 2007

If you’re wondering what’s up with Ruby-Amazon, it is actually based on Amazon Web Service’s 3.1 version. I was playing with it earlier this week and realized there was a ton of missing data. So I’ve migrated some of my apps to Amazon-ECS as a result. I have to say I’m pretty impressed with the library as it allows you to flexibly integrate with new versions of Amazon’s platform. There was some effort in integrating a different library but if you’re familiar with Hpricot it should be a snap. I’m not sure why Herryanto built it with Hpricot, as I’m a REXML fan myself.

I totally dig Amazon’s platform though. It really allows affiliates to add value to Amazon’s site.