Posted by Jeremy Voorhis
Sun, 14 Aug 2005 09:07:53 GMT
With all the tagging craze on the Internets, imagine some sort of interface that tied it all together. Related tags between sites, and meanings negotiated with an ontology.
We got burned out on early semantic web enthusiasts with flashy new things like semantic blogging and agents that schedule doctor’s appointments. It seems the practicality of things like RDF and OWL were lost on most web developers, who would rather seek human solutions and leave the AI stuff to the ivory towers. Stepping back though, it would seem our human solutions are going to be great fodder for real, useful semantic applications after all.
Posted in Semweb | no comments | no trackbacks
Posted by Jeremy Voorhis
Fri, 12 Aug 2005 09:41:15 GMT
A couple days ago, I initiated a discussion for web2.0 interface design. I just found a useful site that discusses exactly that: ajaxpatterns.org.
There seems to be a terribly large amount of information for me to have missed it!
Posted in Rails | no comments | no trackbacks
Posted by Jeremy Voorhis
Wed, 10 Aug 2005 20:52:00 GMT
Courtenay is very clever.
ok, some ideas on permalink
—it should have its own model. why? if you change the name/title of
something, it gets a new permalink to match it’s name,..and.. should
retain its old permalinks… gasp! so has_many permalinks.
yuk. also..
def self.use_permalink( attr )
self.class_eval <<-EOF, __FILE__, __LINE__
before_save { |r|
r.permalink = r.#{attr}.to_url
}
validates_uniqueness_of :permalink
EOF
end
and.. maybe even some way of searching through the db and iterating
til you find a valid link!
I am not sure how I would implement it yet, but adding a model for permalink would indeed be interesting. It might be the first step towards providing a unified permalink API for rails apps, rather than doing model-specific queries for a model’s permalink and the id of a model it belongs to.
The biggest problem I can see is building it so it can construct multiple permalinks, i.e. one for the public and one for administration, etc.
Another change is I am renaming use_permalink( attr ) to acts_as_permalink( attr ) for familiarity’s sake. Other ideas: validate presence of field permalink is being created on, if the user hasn’t done so already.
Posted in Rails | 2 comments | no trackbacks
Posted by Jeremy Voorhis
Wed, 10 Aug 2005 19:24:29 GMT
I assumed people have had this conversation before. From Wikipedia:“
CD/DVD Covers
What constitutes low resolution? Should Wikipedia have a standard image size for such things?
Should there be a project to acquire these images?
Is it fair use to copy these images from Amazon?
* It would appear from Bridgeman Art Library v. Corel Corp. that we could in as much as Amazon added no creativity and use of the original would be fair use.
Bridgeman Art Library v. Corel Corp.
It seems that under that precident, Amazon holds no copyright to the images. They do, however, control who uses their webservices.
Posted in Intellectual Property | no comments | no trackbacks
Posted by Jeremy Voorhis
Wed, 10 Aug 2005 17:55:00 GMT
One of my goals for the cokemachineglow.com is to automate the process of entering data into the music database, importing the data from an outside repository, but storing it locally, where we can maintain and edit it. I had written a prototype that did just that using the REST interface to Amazon Web Services. This was enough to convince me of the feasibility of the concept, but Amazon’s licensing agreement requires that the data link back to Amazon’s web site, and that the data is not cached for more than 24 hours, other data for a generous three months. They can’t really claim to own the tracklists for the albums we review, but the licensing agreement would seem to disallow using the data that came from their service.
I am not a lawyer, but from what research I have done on criticism and fair use, I see that there is no magic silver bullets, and fair use is a defense, not a shelter. The laws surrounding the issue seem to be intentionally vague, but from what I have read, the following principles apply:
- Take only as much as you need – don’t copy an entire work. If we were supplying a PDF of print-quality album art, I suspect this would be a problem. Of course, we do not.
- The doctrine of fair use is more sympathetic to the use of factual data as opposed to an artist’s creative work. I would like to classify album art as both creative and factual data. Anyone can see it by walking down the music aisles of Best Buy. The art is a creative work, no dobut, but it is also a piece of data that is associated with a particular album.
- Artists and record labels, especially the independents, enjoy the pub.
Taking these things into consideration, use of the artwork is most likely not an issue. Licensing agreements, however, seem to be a showstopper for automating its retrieval.
Because of Amazon’s licensing agreement for its web service, I am investigating importing artist data from the community-maintained MusicBrainz database instead. MB’s music database is very comprehensive, the non-subjective portions of it are licensed as public domain, and they expose a powerful web services API and the surprising comprehensiveness of its data. Unfortunately, they do not provide album art, but instead give references to images on amazon.com, so album art will have to be entered manually.
Posted in Intellectual Property, Music | no comments | no trackbacks
Posted by Jeremy Voorhis
Tue, 09 Aug 2005 21:05:00 GMT
For as long as I can remember, I’ve had a historical interest in rock and roll. I’ve got a good number of albums covering aspects of every decade since the 60s, revolving mostly around early punk and various post-punk derivations. Lately, however, I’ve been amusing myself with emusic and have been using it to fill in some unsightly gaps. Here are three albums that I love now and should have loved long ago:

Listening to this album, you can definitely see the progression of the band, leading up to their impeccable double album, Leaves Turn Inside You. If LTIY is Unwound’s Mellon Collie, NPI is Siamese Dream.
Favorite tracks:
- Fiction Friction
- All Souls Day

Smiths’s transitory album between album between his self-titled debut and his relationship with DreamWorks. Either/Or retains the raw production and emotional presence of Smith’s debut, but spends less time brooding.
Favorite tracks:
- Ballad of Big Nothing
- Say Yes

The Tyranny of Distance is now quite possibly my favorite singer/songwriter album. Folk sensibilities, driving post-punk delivery and intricate guitar flourishes in the approrpiate places. This album is considered Leo’s peak, and stands as a testament to Leo’s talent.
Favorite tracks:
- Parallel or Together?
- Under the Hedge
- St. John the Divine
Posted in Music | no comments | no trackbacks
Posted by Jeremy Voorhis
Tue, 09 Aug 2005 06:51:00 GMT
Or, My practical introduction to metaprogramming
UPDATE
At technoweenie’s request, I have packaged permalink as a gem. Download it here If you use the gem, you may omit lib/permalink.rb. Also, replace require 'permalink' with require_gem 'permalink'.
I wanted to give permalinking capabilities to several of my models, but didn’t want to repeat method definitions. This is what I came up with.
Add a field called ‘permalink’ to the table of the model you want permalinking for, and then add the following code to your project.
lib/permalink.rb
class ActiveRecord::Base
def self.use_permalink( attr )
self.class_eval <<-EOF, __FILE__, __LINE__
before_save { |r| r.permalink = r.#{attr}.to_url }
EOF
end
end
class String
# From Typo:
# Converts a post title to its-title-using-dashes
# All special chars are stripped in the process
def to_url
result = self.downcase
# replace quotes by nothing
result.gsub!(/['"]/, '')
# strip all non word chars
result.gsub!(/\W/, ' ')
# replace all white space sections with a dash
result.gsub!(/\ +/, '-')
# trim dashes
result.gsub!(/(-)$/, '')
result.gsub!(/^(-)/, '')
result
end
end
config/environment.
require 'permalink'
app/models/artist.rb (for example’s sake)
class Artist < ActiveRecord::Base
has_many :albums
use_permalink :name
validates_uniqueness_of :name
end
Posted in Rails | no comments | no trackbacks
Posted by Jeremy Voorhis
Tue, 09 Aug 2005 04:20:15 GMT
So Rails is one year old. It’s really quite amazing how far it has come in this short a time. While it certainly is capable of cashing that check for developing a web application at least ten times faster that its advocates have written, one thing that I find to be more of a distraction than a productivity enhancement is the AJAX integration.
I think the Web 2.0 idea is great, but it has created a myriad of new ways to solve UI problems. Some appear to be elegant and are really not, and others are so elegant that I have not thought of them yet. What I am getting at is that RoR’s support for legacy Web 1.0 works so well because it makes it easy to build common solutions to common problems, especially CRUD screens.
Fortunately, this is a problem which should correct itself in time. Developers will discover what works and what’s a waste of time. For example, I have sworn off AJAX paging. However, a sortable list turned out to be exactly what I needed to make editing tracklists a snap for the CMG admin pages.
I have created a wiki page that I hope will serve as a discussion of practical approaches to using Web 2.0 solutions in web applications.
Posted in Rails | 4 comments | no trackbacks