Visions of Aestia

27 Jan 2005

Evil Software Patents

Filed under: — JBowtie @ 10:24 am

ongoing � More Patent Funnies

This is NOT funny. Google has just this month received a patent on “highlighting matches to search terms in retrieved documents”.

How could this even happen? One of the criteria for a patent is supposed to be that an idea is non-obvious. There are plenty of RDF tools that could be considered to be covered by this.

There is no longer any justification, in my mind, for a 20-year patent (what business plan goes out more than 5 years, anyway?). And I’m seriously thinking of joining the camp that says all patents are worthless.

The point of a patent is that if you invent something, you, rather than some copycat, get to make money off of it. The problem is that in today’s world, you don’t - either you spend all your time and money in monitoring and litigation, or you use it as a weapon against competitors.

This patent should never have been granted. I personally had prior art in 1991, nine years before the patent was even filed. And I was still in high school at the time!

25 Jan 2005

Overrides in OWL

Filed under: — JBowtie @ 12:58 pm

One of the issues I’m struggling with at the moment is the fact that OWL doesn’t really handle subclassing very completely. I’d be pleased to shown I am wrong about my assertions here.

In the OWL model I can:
- Add new properties
- Refine the domain or range of a property.

However, I cannot:
- Remove a property.
- Change the domain or range of a property to something completely different.

Frankly, these are not onerous restrictions. However, I think it’s important to remember that RDF is meant to be distributed; these restrictions make it difficult to code around errors or model poorly-defined domains.

If there is an error in a document, I have no standard way of using the definition sans error. Consider the following scenario.

animals.rdf


  ...
  
    
      
      
    
  

australia.rdf


  

Here, the first document encodes a common, if misleading, definition of a mammal. Mammals (usually) give birth to live young, and the original author mistakenly included this assumption in his ontology.

However, this definition is wrong. The platypus is a mammal that lays eggs. Clearly, the definition needs to be changed by removing the restriction, and if I in fact have control over both documents, this is easy to accomplish.
Thanks to the distributed nature of RDF, however, this may not be possible. What if I can’t correct the document or convince the author he is mistaken? I need a way to assert that the platypus is indeed a mammal, but an exceptional one that lays eggs instead of giving birth to live young (note that without cardinality restrictions I can say an animal does both).
The tack I would like to take is to define a special subclass of mammal, say egglayingMammals, that removes the restriction. But I don’t know of any way to do this short of defining my own, non-standard properties.

Now, the current fact is that most ontologies are currently being created by domain experts. But as RDF trickles down to the common developer, more and more ontologies are going to be hastily created without the input of domain experts, and will contain errors and contradictions that need to be coded around. I think we need a way to create definitions that lifts or ignores the restrictions laid down by a superclass. We need a way to assert that some parts of a definition or certain data must be ignored. We need a standard way to assert that something is wrong, or that a perceived contradiction can be ignored. It may be messy and inelegant, but frankly so is most code (and data) in the real world. Ever try to normalize address data?

Our first Vacation!

Filed under: — Ama @ 10:34 am

Just got back from my surprise vacation for our annivesary. We ended up going to Nelson instead of Rotorua - was disapointed at first but now really glad! I just wish the weather had held out so we could have gone to Able Tasman. Ah well, next time. Would have been hard with a little!

Cecily was, as always, an absolute surprise. Barely a protest on the plane there (daddy nearly crushed her against the seat!) and very little crying on the way back (she was over tired). She settled in fairly quickly at the hotel even though she’s never been away from home like that, and she had great fun at the beach building sand castles with daddy, at the petting zoo where she ate most of the food meant for the animals, and picking berries - where she again ate more than we took home!!! She absolutely adores berries.

All in all it was a great vacation, and I was sorry to come home, as much as I love wellington. I’m sure a good deal of regret was due to leaving the rental car, I’d forgotten how nice it is to have the freedom of a car… and I really liked that town.

Copyright durations are bad…

Filed under: — JBowtie @ 9:36 am

Pushing String � Happy birthday to you

…when a song composed in 1893 is still under copyright in 2030. That’s 137 years, by my reckoning. Whatever happened to “limited duration”?

What’s really sad is that the current interpretation of the law prohibits derivative works, so even the oldest living composer can’t build upon it to create a new work.

21 Jan 2005

Total wuss

Filed under: — Ama @ 11:14 am

I’m still shaking from the relatively small earth quake we had this morning. I’m such a wuss! Not sure why I’m so worked up still - even the slightest rumble sent me into tears for the first year or so after the 6.9 we were in in Seattle, but that was in 2000 or 2001. I wonder if its what you call post traumatic stress disorder? Then again I still wince when I hear a plane flying low….
Anyway when the 5.5 hit this morning I literally fell apart and nearly made John stay home. I’m still convinced there’s going to be a bigger one - the reports say they think small ones ease the pressure and prevent bigger ones, but after the 8 on the 18th I’m wondering if this isn’t a warning.
Not to be crass but hopefully it hits while we’re gone! My darling husband has surprised me (for only the second time in our 10 years together) with a trip to rotorua for our anniversary! YAY!!!

I wish I could write something so touching and beautiful as he did to me, but any effort I make now is going to pale in comparision. Will have to think of something to make up for it! After all, all I had planned for our annivesary was dinner to our favorite resteraunt this weekend!

20 Jan 2005

Perils of stubbing

Filed under: — JBowtie @ 4:05 pm

ongoing - Testing Backward

Tim Bray shares a common mistake made while unit testing. Note that even if you don’t unit test, you can waste the same amount of time doing debugging a problem like this.

For the most part, I have been using a NotImplemented exception when stubbing since the COM days (they had an E_NOTIMPLEMENTED code, as I recall).

Anniversary 4

Filed under: — JBowtie @ 2:52 pm

Four years ago today, I was married. Of course Ama and I had been in a committed relationship for several years prior to this event, but things still changed.

Not the things we feared might change - those continue to evolve at their normal rate. No, the things that changed were deeper in many ways.

My faith in Ama’s love became unbounded. In making such a public and premeditated pronouncement of her devotion to our lives together, she made it much harder to back out of that commitment.

In addition to the moral and spiritual obligations that we had already built between us, we also appended a variety of legal and social obligations that had nothing to do with our profound love for one another and everything to do with how other people viewed us. But still it had an effect, in that, in so much as can be measured, I became more responsible.

(Those who know me now may wonder at how I could ever have been less responsible - perhaps Ama will share.)

When I am upset, or tired, or finding it difficult to make it through the day, it is the thought of Ama waiting for me at home that empowers me. When I am stressed by work or money matters or any of the hundred of life’s annoyances, the memory of my beloved’s smile, or her touch, is enough to dispel my burdens.

True, we fight. True, we have sorely tested one another. It is not marriage that keeps us together, it is love. For all our travails, I dare not imagine life without Ama, and my faith in her love and talent and genuine beauty only deepens over time. I would not trade even the worst day of these four years for anything. It is all to be treasured, even the tears and the pain, because it is time spent with her.

19 Jan 2005

Preventing comment spam

Filed under: — JBowtie @ 4:44 pm

It’s nice to see that Google is aware of and doing something about comment spam. I’m definitely upgrading my WordPress installation as soon as this is implemented.

Nearly there:

Filed under: — Ama @ 12:34 pm

Wow, one day she refuses to even stand, the next she’s toddling everywhere! She cant make it across the room without tipping over but she’s getting there :D She even showed off by walking all around when I took her to the after hours clinic after a rather nasty hit to the head resulting in a nasty looking dent (that was monday with the hit, visit yesterday - today she’s fine).

rdf:ID and relative URIs

Filed under: — JBowtie @ 11:43 am

One thing which consistently confuses me is the the fact the rdf:about and rdf:resource follow the usual rules for resolving relative URIs, but rdf:ID does not.

Specifically, as Ed Davies points out in his comment to Refactoring to RDF, step 1, a relative rdf:ID is always interpreted as an anchor within the current document.

This means that within the document “http://example.org/orders”:

“http://example.org/customer#12″, being an absolute URI, is handled identically by rdf:ID, rdf:about, and rdf:resource.

The relative URI “customer#12″ is interpreted as “http://example.org/customer#12″ by rdf:about and rdf:resource, but as “http://example.org/orders#customer#12″ by rdf:ID.

This difference in interpretation of relative URIs extends to cases where xml:base is specified.

The best bet for me, personally, is to either always use rdf:about or to always use absolute URIs.

Comments re-enabled

Filed under: — JBowtie @ 11:21 am

I’ve added some stronger comment spam tools, and optimistically re-enabled comments. Have fun.

18 Jan 2005

Hi, PlanetRDF!

Filed under: — JBowtie @ 9:56 am

Dave Beckett has looked over my RDF data and kindly chosen to add me to the list of semantic bloggers. This is very, very cool since I read Planet RDF on a daily basis.

I’ve been working with XML since the spec was released and have recently become an RDF convert. For the longest time I was completely put off by both the unreadability of the specs and the hideous, hideous serialization format. Thankfully, OWL came along with a readable document that built on RDF, and I found a little python module called sparta that made the scales fall from my eyes.

My version of the RDF elephant is quite simple - it is a distributed form of XML. I know that’s an oversimplification on many levels, but it also makes it really easy to make the transition from producing pure XML to producing ‘dumb’ RDF - that is, pure data just below the semantic layer. Thanks to its distributed nature, some of you smart folks can produce ontologies, triple stores, and inference engines.

Anyway, for the next few weeks I’ll keep working on my series on refactoring XML to RDF.

17 Jan 2005

Refactoring to RDF, step 3

Filed under: — JBowtie @ 2:35 pm

Step 3 of our refactoring is moving from an XML parser to an RDF parser. This can get a bit tricky, so we’re going to a make a few assumptions to avoid outlining every possible scenario.

Let’s assume that your load/save logic is reasonably isolated, and looks something like this:

class order:
    def load(self, node):
        self.id = int(node.id)
        self.customer = customer(node.customer)
        self.product = [product(p) for p in node.product] # a list of products

Here we’re relying on something vaguely-DOMish to traverse down the XML tree and creating objects that correspond to the various elements and attributes we encounter. Type inference could easily happen if some sort of schema description existed.

Now, RDF parsers don’t use the DOM as such, because they may be pulling together information from multiple documents. Instead, most parsers use the triple store as their interface.
Conceptually, this is quite simple. Each object we’re going to create has an rdf:ID, and it may be serialized across multiple documents (using rdf:about to add to the original XML). The fields we are serializing are either references to other objects (rdf:resource links) or simple types (element/attribute values).
All you need to know for this step is that you can get the fields values by issuing a query - the rest will attend to itself. Since we no longer have a context node, the id will need to be passed in to our load function.

class order:
    def load(self, store, id):
        self.id = id #this will be the rdf id, so it is a URI like \"order#17\" instead of an int
        self.customer = store.query(id, \"order.schema#customer\", None)
        self.product = store.query(id, \"order.schema#product\", None) # a list of products

See how similar this is? Instead of assuming that the interesting elements/attributes are children of the current node, we ask the RDF parser for the children of the current node. This is why RDF can be distributed - the parser hides the fact that some of the data may once have lived in another document.
Now, I have deliberately left calling the object constructors to the store.query( ) method. Most RDF stores can use schema or type information and do the right thing. However, some stores cannot create objects and only return the rdf:ID of the children we are interested in.
In this case, the code becomes:

class order:
    def load(self, store, id):
        self.id = id #this will be the rdf id, so it is a URI like \"order#17\" instead of an int
        self.customer = customer(store.query(id, \"order.schema#customer\", None))
        self.product = [product(p) for p in store.query(id, \"order.schema#product\", None)] # a list of products

Which is even more like our original sample.

One final note - some RDF parsers may require your document’s root element to be rdf:RDF. Live with it or find a more liberal parser.

In part four we’ll get into that type information deferred from this step, show a helper class to create objects of the correct type, and start looking at the more interesting things we can do now that we are RDF-enabled.

Norty daddy

Filed under: — Ama @ 12:19 pm

Silly man, didn’t even post about this!

Today is Cecily Rose’s FIRST BIRTHDAY! yay! I can’t believe how fast it went. We had a big party yesterday with all of our ‘adopted’ family - I never knew how many good friends we had until they were all together in the same room. It got quite crowded!

Happy birthday to my girl, I’m so proud of how much she’s grown!

Refactoring to RDF, step 2

Filed under: — JBowtie @ 11:26 am

You might want to review Part 1 before proceeding.

Our document fragment last looked like this:


  John Smith


  
  

Remember, this is a fragment. It assumes there is a root element declaring the RDF namspace.

Step 2 of our refactoring is to add RDF-style namespaces. Technically we do not need to do this, and there are plenty of existing RDF namespaces you might want to use, including FOAF, RSS, and Dublin Core.

An RDF-style namespace is just like any other XML namespace, except by convention it ends with a hash(#) sign or slash(/).


Just in case it hasn’t clicked, the reason for this convention is to allow us to write RDF that describes the elements. When we combine the namespace and local name, we get an RDF ID - now we can write our schema in RDF!


  

You’ll note both styles of namespace here - the RDF Schema namespace ends with a hash sign, while the FOAF namespace (http://xmlns.com/foaf/0.1/) ends with a slash. This example says that the customer element has type foaf:Person.

Actually specifying and using type information is something we’ll cover in step 3; for now the important thing is that we’ve added a namespace. Any existing serialization code will need to be updated to handle the namespace. Here’s our fleshed out sample showing the root element.


    
      John Smith
    
    
      
      
    

To recap:

  • Step 0: Make sure your XML parser understands namespaces
  • Step 1: Replace any existing ID values in your XML with RDF-specific IDs. That is, the value becomes a URI and the attribute becomes rdf:ID, rdf:resource, or rdf:about.
  • Step 2: Add RDF-style namespaces. The namespace URIs should end in a hash(#) or slash(/). All elements and attributes should be in an RDF-style namespace.

No more comments

Filed under: — JBowtie @ 10:41 am

This morning there were over 100 spam comments sitting in the moderation queue. I’ve disabled comments until I can install more powerful anti-spam measures.

I’m still allowing trackbacks at the moment, so that’s the only way to leave comments.

13 Jan 2005

Understanding XML: XML in the Crystal Ball: Publishing, Syndication, Marketing

Filed under: — JBowtie @ 9:26 am

Understanding XML: XML in the Crystal Ball: Publishing, Syndication, Marketing

This is a really insightful post on the role of XML in web publishing. I need to mull things over before responding, but I think this is worth reading if you have any interest in the publishing field.

12 Jan 2005

IBM releases 500 patents

Filed under: — JBowtie @ 10:10 am

Everyone is blogging about this, but nobody seems to be linking to the actual list of patents - so here it is.

500 patents

The really interesting thing is the way the license is phrased; open source developers can use them without issue, and proprietary developers can use them so long as they do not sue open source developers.
In other words, we can all share IBM’s toys, but bullying someone means you have your toys taken away.

11 Jan 2005

XForms will revitalize the client

Filed under: — JBowtie @ 10:08 am

Understanding XML: XML In the Crystal Ball: XForms and the Revitalized Client

Not surprisingly, I agree with everything that Kurt Cagle is saying in this post.

One of the things I have always hated about web development is the need to create masses of JavaScript just to enforce a handful of constraints.
XForms had made it much more natural to generate user interfaces and gets rid of the need for much of the current layout code and almost all the client-side code.

Even now, I use XForms on the client side and use XSLT to generate (admittedly simple) forms for the browser. Being able to pass XForms to the client will eliminate a whole lot of code on both the server and the client, simplifying everything.

I can’t wait.

10 Jan 2005

Quick to learn

Filed under: — Ama @ 12:59 pm

Cecily toddled not only by herself, but stopped mid toddle (usually only walks to us then falls into our arms), turned around, and started up again. Boy this is going quick now!!!

Powered by WordPress