DeveloperDeveloperDeveloper Scotland - 8th May 2010

The agenda is now up and registration is now open for DDD Scotland 2010. The conference takes place on Saturday 8th May at Glasgow Caledonian University. I’m looking forward to Ian Cooper’s Real World MVC Architectures and  Phil Winstanley’s Exception Driven Development.

Capitalize First Letter In Each Word in C#

The C# way to capitalize each letter in a sentence. Here’s how I did it. Remeber to toLower() if you maybe passing in a string entirely in uppercase.


CultureInfo.CurrentCulture.TextInfo.ToTitleCase(someSentence);

Best of the 404

It’s always nice to see a website thats put at least a little effort into their error pages. Here’s a few a like.

South Park

Read the rest of this entry »

A Problem with Google Maps

Go to Google Maps UK. Now search for Blackburn. You get back the result you’d expect yes? Google kindly sends you to the middle of Blackburn, Lancashire. Where in the sidebar does it link you to Blackburn, Aberdeenshire? Nowheres!

Embedding Fonts using @font-face

A nice little bit I CSS3 I use on my homepage to allow me to use fonts not necessarily on the visitor’s computer is @font-face. Font types TrueType (.ttf) and OpenType (.otf) are supported in Opera 10+, Chrome 4.0, Safari 3.1+ and Firefox 3.5+.

Here’s an example. First declare the font

@font-face {
  font-family:'ExampleFont';
  src: url('ExampleFontFileName.otf') format('opentype');
}

If you have different font files for font varients e.g. bold, italic, then these need to be set up seperately.

@font-face {
  font-family:'ExampleFont';
  font-weight: bold;
  src: url('ExampleFontFileName-Bold.otf') format('opentype');
}
@font-face {
  font-family:'ExampleFont';
  font-style: italic;
  src: url('ExampleFontFileName-Italic.otf') format('opentype');
}

Last but not least use this font like any other.

body{
  font-family:'ExampleFont', Arial, sans-serif;
}