Monday, March 24, 2008

MS Idealists Gaining Ground

I recently commented to friends that the continual shunning of web standards by Microsoft's Internet Explorer team would surely lead to the demise of that browser in the long run. My point was that as other browsers gain market share, I think more sites will follow the standards. It seems self-destructive to be non-compliant. My thoughts were prompted by the release of the Acid3 test, which the beta of IE8 scores a whopping 18% on. The result of my comment was a brief debate that left me with an altered opinion on the state of Microsoft.

My friend referred to an article by Joel on Software. With the danger of blogging on bloggers fully recognized, I do have some comments. Joel seems to ignore a few things in his discussion of the difficulties of choosing standards (such as those measured by Acid) versus compatibility (with IE7) mode for the new IE. First, an easy solution does exist. Simply return a different string for the browser name when asked. User agent detection code in existing web sites searches for the string, "MSIE". It'd be pretty easy for version 8 to return "MicrosoftIE" or any of the 1000 variations you can think of. Then those sites looking to include the new version just update their script, while the majority of sites that would break with the newly more compliant browser treat it as an unknown standard browser.

Second, Joel bemoans the triumph of the "Idealists" when in fact it is a good thing. It should have happened when Windows 95 came out. MS tried to maintain backward compatibility with 3.1 at the expense of quality (and to sidetrack OS/2). Then, the NT kernel was supposed to eliminate the DOS layer from the consumer Windows, but this did not happen until a decade later with Vista. 


Look at Apple as a counterpoint. They have effectively abandoned their entire installed base (OS 9 "classic" apps don't work on OS X.5), switched to a new hardware platform, and with the latest OS X introduced a number of API's that will quickly make it the standard for new applications. Their numbers are up to the point that in February 2008, Apple captured 25% of the PC market by revenue. The great improvements in Macs have come from a willingness to stick to the "Ideal", and that is in a niche market.

Apple Mac share of web surfers for two years.

If Microsoft had maintained technological integrity, it could have deployed better operating systems with less regard to old software. Certainly the monopoly OS has the ability to deploy standards and have people come around. They have done this repeatedly by "embracing and extending" industry standards. The same philosophy of breaking interoperability could be used for nice (technological advancement) rather than naughty (monopoly maintenance). Stop selling XP, and Vista will catch on inevitably.

The third thing the article ignores is the fact that, for the most part the "bugs" he talks about were intentionally put into IE 7 and before in order to differentiate it and build its market share. Why people cared back then whose browser people ended up using is beyond me, but the war was so hard fought that standards were ignored, and web developers have paid the price for last decade and more. It makes perfect sense for people to be fed up with coding browser specific hacks to get a site working. Code to the standards and let the "buggy" browsers wither on the vine.

Thursday, March 20, 2008

Creativity Unleashed Through Technology

"When the tools of productivity become transparent, true creativity is unleashed."* I worked next to a guy who was so fond of this quotation that he had it scrawled on his whiteboard for several months. It has become increasingly clear to me that the advance of technology is providing more and more of these transparent tools, and, indeed, the creativity of more and more people is being unleashed.

Historically, there has always been a distinction between the artist and the rest of us. Average Joes may have enjoyed doodling, writing stories, or making up songs, but their audience was typically limited to friends and family or, at most, the local community. The main barriers between "creative professionals" and everyone else could be placed in one of two categories: expense and expertise.

The example of photography is a good illustration of the diminishing barriers to creation and distribution of artistic works. The amount of devotion and expertise required to create in the modern world has dramatically decreased. The Eastman Kodak Company revolutionized photography in 1888 by releasing a camera anyone could use. It cost $25 for the camera with 100 exposures and another $10 for developing and reloading. The company's slogan was "You press the button, we do the rest." You can't get much simpler than point and shoot, so changes in photography were evolutionary for almost a century. Then came the digital revolution. An employee at Eastman Kodak created the first successful digital camera in 1975. It weighed 8 pounds, captured black and white images at 0.01 megapixel, took 23 seconds to do so, and was never put into production. It took until 1990-91 before this technology reached consumers.

As you can clearly see from the graph, the price of digital photography drastically came down during the first decade of the technology. Now people can "press the button" and don't even need anyone else. The ease of utilizing digital photos is an equally important development. Most cameras make it trivial to hook up to a computer and download the images. Software like Apple's iPhoto, Google Pikasa, and Adobe Photoshop Elements make it easy for consumers to quickly make simple changes like cropping, removing redeye, or adjusting colors. Photos can be printed on inexpensive photo-quality ink jets, shared by email, or loaded on file sharing sites like Flickr. What used to be the expensive, reclusive process of film developing and printing can now be a simple, communal activity.

Obviously, there are myriad examples of this transition. People armed with camcorders and iMovie become celebrities on YouTube. Back in 2006, YouTube announced it was serving 100 million videos and receiving 65,000 uploads per day. Anyone with a mic and something to say can develop a following with a podcast. According to Steve Jobs last September there were over 125,000 podcast programs available on iTunes and over 25,000 video podcasts. In addition, blogging and web site creation are simple enough now that anyone can make professional-looking content for the world to read and review. Also from back in 2006, an article reported these astonishing statistics: There are over 50 million blogs. Two new blogs are created every second, and 18.6 new blog articles are posted every second.

Clearly the technology of creation is liberating many people, allowing their artistic expression to come out in the form of graphics, text, audio, and video. As technology continues to advance and simplify the creation and dissemination of such content, it certainly seems that true creativity is being unleashed for more and more people.

* I quoted the saying as best I can remember. I was unable to find a source, so it may have been something my coworker made up.

Sunday, March 16, 2008

Making a Virtual Virtual PC


Before the transition from PowerPC to Intel CPU's by Apple, Mac users had to rely on various other means if they needed to run the occasional Windows app on their computer. The most popular and practical solution was the commercial software package, Virtual PC. It was created by the company, Connectix, but subsequently purchased by Microsoft. Virtual PC would emulate a full Pentium II computer system. Unfortunately, translating instructions between processors is time-consuming and fraught with errors. The program worked for the most part, but was slow at best.

Recently, some of my friends conspired to get me voice recognition software. As I have posted in the past, here and here, my ability to type has been greatly decreased, and I have sought ways to make entering information into the computer faster and easier. Dictation is certainly a good option. It so happened that my friend had gotten a free copy of IBM's ViaVoice for Windows. The system requirements call for a 600MHz Pentium III. Obviously, my emulated Pentium wouldn't cut it.

The native Mac options for speech recognition are very limited. The company, MacSpeech, makes a product called iListen that would run on my G4 PowerBook. There is also a Mac version of ViaVoice. Unfortunately, these products have gotten fairly negative reviews and cost between $50 and $100. A new, superior product called Dictate is being released by MacSpeech, but it will only run on Intel Macs. The answer to this conundrum, my friends figured, was to just send me another computer.

So I have inherited my friend's Gateway 1.6GHz Pentium 4 with Windows XP. Since he wasn't using the computer, this became the most economical option. However, there were a couple of issues to overcome in order for this system to be useful to me.

Issue one: No wireless
First of all, my computer is set up in the garage, far away from any physical network cabling. I use the Mac's Airport card to connect to our wireless network. The Gateway, being an older desktop model, has no wireless available. Thanks to OS X's amazing networking, though, this problem was easily resolved. The first step was to connect the Gateway and the Powerbook with an ethernet cable. Normally this kind of direct connection would require a crossover cable, but I recalled reading that Mac network adaptors automatically detect when a crossover cable would be needed and adjust accordingly to use a regular cable, so I gave it a try. The next step was to enable Internet sharing in the Mac's System Preferences. This was as simple as choosing Airport from the drop-down list and clicking Ethernet for the other computer's connection. I hooked up the cable, started the sharing, and it just worked.

OS X Tiger Internet Sharing

Issue two: Only one monitor
The second issue was that I only have one monitor available (and really no room for another). Normally, I could just use my laptop's display and hook the monitor to the PC. Unfortunately, due primarily to some very rough treatment by its previous owner, my Powerbook's hinge broke, disconnecting the LCD from the computer internals and effectively rendering the display useless. Therefore, sharing the one monitor was the only option.

For several reasons I decided to continue using the Mac as my main computer and run the Gateway remotely as needed. To facilitate this I installed VNC on both systems. For the Windows VNC server, I used Alkit VNC, which allows the sharing of a single application window or the whole screen. I figured this would enable me to just have a ViaVoice window or IE window displayed within the laptop's applications. On the client side I used JollysFastVNC. Though technically just an Alpha release, this app eliminates the biggest problem in using VNC; this client is actually fast. In my limited use I have not had any problems with it. You can see the Gateway's XP desktop running half size in the screenshot beginning this post.

Final issue: No disc!
After getting everything set so I had a virtual Virtual PC, a real PC in a VNC window, it was time to install ViaVoice, the whole reason for all this effort. When I opened the box, I found a nice USB headset mic and a directional desktop mic, a user manual, and an empty CD case! When I asked my friend about it, he said he had never opened the box. Someone must have taken the disc before my friend got the package.

This last problem was one I couldn't overcome. I had successfully set up the computer, but obviously couldn't do dictation with no software. In the end I have a surprisingly responsive "virtual" Windows computing solution. Now I just need some reason for using Windows.

Thursday, March 13, 2008

Future-Proofing Applications: another purpose of design docs

I was doing some reading recently on statistics and testing, and I came upon a free online book, The Basics of Item Response Theory, by Frank B. Baker. It had originally been published in 1985, with this second edition from 2001. What had made it very popular, it said, was the availability of free, as in beer, software to use while following along with the book. The first edition application was written in AppleBasic for the Apple ][. Fifteen or so years later, the program was ported to Microsoft Visual Basic 5 for Windows 95. I don't know if the program runs on modern Windows computers. It certainly does not work on my PowerPC Mac. I found it unfortunate that a freely available educational program would be limited in this way.

Bouncing these ideas around got me thinking about how it would be possible to future-proof an application. It is clear to anyone who has worked at a large company more than 20 years old that aged software platforms are a real problem. Internally developed applications become a mainstay of business operations, but more and more quickly, it seems, the computers and operating systems to run these programs become obsolete. Companies in the situation of upgrading their computer systems can use one of several strategies. Most common, perhaps, is to port the app to a new platform. This usually involves a large expenditure in software development and user retraining and many headaches as new systems attempt to replace the old while having the kinks worked out of them. Many resist porting and end up keeping legacy systems in place long past their expected life cycle. Another possibility is to upgrade computers but keep legacy applications alive through emulation software, which can have a slew of problems of its own.

It is a fact of modern life that programming languages, operating systems, even user interface devices change over time. To truly archive the functionality of an application would require isolation from all of these factors. One such means which would work for simple applications at least, occurred to me. Basically, the idea is to record the functionality of the program in an easily read and understood design document.

To illustrate, I will create a description for a game of tic-tac-toe as a dialog between the user and the computer. This technique is similar to a Use Case, but to me is much more clear. The questions the computer asks are the parameters necessary for the program to run. Note that this example is incomplete in that the rules for deciding if the game has ended would have to be specified, but I left this out to keep it short and simple.

  • User: I want to play tic-tac-toe.
  • Computer: Do you want to be X's or O's, or should I choose?
  • U: You choose.
  • [Assign symbols randomly with an equal chance User is X's or O's.]
  • C: You are X's. You go first. Please choose a location for your X.
  • U: Middle box.
  • [See if the game has ended. If not, randomly choose one of the remaining plays.] 
  • C: I go in the upper left.
    [See if the game has ended. If not, repeat the turns until the game ends.]
  • C: You win. Do you want to play again?
  • U: No.

The important point of this trivial example is that it describes the functionality of the system while remaining entirely interface-independent. If written for the Apple ][, it would probably use a simple text prompt for user interaction. More modern computers would likely allow the user to click on the game board to mark their move. The choice of X's or O's could be made by a GUI button. The computer of the future might use synthesized speech and voice recognition to interact with the user in a very similar manner to how this dialog is written.

Even the algorithms employed can be written in plain language and left up to the programmer to implement in the most reasonable way for the current architecture. For example, assigning the X's or O's randomly in Java could entail use of java.util.Random class to perhaps check whether the next random integer is even or odd. In Python, the "random" module provides the following easy syntax: human = random.choice(['X', 'O']). As long as the implementation follows the documentation of assigning the marker with equal probabilities, the details are unimportant.

There is another advantage to such documentation. In some cases, especially in the sciences and education, the person creating a computer application is not a professional programmer. However, a domain expert could specify the exact functioning of a desired program and leave the actual implementation to others with more expertise. Even if an implementation is created, the functional specification can be made freely available, allowing others to make versions without needing access to the original source code.

Obviously, the more complex a program is, the longer and more complex its design document will be. Full-blown design languages like UML provide the standardized means to create such documentation. For applications that will be around for a long time, a proper functional specification becomes vital to allow for changes in the computing environment. This is clearly the case with many educational computer programs as well as integral business systems. Well documented design is not just for the initial implementation as most people think it is. It can also be one of the best ways to future-proof applications.

Friday, March 7, 2008

The Coming iPhone Halo Effect


The other day Apple held their much anticipated iPhone SDK Roadmap event. Executives Steve Jobs and Phil Schiller were on hand to kick things off. Around the same time Fortune magazine published an interview they did recently with Jobs. At some point during the coalescence of these two events it occurred to me just how big the SDK announcements were. They foretell the coming storm of new Mac adoption due to an iPhone halo effect.

Jobs references the so-called iPod halo effect that analysts cite as a reason for rises in Mac market share in the Fortune article, "We helped it along. But I think a lot of it is people have finally started to realize that they don't have to put up with Windows - that there is an alternative. I think nobody really thought about it that way before." Since digital music players didn't have a monopoly brand associated with them, there was no stigma in the Apple devices gaining a lion’s share of the market. As these devices become more advanced, people are starting to realize that when they have “the whole internet” in their pocket, as with the iPod Touch or iPhone, what they really have is a mini-computer; and that mini-computer is running Mac OS X, not Windows.


Back to the SDK Roadmap, it might have been more clear if Schiller had stood on stage shouting, “Developers! Developers! Developers! Developers!” in a mad frenzy like Steve Ballmer, but it still became apparent that Apple’s strategy is to bring developers into the Mac fold to build a robust application ecosystem all the way from the mobile iPhone OS up through full-fledged OS X.

A large portion of the event was taken up by developer presentations of the work they had completed in just two weeks using the new SDK. It was mentioned repeatedly how many of them had never used a Mac for development or even used Objective-C. It was also revealed, though not trumpeted loudly, that iPhone development will take place on Macs and only on Macs. Those who want to take part in building the iPhone revolution will have to become Mac users and XCode developers.

Just how lucrative this market could be and how easy it is to sign up were clearly flaunted. Apple will host, sell, distribute, and update your app if you simply register as a developer for $99. The tools are free. The developers set prices and get a straight 70% of the revenue. And of course there was “One more thing.” If the regular enticements are not enough, how about $100 million in venture capital earmarked for revolutionary iPhone apps?

Apple is pushing the Mac market from the bottom up and from the back door in. More than a few independent developers are going to be enticed by this potential revenue. They will need Macs. Many of the mobile apps will likely scale easily to full-blown OS X. Once developers are comfortable in XCode, why switch back to anything else? At the same time users are getting used to carrying around a mini Mac. With the OS, applications, and even multi-touch gestures transferring over from mobile to desktop, more and more people will find comfort in this Windows alternative. The iPhone halo could be huge.