May 2004 Entries
Now there's a post title I never expected to write, anyway, got this in my mail from B3TA - theres lots of wierd stuff on that site, but this movie just rocks! Basically it's squirrels (or tree-rats as the movie calls them)..umm...busking. You can downloads this from here
Sorry, had to add this one too, just a simple story about this guy's flying grandad..oh....and him being savaged by lions...odd that we british lost the empire isn't it :-)
Well, the last episode of Friends is about to start...and just been doing my blog trawl before I shut my laptop for the weekend - for which I just bought a new power adaptor; if you need a laptop adaptor, live in the UK and want the best deal, check out http://www.battery.co.uk/. Most interesting bits I came across tonight are the Intelligent Message Filter archive manager and a tip to expose the Spam Confidence Level (SCL) - which are pretty invaluable if you're using the Exchange 2003 Intelligent Message filter. Also read a bit more of the book Paper Prototyping (US) which is...
Really just a wrapper around the really nice native C library, but could be handy when you need to compress stuff in the quickest way possible...here's the SourceForge homepage
Bit concerned that an old post is being linked from this URL http://msdnprod/library/en-us/dnaspp/html/viewstate.asp?frame=true - especially as 1. The URL of the person doing the linking is a Microsoft one2. That post REALLY needs updating (and is just such a simple solution)3. The post isn't even accurate, in it I state that you lose encryption (even if it is the stinky 3DES) using this method - umm...wrong actually you don't just that if you use compression the technique becomes rather ineffectual (since compression and encryption are kind of exclusive - you can't really compress random data...) Anyway, I may just update...
Just noticed this link in a post on Kent Sharkeys blog. The article by Scott Mitchell covers various methods of making ASP.NET 1.1 based sites conform to WAI accessibility guidelines (or US Section 508 if you prefer :-)). It is still stunningly annoying (and frankly unbelievable) that the ASP.NET Hotfix Rollup is still not easily downloadable - almost a year since it was released, neither have I seen it on the MSDN subscribers download site (although apparently a few CMS 2002 updates actually include it!).
Umm..title says it all, Larkware link is here, download link here
Should mention I suppose the I lied in yesterdays post on threading using .NET...mea cupla :-). In that post I mentioned using delegates for multi-threading and said that you always had to use EndInvoke to avoid a memory leak...well not quite, what i actually do is use the excellent AsyncHelper class by Mike Woodring, this supports this syntax: CalcAndDisplaySumDelegate d = new CalcAndDisplaySumDelegate(someCalc.Add); AsyncHelper.FireAndForget(d, 2, 3);No EndInvoke required as it takes care of this using a DynamicInvoke internally. Well, saves a few lines of code!
This is a common puzzler for people new to .NET (who aren't in the US!), just how do you parse a DateTime to be correct for your culture?
Answer, pretty easily...the DateTime.Parse has an overload which accepts an IFormatProvider, so this will let you parse a DateTime in a named culture:
The above code being the code for GB - you can get a good list by looking at Internet Explorer -> Tools -> Internet Options -> Languages -> Add .
Using the code below will let you use the culture defined in the Globalization settings in web.config
(e.g., <globalization fileEncoding="utf-8"...
I found some really interesting articles on the new ASPNETResources.com site, including stuff on Doctypes which was pretty good and tips on getting CSS2 Intellisense support in VS.NET - worth keeping an eye on how this site develops methinks! Also a particularly interesting blog on the site covering similar subjects...
UPDATE: Poking around some more, just noticed they have a really great article on XHTML support using Response Filters in ASP.NET - excellent coverage!
I have a tendency to forget that people don't necessarily know everything (in counselling we called it "contextual framing" - basically aligning your mindset with that of the person you're counselling). With this in mind, here's a simple one which I forgot many prople don't know - how do you call a method asynchronously, e.g., how do you send an email whilst not blocking the thread of an ASP.NET page? Well, .NET makes this REALLY easy to do.
So, you probably know that sending email in ASP.NET is dead easy:
/// Summary description for MailSender.
OK, terribly documented, but it works...this is just the source for a little HttpModule which tracks hits to a .TEXT blog - pretty simple but should give anyone who wants to do it a start. I'll post a more complete version at some point (mainly just want to test how this skin behaves with posted code ;-))
/// Summary description for ViewTrackModule.
public class ViewTrackModule : IHttpModule
#region IHttpModule Members
public void Init(HttpApplication context)
context.EndRequest += new EventHandler(context_EndRequest);
Via Alex Barnett's post, with the earning potential of these things I can think of nothing better than for some of the cash to go to charity! You can get more details on the Big Noise Music site, where I notice they have a 1p streaming thing as well as a 75p dowload service. They seem to have support from some big UK artists including Coldplay (predictably), Ash, Badly Drawn Boy and Melanie C (unfortunately) ;-).
I used to work with Michael at a previous company, one of the most creative coders around any certainly worth keeping an eye on...He also has a really interesting post on Web Accessibility which links to a report pointing out some of the problems with current accessiblity testing tools...which is a bit of a pain, especially if you need sites to be truly accessible (of course ASP.NET 1.1 is not compliant at the moment - ASP.NET 2.0 fixes many of these issues though).
Thought I'd mention, while I was making the new skin for the site (which you'll miss if you're using a Reader of course!), I wanted to use a PNG for my little logo since I'd used a gradient and the logo has a drop-shadow which looked wierd under the wrong circumstances. Well, problem is IE doesn't natively show PNGs properly - there is a fix using the 'alphaimageloader' filter but that can break stuff in other borwsers. What I discovered was this really useful behaviour from WebFX - this just lets you use PNG as any other image then applies the...
Well, this is the first of a few updates to this site over the next couple of days (prefer to take these things in steps - starting with the biggest). The update was fairly straightforward - one thing I haven't seen mentioned is the removal of the IIS *.* mapping which I needed in 0.94 - that had me confused for a while. The skin is also updated - has Mozilla 'issues' right now, but I'll get these fixed at the next update (which also adds a couple of other server controls to the page).Please let me know any issues...
Really useful service, chances are when you design a website you don't have access to the dozens of browser / platform combinations that your users do. Browsercam (though commercial) offers the only truly viable way I've ever seen to do this, put simply you enter a URL and this service displays your site (or just a single page) in Six different browsers, three different operating systems, with and without flash. Very nice!
Wow, this thing is promising. I usually use BlogJet for posting but SauceReader has a good RSS Reader and posting interface - and it has a functional SpellChecker!
Simple idea but really useful! An add-in which lets you past content as various different things in VS.NET. Download it here. For more information, visit Alex's Post
Thought I'd make a quick list of stuff I want to do but never have in .NET - yet....Reflection - haven't yet had ANY call to use reflection for anything, lucky me!Direct X 9.0 - I probably am going to play with this pretty soon, especially with this just around the corner (for the conspiracy theorists, the picture is eerily close to a Longhorny UI isn't it ;-)) Remoting - again probably the fact that I'm primarily a web coder, but never had the need for this...Attribute Based Stuff - now, again, seems really useful, I've read tons on it, just...
Look here...the evil pooch will go away!
Mike Schinkel, president of Xtras.Net, made an offer on his personal blog of a free XDN Professional membership (http://www.xtras.net/xdn) during the month of May 2004 for anyone that blogs about .NET frequently. If you are a .NET blogger, see Mike's post for how to get your free XDN membership.
It's always a thing I've been fairly weak at - partly because in the past it was of limited use due to stupid browser incompatabilities - but now there's really no excuse for not being a CSS devotee, particularly when trying to design lightweight yet accessible sites. The best turorial I've ever found is at this site - they have 5 main tutorials which go through many steps and impart knowledge with an almost scary subtelty. Anways, go there, learn!
I'm planning (fingers crossed) to update this whole thing with the latest version (heavily modified by me) of .TEXT this weekend coming - I currently have a new snazzy skin (for the blog, my skin currently sports a nasty burn) and some other 'interesting' features ready for 'live'...
Recently been working on a site with this stuff, until now this has been really poorly documented (you may have seen a page with a .mspx extension - that's an MNP page). Anyway, Tim Sneath mentioned an article which was recently pulbished which covers in far more detail than I'd seen before, the structure and implementation of this system...worth a read!UPDATE: Just in case..here's the reason I can mention MNP - otherwise it'd have been covered by my NDA and I'd have had a pinky removed (that's Microsoft right, I keep confusing Micrsoft and the Yakuza)
I'm trying to simulate the .NET 2.0 Database Cache Dependency stuff (well kind of, WAY simpler obviously). What I'm doing is running a little timer class as a static property of my global.asax.cs file...like so:public static TimerClass timr = new TimerClass(); My actual timer class thing is really simple, it just adds items to a queue on each tick; in the actual app this will fire a simple stored procedure and only add certain items if the item has been updated. This is all really to get round requiring a context to update some stuff in the cache...this way I can...
A couple of hours after posting my gripe about the Mappoint.NET trial stuff, I got a mail from Michael Lightfoot at Microsoft UK...looks like I was signed up at some point so I now have these details. Now..do I have timew to write an example app before my meeting tomorrow...hmm...anyway, thanks Michael!
Well, here's the story...I am currently preparing a pitch for a job we're hoping to do for a large client who wants to use Geodistancing, Address Verification, mapping etc for their website; being a .NET devotee (all hail the CLR) I wanted of course to use Mappoint.NET to do all of this - strangely we didn't fancy paying $10000 (minimum) for a product which we don't know if the client wants to use of not (we have lots of options for this stuff...). I noticed that Mappoint.NET had started doing a trial version for MSDN subscribers cool - so I requested...
Wish I had this the other week when I was doing my HTML image grabber thing...took me ages to find this stuff. Anyway, nice tool found here which lets you easily use some of the cool Win32 PIIVOKE stuff a bit less painfully...
I realise this is probably very old news but I've been having a bit of fun tonight playing with the new shiny Reflector - all I can say is WOW! Playing around in the source of .NET 2.0 is just too useful for a learning tool. I use this along with the File Disassembler addin from Denis Bauer - now I can dump whole assemblies to source files and poke around them (still not figured how to debug inside them which would be really handy!).
Sorry, had a bit of an unplanned hiatus over the past couple of weeks...a cold and a week away from computers being the main culprits. So, well, I'm back now feeling mentally reinvigorated and ready to play with some new stuff. Had an exellent break - one of the 'doing nothing' weeks I seem to require every six months or so to keep sane. I really recommend it fo all coders, just a week away from coding altogether.