RailsConf 2006

I attended RailsConf in Chicago about 10 days ago. It was a great way to find out what was happening in arguably the most vibrant part of the web development community. I met a lot of people over those three days and would always ask them: “So, are you doing rails by day, by night, or both?”. Most of the answers were “by night”, with a few “just starting by day”, and one “both”. From my unstatistical sample, it seems like rails clearly had people’s mindshare but getting it into their “workshare” is a different story.

A quick search on google or technorati will turn up a lot of info on the conference. Here are some of my favorite moments (in no particular order):

  • Martin Fowler’s keynote: he spoke for over an hour about ruby, rails, frameworks & their (dis)advantages, etc. All pretty much ad lib. I have a number of his books and it was great hearing him speak live. Very interesting.
  • Why the lucky stiff’s concert / monologue / animations extraordinaire. A glance at his site will tell you that all is not as it should be in Why’s brain, which made his concert that much more fun.
  • Mike Clark’s intro to Capistrano. This is the utility I really want to play with.
  • Justin Gehtland’s overview of Ajax and RJS with Rails, and esp. the sneak peak at the new version of scaffolding he and his colleagues are working on called Streamlined.
  • One of the pleasures of attending a conference is discovering great new speakers. Out of the railsconf crew, my pick goes to Matt Biddulph. Matt’s presentation was not only engaging, enlightening, and full of cool annecdotes but also focused on a BBC-related project. Having grown up in London, the beeb is still near and dear to my heart. I’ve found lots of interesting topics on Matt’s blog, such as this great example of putting the Wikipedia and Yahoo APIs to use. Cheers Matt!
  • DHH’s keynote started off with me thinking “CRUD? Why is he talking to us about CRUD?” and ended with the thoughts “Wow! This is a cool way of looking at things, must try it out!”.
  • Last but not least, hooking up with a long lost friend and, as it turns out, rails and OSX fan Steve Chanin.

Next year’s conference is in Portland and will be co-organized by O’Reilly. They’re clearly pursuing rails as strong alpha (and dare I say beta?) geek territory. Lots of fun in store!

Tags: , , ,

AUSTIN - A PalmOS Vulnerability Scanner

About three years ago I wrote a vulnerability scanner for the Palm OS named AUSTIN. It was just a fun side project and after presenting it at Defcon 11, I forgot all about it.

But recently a few people started asking me for the code. Turns out that the Defcon 11 site has my slides, the audio of my presentation, and even the video! But no code, even though I gave it to the organizers. [I wish defcon didn't use Real media formats, they're so annoying to convert. To do so, grab the RTSP stream with a downloader like Offline Explorer Pro and use SUPER to convert it (See my post on video conversion).]

So without further ado, for anyone interested, here is the code to AUSTIN - a PalmOS Vulnerability Scanner.

Caveat emptor:

  • It was written to PalmOS 3.5.2 on a Treo 300 (160×160 screen). I don’t know how it will fare on OS 5 Palms.
  • It was written with PocketC, I don’t know whether the latest version will still run this code.
  • It works but is fairly basic and may even have some bugs (shocking, I know ;-)
  • It’s GPL licensed.

If you end up finding it useful, please post a comment below and tell me what you’re doing with it…

The Smallest Proxy?

I needed an http proxy for another project (more on that later) and thought it would be fun to write one in ruby. How simple can it be? With a few compromises, it can be very short indeed:

# tinyproxy.rb
# just for the fun of it

require 'socket'
require 'http-access2'

def process_request(conn)
  verb, uri, protocol = conn.gets.split
  puts uri
  http = HTTPAccess2::Client.new()
  resp = http.get(uri)
  while HTTP::Status.redirect?(resp.status)
    puts "redirect"
    resp = http.get(resp.header['location'][0])
  end
  conn.puts resp.content
  conn.close
end

server = TCPServer.new('localhost', 4567)
while (conn = server.accept) do
  Thread.new(conn) do |c|
    process_request(c)
  end
end

I’m cheating in a couple places. I’m only handling GET requests, and I’m using Hiroshi Nakamura’s excellent http-access2 package.

On the other hand, it’s multi-threaded and it handles redirects, a must for the web.

Tags: , ,

SQL Server Adapter Fixed (sort of)

Many thanks to Ryan Tomayko for fixing the MS SQL adapter bug I posted a little while back.

Things aren’t all roses, as Ryan states:

Quick Note: the SQL parsing regexp stuff in this adapter is bound to fail in many edge cases. This patch improves the accuracy of the regexen in many places but the basic parsing logic is flawed and could probably use a complete overhaul that accounted for things like habtm and eager loading issues from the beginning.

But it’s still cool to see the process working and bugs getting fixed Cheers Ryan!

ActiveRecord and SQL Server 2005 not ready for primetime

We use a lot of Microsoft technologies at work, so I was curious to see how well ActiveRecord would work with SQL Server 2005 (I tested against the CTP edition).

Why not stick with MySQL? Well, though I use MySQL personally for some applications, SQL Server 2005 is significantly more sophisticated. If it works well with AR, then I get the best of both worlds…

The feedback is mixed. On the plus side, getting up and running was painless. You won’t be able to do windows integrated auth but SQL Server auth works fine and once the user is created, you’re up and running.

On the downside, the SQL Server adapter is broken. I logged a bug in the Rails tracker (see link for more details). In some cases, the adapter can confuse data in the query for its instructions, and end up running the mangling the query. We either need a much more sophisticated set of regexs or (preferrably) a way for an adapter to get the information it needs without resorting to parsing the query.

Interestingly the MySQL adapter doesn’t need to resort to regexps at all, nor do most (all?) of the other adapters. For the moment, I’m sticking with Rails on MySQL!