May 2006 Entries
Back in 2004, we went to the Azores. I wrote up the experience last year, but never got round to polishing the article off. Now, I have...
Here it is...
Dan's getting some welcome assistance from Scott Hanselman with some XML Serialization troubles.
I've been occasionally sticking my oar in to help Dan out with this puzzling little foible of the .NET XML serialization stack for a couple of weeks now, and I can say it really does look like a bug to me. At root, we've got a perfectly valid, normative XML Schema that declares an unambiguous XML vocabulary; and we've got a set of classes output from xsd.exe based upon that schema, that the XML Serializer serializes to XML documents which don't always conform to the original schema. That's...
You learn something new every day. As K Scott Allen points out,
read or write operations to CLI datatypes larger than the native word size (32 bit on your basic PC) are not guaranteed to be atomic.
So, in the course of:
private long i = 0x00000000FFFFFFFF;
public void Increment()
{
i++;
}
it's possible for two threads to interact as follows [edit - with hexadecimals done right this time. Idiot brain was - for some reason - only doing binary earlier.]:
iThread 1 ...
Dave's worried about LINQ
I'm still worried about SQL style syntax in code - where should it go? Should we abstract it into a separate layer? Should we not have stored procedures anymore?
[Via writerus drivelus]
I can appreciate the concern. Of course, specifically what Dave's worrying about here is DLINQ - the data access technology that allows you to use C# 3.0 and VB 9 syntax to write database queries in your code. He's also concerned about the VB9 XLINQ syntax that lets you embed XML in your code - and then embed code in that XML. Indeed - there's a blending...
Enjoying season 2 of Lost? Then why not play along at home...
Sorry. Just a silly program to evaluate the .NET 2.0 version of the AJAX.NET library. Apologies to anyone whose browser doesn't do contenteditable, or who's viewing in a JavaScript-deprived environment. This isn't supposed to be the finest bit of cross-browser programming ever produced :)
[edit - okay, so IE doesn't like cookies belonging to iframes from a different domain. Annoying. So, instead of the embedded version, you now have to have the full page version instead. Sorry. And it still doesn't work in anyhting but IE.]
.flickr-photo { }
.flickr-frame { float: right; text-align: center; margin-left: 15px; margin-bottom: 15px; }
.flickr-caption { font-size: 0.8em; margin-top: 0px; }
New York State of Mind, originally uploaded by James A Hart.
I've uploaded a load more pictures from last autumn's USA trip, using up this month's Flickr bandwidth limit.
The USA photo set will take you along the full 2000 mile drive we completed, from San Francisco down the coastal Highway 1 to LA, up the Californian Central Valley to visit Sequoia and Yosemite National Parks, then over the mountains and down the Owens Valley to Death Valley, across to Zion National Park in Utah,...
Oh dear - sometimes things have consequences far beyond what you expect. A while ago, I posted a frustrated email around the office here asking for anybody to come up with a rational explanation for some funny behaviour I was seeing with the T-SQL REPLACE() function. Specifically, calling REPLACE() on a char field (a fixed width datatype) was stripping off trailing spaces and returning a shortened string; calling REPLACE() on a varchar (variable length datatype) field was leaving trailing spaces intact. This was just about the precise opposite of the behaviour I'd expect.
We all came to the conclusion that it...