Ruby looks pretty nice, but it's a bit obtuse. If you're a C or PHP or whatever programmer, you can't exactly read it without a reference nearby. You can read it, but there are a lot of subtle punctuations. I hate subtle punctuations. Yes, they make for a more powerful language, but they also make for subtle bugs. For instance,
scaffold :event
is a valid statement, but
scaffold : event
is not.You also apparantly cannot have a database table named 'date' because creating a 'date' class to access it will throw all kinds of errors. It collides with the existing date class which manipulates date information. Of course I have an existing database called 'date' that I cannot use with Ruby||Rails because of this. Sigh. I hate database conversions. I'll have to also change the other application which is using the date database. I made all of these discoveries within ten minutes of getting ruby working.
Looks like it's a wonderful language for discovery of how subtle things affect how the program runs. Perl was likewise a wonderful language for discovery. That's why I don't use it anymore.
We'll see. I use languages that make my work easier. The claim is that Ruby makes my work easier. I'll give it the benefit of the doubt until proven otherwise. But my initial impression is that it's destined to be a flash in the pan like java. Remember when everybody was programming in java? Where are they today?
It also wouldn't take much to put a database and view abstraction layer on PHP. Hint, hint.
<?xml version="1.0" encoding="iso-8859-1" ?>
<rss version="2.0" xmlns:itunes="http://www.itunes.com/DTDs/Podcast-1.0.DTD" >
The 'xmlns' declaration is supposed to give a 'dictionary' of the document language so that an absolute stranger to the itunes namespace can figure it out. I'd have to go dig up the xml spec, but I'm pretty certain they say in pretty strong language that if you sponsor a DTD, you kinda' gotta' haveta' put it at a URL that is never going to change. Ever. This URL comes straight from Apple's own Podcast spec (which coincidentally was invented by MTV veejay Adam Curry, who will soon be the father of the internet according to wikipedia).
Yet if you go to that web address and try and read the language definition, you'll find yourself instead at apple.com/itunes staring at an Apple eShopping mall and in my case telling me that I need a new operating system to install iTunes. Where's the DTD? In fact I'm just trying to extend RSS in another way and was going to use their DTD document as a template (since it's about the only existing extension onto the RSS space). Sigh...

It's enough to drive an insane person crazy. Extensible? Try it sometime. You've no idea the can of worms you'll open. I think it's time to dispense with the whole mess and get back to what XML started out as. A means to convey information through a '<tag>content</tag>' syntax.
It is an implicit format to allow producers and consumers of information to talk the same language. In doing so, all of the information forms have been forced to be standardized so that the information language is discoverable through namespace declarations and associated style guides.
Why bother?
It's all well and good for something like a web browser which needs to display information, but it's overkill for the use of XML as a simple data exchange format. All you really need is for an information consumer to recognize an element that it knows about and deal with it.
So I'm proposing something new. FreeXML. A freeXML document can look just like an XML document. The only difference is that it doesn't care what it is presented with. Either it recognizes the data or it doesn't. Namespace declarations? We don't need no steenkin' namespaces.
<freeXML>
<html>
<head><title>a freeXML document which contains HTML</title></head>
<body>
Anybody can do it. See?
</body>
</html>
</freeXML>
Now let's go a step further -
<freeXML>
<animals>
<item><name>dog</name></item>
<item><name>cat</name></item>
</animals>
</freeXML>
Either you know what an 'animals' is and how to deal with it or you don't and you ignore it. This is what every XML consumer does now. The only difference is - No DOCTYPE, no namespace declarations with associated DTD, no XSLT. Either the information consumer can handle the data the producer produces, or it can't.
What about extensibility? What about it...
<freeXML>
<animals>
<item><name>dog</name><mypetname>Fido</mypetname></item>
<item><name>cat</name><mypetname>Fluffy</mypetname></item>
</animals>
</freeXML>
Again, either you know how to deal with <mypetname> or you don't. Validation? Why? If you've grabbed this 'animals feed' from a remote source and don't understand a particular element, it wasn't meant for you, and you can ignore it.
What can you do with freeXML? Anything you can do with XML. It's just another type of markup. Heck, you can embed XML into freeXML. Here's an RSS feed -
<freeXML>
<xml>
<?xml version="1.0" encoding="iso-8859-1" ?>
<rss version="2.0" >
<channel>
<language>en-us</language>
<title>Diary and Other Rantings</title>
<description>Life in Silicon Valley by a former software engineer who now runs a music store.</description>
<link>http://macgirvin.com/blog</link>
<lastBuildDate>Mon, 19 Dec 2005 11:57:51 -0800</lastBuildDate>
<generator>Note-a-Day Weblog - Version 2.2</generator>
<copyright>Copyright 2005 Mike Macgirvin</copyright>
<webMaster>mike@macgirvin.com (Mike Macgirvin)</webMaster>
<managingEditor>mike@macgirvin.com (Mike Macgirvin)</managingEditor>
<item>
<pubDate>Sat, 17 Dec 2005 12:00:00 -0800</pubDate>
<title>Goodbye, Ruby Tuesday..</title>
<description>Who
could hang a name on you?<p />Actually, the name is
'Ruby on Rails'. It's quite an interesting
moniker for a programming language. OK, the language is Ruby. The
'on rails' part has to do with adding the programming
language with database classes into a web server&nbsp; and
database environment. The example is an entire web-based recipe
database in one line of code. That's impressive, and
it's attracting a lot of attention. It was only a matter of
time. Programmers are lazy folks. We don't like to write the
same things over and over. So every time a new language pops up that
includes more and more of the stuff that we've written over
and over again, it's bound to take off. <p />But
if you look under the hood, it's not quite one line of code to
write a web based recipe database. In fact the tutorial takes three
pages of system configuration and database mucking before you get to
the one line of code. Some things never change. <br
/></description>
<link>http://macgirvin.com/blog/index.php/DEC-2005#article-17-DEC-2005</link>
<guid isPermaLink="true">http://macgirvin.com/blog/article.php?17-DEC-2005</guid>
<comments>http://macgirvin.com/blog/feedback.php?17-DEC-2005</comments>
<category>software</category>
</item>
</channel>
</rss>
</xml>
</freeXML>
Or see if I can write one in Ruby||Rails in a dozen lines of code...
Something that has really been starting to intrigue me is the potential for wanton internet identity theft. It works like this... you go to a cool new site and sign up with a username and password. Just like the other hundreds of sites you belong to. But unless the site has imposed a particular username on you (your first choice was already in use), aren't you going to use your 'standard login'? Same thing on Amazon, Google, eBay and everywhere else? Don't lie. Everybody does. And that's why it is interesting.
What about on stinkinidiotsinweirdclothes.com ? Wouldn't you use your standard login there as well? If you're like most people, of course you would. Do you know who has access to the database? Do you trust him/her/them? One well-placed internet site could collect thousands of logins. Every one of them would probably be good on 10-100 major sites and thousands of smaller ones. Credit cards, shopping, bank accounts. It's probably a hundred times as effective as a phishing scam.
Now that you're aware of the problem, what can you do about it? Start changing your passwords! Change something - anything. (Perhaps) add the first character of the site name into your standard password. The only thing that's preventing this from being a global crisis is that nobody has sufficiently exploited it for personal gain (yet).The next piece (which is probably going to take a few days) is to re-do the XML aggregator so that it supports something called 'My Feeds'. It's almost there, but not quite. It will already let folks administer XML resources, but they can only view a) an individual feed, or b) the whole universe. I want everybody to be able to build their own data streams.
You've no idea how pathetic is the state of the vast universe of XML feeds. Most of the sites that I'd like to get a feed from don't offer one, or they only offer teasers (a headline followed by 'go to the site to read the story'). That's hardly an information feed. Several overseas sources I tried are using Windows code page 1215 as their XML charset. Yuck. I don't have a UTF-8 convertor for that one. I also can't seem to load any Wordpress sites where somebody used an ampersand or tag element in their category name. Wasn't properly XML escaped. (Note to self: check my own code - I don't think mine escapes these either). So there you have it. For every ten potential feeds I've looked at, only one or two converse in a compatible XML dialect. Of those, only a small fraction offer any meaningful content.But I found one that wasn't too bad. It's called 'Drupal'. It's got some bugs and quirks, and is similiarly obtuse, but it seems to do quite a bit. So I loaded it up over on the floozee site (that's dot com, hint hint). Multiple blogs, discussion boards, event calendar, newsfeeds, buddylists, etc. Pretty nice little app (once I fixed a few bugs). Oh, and it's got a crude but functional XMLRPC interface. I would have said that it's the perfect launching pad for my next great blog idea - except that it pretty much embodies my entire next great blog idea. I've got some configuration work to do, but basically you build a community blog portal that's tied to an event calendar, latest newsfeeds, online discussion groups, etc. Sigh... guess it wan't such an original idea after all. But now I've got a framework with all the right code to do what I was thinking, so maybe I'll figure out a unique twist yet.
Yet another group of folks is scheduled to come out today and gaze at the bubbling brook outside my store and figure out if there's anything they can do about it. The first guys, at great expense - are going to run a series of high-tech tests to figure out where to dig. The second group might actually start the excavation.
I looked at the dysfunctional hard drive. Western Digital. Gak... Let me tell you something. I've got a drawer full of old hard drives. Some of them go back twenty years. Every single Western Digital drive I've ever owned has failed, and almost always have failed spectacularly. Most every other drive I've still got, and I can still access them given the right hardware. Draw your own conclusions.
2:00 PM
The operating system has been reloaded. Restored my most critical applications first. First things first... the printer drivers and the web browser. Then use the browser to grab the backups. The rental accounts recovered flawlessly. Then I open my financial account data. The most recent date on record is 2003. Ouch. Two years of lost data. Including this year. But I just backed up this two days ago. How could that be? Perhaps I loaded the wrong backup. I scanned the server directories. There's a problem... I have two versions of the backup on the Unix box. In one, the file extension is lower case. The other is upper case. And it was created two days ago. So I reloaded with the upper case version of the file.
The newest date is still 2003. Now I'm starting to sweat. My finances for the entire year - I don't seem to have them on backup. I check the other server. There's a file from Jan-2005. OK - let me try that one. I'll at least have a little more data than I do now. But I think the bank will only let you download three months into the past. I've still got a big problem. Doesn't look like there's any way to recover most of this year. I'm really sweating now. So I load the file from January. The newest date is still 2003. You'd think I'd be sweating buckets, wouldn't you? But no. Now I breathe a sigh of relief.
You see, I've used that particular backup before (the one from January). I know that it contains more recent information than 2003. The program migrated the data on the first file I used, and stored it somewhere else. It didn't even look at the two other backups I loaded.
So I deleted all the data from the program, and started fresh with the uppercase file from two day's ago. Bingo. Everything is there. Sync with the bank and everything is hunky-dory.
They found the leak. I've got jackhammers going 30 feet from me right now. Should be fixed in another hour. Glad it was outside the store...
- where each weblog resides
- my login credentials for each weblog
- the unique name of the weblog that I wish to edit
- for every message : the message-ID of that message for that server
- the category list for every server
- yada, yada
But I digress. It's the DTD that I'm ranting about. They've got an element called <itunes:duration> - which gives the play length of a sound file. This is a wonderful thing to have on a podcast because the RSS spec only supplies the size of a media attachment in bytes; not in play length. But why - oh - why is <itunes:duration> an element of <item>, which is a description of an article ? It should be an element of <enclosure> - which is the data it describes. The problem arises if you have two such enclosures. Which playlength belongs to which file?
Turns out that this is only one issue with the iTunes DTD. There are hundreds more. After all, it wasn't designed to be a web standard. It was designed quickly as a means to sell Apple products, and coincidentally is a perfect one-to-one match for the iTunes.com database schema. Think I'll wait for a better attachment DTD to come along.

Digg
Delicious
Netscape
Technorati