An Open Letter to My Public Library

January 19th, 2012

Dear Librarians,

I’d like to thank you for the work you’ve done putting the library catalog online. The ability to reserve books online (and then renew them online when I don’t finish them on time) has been invaluable. It has dramatically increased my use of the library. Now when I need a book I routinely check the library first rather than ordering it from Amazon. It’s cheaper, the book gets to me faster; and when I’m done, the book no longer takes up space in my apartment. Excellent! Kudos all around.

And now you have eBooks so I don’t even have to go to the library to pick up my reservations! Regrettably the selection of eBooks is somewhat thinner and more oversubscribed; and yes, I know this is partially the publishers’ fault. Still, for the books that are available, it’s wonderful knowing that even the thickest physics text or mathematical tome isn’t going to weigh more than a small eReader or tablet. It makes reviewing calculus on the subway so much more practical.

I’d like to make a friendly suggestion for ramping this up a notch, making the library even more useful, expanding the collection, and increasing monetary donations to the library at the same time. Your circulating collection is large, probably one of the largest in the country, and certainly the largest one I’ve ever had the pleasure to use. Probably 90% of the time the book I’m looking for is available at one of your branches, and you helpfully bring it from wherever it is to my local library where I can pick it up off the reserve shelf. But there’s still that 10% of the time when you happen not to have the book I’m looking for. (And for eBooks that’s more like 90% of the time.) Sometimes that’s because it’s a relatively obscure technical book; but sometimes it just looks like a fluke. For instance, it’s the second book in a trilogy for which you have the first and the third, but somehow missed the middle (or it went missing). Or it’s a novel by an author, most of whose works you already have. It’s something that clearly fits in your collection but just doesn’t happen to be there yet. So off I surf to Amazon where I buy a book I only really want to read once, and that then is going to sit on my shelf untouched for years.

Here’s my idea: I’d rather buy the book for the library and than buy it for myself.
Read the rest of this entry »

A Prediction: P == NP and within 5 years

September 29th, 2011

So after reading this poll of mathematicians and computer scientists who have given the problem way more thought than I have, I now suspect that indeed P == NP (though perhaps not usefully so). Why do I think this?
Read the rest of this entry »

My New Year’s Resolution

January 1st, 2011

In 2011 my New Year’s resolution is to do more things the easy way, even if it takes longer the first time. I am going to stop using brute force to solve problems. In particular:

  • I am finally going to memorize how one redirects both stderr and stdout to the same stream. (2>&1 |)
  • I am going to learn the sed? trick my advisor showed me 20 years ago for repeating a command from the shell history while substituting one word for another, instead of just using the arrow key to backup to and erase the string. (^string1^string2^ or !!:s/string1/string2/ or for global substitution, not just the first occurrence !!:gs/string1/string2/)
  • I am going to increase my regex fu and use regular expressions consistently instead of just editing 20 lines of copy and paste code. (This would be easier if every editor didn’t have subtly different syntax.)
  • I am going to use Python to automate repetitive tasks.

XML 2.0

December 4th, 2010

First for the record, I’m speaking only for myself, not my employer, the W3C, Apple, Google, Microsoft, WWWAC, the DNRC, the NFL, etc.

XML 1.1 failed. Why? It broke compatibility with XML 1.0 while not offering anyone any features they needed or wanted. It was not synchronous with tools, parsers, or other specs like XML Schemas. This may not have been crippling had anyone actually wanted XML 1.1, but no one did. There was simply no reason for anyone to upgrade.

By contrast XML did succeed in replacing SGML because:

  1. It was compatible. It was a subset of SGML, not a superset or an incompatible intersection (aside from a couple of very minor technical points no one cared about in practice)
  2. It offered new features people actually wanted.
  3. It was simpler than what it replaced, not more complex.
  4. It put more information into the documents themselves. Documents were more self-contained. You no longer needed to parse a DTD before parsing a document.

To do better we have to fix these flaws. That is, XML 2.0 should be like XML 1.0 was to SGML, not like XML 1.1 was to XML 1.0. That is, it should be:

  1. Compatible with XML 1.0 without upgrading tools.
  2. Add new features lots of folks want (but without breaking backwards compatibility).
  3. Simpler and more efficient.
  4. Put more information into the documents themselves. You no longer need to parse a schema to find the types of elements.

These goals feel contradictory, but I plan to show they’re not and map out a path forward.
Read the rest of this entry »

Could not load a dependent class com/jcraft/jsch/Logger

June 25th, 2010

Have you ever seen an Ant error message like this?

BUILD FAILED
/Users/elharo/Projects/XOM/build.xml:545: Problem: failed to create task or type scp
Cause: Could not load a dependent class com/jcraft/jsch/Logger
       It is not enough to have Ant's optional JARs
       you need the JAR files that the optional tasks depend upon.
       Ant's optional task dependencies are listed in the manual.
Action: Determine what extra JAR files are needed, and place them in one of:
        -/opt/ant/lib
        -/Users/elharo/.ant/lib
        -a directory added on the command line with the -lib argument

Do not panic, this is a common problem.
The commonest cause is a missing JAR.

This is not a bug; it is a configuration problem

As usual, the ant error message is completely unhelpful, though for once it’s at least technically correct. (Most of the time when ant says, “This is not a bug; it is a configuration problem”, it is in fact a bug and not a configuration problem.) Here’s what’s really happening.
Read the rest of this entry »