Cook Computing

 

« June 2003 »

Re: A civilian in the format wars

Friday 27 June

Tim Jarrett writes:

Is there anything wrong with the technology that we have right now? No. Meta-Weblog works, though it needs wider implementation, as an API to allow multiple tools to work with multiple different kinds of blogs. ...

No, I'm afraid Meta-Weblog doesn't work for most people in the world. Even English-speaking bloggers may not want to limit their blog entries to 7-bit ASCII.

Posted by at 10:25 AM. Permalink.

Thought on Syndication Formats

Friday 27 June

A compelling example of why a vendor-independent syndication format is to be desired is my favourite hobby-horse, string encoding in XML-RPC. Dave Winer studiously ignores the existence of the 7-bit ASCII problem and the reality that most people in the world have a richer vocabulary than can be directly expressed in this encoding. What happens if a similar roadblock is ever reached with RSS?

Posted by at 08:25 AM. Permalink.

FeedDemon beta

Friday 27 June

The beta of Nick Bradbury's FeedDemon is now available for download (via Simon Fell). Simon's post has a link to a fix to get OPML import working but I couldn't import my list of 275 feeds because the max number supported by import is 150.

I wonder what the future for commercial aggregators will be. If Eric Kidd is right either Microsoft will buy out the most successful product or will give away their own aggregator (or add aggregator functionality to one or more existing products). But maybe the opportunity was there for Eric's 30-person company. Someone with the right vision, investment, and marketing could have released a commercial-quality standalone Windows aggregator a year ago and established market presence in time for the explosion of interest in RSS. If it took Microsoft a year to crush them with a free aggregator then maybe in that year the 30-person company would have sold enough to get a decent initial return on the investment and a continuing, albeit reduced, income afterwards if they could innovate more rapidly than the gorilla. I'm not assuming that the 30 people would all be working full-time on this but that a company of this size would have sufficient mass to be able to work effectively in all the areas of implementation, testing, marketing, sales, etc.

Posted by at 07:48 AM. Permalink.

Re: Tom Watson, blogging MP

Thursday 26 June

Lance Knobel chats with Tom Watson, blogging MP, who Lance believes is the first elected national politician to have a weblog (via Scripting News).

David Hinchliffe, the member for the constituency I live in, Wakefield, does not even have an email address. Very old Labour.

Posted by at 11:57 AM. Permalink.

Movable Type and MetaWeblog.newPost

Thursday 26 June

For all budding blogging client implementors who are using the MetaWeblog API with Movable Type, it may be worth mentioning that the publish parameter of newPost is slighly misleading. You might expect that it determines whether the post has draft or publish status but in fact it determines whether the static files relating to the post get created. The post itself is always created with publish status.

The Movable Type code explains:

## In 2.1 we changed the behavior of the $publish flag. Previously,
## it was used to determine the post status. That was a bad idea.
## So now entries added through XML-RPC are always set to publish,
## *unless* the user has set "NoPublishMeansDraft 1" in mt.cfg, which
## enables the old behavior.

Posted by at 09:33 AM. Permalink.

WWDC

Monday 23 June

Not long to go before the Apple WWDC keynote starts. Sounds like they have some exciting new machines to announce. Will I finally be tempted to make the switch? I was planning to buy a 15" Powerbook earlier in the year but once the 12" and 17" machines were introduced I though it best to wait until the 15" was updated. That has been a long time coming so I guess there will be an announcement about a new 15" machine. The price will still hurt though - Apple UK does not seem to take much notice of the weakened dollar.

I wouldn't hesitate if they announced support for the .NET runtime and SDK in the new "Panther" version of OS X but I'm not holding my breath over that.

Unfortunately the keynote is not being streamed live so if I decide to watch it later this evening I'll have to switch off my aggregator until then and avoid various websites. Other than that, I don't need to worry about inadvertantly finding out what was said before I watch. Somehow I don't think there is much chance of anyone in Netherton, West Yorkshire, spilling the beans so I won't be re-enacting the classic No Hiding Place episode of the Likely Lads, and a corresponding ending is even less likely.

Posted by at 05:40 PM. Permalink.

RE: Blogert Initial Reaction

Monday 23 June

ScottW reports on initial reactions to his blogging client and suggests a couple of additions to the MetaWeblog API:

I would like to add a property to the MetaBlog Post object, "IsActive/Published", to allow an indication if the item is currently published or not. This of course assumes the extra property will not crash other blogging system implementations.

I would also like to add a new method, getRecentUpatedPosts. This would work the same?way as getRecentPosts, but instead, would only select posts that have been updated since a specified date. With this, I could store a copy of the posts locally and only select posts that have been updated (read: posts made outside of Blogert)

I have my own hacked up blogging client and the two features Scott mentions would be very useful. I mentioned the need for something like getRecentUpdatedPosts a few weeks ago. It enables you to write a client which can work on your blog offline and then synchronize local and remote versions of the blog when you next have access to the server.

Posted by at 04:28 PM. Permalink.

MetaWeblog API and Icelandic

Monday 23 June

I handled a support query for XML-RPC.NET over the weekend relating to support for Icelandic text in calls using the MetaWeblog API. I fixed the problem but maybe I should have said, "Sorry, XML-RPC only supports 7-bit ASCII and you really shouldn't be using any of those funky funny-looking foreign characters in your weblog".

Posted by at 04:16 PM. Permalink.

Dynamic RSS and Syndirella

Monday 16 June

Scott Watermasysk added a comment on my Full Content RSS Fragments post, describing how he is generating RSS dynamically using etags. I fired up Syndirella + proxytrace to observe how the etag contains the date/time of the last update, which is how he knows which entries to include in the RSS document he returns. Its a great idea but unfortunately not so applicable to Movable Type because that uses static files.

Speaking of Syndirella, I switched to this aggregator from ChannelBuddy[1] yesterday. Following in the footsteps of every man and his dog I want to tinker around coding my own aggregator, or rather the cool ideas I've got which haven't been implemented by anyone else yet, and Syndirella seems a good starting point for this. I've already forked off my private version and made minor changes to the UI according to my own preferences, i.e. making it more like ChannelBuddy (after a year of using ChannelBuddy I'm pretty set in my ways regarding aggregator UI). Its about time I did some WinForms coding and the features I've got planned should bring me up to speed in that area of .NET programming.

[1] ChannelBuddy is a great 3-paned aggregator, developed well ahead of its rivals but unfortunately never released. It now has only one user.

Posted by at 07:03 PM. Permalink.

Weblogging Meets Nicholson Baker

Monday 16 June

The Mezzanine A Box Of Matches

Sort of. I was a bit slow in finding The dullest blog in the world but got there in the end via Gwyn Cole. It actually reminded me of Nicholson Baker's early books, for example The Mezzanine, which is a novel about a man riding the escalator on the way to his office and the thoughts that go through his mind during the one minute it takes between floors. But don't let this put you off if you've never read anything by Baker. His books are very enjoyable, dare I say it particularly so for the geeky type of reader in their almost Aspergerian attention to mundane detail. I've not yet read A Box of Matches but it has received some good reviews. By the way, don't hold back on clicking through the links to Amazon and buying the books. I've already made $9.02 as an Amazon associate over the last 12 months.

Posted by at 12:57 PM. Permalink.

Outlook 2003 Cached Exchange Mode

Monday 16 June

I mentioned HiPerExchange a couple of days ago but it was only this morning, as I logged onto Outlook, that I realized Microsoft have rather spoiled the point of this product with Outlook 2003. This version of Outlook has Cached Exchange Mode which seems to serve the same purpose as HiPerExchange:

Outlook 2003 clients using Cached Exchange Mode perform most e-mail-related tasks from the local client, reducing the number of requests to the server for data and improving performance for items stored in the local copy of the mailbox or .ost file. After the full copy of a user mailbox and offline address book is downloaded, Cached Exchange Mode significantly reduces network bandwidth consumption for e-mail between the client and server. This greatly improves the Outlook experience for remote or branch office users as well as removes the need to restart Outlook to an offline profile when network interruptions occur.

The 800-lb gorilla strikes again. But, seriously, it was an obvious enhancement for Microsoft to make so the Seaside people can't really complain. Oh well, as I said, HiPerExchange must have been a cool project to work on.

I'm using Outlook 2003 in this mode and it does seem to handle online/offline much better than previous versions. More details of Outlook 2003 improvements, performance and otherwise, here.

Posted by at 12:48 PM. Permalink.

Aggregator User Interfaces

Monday 16 June

The ubiquitous Dave describes describes the right user interface for an aggregator:

The first aggregator did it right, every hour it scans the feeds, and presents the new bits in reverse chronologic order, kind of like a weblog. Demo

I've been using an aggregator for over a year which gives you the choice of both the 3-paned view most aggregators present and a Radio-style single page view containing entries from multiple blogs in chronological order. After using both styles for several months I've ended up using the 3-pane view all the time.

The Radio-style view is essentially very limited in usability compared to the 3-pane view. Its ok for reading once-off news items but lack of context of each item, for example you can't immediately relate an item to other items from the same feed, and the inability to return to archived items makes it not so good for information of longer-term value. To begin with I preferred the Radio-style chronological view but I soon began to tend towards the much greater control the 3-paned view provides.

Posted by at 12:39 PM. Permalink.

The Outlook OS

Monday 16 June

Scoble likes Outlook:

Anyway, I use Outlook as my entire operating system. Seriously. It makes backing up my important files much easier than looking for a hierarchical tree inside my C: drive somewhere. Just back up one or two .PST files, and away we go (I drag any important file into Outlook at the end of my workday so that it's automatically synchronized between my two computers -- and also so I can get into it via the Outlook Web Access, so if I need to get into my "operating system" from a public library or at the airport, I can).

I use Outlook to backup documents I'm working on to a folder on the Exchange server. Its great because when you drag a document into an Outlook folder any previous copies of the document in the folder are not overwritten and you don't have to fiddle around with filenames to uniquely identify separate versions of the document. Just drag and drop, the backup is done, and you have a history of snapshots of the document for free.

Also, you can "mount" your Exchange folders in Windows Explorer via WebDAV by selecting "Map Network Drive" and then clicking on the "Create a shortcut to a web folder or ftp site" link. On the "Welcome to the Add Network Place Wizard" type in the WebDAV uri for your Exchange folders. This is the format:

http://mailserver/Exchange/myaccount

where mailserver is the name of the Exchange server and myaccount is your Exchange account name. You don't need to specify the root folder of your Exchange folders, just extend the above path to any particular folder you want to mount.

Posted by at 08:49 AM. Permalink.

HiPerExchange

Saturday 14 June

I just noticed an interesting product mentioned on the WebDAV.org site:

HiPerExchange is a WebDAV server that runs on the machines of individual email users, allowing them to efficiently access email using Outlook Web Access. See the HiPerExchange Technology Primer for more detailed information.

The WebDAV server runs on every client machine and essentially acts as a local cache of the data accessible to the user on the Exchange server, both private and public folders. As I mentioned here Outlook Web Access uses WebDAV so the user simply points their browser at their local HiPerExchange server instead of the Exchange server. Sounds like a cool project to work on.

Posted by at 06:55 PM. Permalink.

Full Content RSS Fragments

Saturday 14 June

Ziv Caspi describes the issue of bandwidth being wasted when only one or two items change in an RSS feed which contains full content (I also mentioned this a few weeks ago). Since I switched to full content in my RSS feeds I've found that I tend to batch up items over the course of a day for publishing rather than publish them individually when I write them. This is not particularly rational because I now have more than enough bandwidth but it doesn't feel right that when I post an entry of only a few lines the subscribed aggregators will each download a large file, for example 33 KBytes for the index.rdf feed right now, rather than an RSS file of ~3 KBytes and the content of the new entry.

Posted by at 06:14 PM. Permalink.

embedded_idl and Attributed COM Programming

Friday 13 June

I've just started using VS2003 for some COM coding (we had to wait until VS2003 before moving from VS6 because migrating to VS2002 and then later to VS2003 would have required an extra round of project file conversions). After several years of coding COM objects the traditional ATL way I thought I'd use the new feature of VS2003 which allows you to implement COM objects using attributes. I tried to import the interface definitions from a type library (which was generated from a .NET assembly) but the compiler spat out this error:

c:\Program Files\Microsoft Visual Studio .NET 2003\Vc7\atlmfc\include\atlcom.h
(1759): error C2259: 'ATL::CComObject<Base>' : cannot instantiate abstract class 
        with
        [
            Base=CUmCLRHost
        ]

This is caused because the header file generated by #import does not contain the necessary attributes:

struct __declspec(uuid("abcc0308-262a-11d2-aa95-00c04fa31dd1"))
ICLRManager : IDispatch
{
      virtual HRESULT __stdcall InitializeCLR ( ) = 0;
      virtual HRESULT __stdcall ShutdownCLR ( ) = 0;
};

The solution is to use the embedded_idl attribute on the #import:

#import "../interfaces/interfaces/bin/debug/interfaces.tlb" \
	no_namespace, raw_interfaces_only, embedded_idl 

The generated header definition now looks like this:

[uuid("abcc0308-262a-11d2-aa95-00c04fa31dd1"),dual]
__interface ICLRManager : IDispatch
{
      [id(0x60020000)] HRESULT __stdcall InitializeCLR ( );
      [id(0x60020001)] HRESULT __stdcall ShutdownCLR ( );
};
Posted by at 06:40 PM. Permalink.

Don't Mention the PDC

Wednesday 11 June

The blog parody was spot on in many details but scanning through Scobleizer this morning one particular fragment of the Robert Scoble take-off came to mind:

... Career advice. Link to friends. Link to other friends. I love working at Microsoft. Come to the Professional Developers Conference. Link to friends. Link to other friends ...

I know Scoble is a now a MS evangelist but, please, I'd prefer not to be reminded what seems like every day that there is a conference called the PDC this October (for example). I'm unlikely to get sent there on a business trip in the current econmic climate and I'd be stretched to justify the cost of a personally paid trip to my nearest and dearest. I know it sounds like its will be a great conference with lots of exciting new stuff but thats precisely why I don't want these frequent reminders I will be missing out on it!

Posted by at 08:51 AM. Permalink.

Shuttle PC

Sunday 8 June

Shuttle SK41G

The anicent Pentium Pro machine we use at home for web and email finally died last weekend. I decided it was time to replace it with something more powerful. Rather than chose a ready-built system I ordered a Shuttle SK41G barebones system from Kustom PCs. High performance was not a big issue so I focused on cost. This SK41G is substantially cheaper than the more recent models and takes an Athlon processor (I chose an XP2200+). 512M of memory was more than enough for web and email usage so a single DIMM provided this, leaving a second memory socket for future expansion.

Putting it all together didn't take very long and I didn't encounter any problems. The main negative comments that I'd received about Shuttles was noise and I found that although it is slightly noisier (assuming you've enabled the fan speed limiter) than, say, a Dell Precision 340, its not too irritating. I'm using an old Seagate Medallion drive and this make more noise than the fans in the Shuttle. Its definitely something Shuttle need to address though (assuming they haven't already done so in more recent models).

Posted by at 12:46 PM. Permalink.

.NET Wrappers for Gecko

Thursday 5 June

In case you missed it, A.N.Other added a comment to my recent post on Mozilla Firebird, succintly pointing to a project which is building .NET wrappers for the Gecko engine using Managed C++. I've not yet had a chance to look into this any further.

Posted by at 08:59 AM. Permalink.

Object Disconnection

Thursday 5 June

Andy McMullan pointed out a obscure feature of .NET Remoting yesterday. If a client acquires an object in another AppDomain (remoted or in-process) and then sets the reference to null you might think that the garbage collector would clean up the dangling proxy object and so release the connection to the object, which would then be eligible for collection itself. In fact the connection is only broken when its lease times out, which might be a long time after a number of garbage collections.

Of course, if the object acquires expensive resources then it would make sense to provide a Dispose method which the client can call to explicitly free up the resources. However the delayed disconnection could cause a problem where a large number of inter-AppDomain objects are acquired within the lease timeout timespan, purely because of the memory allocated for the objects themselves. The default timespan is 5 minutes if no calls are made on the object and 2 minutes from the last call, which means a hgh frequency of object creation could cause the GC heap to expand unacceptably.

So, if this is a problem in a particular scenario, is there a way in which the client can forcibly disconnect the object and implicitly make the object available for GC? Andy mentioned the RemotingServices.Disconnect method and I modified my client test code to call this in a Dispose method implemented on the target object. The ITrackingHandler implementation does log a disconnection (and the client cannot make any further calls on the object) but the object is not GC'ed until the lease times out, after another disconnection event is logged for the same object. In case there was a problem with calling Disconnect from within a call to the object being disconnected, I arranged for another object within the same AppDomain to call Disconnect but the results were the same.

Posted by at 08:50 AM. Permalink.

nxslt

Wednesday 4 June

Oleg Tkachenko (Signs on the Sand) has released version 1.2 of nxslt:

nxslt is a small command line utility that allows to perform XSL Transformations (XSLT) using .NET Framework's XSLT implementation - System.Xml.Xsl.XslTransform class. nxslt basically dublicates functionality and command line options, provided by Microsoft's MSXSL.EXE Command Line Transformation Utility with small difference: unlike msxsl.exe, nxslt does not support specifying start mode. In addition, nxslt has some distinct advanced features, like support for embedded stylesheets, custom resolving, multiple result documents, custom extension functions, built-in rich library of EXSLT extenstion functions etc. See nxslt and msxl.exe for more info.

Changes since 1.1:

  • built-in support for 60 EXSLT extension functions (huge thanks to Dare)
  • support for custom extension functions
  • minor bug fixes

In my XSLT explorations I've been using a similar, albeit very basic, home-brew command line tool. I've now switched to nxslt.

Posted by at 09:14 PM. Permalink.

Joel on VMWare

Wednesday 4 June

Many of the Microsoft bloggers have been plugging VirtualPC recently. Lets hear about VMWare for a change and Joel Spolsky obliges with another rave about this product. I agree with him. Its a great product.

One minor quibble. I think Joel is slightly misleading when he says:

Everything runs emulated, so you're paying for all this convenience with a lot of CPU cycles.

As I understand it, VMWare runs each guest operating system on top of a virtualized set of hardware resources. A virtualization layer maps these onto the physical hardware resources. The guest operating systems and the applications running on them are not emulated. They run natively so that when an application executes a piece of machine code that actual machine code is being run on the CPU. Its not as if the app runs in some Matrix-like world where execution of its machine code is being simulated.

Posted by at 09:08 PM. Permalink.

Passing XML Data Inside the CLR

Wednesday 4 June

If, like me, you'd seen references to XPathNavigator, maybe in IBlogThis discussions, but hadn't used the class yet, then the latest MSDN TV slot Passing XML Data Inside the CLR, presented by Don Box, is worth watching.

XPathNavigator is based on the XPath data model which is also new to me. It seems to be a cut-down version of full XML data model, details in the W3C working draft.

The resources for the talk point to some sample custom XPathNavigator/XmlReader implementations at DevelopMentor.

I like the MSDN TV format. I find the MSDN show format a bit long-winded whereas the MSDN TV slots are concise and to the point, covering just enough material to keep you interested during a coffee break. If I had time to sit through a full MSDN show episode I think I'd rather watch a movie on dvd instead.

Posted by at 06:49 AM. Permalink.

Mozilla Firebird

Tuesday 3 June

After reading Joel Spolsky's and Jon Udell's posts on Mozilla Firebird I installed the browser this morning. After using on and off during the day it works great. The tabs alone make this much preferable to IE. It feels fast too. As a few people have commented, if Microsoft are not releasing the IE replacement for another couple of years (at least, based on previous OS release schedules) there is a lot of scope for competitors to grab market share.

High on my wishlist would be a decent managed API to embed the Mozilla browser within a WinFoms application. Those IE COM APIs are hideous to work with.

Yow Kee has a Call for Mozilla Switch, parts one and two.

Posted by at 07:15 PM. Permalink.

Next XSLT Problem

Tuesday 3 June

The next problem looked tricky to begin with but once I realised I could use the following-sibling axis to traverse the list elements it soon panned out. The problem is to output an HTML unordered list where one or more adjacent <p> elements in the source document have contain a <listPr> element within a <pPr> element, i.e. the source document doesn't have an explicit list structure and lists are just adjacent paragraphs with list property elements. For example:

<body>
  <p>
    <r>
      <t>Before list</t> 
    </r>
  </p>
  <p>
    <pPr>
      <listPr></listPr>
    </pPr>
    <r>
      <t>first item</t> 
    </r>
  </p>
  <p>
    <pPr>
      <listPr></listPr>
    </pPr>
    <r>
      <t>Second item</t> 
    </r>
  </p>
<p>
  <r>
    <t>After list</t> 
  </r>
</p>
</body>

This should be transformed to something like this:

<p>Before list</p>
<ul><li>first item</li><li>Second item</li></ul>
<p>After list</p>

The difficulty is in placing the <ul> tags around the sequence of list items. My current solution involves finding the start of each list and then traversing the list recursively:

<xsl:stylesheet version = '1.0' 
     xmlns:xsl='http://www.w3.org/1999/XSL/Transform'>

<xsl:template match="body"> 
    <xsl:apply-templates select="p"/>
</xsl:template> 

<xsl:template match="p"> 
  <p>
    <xsl:apply-templates select="r/t"/>
  </p>
</xsl:template> 

<xsl:template match="p[pPr/listPr]"> 
  <xsl:if test="not(preceding-sibling::p[1]/pPr/listPr)">
    <ul>
      <xsl:apply-templates select="." mode="listitem"/>
    </ul>
  </xsl:if>
</xsl:template> 

<xsl:template match="p" mode="listitem"> 
  <li>
    <xsl:apply-templates select="r/t"/>
  </li>
  <xsl:if test="following-sibling::p[1]/pPr/listPr">
    <xsl:apply-templates select="following-sibling::p[1]" mode="listitem" />
  </xsl:if>
</xsl:template> 

</xsl:stylesheet> 

Its so addictive at the moment, in the first flush of enthusiasm when learning something new, I could spend hours working on XSLT problems. I'm working my way thorugh a fairly complex transformation (the problems described are just the more interesting issues) and though I've reached the stage where I'm starting to get a feel for what I'm doing, I'm sure I'm not writing anywhere near optimal xsl yet. But its great fun getting there.

Posted by at 06:51 PM. Permalink.