Sunday, January 15, 2006

Newton Technology in 2006

With the Worldwide Newton Conference going on and all the attention currently focused on the Newton, I was recently posed the following question:

Everyone keeps saying that the Newton could do things that no other PDA can. Could we get some examples?

People who haven't used the Newton tend not to recognize its capabilities, as they're not something that are really obvious from the outside. At first glance, it may appear to be just a bulky (and these days, old) PDA.

This is really a flawed analysis, though. Even though the term PDA was coined to describe the first Newton MessagePad, its current usage tends to be more associated with less capable devices that have since come onto the scene in force and took the term for their own. Both Apple and Newton, Inc. realized this themselves in the final couple years of MessagePad production, and they tried to distance themselves from the term by calling the later model MessagePads "hand-held computers".

These days people can better understand Newton devices if they compare them not to modern PDAs, but instead to modern tablet computers. The difference may be subtle, but at the heart of it is the idea that a typical modern PDA is something one uses as an extension of a desktop computer (and it has to be synchronized all the time to stay useful), while the tablet computer can itself serve more or less as a replacement to a desktop system.

The Newton devices sport a freely available, yet sophisticated development environment with a choice of modern languages. They support a wide range of hardware and protocols including 802.11g wireless networking, Bluetooth, land-line ethernet, and IrDA in addition to regular telephony (including both FAX send and receive as well as networking). They can handle extremely large memory cards, and they use these essentially as solid-state drives (they don't use hard drives). They have grayscale displays large enough to do some real work, and the entire display is touch-sensitive with support for free-form natural writing anywhere. Its handwriting recognition system is good enough for everyday use, can be tuned to one's own handwriting, and is flexible enough to handle accented characters. For those times though when writing isn't comfortable, they have a keyboard add-on that's small enough to fit in a winter coat pocket but large enough for touch-typing. It has a powerful, yet energy-efficient processor that makes for long battery life (and it can even use standard AA batteries). Its OS is fully multi-tasking, and it's capable of even playing a few movies simultaneously without losing frames.

Internally it also has some interesting concepts and capabilities. Its concept of "soups" makes novel exchange of data between applications possible. Its "Intelligent Assistant" gives it the ability to turn random, unscripted commands like call Mom or fax Darren not just work, but do the appropriate thing based upon your current location (supplying phone area codes, region codes, and prefixes as needed) and other factors (like time of day).

The combination of all of these factors makes for an extremely adaptable device.

For applications they have all the usual things expected from a PDA (like notebook, address book, calendar, etc.) but also have the sorts of full-featured apps one would expect from a tablet computer (like a word processor good enough that people have literally written novels with it, a spreadsheet app worthy of a desktop, a graphing calculator, a personal finance system, etc.). In addition to these things, they have modern Internet apps (including among others what's probably the best e-mail client I've ever seen on a hand-held device and a full graphical browser) plus some more technical apps like Telnet that (coupled with all the networking capabilities mentioned above) make the device good for checking out networks in addition to its more typical tasks.

They of course also have all the sorts of applications that people over the years have written for hand-held devices of all types; if your interest is astronomy, there's software for you; if your interest is hiking, there's software (with GPS support) for you; if your interest is photography, there's software to connect to your digital camera; if your interest is interactive fiction, there's software that will let you run all the Z-machine titles, including all the original Infocom games as well as all the newer stories.

They have a great built-in e-book parser, and in fact, the Newton book is according to some the original e-book format. This is of especial interest not just because there are large libraries of Newton books available, but because during the late '90s Newton, Inc. (before it was absorbed into Apple Computer) released the details of its Newton book packaging format to the world. The Newton book format is thus arguably an open format, and is thus open to all sorts of uses without fear of future lock-out. It's also a modern format with Unicode support that can handle many languages. I've personally been working on a Newton book reader that currently functions as an extension to Firefox (it makes it possible to read Newton books on machines running Mac OS X, Solaris, Linux, Windows XP, and everything else that supports Firefox), but any number of applications are possible.

The big thing that makes a Newton device useful isn't any one of these particular features; it's the combination of them all in a portable package. It's really got all the advantages of a typical tablet computer, but it's packed into a smaller and lighter unit, has instant-on / instant-off capabilities, was designed to even be used with just one hand while standing up, and pretty much never crashes. While these days people tend to think of PDAs as being devices to manage personal information and track meetings, Newton devices are much, much more.

Newton devices have come in many shapes and sizes. Besides the Newton MessagePad and eMate made by Apple and Newton, Inc., there are military-grade units made by Digital Ocean, a all-in-one FAX / copier station made by Siemens, and even other hand-helds made by other companies.

The later model Newton MessagePads stand out, though. Some people who've been in the computer business long enough get the ability to admire particular items not just on the merits of computer science, but on more artistic grounds. It's a little hard to explain, but some devices are more beautiful than others simply based upon the artistry in their design, and I don't mean this in a physical way based upon case mods and the like. It's a bit more like how a mathematician may find a certain formula beautiful, or a physicist may find a certain theorum beautiful. The Newton MessagePad is one such device; a person with enough background and enough exposure to it will invariably come to appreciate its elegance and beauty.

The Worldwide Newton Conference is going on right now in San Francisco as I write this, and even though I can't personally attend I'm actively following new announcments. One of particular interest is that Paul Guyot has gotten his Einstein Newton emulation project running on other hand-held devices. This means that in the future it'll be possible to essentially turn other tablet machines into Newton devices; all that's required is that they be able to run Linux. It remains to be seen though whether these devices on new hardware will ever manage to be as elegant as original Newton devices.

Thursday, March 17, 2005

Adventures with Apache 2

I've been again spending some quality time with Apache 2. The Apache Group has been stating that we consider this release to be the best version of Apache available and encourage users of all prior versions to upgrade for quite some time now; you can find this in official announcement and here and there elsewhere. Apache 2.0 does offer some major improvements Apache 1.3 (like filtering and internationalized error messages). It is also significantly, measurably faster.

Besides the comments by the Apache Group, you'll also find articles and discussions questioning whether or not to upgrade and often implying that upgrading is a bad idea. The usual conclusion they come to as to why one may not want to upgrade is that not all third-party plug-ins have been upgraded to 2.0 yet. This is of course becoming less and less of a problem as time goes on, and is thus becoming a flimsier and flimsier argument.

Still, of all the production servers I manage, only one of them is currently running Apache 2. I'd love to upgrade the others, for the speed increase if nothing else, but I am still prevented from doing so. My problem isn't third-party plug-ins (in fact, the three plug-ins I most frequently use in Apache 1.3 are now standard components of Apache 2.0, so the plug-ins are actually easier with 2.0) but is instead something I haven't yet seen mentioned as a deal-breaker with Apache 2.0: caching.

With Apache 1.3 caching is robust and reliable. With Apache 2.0 caching is something of an adventure. I'd say it's a little more hit or miss, but actually it even lacks the X-Cache HIT or MISS HTTP header lines that make checking caching performance on Apache 1.3 so easy.

Going through the documentation for the Apache 2.0 versions of modules mod_cache and mod_disk_cache, one finds a lot of messages stating that various directives are not yet implemented, and that in fact both modules are still experimental. They're also (often cryptically) buggy.

You might wonder why I need the Apache caching facility on the majority of my servers. The answer is simple: Zope. Saugus.net (where I work days) is a Zope Solution Provider, and the majority of sites we serve utilize the dynamic capabilities of Zope behind a robust Apache front-end, and Apache caching is a simple and effective way of reducing a Zope server's load.

Every so often I try Apache 2 on a non-production machine to see how it handles caching, and each time I come to the same basic conclusion that it's not yet ready for prime time. Well, that is until 2.0.53 came out on February 8.

I tried it as usual and had it running for quite awhile on a test machine without problems. The lack of the X-Cache header made testing more painful than it should otherwise have to be, but it was still readily possible to tell whether a request had been served by Apache via cache or by Zope via dynamic generation. I actually started to dig into the source at one point to see if I could temporarily reactivate the header for testing purposes, but doing so was non-trivial and I did have other deadlines. In any case it looked pretty good even in a relatively complicaated fake set-up.

I then tried it on our ShellTown machine. This machine primarily exists to provide shell accounts for customers; it only serves a handful of domains, basically just for itself and the shell customers who utilize it.

Things seemed fine at first, but after a couple days we got some trouble reports in that involved a very strange behavior: some of the domains would work properly if addressed without a prepended www. but wouldn't work properly in the opposite case. Specifically for the most troublesome case, the site Ochmoneks worked reliably 100% of the time if it were accessed as ochmoneks.com but would produce a virtual directory listing (which even showed the proper index.html file in it) if it were accessed as www.ochmoneks.com. Weirdly, one could make it work if two trailing slashes were appended (one wasn't enough). Also, of course I checked the DNS records for Ochmoneks.com, and they were fine and showed nothing unusual.

Turning caching off completely made the problem go away. Doing a search through the Apache Software Foundation Bugzilla reveals nothing that sounds similar out of the over fifty reported bugs involving caching in Apache 2.0, although I confess I've not been able to reduce this to a simple case. It only seems to happen on the real server.

The Ochmoneks site doesn't utilize Zope, so my workaround has been to hand-tune the httpd.conf file to cache only Zope-generated content. This is far from ideal, but there are few enough domains (and few enough Zope-generated pages as some domains feature both static and dynamic content) to make it viable.

Thus the ShellTown customers get the advantages of Apache 2.0, but due to the oddities we've experienced we're in no hurry to upgrade any of the more complicated machines.

Saturday, January 29, 2005

The Beginning

A beginning is a very delicate time.

Or so spake Princess Irulan from 1984’s Dune. It’s one of those fun statements that’s both profoundly true and demonstrably false depending upon circumstances (bringing to mind Malaclypse the Younger’s quote, All things are true, even false things). It’s frequently said that a first impression can never be unmade, but yet when does a band make sound checks?

This post is intended to be more of the blogging equivalent of a sound check than anything else; the next post here will hopefully give a better taste of what this blog will be about. Since this is my personal blog I’ll occasionally be posting on various things that catch my fancy, but it’ll still mostly focus on computers and (especially) software. This post I’m using primarily as a testbed to try out various software and play around with layouts.

I’m currently expecting to post more or less fortnightly, but that is bound to change with real-world schedules.

The next section can be completely ignored. It’s some traditional dummy text in Latin used to fill space in documents for purposes of typesetting and layout. I’m using it not only for the latter purpose but also some XHTML/CSS coding tests as well...

Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.

Of course, even though it’s basically Latin, it’s also semi-nonsense as it’s a bad chop & combo job on a couple of paragraphs from Cicero’s de Finibus Bonorum et Malorum (which translates roughly to the “Extremes of Good and Evil”). The original paragraphs are as follows:

Sed ut perspiciatis unde omnis iste natus error sit voluptatem accusantium doloremque laudantium, totam rem aperiam, eaque ipsa quae ab illo inventore veritatis et quasi architecto beatae vitae dicta sunt explicabo. Nemo enim ipsam voluptatem quia voluptas sit aspernatur aut odit aut fugit, sed quia consequuntur magni dolores eos qui ratione voluptatem sequi nesciunt. Neque porro quisquam est, qui dolorem ipsum quia dolor sit amet, consectetur, adipisci velit, sed quia non numquam eius modi tempora incidunt ut labore et dolore magnam aliquam quaerat voluptatem. Ut enim ad minima veniam, quis nostrum exercitationem ullam corporis suscipit laboriosam, nisi ut aliquid ex ea commodi consequatur? Quis autem vel eum iure reprehenderit qui in ea voluptate velit esse quam nihil molestiae consequatur, vel illum qui dolorem eum fugiat quo voluptas nulla pariatur?

At vero eos et accusamus et iusto odio dignissimos ducimus qui blanditiis praesentium voluptatum deleniti atque corrupti quos dolores et quas molestias excepturi sint occaecati cupiditate non provident, similique sunt in culpa qui officia deserunt mollitia animi, id est laborum et dolorum fuga. Et harum quidem rerum facilis est et expedita distinctio. Nam libero tempore, cum soluta nobis est eligendi optio cumque nihil impedit quo minus id quod maxime placeat facere possimus, omnis voluptas assumenda est, omnis dolor repellendus. Temporibus autem quibusdam et aut officiis debitis aut rerum necessitatibus saepe eveniet ut et voluptates repudiandae sint et molestiae non recusandae. Itaque earum rerum hic tenetur a sapiente delectus, ut aut reiciendis voluptatibus maiores alias consequatur aut perferendis doloribus asperiores repellat.

Translating the first paragraph into Esperanto (to both add length for this layout tweaking exercise and check on Unicode support) we have:

Sed mi klarigas vin kiel ĉio tiu ĉi erara ideo pri plezuro denunca kaj doloro laŭda naskiĝis kay mi donos vin raporto kompleta de la sistemo, kay prezentas la efektivaj instruaĵoj de la esploristo granda de la vero, la konstruistestro de homa feliĉeco. Ja, neniu evitas plezuron mem, ĉar ĝi estas plezuro, sed ĉar oni kiu ne scias kiel postkuri racie plezuro renkontus sekvojn doloregajn. Krome neniu amas aŭ postkuras doloron mem, ĉar ĝi estas doloro, sed ĉar de tempo al tempo incidentoj de laboro kay doloro havigas al si iom plezurega. Ja, por malgranda ekzemplo, kiu de ni entreprenas ekzercon fizika peniga, krom gajni ia supereco konsekvenca? Kiu havas ia pravigon trovi kulpo kun homo kiu elektas ĝui plezuron kun ne ĝena konsekvencoj, aŭ oni kiu evitas doloron kun ne plezuro rezulta?

Of course, I don’t claim to know any Latin at all and my Esperanto is by no means the best in the world. I’m sure I’ll find any comments or corrections from folks with more Latin and/or Esperanto experience educational.