# Monday, 21 June 2010

Edwards & Johnson

The site has been up for a little while, but I forgot to post about it. Develop-One created this for Law Offices OF Edwards & Johnson, P.A. – Attorneys at Law.

Visit them at: www.lincolnmainelaw.com

#    Comments [0] |
# Wednesday, 02 June 2010

Snippet Designer v1.3

Last week I mentioned and demonstrated a custom snippet in VS2010 during my BAND talk. Turns out there is an open source tool for helping you create snippets: snippetdesigner.codeplex.com, for more information and background info check Greg’s blog.

#    Comments [0] |
# Tuesday, 01 June 2010

Amazon Wireless

I guess Amazon is following suite with other more brick & mortar kind of companies and has decided to jump in the wireless plan market.

#    Comments [0] |
# Thursday, 27 May 2010

Learning more about Unit Testing

I just had an email in my inbox recommending "The Art of Unit testing" by Roy Osherove. I guess I’ll put in another order at Amazon. :-)

I've been doing unit testing for a long time, but since I'm largely self-taught I can probably learn something. Perhaps I’ll even sign up for a course at DevelopMentor. I know all the basics, I feel the biggest challenge with unit testing larger applications is managing test data.

#    Comments [0] |
# Wednesday, 26 May 2010

Usability testing

Last night at the BAND meeting Eric Burdo did an open mic talk about usability testing. He referenced two books by Steve Krug. Both seem like a good read to me and both are available on Amazon.

#    Comments [1] |

Windows Phone & Gaming

At BAND last night I had some interesting discussions about Windows Phone and as Daniel showed me the racing game on the Zune it suddenly hit me. Windows Phone is not going to be a iPhone killer, at least not based on a single feature that will blast the iPhone away. It is going to blast a hole in the Nintendo DS and Playstation Portable market.

Everything I’ve seen so far about Windows Phone makes it equal to the iPhone as a phone, but the focus on XNA and XBox Live integration will make it that everyone that has an XBox is going to want to have one… It’ll be interesting to see if my hunch is right. It took me a while to figure it out, since my view of the Windows Phone has been influenced by me thinking about ‘enterprise’ applications and how Windows Phone fits in there.

At the Augusta MSDN Roadshow event 2 weeks ago Chris Bowen showed a device and he didn’t show any details about what the Office/email/Outlook experience looked like on the phone. Considering it will still be a while before the devices hit the market makes me believe that a lot of development is still going on in that area and that Microsoft will have some surprises in store for us. I expect the Phone 7 offering to be well beyond what a Blackberry offers. Time will tell.

The hardware specs for Windows Phone 7 require manufacturers to provide at least 8GB of memory. My wish is that these phones will have at least 64GB of memory. That way I can put all my media (music, pictures, movies) and office files on my phone and not have to lug around a USB stick anymore, plus with Office on the phone I’ll be able to actually use the files. Perhaps WP7 will allow me to do a remote desktop session into my phone? :-)

Can’t wait to get one of these phones! :-)

#    Comments [0] |
# Tuesday, 25 May 2010

Opening up Outlook .pst files

Microsoft has announced two open source solutions for accessing Outlook .pst files. Read the press release here: http://www.microsoft.com/presspass/press/2010/may10/05-24PSTToolsPR.mspx

I’ve been able to find the following on Codeplex:

PSTViewTool : http://pstviewtool.codeplex.com/

PST SDK: http://pstsdk.codeplex.com/  [Thanks to Greg!]

Also, doing a search for Outlook on CodePlex offers a lot of solutions for looking at Outlook data or integrating with Outlook: http://www.codeplex.com/site/search?query=outlook

Update: Added the PST SDK.

#    Comments [4] |
# Monday, 24 May 2010

Silverlight 4 and ICommand

Silverlight 4 offers the opportunity to databind against a command. This is useful in MVVM scenarios. For some reason there is no quick implementation of a command (or I have been unable to locate it) so I wrote my own ‘QuickCommand’:

#region QuickCommand
public delegate void Execute( object parameter );
public delegate bool CanExecute( object parameter );

public class QuickCommand : ICommand

    private Execute _executeMethod;
    private CanExecute _canExecuteMethod;

    public QuickCommand()
        : this( null, null )

    public QuickCommand( Execute executeMethod )
        : this( executeMethod, null )

    public QuickCommand( Execute executeMethod, CanExecute canExecuteMethod )
        _executeMethod = executeMethod;
        _canExecuteMethod = canExecuteMethod;

    #region ICommand Members

    public bool CanExecute( object parameter )
        if ( _canExecuteMethod == null )
            return true;
            return _canExecuteMethod( parameter );

    public event EventHandler CanExecuteChanged;

    public void Execute( object parameter )
        if ( _executeMethod != null )
            _executeMethod( parameter );

#endregion QuickCommand

The Quick command allows you to assign a lambda expression to a ICommand property like this:

public class MainView
    public MainView()
        About = new QuickCommand( c => MessageBox.Show( "© Develop-one, 2010" ) );

    public ICommand About { get; set; }

This ICommand property can then be used for databinding a button control (I removed the default namespace declarations):

<UserControl ... 
<StackPanel Orientation="Vertical">
    <HyperlinkButton Content="About" Name="hyperlinkButton1" HorizontalAlignment="Center" Command="{Binding About}"/>

See how the ‘Command’-property of the button binds against ‘About’-property of the MainView class? Sweet!

#    Comments [0] |
# Monday, 10 May 2010

Accessing TFS 2010 from Visual Studio 2008

I’ve recently installed TFS 2010 and have been running some projects on a complete 2010 oriented environment. Today I found the need to also connect to TFS 2010 from Visual Studio 2008. (essentially due to a project that I cannot convert to 2010, yet). In order to connect to Team Foundation Server from VS2008 you need the Visual Studio Team System 2008 Team Explorer, then in order to connect to TFS 2010 you also need the Visual Studio Team System 2008 Service Pack 1 Forward Compatibility Update for Team Foundation Server 2010.

So my initial setup was:

  • Windows 7 Ultimate 64-bit
  • Visual Studio 2008 Team Suite SP1
  • Visual Studio 2010 Ultimate

I installed Visual Studio 2008 Team Explorer and then on top of that the Forward Compatibility Update. I received no errors during the installations, but I was unable to connect to my TFS 2010 machine. I tried Martin Kulov’s suggestion of entering a full URL. This was not accepted as input. Neil Rees blogged about reinstalling Visual Studio 2008 SP1 after installing Team Explorer 2008. So I did. Then I reran the installer for the Forward Compatibility Update. Initially still no juice, but then when I entered a full URL (http://servername:8080/tfs/collectionname) it all came together and I was able to connect to a specific collection of team projects from within Visual Studio 2008.
Oh, and not unimportant during all this my VS2010 installation was unaffected.

#    Comments [0] |

Error installing SQL Server 2008 R2

I just tried installing SQL Server 2008 R2 in a VirtualPC environment. This caused an error, redownloading the .iso image from MSDN did not help. I Binged it and found Bob Beauchmin had the same problem. Apparently the .iso reader in VirtualPC causes the problem.

More here: http://www.sqlskills.com/BLOGS/BOBB/post/Getting-error-2337-installing-SQL-Server-on-a-VPC.aspx

#    Comments [0] |
# Friday, 07 May 2010

MSDN Roadshow in Maine

Almost manage to miss it in my inbox, but I just signed up for the Maine MSDN Roadshow event! It will be held on May 11th in Augusta, ME with thanks to State of Maine (John rules!) for the accommodations and of course Microsoft for making Chris and Jim drive all the way up north :-)

The Agenda:  A Payload of Awesomeness

“Fore!” – Slicing Into What’s New in Silverlight 4

Silverlight is all about driving your applications into the fairway of user experience.  Silverlight 4 tees up many new features to help you create rich applications that will hook your customers’ interest.  You’ll see Visual Studio 2010’s improved designer, microphone and webcam support, core API and XAML improvements, new out-of-browser options, and more.  Of course, these features aren’t rough to use, and you’ll get into the swing of things in no time.

“Don’t T(h)read on Me” – Snaking Through the New Parallel Programming Options

Many developers recoil at the prospect of writing and debugging multithreaded and multicore applications.  The great news is there’s plenty to help in .NET Framework 4 and Visual Studio 2010.  We’ll sink our teeth into Task Parallel Library, PLINQ, Visual Studio 2010 debugging features, and new Framework classes that offer ways to make efficient programs and help shed those concurrency worries.

“Weaving the Next Web” – ASP.NET 4, Windows Azure, and Beyond

Visual Studio 2010 makes it easier than ever to stitch together masterful applications.   Continue to ply your existing skills with an improved Web Forms experience, or quickly spin up interactive forms-over-data sites with Dynamic Data.  And of course you can hook right into ASP.NET MVC to craft testable and extensible solutions.  It doesn’t end there though, from the fabric of the same development environment, you can swiftly shuttle your applications, Azure-aware, to the cloud.

“It’s Your Call” – Windows Phone 7, Silverlight, and XNA

Windows Phone 7 is dialed in for a holiday 2010 release and developers can answer the call today by leveraging Silverlight or XNA skills to create and extend applications or games to reach to new customers in new ways.  This demo-heavy session will give you the 411 on using Expression Blend 4 and Visual Studio 2010 with the Windows Phone 7 tools.  After seeing what’s new, you won’t want to put this opportunity on hold.

Sign up here.

#    Comments [0] |
# Monday, 29 March 2010

Repairing Outlook 2007 .pst file

I just had a little scare with Outlook. After installing VSTO 2010 beta 2 64bit on my system my Calendar folder was suddenly corrupt. Luckily there is an excellent (free) way of repairing a broken .pst file. It’s just a little hidden. Read this KB article to find out how to do it.

Tip to Microsoft: Why not register this file as an “Repair” option to a .pst file, allowing me to right-click and fix my broken .pst file?

#    Comments [0] |
# Thursday, 25 March 2010

Upload a file using FTPS

I just implemented a little routine to upload a file to an FTP site using SSL. I started looking at purchasing a component to help me out, but it turns out the .NET Framework offers all you need.

public class FtpStatus
    public FtpStatus()
        Succes = true;
    public bool Succes { get; set; }
    public string Message { get; set; }
/// <summary>
/// Upload a file using FTP and SSL.
/// </summary>
/// <param name="host">Full name without the 's', e.g.  ftp://secure.develop-one.com</param>
/// <param name="filename">Filename including server path, e.g.  /Upload/test.txt</param>
/// <param name="file"></param>
public FtpStatus UploadFile( string host, bool useSsl, string username, string password, string filename, byte[] file )
    FtpStatus result = new FtpStatus();
    string target = host + filename;
    FtpWebRequest request = (FtpWebRequest) FtpWebRequest.Create( target );
    request.EnableSsl = useSsl;
    request.KeepAlive = true;
    request.UseBinary = true;
    request.UsePassive = true;
    request.Method = WebRequestMethods.Ftp.UploadFile;
    request.Credentials = new NetworkCredential( username, password );
        using ( Stream stream = request.GetRequestStream() )
            stream.Write( file, 0, file.Length );
    catch ( System.Net.WebException exception )
        result.Succes = false;
        string message = ( (System.Net.FtpWebResponse) ( exception.Response ) ).StatusDescription.Replace( "\r\n", "" );
        if ( message.IndexOf( ":" ) > 0 )
            message = message.Substring( message.IndexOf( ":" ) + 2 );
        result.Message = message;
    return result;
#    Comments [0] |
# Saturday, 13 March 2010

Exploring Facebook API

I’m looking at creating a new website for our ATV club, but we also have a fan page on Facebook… looking to integrate the two… offering some basic info from Facebook onto our site seems easy… now looking to see if and how I can have a list of Facebook events on own site.

The box below shows a Fan Box for our club.

An here is a Page Badge:

Dwinal Pond 4 Seasons Club | Promote Your Page Too

Go to http://developer.facebook.com to create these widgets for your site.

#    Comments [0] |
# Wednesday, 10 March 2010

Reading Excel files in a WCF service using OleDB requires 32bit process

I’ve been doing a little work on a WCF service that reads an Excel file. My development machine is running Windows 7 64bit and my service was deployed to IIS. I kept running into a problem with opening the OleDb connection to the Excel file: “Error: Microsoft.Jet.OLEDB.4.0' provider is not registered on the local machine.”

Turns out that Office Jet provider will only run in 32bit. After changing my ASP.NET processes to run in 32bit everything ran just fine.

This KB article shows how to change ASP.NET to 32bit: http://support.microsoft.com/kb/894435/en-us

#    Comments [2] |
# Tuesday, 09 March 2010

Translating Software Maintainability Metrics into dollars

Nowadays there are a variety of tools and services available that provide insight into the quality of the code. In order to quantify quality a number of metrics are collected and used to create a maintainability index number. Visual Studio Team System gathers metrics to put a number on the quality of your code. While Omnext offers code is a company which offers services around providing insight into the functioning, quality, and size of software. Now what to do once you have a number? What does it really mean, other than wanting to be good and not score low on a report?

I offer a basic solution:

A project which scores high on maintainability can be maintained by junior to medior skilled developers.
A project that scores low requires senior developers to maintain the application and effectively do what a junior could do on a better code base.

This leads to a simple mathematical deduction.

A senior developer costs 30% to 40% more than a junior. Therefore a bad system will cost 30% to 40% more to maintain than a good system. Of course the increase is not quite linear so if we put it on a sliding scale/table we get:

Maintainability Index

Increase in maintenance cost


























Feel free to refer to this as the Blomsma Code Metrics Cost Factor.

#    Comments [0] |
# Monday, 01 March 2010

SQL Azure Backup

Last week at the BAND user group meeting in Bangor me and Chris Bowen had a little unresolved discussion about how SQL Azure manages backups. Today I found (thanks to Ben Rees) a segment of a presentation that was done at PDC’09 by Dave Campbell and Tony Petrossian. I grabbed the screen that covers what is and what will be available when it comes to backup.


1. Automatic failover. Every SQL Server instance will be configured for automatic failover. This is part of the standard service, no additional charge.
2. BCP, SSIS or other custom tools. Today (3/1/2010) there is only one way to create backups and that is pull the data to a local backup. You end up paying for bandwidth usage.
3. Database clone. A on demand backup which creates an (almost) instant replica of your database. Useful before doing schema changes and you could easily schedule the creation of a daily clone if you wish to do so. You pay for the storage. This feature should become available 1H 2010.
4. Continuous Backup. Backups run as specified by user where you will be able to restore the database to a specific point in time. Pricing not available yet. This feature should become available 2H 2010.

Update: Original video is here.

#    Comments [0] |
# Thursday, 11 February 2010

Visual Studio & MSDN availability on Amazon

VS2010 is not yet available on Amazon.com, but VS2008 with MSDN subscription is. If you purchase VS2008 with a MSDN subscription today then you will still qualify for a free upgrade to VS2010 when it goes RTM.


More info on the offer here: http://www.microsoft.com/visualstudio/en-us/howtobuy/ultimate-offer.mspx

#    Comments [0] |