Thursday, December 20, 2007

RSS is *everywhere*

UPDATE: for some reason not all the images come through in my feed reader; there should be three images below: two smaller ones side-by-side, and then the larger one that is a larger shot of the drinking fountain top.
***

First there was the coffee cam, then the internet-enabled refrigerator, now there are water fountains with RSS feeds:


Separated at birth?



Monday, December 17, 2007

Misuse of the progress bar in web applications

A while back it became fashionable to have animations appear in or layered on top of web pages during page transitions to indicate that the user's request was being processed and that the page was not just sitting there waiting for input or locked up. That's all well and good, except for one thing: it doesn't mean anything like "your request is being processed." The indicator is just an animation that is preprogrammed to cycle through the same set of images until the next page loads, giving the appearance that something is happening, but all it really means is that the animation loaded. It's the web version of "this page intentionally left blank," but worse, because it is misleading rather than just paradoxical.

There is no question that feedback improves usability, so it is the right thing to do to visually advise the user that the application knows a button has been clicked, etc. But, there is one type of status indicator that has no place on a web page: the segmented progress bar. These are a carryover from desktop apps where the bar really does indicate the relative completeness of a process, but they don't work in a web page (they work fine for browser status, but that's different). Unlike desktop apps, web apps are not wired into the events as they are taking place and so they are meaningless.

The problem developers and designers are faced with is that the bar can't just move from left to right once and then stop because the process may take more or less time than that to complete. Clever folks (not good clever) have taken to making the bar cycle repeatedly from left to right, as if that makes any more sense, unless you are a fan of Battlestar Galactica or Knight Rider.

Some alternatives I have seen include a message in the status bar of the browser itself, which is hard to see and easy to ignore; the blinking dot, which is old school in a command-line sort of way (or in the way of the highway information sign when it contains no accident information or fictitious travel times).

The best I have seen are animated icons that are circles or spheres of some kind that have a piece of their image that moves around it, such as the belly-button ring on the Nintendo Wii (take a look, you'll see what I mean), or even the beachball in Windows Mobile apps. In the case of the Wii, the indicator is a simple circle that has a dot moving around it, so there is no question that something is happening. Likewise with the beachball, it is simple but effective, because a circle has no starting point and no ending point and so there is no problem of trying to decide what to do after it cycles the first time.

I probably won't be able to pry the nearly useless status indicators out of web developers' hands, but please, please, please get rid of the Cylon eyes!

Monday, December 10, 2007

Linq + Anonymous Types = bliss

If you've ever been faced with the task of reading in a list of object properties from XML and instantiating objects with the node text, you know that while it is relatively straightforward on the surface, it still can be a lot of hassle to create the DOM object, work up the XPath to get what you want, create a strongly-typed object to hold the properties you are pulling, and test and convert the node inner text and stuff it into the object.

I have been following along Scott Guthrie's description/tutorial of the new ASP.NET MVC Framework and ran across a little tidbit that made the job of using XML in my application a whole lot easier: using anonymous types and the results from a Linq query to populate them. Here's an example:


XDocument buildFile = XDocument.Load(args[0]);

var builds = from file in buildFile.Descendants("file")
select new
{
SourcePath = file.Element("sourcePath").Value,
TargetPath = file.Element("targetPath").Value,
ReplaceToken = file.Element("replaceToken").Value,
ReplaceWith = file.Element("replaceWith").Value
};

foreach (var file in builds)
{
ReplaceInFile.Replacer replacer = new Replacer(
file.SourcePath,
file.TargetPath,
file.ReplaceToken,
file.ReplaceWith);

string contents = replacer.Replace();

Utilities.SaveFile(file.TargetPath, contents);
}


The anonymous type comes in really handy here because I only need it for a very limited purpose and will not need it anywhere else. Previously I would have created a new class to hold the properties, but now I can do it on the fly.

Maybe calling it blissful is a bit much, but it definitely is an improvement over the old way of doing things.

Thursday, December 06, 2007

Using gmail chat for AIM contacts

More cool features from google chat: you now can log into AIM and chat with your AIM contacts from google chat. You still need to have an AIM account, but you no longer need to use the AIM client to talk to your contacts on that service.

It's about time, too. Google chat is a Jabber client, and there are transports out there that bridge between Jabber and other chat protocols, but for some reason google does not have servers running those transports. Even though you can do it using other servers they are a pain to configure (you can't do it through any google client or settings page, you have to download another client (like Psi), find your way to a server of questionable security and availability, and perform some voodoo to get everything working right) and even then it is iffy.

I have long wondered why google has not set up transports and whether they someday will, and it looks like this may be a step in that direction. I don't yet know whether they are using the XMPP transports or some other method to do the bridging, but whatever they are doing I hope they extend it to ICQ (really an AOL property), MSN, and Yahoo! so I can ditch my desktop chat clients entirely.

Wednesday, December 05, 2007

Visual Studio 2008

I installed Visual Studio 2008 yesterday and have been itching to get my feet wet with it. There are a lot of cool features in the 3.5 framework, and a lot of improvements in the development environment as well. One feature I am particularly interested in is multi-targeting, which gives you the option to choose a target framework (and hence deployment environment) other than the default 3.5 version.

To me this is a huge improvement. It's one thing to fire up a new version of VS and crank out some sample projects, but as soon as you want to deploy them into an environment that does not yet support the newest framework version you are stuck. What ends up happening is a sort of dual existence between the old and new version, with existing code dragging you back into the old version of the framework for way longer than you really want to be there. The promise of multi-targeting is that you immediately reap the benefits of the new IDE and some of the framework classes while still being able to work on projects that are targeted for a previous framework version.

My first experience with 2008 was to convert an existing 2.0 ASP.NET solution that has five projects. I knew you could choose a target environment for new projects but I was not sure how it would work converting an existing one; it turned out to be no problem:



I chose not to upgrade because I want to be able to deploy the app on my current 2.0 host. The conversion succeeded, the app built on the first try, and it ran without a problem. Next came the real test: push it out to my web host, which is running the 2.0 framework, and see if there are any hiccups. I am happy to report that so far I have not run into any problems, and I am looking forward to really digging in to see what 2008 has to offer.

A minor request to the blogging world Part 2

Sarge asked the question in the comments "Do you click-through" to blogs who only provide summaries in their feeds? My answer at the time was that I don't bother clicking through, mainly because it's a hassle, the subtext being that it is counter the spirit of a published feed to dictate to me how I consume it by forcing me to go to the site to view junkloads of ads along with the blog content.

Well, it appears I have to eat my words for The Dilbert Blog, by Scott Adams. Recently Adams changed his feed settings to only show a few words from the first sentence of each post, down from full posts as it had been for the two previous years he has been writing the blog. A couple of days prior to making the change he blogged that people only come to the actual site long enough to find the link to the RSS feed, his feeling being they are doing so to avoid the ads on the site. I am curious to see whether he provides an update later about site visits since making the change to the feed settings.

It would not be difficult technology-wise to stick ad content (text, images, whatever) into feed content and I won't be surprised if it starts happening, although I suspect the feed-o-sphere will be up in arms about it if it does.

Monday, December 03, 2007

What does automated testing miss?

A friend of mine once said that you can judge the intelligence of a driver of a car by the number of stickers plastered to the back of it. He asserted that the relationship is inversely proportional, which I found to be insanely hilarious at the time, and I still think it is a clever turn of phrase even though essentially it is an unprovable generalization. The point is that saying "support world peace" fifty different ways doesn't make you a better person, and it often has the opposite effect of betraying a lack of aesthetic and poise.

Joel on Software gave a talk at the Yale Computer Science department recently wherein he made what I perceived to be a similar assertion about the relationship between the attention given to certain classes of bugs and the ability to test for them automatically:

And so one result of the new emphasis on automated testing was that the Vista release of Windows was extremely inconsistent and unpolished. Lots of obvious problems got through in the final product… none of which was a “bug” by the definition of the automated scripts, but every one of which contributed to the general feeling that Vista was a downgrade from XP. The geeky definition of quality won out over the suit’s definition; I’m sure the automated scripts for Windows Vista are running at 100% success right now at Microsoft, but it doesn’t help when just about every tech reviewer is advising people to stick with XP for as long as humanly possible.


Whether that is true in the case of Windows Vista is open for debate, but the notion that 100% successful unit tests may still leave bugs and internal consistencies is one that has been on my mind a lot lately. Joel makes the point elsewhere in his talk that writing good code depends on writing good specs, and writing good specs is just as hard as writing good code. Writing good tests is equally as hard, but for some reason I think there is a belief out there that as long as you have lots of them, successful unit tests make your code good.

If something is difficult to unit test, such as stored procedures and user interface, a couple of things happen: First, a subtle prejudice develops against those areas (if they can't be or just aren't tested, they must not be very important). Second, the wrong tool for the job gets used -- SQL finds its way into code instead of living in stored procedures, UI issues are deemed trivial so long as the feature being implemented at least works, etc.

It would be a mistake to argue that unit testing should not be done for these reasons, but there needs to be a greater awareness of the relative importance of other types of testing as well. We should take care not to think we have done a complete job of testing just because we can point to a huge stack of tests that only test one area of an application. Perhaps it would be wise to spend a little less time copying and pasting the same test multiple times and changing one piece of it and a little more time making a comprehensive test plan.

Thursday, November 01, 2007

google spreadsheet enhancement

I just noticed something really cool about google spreadsheets: you now can format cells based on rules. I guess I am a glass-half-full kind of guy to think that finally adding such a sorely lacking feature is such a positive deal, but I think it is a cool example of the "release early, release often philosophy" that google embraces.

Tuesday, October 23, 2007

A minor request to the blogging world

I read blogs almost exclusively via RSS in a reader (bloglines), and as a result I never get to see the purty formatting, links, etc. that people have on their pages for non-reader-using viewers. I'm fine with missing out on the window dressing, but I do have a gripe that I think individual bloggers need to address: don't refer to "the above post" or those links "over to the side" of your current post. In fact, don't use any locational references at all; they mean nothing to me, because all I see is pretty much plain old RSS and no special formatting. Because *I* control the order in which I read posts and because I happen to like having the posts show up most recent first in my reader, it makes no sense to refer to something "above" the current entry, because 1) "above" means after for me, not before; 2) the post I am reading might be the only one on the page rather than part of a long line of them.

Now, you might argue that because it is my choice to read posts in newest-to-oldest order, I have taken it upon myself to figure out the sorting and references and too bad for me if it isn't chronological the way the author intended. I would counter by saying that by choosing to publish a RSS feed you are putting your content out there in a way that you should reasonably expect someone to consume it differently from what you intended. Maybe most people *don't* read in reverse chronological order like I do, but other methods of getting to your post, like permanent linking into archives, etc. will suffer the same problem.

I do have a solution to go with all this griping: make the reference to the other location a hyperlink. Keep on using the locational language if you have to (it *does* admittedly add at least some context in the sense that it points to a time in the past, but link to it as well, so that if I am looking at a feed with only the one post on it and you refer to something else and I want to know what the heck you are talking about, I can just follow the link.

Here's an example:

  • Down below, when I made fun of Comcast, I forgot to take into account that I might be hurting their feelings of fiber-envy.
  • Earlier, when I made fun of Comcast, I forgot to take into account that I might be hurting their feelings of fiber-envy.


Which is easier to follow?

Thursday, October 11, 2007

Test post from IE to see if Blogger is broken

So here is a test post from IE7 to see if the problem is browser related.

[UPDATE] So it looks like there is a problem with Blogger if you try to post from Firefox. I keep getting this error message: "URL contains illegal characters" without any explanation about which URL or what characters. Looking around Blogger's help turns up nothing useful that does not relate to URLs to images (I wasn't posting with an image). So, I tried posting from IE7 instead of Firefox, and encountered no problems.

Just for kicks, I am linking to the search results in Blogger's help just to see if embedding a hyperlink really does cause trouble.

Comcast "fiber optics" vs. Verizon FIOS

UPDATE: I didn't get a picture of the billboard, but I did get a mailer the other day with basically the same message:


We are getting FIOS from Verizon installed today now that it is available in our neighborhood. For the same price ($55/month) that Comcast charges us for 1.5ish down/500 - 700ish up, we will be getting 15 down/2 up from Verizon. Comcast is good sometimes, but not always, and that's a problem. The thing with cable broadband is that depending on how much your neighbors are using the bandwidth that is shared in your neighborhood area, your bandwidth may be severely limited.

My installation experience so far has been good. The initial sales person was very professional, and all the steps he told me would happen (initial survey/line painting for other buried utilities, trenching of fiber from the local box, installer appointment) have happened as described and on time. The installer called today to say he was about half an hour away, and while I had him on the phone I described our existing setup and asked what his plan was for running copper from the fiber terminal to the location where I want the router. He said that because we already are using the coax for DirecTV, he will run CAT5 into the room, and even asked where we would like the wall plate to be located which I think is awesome (we had back luck trying to run DirecTV and Comcast over the same coax, so I didn't want to add yet another service into the mix, even though we will be getting rid of Comcast as soon as possible).

Anyhow, Comcast must be getting hammered by Verizon and losing customers left and right, if the billboard on the major road through our town is any indication. I don't have a picture of it, but it cracks me up every time I see it. It is a photograph of a bundle of fiber optic strands with the words "Comcast: powered by fiber optics" in big letters on the other half of the billboard. I guess they hope unsuspecting consumers will think twice about getting FIOS because, at least according to the billboard, they already have fiber optic service from Comcast.

I'm not falling for it, and I can't wait to compare the two side by side, right before I ditch Comcast for good.

Monday, June 25, 2007

Opera on the Wii

I am writing this from Opera on the Wii. Pretty cool for a game console. Can't use the WYSIWYG editor though. Opera doesn't recognize the editing area as an input box and doesn't let type in it. Multitap works really well and I can type faster than on the virtual keyboard.

Monday, June 11, 2007

Poor application design (and bad data)

What is the deal with all the crappy data on web sites these days? I don't know if it's because I develop web applications for a living, generally have too-high expectations, or just because I am super picky and pedantic (most would vote for the last, I suspect), but I have become really frustrated lately with web sites that don't "just work" the way I think they should.

Some examples from the past couple of days: I wanted to find out more about Ryobi lawn equipment because I have one of their gas-powered string trimmers and I wanted to see if they have an edger attachment that you can use with it (it has interchangeable heads to do different things). So, I get to their web site and start the painful process of locating the product I have, figuring that's a good place to begin finding attachments for it. In spite of the pain of the menus not expanding as I scrolled over them, and having to decide whether I wanted "power tools" or "outdoor tools" (it's both, right?) I was able to locate the product page for the particular model of trimmer we have (ooh, check out the spiffy AJAX-Y grayed out window/image popup when you click the image). My hopes rise as I see they have a "features" tab that tells me the trimmer has a heavy duty coupler for use with Expand-It attachments, which confirms that I am looking at the right product. But, do you think they have a "here is all the cool stuff that attaches to your trimmer using the heavy duty coupler" section on the page? Heck no! What they *do* have is a link to Home Depot, where evidently I am supposed to go foraging myself for the attachments, so I click the link aaaaaannnnndd the page I have requested cannot be found (I requested? I didn't write the stupid broken link!). No sweat, thinks I, because I am resourceful and they have a handy-dandy search box on the page. Type in "ryobi" and voila: nothing. I don't mean "sorry, no items match your search request" type of nothing, I mean a blank page, no message, nothing but white screen and nothing to see in the source behind it either that might clue me in. Being the extremely patient person I am, I click the big Home Depot logo to get to their main landing page and try the search again, and success awaits me on the search results page. They have the attachment I want, the price is about what I expected, and I am ready to go buy that sucker (better yet, let me pay online, right now, and go will-call pickup that thing (OK, maybe that is asking too much)).

So, hmm, it's 6:30 on a Sunday evening, I wonder how late they are open, and more importantly, if they even have one in stock at my local store. Check it out: there's a "Check Your Local Store" link that looks perfect for what I need to know, so I follow it, type in my zip code (that seems reasonable), click "make this my store" and it happily tells me that they do in fact sell that attachment and my local money pit. But wait, do they actually have any in stock? And what about that closing time? Whiskey Tango Foxtrot? Got sidetracked and all giddy finding out I now have a Home Depot that is mine. OK, found another link labeled "Store Finder." Thought I just did that, but OK, I click it, and WTF? again; it wants to know my zip code that I just typed in 45 seconds ago. See "my" store listed again and the phone number I must have missed before, but still am curious about whether they can just tell me the hours on the page, because I really don't like calling places like that to ask if they are open. So, I click the "more details" link, hoping for a nice list of store hours, but, and this is what got me, they don't show the store hours. They do say that store hours vary by season, but they aren't getting any more specific than that. Drat, if only there was some way to centrally locate that information so that it could easily be updated by someone as the seasons change. If only there were some way to predict when the days and months were going to change so that the application could automatically make the changes for you; imagine it!

That's an example from just one relatively small project; I could rant for days about all the stupid stuff that is out there (like how the blogger site warned me just now that I had unsaved data on the page, even though they have this handy-dandy autosave feature that keeps telling me, annoyingly, that it automatically saves my work as I go; so did it or not?).

So what's the deal? Has the quality of data on the web gotten worse in the past couple of years, or am I just noticing it more now for some reason and being much less forgiving than I used to be?

Sunday, June 10, 2007

Blogger classic templates

Back when I first heard about blogger beta I thought it was going to be cool using it because of the new features it offered, such as comment feeds. It *is* cool, but there is one major problem with the new version: you can't post via FTP to your own host the way you can with the classic templates. You can forward your site or point your domain at the blogger site, but I don't want to do that, so I am stuck using the old templates.

I have spent a lot of time getting things set back up the way they were before, hassling with the paths and filenames in blogger to get the FTP publishing working properly, and to get the RSS feed links pointing into the correct locations. It all is working well now, except for one thing: my blog does not see my old archives that I still have on my site. I can force the links to the archives into the site template, which works well enough, but it made me curious about how blogger knows about the archive files that are there when it generates the template pages in the first place. Looking at the template, you can see it is doing an expansion to pull in the archive links, but I don't know enough about it to know where it is pulling that list from.

Maybe it's good to make a clean break from the past, but I like having links to the old stuff around, and at any rate it seems like it ought to be possible to do what I am trying to do. Will post more if/when I get it sorted out.

[update] I thought I had it figured out after doing a little poking around the blogger help area and examining the expansion variables a little more closely. It looks like blogger just takes the path and filename as you configure it and anything in that path will get added to the automatically generated list, but I'm not seeing it. No matter, I guess, but it is bugging me.