Archive for March 26th, 2006

RSS Naming Conventions Update

Sunday, March 26th, 2006

I’ve overhauled my naming conventions. I think “feed” is a little too geek, so in Daisy I’ve gone with a convention I think is much more user friendly:

Rule#1 – A ‘weblog’ is the thing that gets published. Like a newspaper.
Rule#2 – A ‘feed’ is the URL endpoint a weblog’s content is available at. Like a newswire, it’s a connection point.
Rule#3 – You subscribe to or unsubscribe from a weblog, not a feed.
Rule#4 – The result of subscribing to a weblog is a ‘subscription’.
Rule#5 – It’s ‘article’, not ‘post’.
Rule#6 – Articles have a ‘headline’.
Rule#7 – it’s not ‘tag’ it’s ‘topic’.
Rule#8 – ‘RSS’ never gets mentioned

Posted by Jim Mathies | Filed in Daisy, RSS, Technology | 3 Comments »

 

Interesting Microsoft RSS Platform Problem Found

Sunday, March 26th, 2006

I finally spent some time today tracking down my sporadic file in use exceptions related to feed renaming and moving. Technically I’d consider this a bug, although I’m not sure how the folks in Redmond will solve it. (They probably won’t, so I will have to.) Essentially the problem involves delayed garbage collection of objects which basically hold COM references to unmanaged code (feed handles). The following code produces exception faults in the first feed rename call after the second feed object is created:

IFeedsManager fs = new FeedsManagerClass();

IFeed feed;
feed = fs.GetFeedByUrl("http://wherethehellismatt.typepad.com/blog/rss.xml") as IFeed;

feed.Rename("Where the Hell is Matt?");
feed.Rename("Where the Hell is Matt??");
feed.Rename("Where the Hell is Matt???");
feed.Rename("Where the Hell is Matt????");
feed.Rename("Where the Hell is Matt?????");

feed = fs.GetFeedByUrl("http://wherethehellismatt.typepad.com/blog/rss.xml") as IFeed;

feed.Rename("Where the Hell is Matt?");
feed.Rename("Where the Hell is Matt??");
feed.Rename("Where the Hell is Matt???");
feed.Rename("Where the Hell is Matt????");
feed.Rename("Where the Hell is Matt?????");

The exception is a file in use exception:

System.IO.FileLoadException
{"The process cannot access the file because it is being used by another process. (Exception from HRESULT: 0x80070020)":null}

The only way to solve it, is to force a garbage collection cycle:

IFeedsManager fs = new FeedsManagerClass();

IFeed feed;
feed = fs.GetFeedByUrl("http://wherethehellismatt.typepad.com/blog/rss.xml") as IFeed;

feed.Rename("Where the Hell is Matt?");
feed.Rename("Where the Hell is Matt??");
feed.Rename("Where the Hell is Matt???");
feed.Rename("Where the Hell is Matt????");
feed.Rename("Where the Hell is Matt?????");

feed = null;

GC.Collect();

feed = fs.GetFeedByUrl("http://wherethehellismatt.typepad.com/blog/rss.xml") as IFeed;

feed.Rename("Where the Hell is Matt?");
feed.Rename("Where the Hell is Matt??");
feed.Rename("Where the Hell is Matt???");
feed.Rename("Where the Hell is Matt????");
feed.Rename("Where the Hell is Matt?????");

So here I am, working with the latest and greatest in language runtimes, and I find that, because Microsoft doesn’t use their own tools when developing code (The feed store is a C++ COM object and is accessed through Interop) I’m forced to “clean up after myself” anyway. Feels like I’m back in ANSI c calling free on malloc’d memory blocks. Joy. Of course this is still beta code, so maybe I’m being too critical at this point. We’ll have to wait and see. But I honestly don’t see how this can be fixed from the unmanaged side of things, so my guess is even after the final release it’s probably going to have to happen on my end. I also think this is going to cause some pretty serious problems down the road, since multiple applications can access the feed store at once, any of which might open and hold a handle on a feed or feed folder.

Posted by Jim Mathies | Filed in Daisy, RSS, Technology | 2 Comments »

 

Hayward Fault Ready to Snap?

Sunday, March 26th, 2006

There’s an interesting article on Newsday about San Francisco’s Hayward fault.

“It is locked and loaded and ready to fire at any time,” said U.S. Geological Survey seismologist Tom Brocher.

The Hayward Fault runs through one of the country’s most densely populated areas; experts say 2 million people live close enough to be strongly shaken by a big quake.

It slices the earth’s crust along a 50-mile swath of suburbia east of San Francisco, from exclusive hilltop manors overlooking the bay to Hayward’s humble flatlands. It snakes beneath highway bridges, strip malls, nursing facilities and retirement centers, and it splits the uprights of the football stadium at the University of California, Berkeley.

From Wikipedia:

The Hayward fault is considered to be particularly dangerous due to the poor soil conditions in the alluvial plain that drops from the East Bay Hills to the eastern shoreline of San Francisco Bay. At the lower elevations near the bay the soil is mostly water saturated mud and sand, which tends to amplify the effects of an earthquake and so producing significantly greater ground motion. Additionally, the soil itself can fail, turning into a liquid mud from the agitation, a mud unable to support buildings erected upon once-firm soil. This region is also covered with dense low-rise urban development, most of which was built soon after the 1906 San Francisco earthquake, but before good earthquake resistant construction practices had been developed. All though many structures have undergone seismic retrofitting there are a large number of dangerous un-reinforced masonry (mostly brick) structures and chimneys, which can be extremely hazardous to occupants in a large earthquake.

In its northern extent the Hayward Fault lies directly beneath the portion of highway 13 that is south of highway 24, extending north directly under Lake Temescal and further under the centerline of the football field of Memorial Stadium at the University of California, Berkeley. There are no plans at this time to replace the stadium, even though its “O” shape may possibly be split into two “C”s. A suitable site for a replacement is available immediately to the east in Wildcat Canyon, although this would require an east-west alignment rather than the traditional north-south orientation. While there is only a small probability of an earthquake on this fault while the stadium is occupied the results could be deadly.

Some of the cities in the eastern bay shore and south bay region near this fault include Richmond, Berkeley, El Cerrito, Emeryville, Kensington, Oakland, San Leandro, San Lorenzo, Castro Valley, Hayward, Fremont, Milpitas, Niles, and portions of San Jose.

Posted by Jim Mathies | Filed in Earth, Life | Comment now »