mostlylucid

.NET

John Lam’s Dev Kit

Kind of a ‘tools’ list but a great post on what John uses on his machine…a few new ones I hadn’t seen which is always nice!

Premature optimization and user perception...my pet project and CSS Sprites

One of the themes I'm looking at for vNext of ASP.NET is the optimization of sites by reducing the number of server requests required for a single page. A new classic in the area of improving the perceived performance of your sites by reducing the number of server roundtrips is Steven Sounders book 'High Performance Websites'. Steven's book is very small, very readable and probably the best book on anything to do with the web that I've read in years. This book was a huge revelation for me...I spent most of my coding career writing the slickest, highest performing code I could...and frankly...

My secret project....NET 3.5 SP1 Beta (well, the release bit)

I should have made this a better post but anyway. Brad Abrams just posted about the .NET 3.5 SP1 Beta release . We've also posted a bunch of new Screencasts covering the new features for ASP.NET in this release, as well as a readme which has some getting started and upgrade information for migrating from the previous release...

Grrr...poor use of singletons and a very cool Generic Singleton pattern!

I posted earlier that I'm switching to blogengine.net, as part of this I've been fiddling around with the code (as is my way..I'll contribute back to the source when I've finished). One of my major pet hates is poor use of the singleton pattern, especially as there's a definitive article on the pattern in .NET and how to do it well. It's actually likely that this pattern is overkill in this case and a ReaderWriterLockSlim could be better (though it has it's own problems) . Anyway, on the assumption that a Singleton is the best choice here, let's look at...

Why do single chances make me nervous...life should come with an undo function...

Spent most of the day not doing what I should've been doing. I have a number of balls in the air at the moment and it feels like I've just added a spinning plate act at the same time...noisy disaster may ensue. Right now I'm working on another Codeplex release, working on a private build of some beta bits for the Insiders, getting our bugs migrated to the right place so we can get cracking on ASP.NET v.Next, getting the notes together for the last meeting (before the next one happens!) as well as getting the Hands-On-Labs ready for this...

Obsessive Coding, optimal string Reverse...

I love this type of thing, a whole post on optimal string reverse algorithms. I always love this sort of thing, learning huge amounts of detail about fundamental operations (sort of, umm when do you ever reverse strings?). Actually looking at Justin Rogers' blog he has lots of great performance posts...

Why do so many people mess up Singletons?

I've written about this a few times now (use the search thingy to find where) but I'm still surprised how many people mess up the Singleton pattern.   For instance take: if (blogSettingsSingleton == null)                 {                     blogSettingsSingleton = new BlogSettings();                 }                 return blogSettingsSingleton;   Looks ok, right? But this is a classic poor pattern when dealing with multi-threaded apps. Why? Look at the initial 'if' statement, and think what happens if multiple treads hit this at the same time...one thread...

C# null Coalescing operator

Just because I always forget this...the C# null Coalescing operator: Sample below shamelessly stolen from here... MyClass anObject; ... // Variant 1: Using a full if/else clause MyClass anotherObject; if (anObject != null)   anotherObject = anObject; else   anotherObject = new MyClass();   // Variant 2: Using the ?/: conditional operator MyClass anotherObject = anObject != null ? anObject : new MyClass();   // Variant 3: Using the ?? operator MyClass anotherObject = anObject ?? new MyClass();

Crazy busy at work, back soon!

Things have been insane at work over the past few days...back to this soon! Plan to get a nice 'Amazon book suggestion' tool on the site; going to let readers suggest books on various topics by entering an ISBN and then provide the country appropriate URL to buy that book. Still fiddling with the new Amazon web services bits but it's nearly there... See you at the weekend (probably!)

Update to my favorite Live.com service

I have to say, Skydrive is the best thing Live has done so far in my opinion...very easy way to share files. I use it a lot to share stuff with my family back in the UK, my parents aren't very computer savvy but the Skydrive interface is really simple to use (they're used to folders and such...).I'm going to be very cheeky and just paste a bit of the mail which one of the PMs (Program Managers) from that team sent round today: "We’re excited to announce that at 3pm, today, we’re updating Windows Live SkyDrive (http://skydrive.live.com) with some new...

Full .NET Archive