What Should I Do With My Life?

|cover|What Should I Do With My Life?, by Po Bronson, is not really about what to do with your life. It’s really about how people make that decision; how they find their “passion” and what they do once they figure it out (if they do). An amazing read that I can’t put down right now.

date:2003-10-17 23:18:15

Yet another ccValidator update

It seems like all I’m writing about here lately is ccValidator and ccLicense, but I suppose that’s OK. After my announcement this morning, it was pointed out that the validator didn’t exactly handle Unicode properly. So, some more regexing (for the XML encoding) and print "foo".encode(encoding) action, and tah-dah! New ccValidator , now with a gooey Unicode center.

Thanks, “Maxime”:http://www.organigramme.net/; keep those bug reports coming.

date:2003-10-17 18:00:49

ccValidator Fixes

Based on yesterday’s excellent feedback, I’ve updated the ccValidator code to it’s new, improved version. Things fixed include:

  • handling of large RDF blocks
  • handling of work information is largely improved (multiple works are supported, sub-segments render properly, etc)
  • tweaks to handle changes made in ccLicense.py

So go on, validate your license, and let me know if you run into any problems. I still need to wrap the exception handling better so a CGI traceback doesn’t spew when something doesn’t validate, and would like to modify the validation script to use some sort of templating (instead of print statements). Suggestions for a good, Python-ic templating solution?

date:2003-10-17 12:17:14

Updated ccLicense.py Available

I’ve just posted an updated version of ccLicense.py, which I’ve dubbed 0.2. You can find it here . Changes are largely related to the way it extracts work and agent information from the license RDF. The interfaces have been more generalized to accomodate nested RDF structures. However, 0.2 is a step back in terms of license creation; generalizing the extraction interfaces means the interfaces for creation need to be reworked as well. Since the improvments were driven by ccValidator , the creation stuff was left behind. I hope to have a more complete version ready in the near future. As always, comments and feedback are welcome.

date:2003-10-17 12:13:01

Why didn’t I think of that sooner?

Shortly after announcing the validator to the cc-metadata list this morning, I had my first bug report. In my defense, it’s not even a bug in my code, per say, but some invalid metadata. However, there were several discoveries I made that I’m working to roll into both ccValidator and ccLicense.py. In no particular order:

  • Python 2.2 seems to have a broken re module which barfs on really long matches. 2.2.3 and all the 2.3 series seem to have this fixed (note: this is just my observation, if anyone can confirm/correct this, feel free)
  • ccLicense.py returns incorrect results if the RDF block defines more than one work and…
  • …I was trying way to hard to parse the work meta-data; some simple TripleStore action will do fine, thank-you
  • And finally, the way I extracted the licenses was also a little embarassing.

So I’ve fixed the last three and my webhost is graciously upgrading Python as we speak (I hope), so a new, improved, working better than ever version of the Validator should be ready real soon now. And I’m just kicking myself that I didn’t think of the last 3 issues sooner.

date:2003-10-16 15:42:36
category:ccRdf, ccValidator

ccLicense.py 0.1

As part of my effort to complete the Creative Commons web validation service, I inadvertently addressed another of their challenges: creating a language (in this case Python, of course) API for manipulating licenses. So with muted fanfare, here’s version 0.1 of cclicense.py. It currently supports parsing a license and extracting of permissions, restrictions, etc. It also will emit RDF, although that’s not exactly perfect yet.

Future plans:

  • complete the methods that allow creation of new licenses
  • fix the emitRdf method to use namespaces in a cleaner way
  • either replace or just accept the way it handles work information (which I’m not currently a huge fan of)

In order to use it you’ll need RDFlib and Aaron Swartz’s TRAMP. I’ll make a distutils package once I get the rest of the methods fleshed out. As always, suggestions, comments and feedback welcome.

date:2003-10-16 10:37:40

Creative Commons License Validator

Well, what good is a weekend not spent coding? In this case, I managed to hack together a very rudimentary RDF parser/validator specialized for Creative Commons licenses. You can find the web interface here and the sourcecode for the CGI here. The Python module which does most of the heavy lifting, cclicense.py, will be up soon. I’d love your feedback on any or all of it.

Right now it can parse raw RDF or retrieve a URL and scan it for RDF (using a simple regular expression). In either case it parses it and spits out the licensing and work information it finds.

It still needs some work when it comes to parsing work description information, especially with sub-elements (like Agent’s). I’d also love to hear suggestions for improving the output mechanism; it currently runs as a simple CGI, so the result page’s HTML is manually emitted with print statements. Any suggestions for making this work smarter?

date:2003-10-15 09:00:00
category:ccValidator, python

New Hosting

So if you’re seeing this blog post, the DNS records have sufficiently propogated, and you’re viewing yergler.net at it’s new home on Modwest.com. Nothing to see here, move along, please.

date:2003-10-14 23:02:00

Ahhh… Now I Understand

Descriptors, like meta-classes, are a feature of Python that I didn’t really understand up until now. Raymond Hettinger has written an excellent How-To Guide for Descriptors, which clearly explains and demonstrates their use. My biggest suprise is that (unlike meta-classes) I already knew how to use Descriptors, I just didn’t have the vocabulary to adequately explain them or an understanding of the underlying machinary.

Reading explanations of advanced Python features always leaves me feeling a little overwhelmed, yet incredibly empowered: “you mean I can do that with so little code?”

date:2003-10-14 12:36:17