C#

If you're using a loop, you're doing it wrong

"If you're using a loop, you're doing it wrong" by Chuck Jazdzewski is a quick primer to LINQ. It's a reminder that a lot of developers are going to make a conscious effort to change the way they approach problem solving when they're using LINQ. Of course any ex Notes/Domino developers with @Function programming experience will be used to stringing operators together, so they should be right at home! Tags: LINQ

Parallel Extensions CTP

The December CTP of Microsoft's Parallel extensions has recently been released. Some info from the download page: Parallel Extensions to the .NET Framework is a managed programming model for data parallelism, task parallelism, and coordination on parallel hardware unified by a common work scheduler. Parallel Extensions makes it easier for developers to write programs that scale to take advantage of parallel hardware by providing improved performance as the numbers of cores and processors increase without having to deal with many of the complexities of today’s concurrent programming models. Basically a set of extensions...

You down with MVC? Yeah you know me!

Ok, it's a pretty crappy pun, but someone had to use it. A couple of MVC/MVP related links: MVC demo sourcecode MVC or MVP Pattern – Whats the difference?

More real world LLBLGenPro code

I love working with LLBLGenPro. However sometimes I go through a process of adapting what I want to do into LLBL speak. I'm still pretty new to using the tool, so I figured I'd throw up some of the more useful chunks of code relating to real world problems just in case someone else finds them useful. The Problem You have a list of entities, lets call them "Categories". You're dynamically creating a total related to these categories, lets say "the number of images in each category". Finally, you want to filter your result set (using LLBLGenPro -...

Developing Linq for LLBLGenPro

Fans Bouma is documenting the process of adding linq support to LLBLGenPro in a series of posts. One of the pingbacks named the series "A diary of LINQ pain" which sounds pretty appropriate! Tags: LLBLGenPro, Linq

Forehead slapping with DateTime.AddDays()

A little note to remember when working with DateTime.AddDays(). Luckily I only spent a few minutes with my code stuck in an infinite loop before googling, but still.. Technorati tags: C#

ReSharper 2.5.3

ReSharper 2.5.3 is now out, and represents the last 2.5.x release for those of you who aren't planning/able to go to 3.0. There are a fair few fixes, specifically in the area of ASP.NET support. Grab it if you're not planning to move to 3.0. (3.0 has been fine on my XP machine at home, but I still need to find time to re-test it on my work Vista box, where I was experiencing weird behaviour) Tags: ReSharper,

ReSharper 3.0, Vista, or aliens?

Seeing as I mentioned the ReSharper 3.0 release, I thought I should also mention that I've reverted my main work box (which is running Vista) back to ReSharper 2.5.2. I was having some weird issues around shortcuts not quite sticking, as well as some functionality simply not working (the compilation checking seemed either disabled or incredibly lagged, ctrl-p for parameter info was only working intermittently, and the automatic insertion of using statements wasn't firing either). It was a weird few hours working without full ReSharper functionality - it scared me thinking about how much I missed it. Unfortunately I...

The Most Useful .NET Utility Classes Developers Tend To Reinvent Rather Than Reuse

Wow, what a post title. It's a couple of weeks old, but this list over at haacked.com is a quick list of classes that developers tend to code themselves rather than use what's provided in the framework. The constant reinvention is symptomatic of a large and comprehensive framework - there's so much in there, it's sometimes hard to know where to look for something that does what you're trying to do. Looking through the list was quite refreshing. There were a few obvious ones such as System.IO.Path.Combine, however I'd never thought that a framework which is destined to...

ReSharper 3.0 released

ReSharper 3.0 is now out of beta and available for download. So far I've installed it on both b0xes I develop on, but haven't really used it as yet. I have to confess, there's not a lot in the new release which has wowed me so far - although I'm hoping the XAML support might be useful in the near future. The addition of 'code suggestions' also sounds like something that will be quite welcomed - there were a few situations before where ReSharper would 'warn' you about things which were fairly legitimate. It'll be nice now to receive...

ReSharper 3.0 Beta now available

The beta release of ReSharper 3.0 is now available for downloaded. The product now features support for VB.NET (Revisualbasicer?), XAML, as well as additional productivity enhancements. ReSharper 3.0 Beta expands its versatile support of languages and technologies, providing improved functionality for C#, VB.NET, ASP.NET, XML, XAML, build script editing and integrated unit testing. In other improvements, ReSharper 3.0 brings much-awaited XML and XAML support. XML features include type completion, various navigation between tags, navigation to referenced types, basic code assistance, and live templates support. XAML features include XML editing in XAML code, all three types of ReSharper's...

ReSharper Keyboard Shortcut of the month

CTRL-SHIFT-V. The funny thing about this shortcut, is that it's so close to CTRL-SHIFT-B that I can't believe I haven't hit it accidentally before now while building a solution. Today however, after having used ReSharper for over a year, I did hit it by accident and found out that it's basically ReSharper's version of a clipboard paste which allows you to paste any of the last 20 text items that were copied to the clipboard (from any application) into your current window. ReSharper also provides you with a simple preview window to make sure you're pasting exactly the...

Fun with MSMQ

Working with MSMQ is pretty simple. A couple of quick google searches will return a nice array of code snippets and tutorials to help you get started. If you prefer books, there are heaps of them out there too, although I'm not really sure how you write entire book which is based soley on MSMQ, but I assure you they do exist. I understand that if you're developing an enterprise application that you'd probably want to use some more complex features of MSMQ, but the basic concept isn't that hard - put a message on the queue, take a...

ReSharper 2.5 released

The main enhancements in 2.5 seems to be performance related, which is always a good thing: ReSharper for Visual Studio 2005 provides performance improvements in all areas, including: Visual Studio startup time with ReSharper is close to that of Visual Studio without ReSharper The speed of typing in the editor is greatly improved, including autopopup on Code Completion More speedups for code formatting, error highlighting, Live Templates, parameter info, and more However the most useful feature I've found so...

ASP.NET Text Character Counter

A textbox character counter is a pretty simple piece of functionality, and there's a lot of different ways to apply one to your application. The following method is nice and simple, and can be done using only clientside JavaScript if required, or combined with server side code in order to create a more dynamic effect (ie, turning the counter on/off conditionally). First, we'll add the most basic static implementation of the field counter to a form using only a JavaScript function and event handlers in the aspx file, then we'll look at how we can extend the functionality...