mostlylucid

October 2003 Entries

Best comment ever on the RSS / Atom debate

Rory Blyth - you are my one true god - for this post alone (and having the funniest Techie blog on the planet):

Went to the blogger BOF tonight, and all I can say is that I'd like to flush this whole Atom vs. RSS debate down the toilet and do something more interesting, like shave off all of my chest hairs and then eat them.

If the debate over the "best" method of delivering boring stories about golfing with the in-laws is something that's keeping you up at night, then you have my condolences (especially since we already have a working method (RSS)). It's time to do some serious stopping and smelling of the roses.

At least DonXML had the good sense to show up inebriated.

If you want to know more about the session, then go check out Benjamin's coverage. I'm going to turn in after sleeping two hours out of the last fifty or so.

Well that's the PDC DVD ordered...

Just called up MSDN UK and asked for the PDC DVD, should be here around mid-November apparently. So if you're in the UK and an MSDN member (if you're not, get your company to join - only cost £520 if you join the 'Empower' ISV doohikey), call up now - you get to speak to a lovely lady! I can't wait to get my mitts on Yukon and Longhorn (Whidbey is old hat now :-))...reminds me, must get my new test machine ordered...

Linksys Routers and Windows Update

To cut a long story very short, I've always had a problem in accessing Windows Update from behind my Linksys BEFVP41 VPN router (which otherwise is excellent); well, I had to reinstall my main PC over the past couple of days (hence the lack of posts) and this became a major problem...so after some fiddling with settings, I discovered that changing the MTU to 1454 totally solves the problem. This fix also means I can put my external servers on the same segment as my dev machines again - giving the 100mbps access to each other again as this problem also caused problems for using externally facing web servers behind the router - yay!

What on earth is going on at ASPToday.com

I've been a fan of ASPToday for a while, but some very odd things are going on there at the moment...first is the sporadic downtime the site is having, then there's the distinct paucity of articles recently, they had a run with great new articles - then they just stopped! Still waiting on an ASP.NET 2.0 article promised for today...

Tools list from Developmentor

Just discovered this after reareading one of my old posts  ... which is in itself a reporting of Scott Hanselamn's  Power tools list, a fantastic, very varied list of .NET tools and samples from those nice folks at Developmentor...way to may useful things to detail, have a look, I've found around 10 separate links to tools I'll find immediately useful!

Interesting User Agent...

Just noticed this in my User Agents....NET CLR 2.0.31022 - now the version I have from the Alpha is .NET CLR 1.2.30703 - is this new string the PDC build?

Whidbey toolbox controls

Now it's after the 26th, the NDA is lifted on the Whidbey alpha...which is nice :-) Anyway, thought I'd provide a look at the new ASP.NET toolbar for Whidbey here.
There's lots of really nice new controls which are also much easier to use; one example, you can now drag them into the HTML source window instead of having to switch into design view (which is REALLY useful!). I dare say that this stuff will be all over the web as of tomorrow morning. Someone was asking about the Portal stuff...well that is really fantastic, you have the option of creating a new ASP.NET intranet site - which essentially makes a complete framework (using masterpages etc...) for an intranet. Anyway, more from other, more capable writers very soon I dare say :-)

 

Excellent MSN Style Toast popper

Been playing a little with my little stats app over this weekend, decided to add a little MSN-like notification function - this was made incredibly simple with this, a wonderful control  by John O'Byrne which allows you to use any bmp file for a notification popup window; very similar to the MSN messenger popup thingy...
This is a truly excellent control provided with source...go, pop for your country!

Spamnet available for Outlook Express

I've written about it before - but Spamnet is just the greatest email tool ever! Now they've finally released a version for Outlook Express! If you never want to see spam again, just get it - you'll have more that 500000 PEOPLE filtering out spam for you - no spammer can ever beat this!

Concorde retired...anyone remember the US version...

Here it is - look familiar? Oh, and the Soviet Version (which was such a close rip-off that it even copied some odd little bolt holes left over in the original Concorde design). I love this quote about Concorde from here:

'Still trying to convince the public and, more importantly, the airlines, of the superiority of Concorde, Air France officials staged a race between one of their 747s and one of their Concordes. The 747 took off from Orly Airport in Paris at 8:22 am EST on June 17, 1974, bound for Boston while the Concorde took off from Boston's Logan Field at the same time bound for Paris. When the Concorde passed the 747 (at about twice the altitude), it had already traveled over 2400 miles while the 747 had barely covered 600. The Concorde landed in Paris, spent an hour on the ground, then took off again and beat the 747 back to Boston by 11 minutes! Officials from other airlines, noting the Concorde carries 300 less passengers and yet burns 20% more fuel, remained unimpressed - especially with OPEC oil crisis just around the corner.'

The coolest thing of all - Longhorn build 4051 on MSDN in November!

My PDC envy is slightly abated...now I'll just have to get a new test machine (VMWare is cool and all, but you can't beat dedicated). Anyway, read all about it here at Bink. I really can't wait to play with some of the new Avalon stuff...This appears to be for MSDN subscribers only (force your company to subscribe - for UK companies, check out this for a great offer - basically 5 MSDN Universals for £520 !)
UPDATE:  Someone  should get a 'build sweepstake' going...guess what build version this gets to before release (5001 is my guess) - with great prizes for the winners!

Whidbey Alpha - don't expect too much...

With all the hype about the distribution of the Whidbey Alpha at the PDC, I can't help but worry that people will get their hopes up a bit much...just remember it's an Alpha, whilst phenomenally cool and displaying lots of the new .NET 1.2 (or 2.0, not sure what it's called right now!), it is a very early version. Expect lots of stuff in this version to still a bit buggy and incomplete - not saying it won't be a whole lot of fun, I'm just saying take it for what it is.
I know there's no chance in hell that I'd ever expose any of my Alphas to the public!

Really useful Web Service tools

One of my colleagues, Jonny Anderson pointed out these really useful web service tools on GotDotNet, the Web Service Studio Tool  is just remarkably useful for debugging and otherwise playing around with Web Services...

Useful tools...ASP.NET Version Switcher

If by any chance you install a new version of .NET and still want to work with older sites under earlier versions (e.g., for the Whidbey stuff)... check out Denis Bauer's ASP.NET version switcher...makes it much easier.

What ever happened to Mark Anders?

Along with Scott Guthrie, Mark was one of the fathers of ASP.NET - is he presenting at PDC...what's he working on now?
The talks given by Mark (and Rob Howard) at the Wrox Professional ASP developers' conference in London in 1999 were my first taste of the then NGWS and ASP+ (seem to remember Dino Esposito trying to guess what .NET was - which was pretty amusing  at the time :-)) . Whatever he's working on, you can bet it'll be pretty interesting...
Anyone....?

Scott Guthrie blogs about some of the new Whidbey features...

Some very interesting stuff here.

UPDATE: Just reading that article, things I'm looking forward to most are the URLMapping (Rewrite.NET is cool and all but it will be nice to have the  new 'native' model) and 'No Compile' - I have been waiting for this for SO LONG, JSP has had it pretty much since day one, that ASP.NET has not until now had this feature was a major omission - finally, we can protect ALL the source for our apps!
Incidentally, after the PDC I'll post some more stuff here about some of the new stuff in Whidbey - there are some very cool additions / changes which Scott has not yet mentioned ;-)

XmlTextReader bizarre and fustrating bug...well not really a bug...

Had this odd issue working on some code which uses XmlTextReader to pass through an XML string...basically, when I ran the code noemally, it worked every time, but when I ran in debug mode it would read the first node and skip all others.
Well, this drove me nuts, I wrote a bunch of test code etc...in the end another developer here noticed than I had the ReadOuterXML() method in my Watch debug window...well, that was the problem - never assume that the Watch window is passive - by calling the ReadOuterXML method, I was skipping all the nodes causing the issue.

Brain.SetMode = BrainMode.Learn

Back in a learning mode once more (currently wrangling information on XmlTextReader and multithreading).
Also been rediscovering the wonderful DotNetRocks shows, check them out - great for long journeys / passing time in airports!
My current information source of choice (besides the internet) is the book Programming .NET components by Juval Lowy , best book I've ever read covering the more advanced .NET topics, such as threading, security and app design...very nice and a definite 'must have'

I want my iTunes!

It is so annoying - no decent legal music download service exists for the UK..iTunes is now available for Windows...but not for the UK, how dumb is that! 
According to this story, this should be changing soon. Just been playing with it, my god this is a fantastic application! Broadband has found a natural partner - previews are instantaneous, it's incredibly easy to find music I like...now I just want to be able to buy them!

Including XML comments in external files for C#

This strikes me as pretty useful...found here at Eric Gunnerson's blog....
Actually, looks like a fairly interesting discussion on the relative merits of this approach is happening there right now...

Migration tool - go from ASP - ASP.NET automatically!

Yet to try it out, but this has great potential to make my life a whole lot easier; going between VBScript and C# is not pleasant...if I forget one more then in a VBScript if statement, I may kill someone.
Anyway, found the link on Tim Sneath's blog, you can find the tool here.
It is still an alpha, so it won't be perfect!
UPDATE: Not perfect is an understatement - only converts to VB.NET; pretty useless in an all C# shop! Code it generates still requires significant work to work properly...hmm...

Useful utilities from the man behind SnippetCompiler

A whole heap of useful bits here.
The Netping utility solves a problem I've had for a while - tying up IP addresses with machines...very handy! Oh, Jeff Key also makes the excellent Snippet Compiler...
Anyway, worth a look!

CDONTS, Windows XP and Windows 2000

If you have a lot of ASP code which currently runs on a Windows 2000 server, you probably use CDONTS to send your mail...Now, if you want to migrate to Windows 2003 (or Windows XP for local dev) you'll have a problem - CDONTS no longer comes with those environments...
Luckily CDONTS still works, you just have to hunt down a file called CDONTS.dll in the system32 directory of your Win 2000 box, copy it to your 2003 box and register it...your old code will then work (though CDOSYS is better!)

Roy Osherove - Feedable, RSS feeds for sites that had none before...

Umm...ok, over elaborate title...here's the link (oh, and subscribe to Dave Barry's blog, it's fantastic!)

Run .NET code from Sql Server - before Yukon!

Found this on Ashutosh Nilkanth's blog (good name!), basically allows you to run pretty much any CLR code using a Sql Server extended stored procedure - not nearly as good as Yukon, but if you need to do this now, it is a start!

Research shows direct brain machine control...

Read on Jesse Ezzel's blog about research showing the ability of monkies to directly control robotic arms with neural impulses.I have to say that, though this is potentially great news for those with severe impairment in movement, it does concern me that little mention is given to the fate of the monkies invloved. This statement "There was an "incredible moment" when the monkey realized that it could guide the cursor and grasp an object on the screen just by thinking it, Dr. Nicolelis said. The arm dropped. Muscles no longer contracted." ; is a bit troubling as it would infer self-awareness on the part of the monkey which is taken as one of the major indicators for sentience - especially troubling as it's almost certain that this animal will die as a result of this procedure.
It's always bothered me that higher primates and monkies are somehow assumed to be unintelligent until human researchers decide that some test shows they are intelligent and therefore may be bestowed some form of rights.  Interesting research though! Wonder how long it will be before someone hooks up a speech synthesizer to the language centres and a primate gives us a good telling off?

Rewriting ASP.NET Urls

One fairly interesting little article I read of late is Rewrite.NET, this is by far the best implementation of Url rewriting that I've seen for ASP.NET.
In case you're not aware what Url Rewriting is, it is basically a way of providing more friendly URLs for accessing items on a web site - an example may be for portal apps, where your contact page may be http://<site>/default.aspx?tabid=16 , instead you want http://<site>/contact.aspx - well that's where Rewrite.NET will help you out!

Slow time for the old brain...

I have a rotten cold...result - I'm reading alot but writing very little. On the bright side my reading has thrown up a few little bits and pieces which I'll scribble on this here site very soon...stay tuned...normal thinking will resume shortly...

Little Javascript tip...OnError for Images...

This is an odd little tip...not sure where I found this out, but I use it a fair bit...if you have an image which you're not sure will be available, add this to the img tag: OnError="this.src='/images/shim.gif';this.width='1';this.height='1'" (where images/shim.gif is an image which will ALWAYS be available - if not you'll get an odd error...).

Anyway, prevents the ugly broken image thing...

Simulating #Include with a server control...

I had been planning to implement something similar to this...with a 'twist'. Namely, I plan to do one which accepts multiple rexexp / replacement value pairs, allowing each page to specify it's use of the 'include'. This is mainly so I can share includes between ASP and ASP.NET, allowing me to replace the <%=Content%>ASP tags with content supplied by the ASP.NET page..get round to it some time :-)

New personal crusade...

Why doesn't the .NET implementation of Web Services support GZIP compression? I've found a couple of articles describing how to implement it, but I'll have to do a bit of digging (my Reference.cs doesn't have the mentioned methods...).

I'd have thought that Web Services were about the single most obvious place to support compression...grr...anyway, I'll post any progress I have...
UPDATE:  Man, I should read these articles properly...it's an override...the method isn't in Reference.cs - look, I have a cold, be kind! So, I'll just write a little proxy class which the Reference.cs can inherit from instead to support compression using the excellent SharpZipLib to provide the compression services...I'll of course make my new proxy class available here...

You can teach an old dog new tricks...

To cut a long story short, even though I've used .NET since the first beta (in 1999), I never got around to using Winforms - no, really! I have developed winforms apps in VB6 and swing apps in Java, just never got round to writing a C# Winforms app...
To cut a long story short, I decided to write a little application leveraging a web service to monitor hits on this site (no reason, just a cool little web service with vaguely interesting data) , so I've picked up quite  a few books on Winforms programming - well, 5...I have a book 'issue'. The best one I've found, both in terms on pure information and readability is Windows Forms Porgramming in C# by Chris Sells.
I cannot say too many good things about this book, it explains the issues at exactly the level I need - and I guess due to Chris's experience, there's a lot of little tricks and techniques in there that none of the other WinForms books I have even begin to cover.
Anyway, very much recommended!

Things I wish I'd known before this: Part 1 (of several million)

I did not know this was possible or so easy! Just found out you can extend XSLT (so you can use bits of code in there) from C# have a look here and here for the lowdown...
This would have saved me so much time...why haven't I read about this before? Maybe I did and just forgot...what else have I forgotten!

UPDATE: You can even do it from VBScript! I still can't believe I didn't know this!

Grouping validators in ASP.NET

AspToday has a really good article on grouping validators in ASP.NET - client as well as server side (which I hadn't seen in a code sample before). Anyway, you need a subscription to view it (sorry, but it is worth it!) here's the article.

Quite possibly the most useful tip I've read all year!

Very simple, but Dan Bright points out that:

 

No to all?

Ever get one of those messagebox prompts with the options: Yes, Yes To All, No, Cancel?

Where is No To All?

I will tell you!  Hold the shift button when you click no and it will apply that to all following dialogs in the current operation.

posted @ 8:16 PM

Interesting ASP.NET UI tips from Infragistics

I really should be asleep (it's 1:30am - I need sleep!). Anyway, whilst my self-imposed insomnia is still in control, I foung this interesting little article on "10 Rock-Solid UI Tips"  at the Infragistics site.
Some pretty useful little tidbits there, althougn number 2 - Use Independent Component Publisher Controls may be just a little biased :-)

World as a Blog

Also from the land of UserAgents, just discovered this, shows a map of the world with constantly updating blog entries...quite mesmeric actually!

Cool little stats thing...

I've just written a little HttpModule which lets me see incoming requests in real-time, very interesting to see just what weird and wonderful clients are hitting this site - way more than I actually thought which is nice...also very interesting just how easy these are to write - I came from a world of servlets - where things were a little more complicated!
My favourite User Agent so far..."UltraLiberalFeedParser/2.5.3 +http://diveintomark.org/projects/feed_parser/" - I like this because I'm pretty ultra liberal myself :-)
Anyway, I'll make this available for download at some point - I'm working on a little web service / notification area app which pops a little notification window when certain 'tagged' visitors appear on your site.
Note, I have no actual reason for doing this, just seemed like a fun little project to flex my flaccid muscles on to learn a bit more about nice ways for Windows apps to interact with websites (in a 'fairly' useful manner)...

Really useful ISO opening tool - Undisker

I download lots of ISOs from MSDN and others for evaluating software, developing etc...To be frank, burning all these to CD is a pain. I have recently stumbled upon a great tool called Undisker - basically, it lets you treat ISOs like archives - so you can extract them to directories, as well as making whole drives into ISOs  - incredibly useful surprisingly!

Anyway, it's a great tool and only costs $29.95  not bad considering that I reckon it's saved me a couple of hundred blank CDs in the couple of months since I started using it!

Amazingly interesting project by Steve Tibbett - read RSS feeds in any Newsreader!

Just noticed on Scott W's site, hidden in one of the comments is a link to a project called Syndicache, this is a stunningly interesting idea. What this seems to provide is a method of using NNTP as a central aggregator for RSS feeds, have a look here for an example. It has always struck me how similar news aggregators like FeedDemon are to news readers, this project seems like a logical step, utilising a widely accepted infrastructure for the consumption and propogation of feeds.

Now we just need a reader capable of displaying the results nicely...which Steve Tibbett seems to be working on as well...could be worth watching!

More new bits...

More changes, you've probably noticed the feed taken from Weblogs.asp.net on the right hand column...this is done using a slightly modified version of the RSS Feed control I posted earlier - no real benefit to it, just gives the page a bit more life :-).

I also modified the search contol a bit further to be more responsive to user input...I'm not planning to supply this for general download right now as Scott W has suggested that .TEXT 0.95 will be out soon and will contain some not insignificant changes...including a possible search feature...
Anyway, my plan for today are to work on a little vote user control (which I will make available for download) and the initial stages of a project for work - which should be fairly interesting for a change :-)

New Search Function...

More for an academic exercise on the workings of .TEXT than anything else, this site now has a search function (really very simple to implement - please contact me if you want the source...). Anyway, not perfect as yet...but I'll fix it when I have time.

Quick answer...

How do you enable caching for the RSS control? Well, in the RssDisplay.ascx, add the following line after the <%@ Page%>declaration:
<%@ OutputCache Duration="1200" VaryByParam="none"%>
This will cache the output (and therefore, the webrequest to the rss feed) for 20 minutes... 

My version of an RSS Feed control...

Kent Sharkey posted an RSS View User control , which is pretty nice...I wanted to use XSLT for mine (I'm akward that way :-))
Anyway, I wrote this little one (which may appear on this blog in the future...)- not perfect but it works after a fashion :-)
Update...I've decided that I'd like to package this a bit better (if you never saw the previous one, it was really bad...I apologise for offending your coding sensibilities)
. Anyway, this one isn't a lot better...but it is functional and should give a good start - here's the link to download it (VS.NET 2003 project...) .

One album everyone should have in their collection...

Just rediscovered this album after many years away from it, my opinion this is one of the greatest albums of all time (not something I say flippantly). The Longpigs  - The Sun Is Often Out (us link), absolutely amazing, doesn't sound a single bit dated. "Lost Myself" and "On and On" are just heartbreakingly good with the latter being just one of the best love songs ever...ah well...jjust a suggestion :-)

New Favourite Toy - Xml Serialization for generating Xml Feeds

I've previously used Xml Serialization for loading and saving config files into and out of apps - nice use...What I've done recently though has been very useful - for me at least.
Essentially, I have an application which has a little Poll control, now in ASP.NET this is constructed by binding a collection of items (OptionItem or ResultItem depending on the 'mode')...which are in themselves contained in a VoteItem class to certain controls in the page and to a repeater for displaying the options.
Now, a project came in recently which wants to use the functionality of the Poll from ASP - what I decided to do was provide it in the form of an XML feed which the ASP could transform using XSLT into the presentation front-end. What I had planned to do was manually construct the XML string based on the VoteItem class...but then I remembered XMLSerialization - basically one step and I had an XML representation of the vote item - yay!
Anyway, I'll modify the code in the next couple of days and upoad a version of the poll to this site (I may even have a poll on here :-)). For the moment, here's a snippet of code which will generate an XML string given a class (any class pretty much...just used it for votes in mine...)

  public string SerializeVote(VoteItem theVote)
  {
   XmlSerializer xSer = new XmlSerializer(typeof(VoteItem));
   MemoryStream writer = new MemoryStream();
   xSer.Serialize(writer,theVote);
   string outStr =  System.Text.ASCIIEncoding.ASCII.GetString(writer.ToArray());
   writer.Close();
   return outStr;

  }

UPDATE: This is a prettry good article on Xml Serialization...

One last thing before bed...Chris Brumme posts another 'book'

How does this guy find the time, anyway, found on Roy Osherove's blog, Chris Brumme (CLR God) has posted and article on the Exception model in the CLR. Not exactly light reading...but worthwhile to gain a bit more precious insight into the deep and murky inner workings of the CLR.

Moaning...

Been reading my recent posts and blog comments...umm...sorry, in a bit of a moaning mood of late. I really have to get down to it and contribute a bit more - I have some changes to make to this site which are sitting on my dev version just waiting on completion - this weekend, definitely!

Anyway, got to go to bed...which reminds me, one of the fixes is to the time stamp...not entirely sure why it insists on adding random times to my posts...hmm...
Oh, incidentally, one of the really cool things in the .TEXT posts editor is ieSpell , a quite shockingly useful little spell checker which works within IE (umm...hence the name :-)). Anyway, FreeTextBox which .TEXT also uses includes a little button to check the text you're entering - both total requirements for any .NET based CMS from now on (well, for the ones I develop it is!).

Really good article on MSDN about Session state in ASP.NET

I really like Dino Esposito's writing style...anyway, he's come up with a brilliant article on the most efficient ways to use Session state from ASP.NET - this is just about the best examination of the subject that I've seen and is now one of my 'must reads' for any developer starting out with ASP.NET...

Anyone found a really good article on ASP.NET page lifecycle events yet...I've yet to track one down - and I do think that is the number one most important thing for developers to get a grip of when writing ASP.NET applications - it can really bite you in the ass if you get it wrong!
Dino also wrote this one which is pretty good at covering the basics of the lifecycle and is certainly a good primer...I don't know what I want to read, just more detail, maybe examples of what can go wrong, when things are available in the lifecycle etc...tricky one...that's why I'm a crap writer I guess..but I knows what I likes :-)