Blog posts tagged "ruby"

Comments Tweaked

November 6th, 2005

Comments should now properly refresh on Firefox 1.5rc2 (also fixed for any other browser that was deciding that $('commentList').lastChild means the smattering of whitespace between a closing </li> and the closing </ol>)

Also turned off the html filtering for comments which was acting as a “make ugly” flag. (BlueCloth seems to be finicky and difficult compared to Markdown implementations I’ve used before, and RedCloth claims to do Markdown, but didn’t when I tested it)

Tagged: Uncategorized , , , ,

Boston: Last Week’s Meetups

September 20th, 2005

I didn’t do a very good job of advertising last week’s meetups, but just so you know, you missed the inaugural meeting of Boston.rb rising, phoenix-like, from the ashes. Next meeting is Oct. 4th (first Tuesday, also known as Ruby Tuesday), and I think I’m on the hook for some, as yet unspecified “tech talk”.

Also the first (only?) Web 2.0 meetup, which was a bit “schmoozy” for a term that I think of as capturing a back to our roots aspect of the Web, but was full of good people including Brian (finally!), David, the other David, and Steve. Antonio couldn’t make it, something about actually releasing software (so Web 1.0!), but he finally has a blog, so now I can link to him anyway.

Tagged: Uncategorized , , ,

TZInfo – Ruby Timezone Library

September 19th, 2005

TZInfo is a Ruby library that uses the standard tz (Olson) database to provide daylight-savings aware transformations between times in different timezones. The tz database is compiled into Ruby classes which are packaged in the release. No external zoneinfo files are required at runtime.

Sweet! Another item off the todo list I don’t have to do. And Scott has written an article about how to use it as a replacement for Rail’s “so-broken-its-negligent” TimeZone implementation.

As a hacker (is it a universal feeling?) its always an ambiguous feeling to see someone else cross an item off your todo list, a little sense of a loss (I was looking forward to solving that problem) with a bit of glee (Now I get to solve more interesting problems!)

Quickly: A Useful Mental Model for Tagging

September 6th, 2005

Lots has now been written on schemas for storing tags (mostly in relational databases). In fact Tag Schema is a blog and mailing list devoted entirely to exploring that space further. (maintained by Nitin Borwankar, working at Odeo these days).

So what happens when we take off our DBA hat, and put back on our programmer hats? (because really, who has seperate DBAs these days?)

Most implementations I’ve seen treat tags as something you put in a bucket attached to an object. (could be most implementations I’ve seen are in Rails which encourages this)

But tags aren’t something an object has, their something an actor said about an object. An actor is key. Tags without someone/something behind them are devoid of context and meaningless. So rather then coding it as:

object.tags << sometags

consider

user.tags(object, sometags)

where tags is no longer a noun (a collection), but a verb.

At some point I don’t care how you store it in your database, but you need to be thinking about it as something a user is doing to the object.

Tagged: Uncategorized , , ,

Ruby Threads

September 1st, 2005

Just wanted to echo something I sent via email, but Tim’s right Ruby threads are weak, in fact I’d call them a toy. Key problems:

  • slow as hell, threads tend to die unexpectedly
  • documentation and sample code limited to a handful of pages in the Pickaxe (lack of people using should have been clue #1)
  • non-OO (in Ruby! an int in Ruby is an object!), all examples use code blocks, subclassing Thread can have unexpected (to me, with my Java threading biases) results
  • many core libraries, and more painfully (in that I lost several weeks of my life, and some hair) ActiveRecord aren’t thread safe.

All from my experience of trying of writing a threaded RSS poller for Odeo that reused the model objects from the webapp. In short, fork() is your friend.

I’m hoping that Ruby 2.0 with Rite/YARV, the new threadsafe virtual machine will solve this. In the meantime there is, JRuby, I suppose. But I’ve got a lot less invested in Java then Tim does.

Tagged: Uncategorized ,

Odeo

July 11th, 2005

Last one to mention it, I’m sure, but late last Friday (hopefully the last late Friday night spent at the office) Odeo opened the doors to the directory/sync portions of the site. The Flash based studio is still in beta-invite, but look for it soon.

On a semi-related note, don’t mix ActiveRecord and Ruby threads and hope for reproducible, reliable, thread safe results. More on that when I get back from Peru.

Tagged: Uncategorized ,

R-Cubed: Ruby, Rails and RDF

May 21st, 2005

Nothing quite like spending an afternoon sketching out database schemas for lists of heterogeneous, extensible objects to give you that familiar, sinking feeling of re-inventing RDF…badly. And nothing quite like surveying the state of RDF for scripting languages to convince you to grimly knuckle down to your schemas.

If I were a Semantic Web booster, looking for a project to hack on/fund, I’d pour some resources into making a replacement for ActiveRecord.rb to make it simple to build Ruby on Rails apps with a triple store back end. Catch the wave of hype/buzz, appeal to a community consisting of some of the savviest, most cutting edge web developers, and maybe pick up a few hints along the way about making tools developer friendly. Done well, it would be a very compelling alternative to LAMP(R). Call it R-Cubed, or maybe Triple-R.

Tagged: Uncategorized , , ,