Wednesday, December 28, 2005

Inside Symantec LiveUpdate

Last April, I wrote about my problems with McAfee Internet Security Suite. Since I am on vacation this week, I finally got around to removing the McAfee suite from my home computer. I decided to upgrade to Windows XP Service Pack 2 -- for the built-in firewall -- and then add Norton AntiVirus for virus protection.

I was particularly worried about removing the McAfee software. Last time I tried that, the uninstall program failed and left lots of remnants on the system. I spent hours first tracking down instructions and then manually removing services and registry settings. By comparison, the removal of Internet Security Suite 6.0 was painless. It took all of five minutes.

The installation of Windows XP Service Pack 2 (SP2) was painless too. I still haven't explored all the benefits of SP2, but I like the built-in Windows Security Center, the new Outlook Express security features, and the Internet Explorer pop-up blocker. (Nevertheless, I will continue to use Firefox for most of my web browsing.)

In short, things were going great. I had a brand-new copy of Norton AntiVirus 2006 and I expected that installation to be dirt simple. Twenty four hours later, I finally have things working. Although the initial installation appeared to go well, I couldn't get Symantec LiveUpdate to work. Without LiveUpdate, it is difficult to get the latest virus definitions. Without those, virus protection is incomplete.

When LiveUpdate fails, it tries to be helpful. It displays an error message and provides a link to a Symantec web page with trouble shooting tips. In this case, the message was:
LU1841: Connection to ISP failed. LiveUpdate could not connect to your Internet Service Provider. Verify your dial-up information is correct.
Possible explanations included problems with the system's Internet Options or misconfigured firewall software. I checked these and other possible explanations, used Symantec's Automated Support Assistant, and generally pounded my head against the monitor for hours. Nothing helped.

Finally, I stumbled upon this excellent document on the Symantec site. Near the end of the document there is a section about some Settings.LiveUpdate files. These files hold various settings including the names of LiveUpdate servers. If the files are corrupted, LiveUpdate can stop working. The document suggests removing the files and trying again. Since the LiveUpdate service appears to keep the files open, this is easier said than done. Unless you take some special steps, you will get sharing violations when you try to remove the files.

Here's what worked for me:
  1. Restart Windows in safe mode. This causes Windows to run without the LiveUpdate service.
     
  2. Backup all the files in c:\Documents and Settings\All Users\Application Data\Symantec\LiveUpdate. I just copied the files to a temporary directory.
     
  3. Back in the c:\Documents and Settings\All Users\Application Data\Symantec\LiveUpdate directory, remove all files with Settings in the file name. In particular, you don't want to remove the Configuration and Product files. Those files apparently contain important information about your registered Symantec products.
     
  4. Restart Windows and retry LiveUpdate.
While this whole process took much longer than it should have, I feel like I understand the inner workings of LiveUpdate a little bit better. I am posting this story with the hope that someone else can benefit from it some day. Now I just have to take care of some overdue vehicle maintenance, finish a few household chores, and defeat the legions of spammers assaulting my Inbox. Then my "vacation" will be complete.
 

Wednesday, December 21, 2005

Thomas Jefferson

I am reading Paul Johnson's big A History of the American People. I am only about a quarter of the way through, but one of the pleasures of this book is seeing how Thomas Jefferson keeps popping up. From 1776, when he wrote the Declaration of Independence, through his busy years as President (1801-1809), until his influence diminished at the end of his friend James Madison's second term (1817), Jefferson managed to play a key role in shaping our nation.

I've read a lot about Jefferson before, but Johnson's history includes some facts that are new to me. For example:
  • As a result of the 1783 Peace of Paris, the United States gained a vast new tract of land, the so-called Old Northwest Territory. Jefferson, who helped negotiate the treaty, proposed dividing the territory into several new states including Metropotamia, Polypotamia, Assenisipia and Cherronesus. Fortunately, he was overruled. Instead, over time, we got Ohio, Indiana, Illinois, Michigan and Wisconsin.

  • While he was president, Jefferson had an open door policy. He let it be known he would answer any letter from any citizen and he was true to his word. He answered, in his own hand, literally thousands of letters from ordinary people and he kept copies of all his correspondence. The result is a lively record of what was on the minds of both the great men and ordinary people of his day.

  • Although he was personally involved in adding the Old Northwest Territory and the Louisiana Purchase to this country, Jefferson wasn't satisfied. In 1812, he urged his friend James Madison to invade and "liberate" Canada. Jefferson and Madison expected to be welcomed by Canada's citizens. They neglected to consider the large population of loyalists who had emigrated from south of the Canadian border before, during and after the American Revolution. Even the French-speaking citizens of Quebec were not inclined to oust the British. The result was a disaster. The inexperienced American army was routed and within months the British invaded and burned Washington, D.C.
Thomas Jefferson was a leading light of the American Revolution and one of our greatest presidents. We have long admired him for his many deeds including writing the Declaration of Independence, building Monticello, and chartering the Lewis & Clark expedition. Recently, his image has been tarnished by his, to our eyes, profoundly inconsistent views on slavery. I guess this is human nature. We put our leaders high on a pedestal and then, every so often, we happily knock them off. But in Paul Johnson's hands, Jefferson emerges as a man in full. Johnson describes Jefferson's greatest achievements, his little inconsistencies, his most enduring ideas and his monumental mistakes. In the end, I am amazed not by Jefferson's inconsistencies (he was only human), but that a man of flesh and blood accomplished so much.
 

Friday, December 16, 2005

Web 2.0 Explained

You may have seen the term "Web 2.0" tossed around, but what does it mean exactly? In one context it appears to have something to do with Ajax. In another context it appears to have something to do with tags -- like tags in Flickr. It turns out it includes both ideas and much more. It's a grab bag of ideas supposedly driving a rebirth of the Internet.

This makes a dramatic narrative. "Web 1.0" rises from nothing in the mid-1990s. Amazon.com takes business from bricks-and-mortar stores. AOL buys Time-Warner. Every business is an e-business. Then, in 2001, it comes crashing down. We realize bricks-and-mortar stores still make sense. In fact, Wal-Mart has gotten very big indeed. Time-Warner executives wrestle control from the AOL upstarts. The Internet bubble is forgotten and everything is (mostly) back to normal.

Then, the narrative continues, "Web 2.0" rises from the ashes of "Web 1.0". Google and a half dozen smaller entities like Flickr and Wikipedia begin to redefine the Internet. Venture capital pours into hundreds of cool startups and the bubble begins to grow again. Hopefully, it doesn't grow too big, too fast. This version of the Web is actually useful.

But there are problems with this narrative. For example, is Ajax really all it's cracked up to be? Chris McEvoy wrote a spoof of Jakob Nielsen lamenting the problems of Ajax. Although it's a spoof, the arguments are compelling. For example:
Ajax breaks the unified model of the Web and introduce (sic) a new way of looking at data that has not been well integrated into the other aspects of the Web. With ajax, the user's view of information on the screen is now determined by a sequence of navigation actions rather than a single navigation action ... Even worse, URLs stop working: the addressing information shown at the top of the browser no longer constitutes a complete specification of the information shown in the window.

And in his excellent essay on Web 2.0, Paul Graham damns Ajax with faint praise:
Basically, what "Ajax" means is "Javascript now works." And that in turn means that web-based applications can now be made to work much more like desktop ones.

Google Mail, Google Maps and other Ajax applications are great, but are Ajax applications really going to replace desktop applications? What happens when I want to disconnect from the web? Don't get me wrong. I don't think Ajax is going away, but it will not single-handedly topple the desktop.

There are also problems with tags. And there are problems with Wikipedia. There are problems with all the social networking, new democracy technologies. Maybe it's just the sources I read, but it feels like "Web 2.0" is losing share to "Cynicism 2.0".

Near the end of his essay, Paul Graham says:
Google was a pioneer in all three components of Web 2.0: their core business sounds crushingly hip when described in Web 2.0 terms, "Don't maltreat users" is a subset of "Don't be evil," and of course Google set off the whole Ajax boom with Google Maps.

Web 2.0 means using the web as it was meant to be used, and Google does. That's their secret. The web naturally has a certain grain, and Google is aligned with it. That's why their success seems so effortless.

In the end, Google is not an Ajax company. They are not even a search company. Right now, their biggest source of revenue is selling advertisements. They are successful because of the value they provide to their customers. The technology they use is only a means to that end. If the "Web 2.0" startups don't absorb that simple lesson, they are doomed to fail.
 

Wednesday, December 14, 2005

Iraqi Elections

Tomorrow, Iraqi citizens will take another big step toward democracy when they vote to seat members of their new parliament. Undoubtedly, the U.S. media will take a break from the usual body count and "who knew what when" to admit that perhaps, after all, there is promise in Iraq's future.

Meanwhile, there are bloggers who remind us of that promise every day. Michael Yon is one blogger who regularly posts good news from Iraq. I am particularly impressed by a photo essay he posted last month. I'll get to the photo essay in a minute, but first take a few moments to clear your mind. Forget WMD, "blood for oil", the Al Qaeda connection and so on. Those arguments are all relevant certainly, but they are also old news. Regardless of how we got there, we are in Iraq now. If we leave too soon, we risk the total collapse of a fragile democracy. And we'll have broken a promise to our allies.

If you want to meet our allies, see Michael Yon's photo essay.
 

Sunday, December 11, 2005

Bloglines

I finally got around to trying Bloglines last week. It's great! I realize this is not news to my techie friends, but I want to spread the word to the less techie readers of Runtime Log.

Bloglines is a FREE web-based service that watches for new posts on multiple blogs. It keeps track of new posts so you don't have to constantly visit your favorite blogs only to be disappointed when there's nothing new. It's especially useful for monitoring blogs with infrequent or sporadic activity.

The heart of Bloglines is the nifty outline shown in the picture. It lets you organize blogs by category. Blogs (or categories) with new activity are shown in bold type, with the number of new posts in parentheses. To read new posts, you simply click on the outline entry. When you do this, Bloglines shows just the new posts in a separate frame.

Reading a blog with Bloglines causes it to be marked as completely read, but you can remember a post you want to get back to by checking a box labeled "Keep New". In the picture above, I have marked two Software Development posts as "Keep New". This is indicated by the numbers in gray parentheses.

If you read lots of blogs, Bloglines is a great way to organize them and save time. And if you have your own blog, you should look at it with Bloglines too. It will look slightly different. You might be interested in how some of your readers are seeing your blog.
 

Tuesday, December 06, 2005

Form Follows Function

For the past several weeks, I have been working on an API at work. The first step was to design the API and have it reviewed by other software architects. I was surprised by how much time we spent debating the mere form of the API. For example, we argued a lot about whether to use interfaces or classes for value objects, but comparatively little time discussing the function of the API. I am not saying the interfaces vs. classes debate is not important, but often the argument was, "By convention, all value objects must be defined as interfaces (or classes)." In other words, it was a case of form for form's sake. The argument was not grounded in the function of the API.

Now that I have moved from design to implementation, I am noticing another kind of tension. As developers begin to use the emerging API, they make enhancement requests. Often these requests are to add a method that is outside the scope of the API, or worse, to make an existing method do some additional work that isn't obvious from the method definition. As an example, I've had several requests to make methods aware of the User Interface (UI) context, but this is an API for accessing data and metadata. None of its implementations should introduce side-effects in the UI unless all of them can guarantee the same behavior. I think it is important to keep the API contract as simple as possible, so I generally decline such requests.

It strikes me the answer to both kinds of debates is the same: "Form follows function." This phrase first gained currency in the discipline of building design. The late 19th century architect, Louis Sullivan, and his disciple, Frank Lloyd Wright, were its most famous proponents. The phrase is sometimes misinterpreted as a statement of precedence. In other words, it is interpreted as, "function precedes form," but that's not really the idea. Rather, Sullivan and Wright were reacting against the conventions of the day. They thought it was silly to build Renaissance train stations, Greek Classical post offices, and English Tudor homes. There were against ornamentation for ornamentation's sake. As Wright said, "Form and function should be one, joined in a spiritual union."

"Form follows function" has been applied to lots of other design activities besides building design. I actually haven't heard it used in reference to the design of an API, but I think it makes sense. It carries with it two important ideas. When designing an API, you should:
  1. Resist unecessary ornamentation. Some conventions are certainly of universal importance, but others should be applied in only some circumstances and some are mere fads. Each convention should be tested against the function of the API. Does it really make sense in this context?
     
  2. Make each method as explicit as possible. To improve the usability of your API, give each method a descriptive name and make it do what it says -- no more, no less. Avoid the temptation to have methods cause side-effect in other parts of the system. This is particularily important for APIs that will have multiple implementations.
Next time someone tells me I must always use interfaces for value objects or I must follow some other such convention, I'm going to say I heard differently from a famous architect. "Form follows function." I heard it from Frank Lloyd Wright.
 

Monday, December 05, 2005

December - January Issue of Striding Along

There's a new issue of the Gate City Striders newsletter on the web. This issue includes a description of the Boston Marathon "bypass" process for club members, news about about the Freeze Your Buns winter race series, cold weather running tips, a glimpse at the 2006 New Hampshire Grand Prix calendar, and more. It is also my first issue as ex-newsletter editor. I think the new editor, Bill Farina, is doing a great job.

See it all on the newsletter page.