Mike Schaeffer's Blog

Articles with tag: tech
June 22, 2006

I don't know how plausible it is, but it'd be awfully nice if laptops had a way to power USB ports when the machine is off but plugged in. Perhaps this could be controlled by a switch on the side of the case that turns on USB power only.

The use case, of course, is for portable devices that can charge their batteries over a USB connection. Apple has stopped bundling anything except a USB cable with the iPod, and it's pretty easy to find USB power cords for PDA's and cell phones. With this kind of functionality in a laptop, the laptop could become a traveler's one central power adapter, eliminating the need to carry large numbers of dedicated adapters or half-baked partial solutions like the iGo. I can see paying 50-60 dollars extra for a laptop with this feature.

Another way this could be implemented would be to put 3-4 power-only USB ports on the laptop's power brick.

June 22, 2006

My blog setup requires that I log in via ssh to my webserver to use a text editor to edit articles in raw HTML. This is the downside of using barebones blog software. On the flip side, it'd at least be pretty easy to add a (private) article submission form. All it would have to do is present a list of subdirectories in the blosxom hierarchy, and allow content from a text box to be deposited into a named file with a specified timestamp (which can be set with touch). Step 2: allow these files to be edited in a text box.

June 21, 2006

I was skimming Vincent Maraia's (he has a blog!) book, The Build Master: Microsoft's Software Configuration Management Best Practices, and ran across the following quote:

Thus, if you want to learn one languauge that will cover many tools and technologies no matter what platform you are working on, that language is XML.

On the surface, this is a true statement. Since XML's introduction it's shown up virtually everywhere: XML has been used for everything from configuration files to RPC protocols. Better still, all these XML documents have the same understandable syntax and can be parsed by the same, standard tools (which exist virtually everywhere). If you want to work with XML files, chances are your favorite text editor has built in XML support; If you want something more structured, Excel has a powerful XML import capability, as do most databases. However, as nice as all this is, it glosses over one fundamental fact: XML, by itself, doesn't mean anything.

Saying that a document is in XML is basically the same as saying it's in CSV: it implies the format that contains the data, but it doesn't imply anything about the data itself. There are still a bunch of unresolved questions: What tags are supported? How are attributes parsed? What do the tags actually mean? These are the types of questions you'll find yourself asking about five seconds after receiving an XML document in a new format. While some of these questions can be answered by a Schema or DTD, the last question, the key question, isn't addressed by a schema at all. As anybody who has had to reverse engineeer an otherwise unknown XML document can tell you: even if you know a document is in XML, the things you really care about are still left unspecified.

So, XML isn't really the 'language' Mr. Maraia states it to be, which is why his comment is so optimistic. While it is true that XML is useful and universal, you'll also need to learn schemas for the documents you'll be working with; That's where the bulk of the work will be. (Syntax is generally an easy thing to learn, and developing syntax processing code is a well understood branch of computer science.) So, while you should learn XML, if learning XML itself is the kind of decision you have to mull over, you probably aren't prepared for steps you'll be taking immediately after learning XML. (This is particularly true if you're using XML to configure build tools, as in Maraia's book. If you're in that role and are having trouble with XML, you should just quit now.)

Erik Naggum, of comp.lang.lisp fame, summed this up quite nicely:

Structure is nothing if it is all you got. Skeletons spook people if they try to walk around on their own. I really wonder why XML does not.

Tags:tech
June 13, 2006

Recently, I was asked for advice on how to learn Excel macro programming. I'm not the expert, but I read sites and books written by folks who are. Here are some useful links.

Websites:

Books:

The last book is particularly interesting: it focuses on the C/C++ API to Microsoft Excel. Since Excel 5, when Microsoft introduced VBA and the Excel COM object model, this programming mechanism seems to have fallen out of vogue, but it is still being maintained, and represents a way to write really fast and secure Excel add-ins.

Older Articles...