Recently I was working with a client to debug an issue that they could only reproduce in production (I hate those). Unfortunately, this was the sort of error that was sporadic and unpredictable – so hooking up a debugger and waiting wasn’t much of an option. Fortunately, Microsoft’s Debug Diagnostic Tool can be used to automatically grab an IIS Memory Dump during certain scenarios (like crashes and hangs). Normally, memory dumps aren’t the kind of things that .NET developers go digging in to. Well never fear my .NET developer friend, let Tess from the Microsoft debugging team show you the way!


This is a great presentation that Tess Ferrandez gave at 0reDev last year on Debugging .NET Applications with WinDbg. After you’ve watched her presentation be sure to check out the rest of her full blog, especially her post on using CMDTree then go read John Robbin’s post on Debugger Markup Language (DML).

Now you are well on your way to being the Memory Dump Ninja that I always knew you were!

This week I had the privilege of leading a custom workshop for a team of developers in Fort Worth, TX. One of the topics that we covered was Writing Testable Code; specifically, we looked at the Model-View-Presenter (MVP) patterns, dependency injection and using RhinoMocks to pull it all together. The one catch was… this group of developers used Visual Basic.

I’ve never shied away from VB. In fact, VB6 with classic ASP is where I cut my programming teeth, and VB.NET was my first move to a true OO language. That being said, I work day in and day out with C#… I’m much more fluent there, and I realized that there were a ton of new features in VB that I wanted to cover that I wasn’t up to par with, fortunately I was able to call on my network of super smart friends and recruit/hire a fellow MVP’er to help me out for the day (thanks Cory for doing that 2 days after your wedding!)

One of the things that tripped me up was using Lambdas in VB. Lambdas are especially important if you are going to use a Mocking framework like RhinoMocks (which I do). Doing Lambdas in VB – especially when I was trying to raise an event from a mock – sort of tripped me up…

First – if you are working with Rhino Mocks, you should go have a look at the excellent Wiki. I find that a lot of people (read: I had) skip the “documentation” since RhinoMocks is so fluent and straight forward, but it’s definitely worth the read!

Second, if you’ve never raised an event in mock from your test in C# here’s the code:

viewMock.Raise(x => x.CalcShippingRequest += null, this, EventArgs.Empty);

and in VB:

Read the rest of this entry »

Bing 404 Plugin for WordPress

June 5, 2010    Category: Blog, Technical   2 Comments »

Yesterday Microsoft released a new plug-in for WordPress that uses Bing Search to improve your 404 pages. It works by grabbing keywords from the missing URL string and then uses the Bing API to search your site for those keywords.

Update: The creator of this plug-in just added a quick start video… go check it out!

So, your 404 page can go from this… 
(boring WordPress Default 404)

To this…

Read the rest of this entry »

This post is the 6th in a series that started with the 10 practices that every developer needs to start right now

image The first time that someone taught me about Software Design Patterns it went something like this:

  • Them: “… and so that is the pattern.”
  • Me: “That’s it”
  • Them: “Well, yeah.”
  • Me: “But that’s how I’ve always done that.”
  • Them: “Well, then you’ve always been following that pattern”

I find that is how a lot of people react when they first learn about patterns. “So a pattern is just giving a name to good software development” Well, yes and no. On the one hand – yes, a software pattern is recognizing common software challenges and the approaches that have worked in the past to over come those challenges – and naming it. On the other hand, don’t underestimate the power of giving something a name.

Read the rest of this entry »

Secure Coding 101

February 10, 2010    Category: Blog, Technical   3 Comments »

This post is the 5th in a series that started with the 10 practices that every developer needs to start right now

image When writing software, we often don’t think about the security implications of our actions. Probably because we write software to do something, we’re not always aware of what it shouldn’t do. Their are a lot of guidelines for writing secure code, and designing secure systems. Rather than going in to all of the areas, let me just hit on some of the especially important topics that I’ve come across…

Read the rest of this entry »

SOLID: Software that works.

February 9, 2010    Category: Blog, Technical   5 Comments »

This post is a part of a series that I started with “10 Practices that Every Developer Needs to Start Right Now“.

Update: This post was picked up by DZone, go vote it up!


Ok, before you dig in to the post, let’s get two things out of the way first.  1.Go read the authority on SOLID principles from the man himself, Uncle Bob Martin.  2nd.Go get the very cool Inspirational SOLID images from the guys over at Los Techies. They released them under a Creative Commons License which I think is pretty cool! Alright, got that out of the way? Good. Let’s get started.

Few things have come a long OO history that resonate so well with so many developers than the SOLID principle. One of the reasons they resonate with so many developers is because they communicate several practices that many developers have been doing all along. The beauty and power of the SOLID principals in in there ability to communicate, what I call code architecture, in such a memorable and practical way.

Like any good thing, however, taken to an extreme can become a hindrance on any project. So, I’m going to tackle these principals like I tackle everything in this series… give you my take on it. So here you go: SOLID according to Caleb.

Read the rest of this entry »

Learning to Write (Software)

January 25, 2010    Category: Blog, Technical   4 Comments »

I received a message on Facebook last week from a friend of mine that asked this question:

I have recently decided that I would love to go to school to learn programming. I just wanted to know if you had any advice or suggestions that could help me out (I know it’s a very open ended question)? Also I wanted to know if you had any suggestions on books to read regarding Design Patterns (particularly related to web development).

Great question. Let’s tackle those starting with the second part…

Read the rest of this entry »


I’m starting off this series talking about Object Oriented Programming. It’s amazing how many people write C# or VB (.NET) with long, procedural methods with really no understanding of the true fundamentals of OO design.

I know, I know – it’s not you, and know what? I’m not talking about you.. but check out the code from the person next to you. See what I mean?

Just because you’re writing in an OO language, doesn’t mean that you’re writing OO code, or taking advantage of the Object Oriented benefits. An Object Oriented language is more than classes with methods, properties and events (even VB 6 had that!).

Learn the Fundamentals.

Read the rest of this entry »


If you are going to read through my “10 practices that every developer should start right now” series, then you probably want to know where these 10 practices came from, why I chose these 10 – really, what so important about secure coding anyway? 😉   – I think that it’s important to know that these aren’t just 10 random items to fill a couple of blog posts. These are all practices that have been thoroughly thought out. This list is something that I started to formulate over a year ago based on my experience as a consultant, working as a technical editor, and discussions with countless MVPs, other consultants and in my interviews with potential consultants… Read the rest of this entry »

Update: Since technically a DI Container could be considered part of SOLID, I’ve swapped it out for Secure Coding… more on this soon!

If I ever right a book on becoming a .NET Ninja, these are the things that I want to cover.Ask a Ninja Handbook




Use a Container (DI)

Secure Coding 101


Automated Tests

Source Control

Continuous Integration

Agile | Lean | Scrum | XP

Team Dynamics

Never Stop Learning

Eventually, I’d like to write a book and dedicate at least a chapter to each of these (although any one of these topics could be a book in and of itself) In the mean time, I think that I’ll start with a blog post on each one, and maybe make it a goal to eventually do a User Group talk covering each topic? I’m looking forward to flushing these out as posts. I hope that you will enjoy them too!

What sort of things would you add to the list?



Enter your email address: