Blog posts page 9 of 44

Origins of a love affair

From an earliest memory of a cream colored box emblazoned with letters, mostly black — some red, came an owl proclaiming allegiance to the BBC.

This small box sat silently, patiently even, in our classroom for the best part of a year. On the few occasions our teacher was brave enough to flip the switch the machine would chirp into life with it’s two-tone beep and would state on capital white letters on a black background that it was BASIC. At this point the teacher would key-in the mythical incantation of CHAIN ""CHAIN "" — handily jotted on a nearby note — and feed the beast a cassette tape.

SQL Server query plan cache – what is it and why should you care?

SQL Server like all databases goes through a number of steps when it receives a command. Besides parsing and validating the command text and parameters it looks at the database schema, statistics and indexes to come up with a plan to efficiently query or change your data.

You can view the plan SQL Server comes up with for a given query in SQL Management Studio by selecting Include Actual Execution Plan from the Query menu before running your query.

When an object-relational mapper is too much, DataReader too little

  • đź“…
  • đź“ť 248
  • đź•™ 2
  • 📦 .NET
  • đź’¬ 16

I fired up Visual Studio this evening to write a proof-of-concept app and found myself wanting strongly typed domain objects from a database but without the overhead of an object-relational mapper  (the application is read-only).

One solution is to write methods by hand, another is to code generate them but it would be nice to be able to do:

Five steps to blog (re)design

For some time I’ve wanted to refresh the design here at damieng.com which evolved out of the Redoable theme with my own tweaks to colors, typography, images and background until it was almost my own.

Almost, but not quite.

First impressions of Snow Leopard

I came home from work today to find my family pack upgrade version of Snow Leopard. It’s been a few hours, so here are impressions so far.

The packaging was very small and lightweight and eco-friendly compared to the big-plastic-box-monsters that come out of Redmond.

LINQ to SQL cheat sheet

A few short words to say I’ve put together a cheat sheet for LINQ to SQL with one page for C# and another for VB.NET.

It shows the syntax for a number of common query operations, manipulations and attributes and can be a very useful quick reference :)

Dictionary<T> look-up or create made simpler

  • đź“…
  • đź“ť 236
  • đź•™ 2
  • 📦 .NET
  • đź’¬ 6

The design of a Dictionary<T>Dictionary<T> lends itself well to a caching or identification mechanism and as a result you often see code that looks like this:

It’s not that it is particularly difficult but it can be a bit error prone and when you’re doing it over and over. What would be nicer is something that let you do:

LINQ to SQL resources

  • đź“…
  • đź“ť 723
  • đź•™ 4
  • 📦 .NET

A quick round-up of some useful LINQ to SQL related resources that are available for developers. I’ve not used everything on this list myself so don’t take this as personal endorsement.

Note: While the T4 templating language is built-in to Visual Studio 2008/2010 it does not come with syntax highlighting or IntelliSense. Check out either: