Monday, June 19, 2006

Rails Day 2006

On Saturday, I participated in Rails Day 2006. It's a 24-hour contest between 1-3 person teams to develop cool Ruby on Rails web apps. I set out to build a visual database query building system (that doesn't require knowledge of SQL) that also allows people to post and share these queries with other users of the system. This would allow people to quickly and easily build queries and share them with others.

The itch I was trying to scratch is that many people in the nationwide network of non-profits I work for use Access to create databases for the data they're working with because they can easily create queries to run on that data. I would rather they put their data in our centralized MySQL server for many (hopefully obvious) reasons.

However, asking them to learn SQL is a bit much, and connecting Access (or OpenOffice.org Base) to MySQL is a bit daunting, especially since there is no way in hades I'm going to open up the MySQL port to the Internet (so they would need to setup a VPN client, an ODBC data source, Access connections to all the tables, etc.).

If I had a web app that just gave them the visual query builder piece, it would be pretty easy. Combine that with the collaborative ability to share the queries, and you've got a big win in terms of empowering people to help themselves and help others work with the database.

Anyway, I built Emerald (as I called the tool) during Rails Day. I don't have it hosted anywhere, unfortunately, so it's not easy to try out. (You could check it out from Rails Day's svn repo and run it locally on your computer, if you really wanted to.) The app, as it stands right now, is not a solution to the problem I set out to solve. If anything, it's proof that a) ActiveRecord (Rails' ORM database access layer) is not a good tool for this sort of job, i.e. generic database access that adapts itself to your schema, not the other way around or b) I don't really know what I'm doing. :)

ActiveRecord proved very tricky to adapt to this purpose. One of the mantras of Rails is "convention over configuration" and usually it's very nice. For example, if you have a table whose name is the plural form of the class you're instantiating (let's say the table is called "people") and the primary key's name is just "id", then your model class looks like this:

class Person < ActiveRecord::Base

end
That's it. You now have full ORM access to your "people" table using instances of Person objects. It's very handy.

However, when trying to adapt it to work with existing database schema, the convention was almost never correct, and namespace conflicts abounded. These are possibly not insurmountable problems, but in a 24 hour contest, it caused me to have to spend way too much time adapting the tool to the job. This became rather frustrating by the end of the day.

I was fully aware of the fact that I was trying to use ActiveRecord in a non-standard way, so these difficulties were not entirely unexpected. I wanted to push the boundaries a little of both my knowledge of Ruby (and Rails) and what was possible to coax ActiveRecord into doing. It was a labor of love, as I am a big fan of Ruby, Rails, and ActiveRecord. Overall, it was a very fun experience and I can't wait for next year! (But I'll probably pick a project that's more suited to ActiveRecord's purpose.)

Wednesday, June 14, 2006

Posting this from Flock

First Post!

Slashdot just posted a link to this nifty little Firefox-based web browser. It has built-in blogging tools, del.icio.us and flickr integration, and other cool features. It's billed as the "Web 2.0 browser." Click the image below to check it out.

So far, I like it. Some are claiming it's all hype, and that you can get all these features in Firefox via extensions. While I have no doubt that that's true, I for one enjoy having it all integrated in one package, without having to hunt down a million extensions. Leave comments with your impressions of it.

Flock: The web browser for you and your friends.

Blogged with Flock

UPDATE: Flock is still in beta, and it shows. I've already run into a few rough spots with it. I'll be sticking with Firefox for now, but keeping an eye on Flock's development.

Sunday, June 11, 2006

YearlyKos '06 wrap-up

YearlyKosI'm finally back in Denver from YearlyKos. It was great. I loved meeting and talking to all the bloggers. Everyone was very nice and approachable. If you want to build more access to the netroots, you need to go to this conference.

Some comments on a few of the speakers at YearlyKos:

  • Mark Warner - +5 points after his funny and inspiring speech; Keep an eye on this guy for '08. The universal health care for everyone under 18 idea that he and other Dems are talking about now is great. Something we can actually achieve, *much* harder for the other side to speak out against than "HillaryCare" (as long as we keep getting the messaging right), and a significant step towards real universal health care (we'll get there).
  • Howard Dean - between his speech at yKos and what Markos and Jerome write about him in Crashing the Gate, +12 points. We should be very, very glad he's at the top of the DNC now.
  • Harry Reid - Give 'Em Hell Harry indeed! +10 points for being a model of Democratic backbone, and proving that that's not an oxymoron. Watching him struggle to contain his excitement when someone yelled, "Shut it down, Harry!" was priceless. He's introducing legislation that will require the administration to backup everything it claims about Iran w/ real intelligence.
  • Barbara Boxer - Her speech was very good, but apparently she was overheard defending Lieberman to a reporter, and then wondering why so many people at YearlyKos were not very... enthusiastic about ol' Joe. Barb, come on, Jomentum is a Republicrat!

If you missed YearlyKos, go to their site (logo above is a link) and you get can video and audio of most of the conference (at least the keynotes).

Saturday, June 10, 2006

Where do we go from Net Neutrality?

Still at YearlyKos. A questioner in a Net Neutrality panel brought up an excellent point. After we win on the Net Neutrality issue, we need to use that momentum to start fighting things like the DMCA and the "copyright extremism" (quoting the very smart Matt Stoller of MyDD who is on the panel) of DRM. This is a culture war; it's a free speech issue. This information belongs to all of us. Onward!

Open-source TV

Democracy: Internet TV I'm at the YearlyKos netroots conference in Vegas and Tiffiniy Cheng at The Participatory Culture Foundation ran a session on online video. She showed us the Democracy Internet TV Platform. It's working now, you can download the Democracy Player and see what's already online. It's basically RSS video feeds combined with an iTunes Music Store-like interface. Oh, and it's all free and open source. The software is GPL'ed and runs on Windows, Mac, and Linux. I dig it.