Monday, 26 November 2007

Too much Resharper...

You know you've been using Resharper too much when you press F12 in a Word document expecting to be taken to the next spelling error! :)

However, now I think of it, it would be a good thing.

Friday, 2 November 2007

Mingle 1.1 Released


ThoughtWorks Studios have now released Mingle 1.1.

The new changes are documented here. There is post installation documentation here which might be useful when learning about the new card types and how to start using them.

A word of warning - Once you installed the new version and launched the website, the installation says "...this could take a very long time". They weren't joking! It took several hours on my machine. I've no idea how long it actually took because I had to leave it running all night. However, it did successfully upgrade in the end. The strange thing was that during the upgrade process, the CPU is hardly used. What was it doing?!

Not had a chance to use the new features yet but from the documentation they look encouraging. Nice work ThoughtWorks.

Download Mingle R1.1

Friday, 26 October 2007

ScreenGrab! for Firefox

Browsing around recently, I came across ScreenGrab for Firefox.

Screengrab! is an extension for Firefox that makes it easy to save a web-page as an image. With it, you can save anything that you can see in a browser window - from a small selection, to a complete page.

If you are a web developer and need an easy way to convert sections of a page or an entire page to a .png file, this the tool for you. It would be very useful when supplying clients with page screen shots.

IMAP Released for GMail

Finally, IMAP is available for free on GMail.

It was only released within the last few days and is still being rolled out to everyone.

Here is the official word.

Wednesday, 3 October 2007

Great Mistakes in Technical Leadership

Came across this article on Hacknot.

It's worth a read.

From the article:

A Technical Lead lacking in self-confidence can be a major frustration to their team. They may find themselves waiting on the Lead to make decisions that significantly effect their work, but find that there is some reticence or unwillingness to make a firm decision. Particularly when new in the role, some Technical Leads find it difficult to make decisions in a timely manner, for they are paralyzed by the fear of making that decision incorrectly. Troubled that a bad decision will make them look foolish, they vacillate endlessly between the alternatives, while their team mates are standing by wondering when they are going to be able to move forward.

Tuesday, 2 October 2007

I'm online with Plugoo


I've just added Plugoo to my blog and gave it a test run last night. What a cool idea!

Thanks to Plugoo, visitors on your webpage, friends or family, can easily chat with you while visiting your website!

Plugoo enables you to chat directly from your Instant Messenger with any visitor of your blog, personal webpage or e-sales site.

When you’re logged into your Instant Messenger (Windows Live Messenger, Yahoo! Messenger, AIM, GoogleTalk, Jabber or ICQ), you can receive in real time all the comments of your visitors or any question they might ask, and answer instantly!

It's very easy to sign up and get it working on your website or blog. If you are reading this from my blog directly rather than a feed reader, make sure you say hello!

Google Apps includes presentations

Google have just released another application to add to their Doc & Spreadsheet Google App suite called presentations.

As far as I can see, Google have recreated Microsoft Office online. Well done Google!

  • Word = Documents
  • Excel = Spreadeheets
  • Outlook = Calendar + Gmail + todo
  • PowerPoint = Presentations
The rest of the Office suite doesn't matter. No one uses it anyway!

I wonder how long it will be before businesses will starting using Google Apps in earnest?

Monday, 1 October 2007

Mingle Roadmap

There are a few nice things coming our way in Mingle before Christmas. This pdf shows a roadmap at a glance. I'm particularly interesting in parent-child card relationships and CruiseControl integration both of which I'll need to wait until v1.2 scheduled to be release in December.

However, there are plenty goodies in version 1.1 that will keep me interested in the meantime such as card printing, enhanced transitions and date properties to allow card scheduling.

It's not surprising that the Mingle development team use Mingle themselves and here is a picture of their current card wall for release planning.

Of all these goodies, I'm still concerned about the memory use of MingleServer.exe. It seems to take up a huge amount of memory which I understood was to be fixed in the RTM release. If anyone out these knows how to make this memory use any better, I'm all ears.

Wednesday, 12 September 2007

Shared Posts

I've starting using Google Reader in earnest now and one of its features is the ability to share items on my blog from feeds that I read. Basically, I act like an aggregator for the items that I think are worth sharing.

This is separate from my blog feed so if you are interested, you can subscribe to my shared items list list using this feed ,or you can see it on the homepage of my blog.

Tuesday, 11 September 2007

Recent Comments Widget

Came across this cool gadget that allows you to add recent comments to your Blogger sidebar.

Very easy to install and configure. Download it here

While you're at it, you should check out the other widgets from this site.

Monday, 10 September 2007

Setting up .NET Development Trees in Visual Studio

I had the intention of talking about best practice ways of setting up a Visual Studio solution including which are the best tools followed by a step by step guide of how to do it. Well, it looks like someone beat me to it! This pdf from Mike Roberts does exactly that. What was interesting is that we set up our VS solutions very similarly and use most, if not all of the same tools. But then again, Mike Robert's is from ThoughtWorks and our Development Manager is ex ThoughtWorks - Amazing how the information flows between companies! ;)

Talking of development tree structures, there is a tool on CodePlex that generates your solution tree for you in line with how Mike Robert's document suggests. It's called Tree Surgeon. It's very simple but it provides a good start.

Monday, 13 August 2007

TechEd New Zealand is underway

TechEd 2007 started today starting witht the keynote speech given this year by Lou Carbone. It was brilliant! It is soon to be posted on the TechEd NZ site soon and I recommend that you watch it. It is very inspirational. Some more info on this on Darryl Burling's blog and Nigel Parker's blog

Intergen were dressed in their ususal "outstanding" outfits making our mark on the NZ community.


I went to the following events:

  • DEV346 Next Generation Team Foundation Server
    Having already played with TFS quite a bit, I didn't learn a great deal from this session. However, what i did learn is that there is a way to gain access to TFS source control using a SVN client! So that means we could use TortoiseSVN from Windows Explorer to manage TFS source control - how cool!
  • ARC304 Architecting Next Generation Business Applications
    This was heavily focussed on MOSS which wasn't for me so didn't take a lot away from this session
  • ARC306 UX - Interface Design patterns
    This was an interesting session showing the possibilities of user interface design. It included a few video clips showing Photosynth, some multi-touch tabled demos from Jeff Han all giving us plenty of ideas for our next user interface.
  • DAT304 The Next Release of Microsoft SQL Server: Overview
    There are a few cool additions to the next vesion of SQL Server codenamed "Katmai". I particularly liked the automatic page recovery feature of a mirrored database! Check out the rest of the features on the Microsoft site.
    The July CTP of SQL Server 2008 is now available for download
A great start to TechEd 2007. Hopefully tomorrow will continue to be as good...

Sunday, 12 August 2007

Intergen setting up at TechEd 2007


Well, Tim and the rest of Tech Services did a great job of setting up the hand on labs room at TechEd this year. Well done guys!! The lab room looks cool and aparently everything is working just fine... fingers crossed!

Nothing of note has happened so far, but that's because Ben wasn't there to entertain us with a brooks-worthy cockup!! Still, 3 days left for that, eh Ben!

Shaun made a stellar effort of setting up the Intergen stand complete with an shot-em-up arcade machine. Tim and I had a game and got hooked in pretty quickly! If I'm not on lab duty or attending a session, you'll find me playing games at the Intergen stand.

As ever, the TechEd bag is quite funky and comes with a bundle of advertising inside, the most controversial of which was a brochure from Absolute IT doing a salary review. :) It's worth a read.
No free copies of Vista yet but I'm on the lookout.

To keep everything central, I've setup a Facebook group called Intergen TechEd 2007 for all the photos, videos, thoughts and new from this years event. It's an invite only group so if you're from Intergen, ping me an email and I'll add you in. There is a link to my Facebook public profile at the top of my blog and from there you can look at my groups to find the TechEd 2007 one.

Friday, 10 August 2007

Adding statistics to your blog

Add stats to your blog with Statcounter.

I've added some statistics to my blog so I can see who is looking at what. Nice to see the demographics of who visits your blog! It's very easy to sign up and there are loads of config options. Some of the stats are very interesting, especially the demographic map one!


A free yet reliable invisible web tracker, highly configurable hit counter and real-time detailed web stats. Insert a simple piece of our code on your web page or blog and you will be able to analyse and monitor all the visitors to your website in real-time!

Thursday, 2 August 2007

Formatting your code for blogging

In my previous post, I was trying to insert XML into my blog entry. Blogger isn't very helpful and makes a mess of XML and any C# or VB code entrys.

However, there is a formatting tool which outputs 4.01 compliant HTML which you can paste directly into your blog! It parses c# vb, xml, t-sql and others and does it very nicely.

Here is a sample of c# output:


using System.Windows.Forms;

namespace Vulcan.Borat.WinApp.UserControls
{
public partial class ProductPanel : UserControl
{
public ProductPanel()
{
InitializeComponent();
}
}
}

Using NUnitForms with NUnit Framework 2.2.9

NUnitForms has been compiled to work with NUnit framework library 2.2.7. However, NUnit have released a new framework which can be made to work with NUnit 2.2.9 quite easily.

By default, if you put NUnitForms and NUnit Framework 2.2.9 into the same project, you will get the error message

Could not load file or assembly 'nunit.framework, Version=2.2.7.0, Culture=neutral, PublicKeyToken=96d09a1eb7f44a77' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)

along with a further error

WRN: Assembly binding logging is turned OFF. To enable assembly bind failure logging, set the registry value [HKLM\Software\Microsoft\Fusion!EnableLog] (DWORD) to 1. Note: There is some performance penalty associated with assembly bind failure logging.
To turn this feature off, remove the registry value [HKLM\Software\Microsoft\Fusion!EnableLog].

However, you can use NUnitForms with NUnit 2.2.9 if you get the test project to perform some assemble redirecting. In your test project, create an app.config file and add the following XML to redirect NUnitForms assemble to use the NUnit Framework 2.2.9 assembly:

<?xml version="1.0"?>
<configuration>
<runtime>
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
<dependentAssembly>
<assemblyIdentity name="nunit.framework" publicKeyToken="96D09A1EB7F44A77" culture="neutral"/>
<bindingRedirect oldVersion="0.0.0.0-2.4.0.2" newVersion="2.4.0.2"/>
</dependentAssembly>
</assemblyBinding>
</runtime>
</configuration>


Recompile and run your NUnitForms tests and your working :)

Wednesday, 1 August 2007

Mingle v1.0 Released

ThoughtWorks Studios have released Mingle v1.0 to the public.

You can download a 30 day trial version

Thursday, 19 July 2007

Mingle

Mingle is a software application that helps you and your team manage Agile IT projects.
It supports software delivery by providing the whole team with a single place to share all project output using a framework based on over 7 years of ThoughtWorks' Agile experience.

Mingle provides project intelligence for teams that need to make real-time decisions based on Agile metrics collected from everyday activities.

I've had a play with Mingle recently and so far it looks like a great piece of software, even though it is still an alpha release. It is developed and supported by ThoughtWorks Studios. You can register you interest in Mingle which I did and was given access to download the software the next day.

Mingle uses MySQL or PostgreSQL as a back end database and the installation was simple and problem free. It integrates with Subversion for tracking your code against the requirements

Well worth checking out Mingle if you are looking for a tool to help you with agile project management and centralising your project information

Tuesday, 17 July 2007

Get latest before checkout

One difference between Visual Source Safe (VSS) and the version control in Team Foundation Server (TFS) is that VSS performed a get latest operation before checking out a file but TFS does not offer this functionality. This caused an issue for a few of my colleagues and until now, I didn't know of a way around this problem. For those that are interested, Greg found an article here that describes how to alter this behavior and you can download the file from CodePlex. However, the add in doesn't do it for me because IMHO, you should NOT perform a get latest before you checkout and file and here is why.

Microsoft have lulled us into a bad head space when it comes to source control. No source control system should manage state, but VSS and TFS both manage state on the server. This just causes no end of problems and doesn't represent what source control is all about. The topography of source control should be a hub & spoke situation - once a client performs a get latest on the server, the server does whatever it needs to to provide the information to the client and then severs the connection. The server should not maintain that Joe Bloggs just checked out file x because it makes absolutely no difference. What if that person kept file x checked out forever? Would it matter? No, not at all. What matters is what goes into the repository, not what comes out of it. In fact, the whole concept of check out is flawed. It's not that you are checking out the file, it more that you want to make changes to a file. In TFS land, check out means "update the server with a record saying that I'm maybe going to edit a file" and undo checkout removes the record. What's the point of maintaining that you might do something? Ultimately, once you have the latest source on your machine, you shouldn't need to contact the repository again until you want to commit the files.

Take this scenario:

  • there are two developers, Bill and Ben
  • Bill makes changes to the customer code file
  • Ben makes changes to the customer code file
  • Bill checks in his changes
  • Ben checks in his changes
What happens here? Whose changes are accepted? What actually happens is the server performs a merge on every check in and if the code can be merged without conflicts, the changes are merged and accepted into the repository. So in this case, as long as Bill and Ben's changes merge successfully, there will be no issues and their changes will be merged together.

However, there is a fundamental step missing from this scenario which causes the most headaches. Before you check in, you should always perform a get latest. If you don't, the version control system will attempt to merge your changes together but it's a horrible position to be in to be caught short when your trying to update the repository. A much better approach is to perform a get latest on the entire solution before you check in. This way, any files that have changed are brought to your machine locally and you can merge/diff/rebuild the project and run your tests before checking in.

Lastly, and my main point about why get latest is bad before checkout, imagine this scenario:
  • There are two developers Bill and Ben
  • Ben makes changes to the customer file and these changes require changes to several other files file to complete the change successfully
  • Bill wants to edit the customer file and he does a get latest before he starts. When he tries to compile, it will fail because he did not get the related files that Ben changed, only the customer file. Therefore, Bill also has to get all the other necessary files to make the solution compile. He doesn't know which files these are and so ends up having to get latest on the entire project
This scenario is bad because you haven't completed doing what coding changes you were working on and yet you've had to mix changes from other people. Basically, you should not perform a get latest on a individual file otherwise you are only getting a partial get latest when it comes to building the entire solution. Also, before performing a get latest, you should finish your own changes first and ensure it compiles and passes all the tests before introducing changes from other member of the team through a get latest. Remember, get latest cannot be undone, so if you have your IDE perform a get latest before you check out a file and you end up in the above situation, you could spend a lot of time putting things back together before you are ready to.

In general, when you are working with source control, you should follow this procedure:
  • Make changes to the source
  • Build the solution and run your tests
  • Perform a get latest on the entire solution
  • Build the solution and run your tests
  • If it builds and all the tests pass, check in
Get latest on an individual file is fine if you understand the repercussions of what you are doing, but having your IDE automatically get the latest copy of a file before you check out defeats the purpose of having a source control system there at all. Assuming it were possible, why not just have all team members working from a central file resource so they alway have the latest files? Can you imagine what this would be like? This is exactly what is recreated if you get the latest version of a file before you make changes to it.

Wednesday, 13 June 2007

Leadership and Management

I came across these two definitions which I thought distinguished the difference between leadership and management effectively.

Leadership without management

...sets a direction or vision that others follow, without considering too much how the new direction is going to be achieved. Other people then have to work hard in the trail that is left behind, picking up the pieces and making it work. Eg: in Lord of the Rings, at the council of Elrond, Frodo Baggins rescues the council from conflict by taking responsibility for the quest of destroying the ring - but most of the management of the group comes from others.

Management without leadership
...controls resources to maintain the status quo or ensure things happen according to already-established plans. Eg: a referee manages a sports game, but does not usually provide "leadership" because there is no new change, no new direction - the referee is controlling resources to ensure that the laws of the game are followed and status quo is maintained.

Leadership combined with management

...does both - it both sets a new direction and manages the resources to achieve it. Eg: a newly elected president or prime minister.

Read the source article

Monday, 11 June 2007

Facebook Rocks!

How cool is Facebook? Between Claire and I, we received a few invites and never bothered to sign up. I just thought it was another "thing" to sign up to and wont really be of any use. Now I'm hooked! It's very addictive.

Facebook is a social utility that connects people with friends and others who work, study and live around them. People use Facebook to keep up with friends, upload an unlimited number of photos, share links and videos, and learn more about the people they meet.

I signed up this weekend and I've already contacted several people that I'd not seen or heard from since school days! Very interesting to see who is doing what now.

For those that are interested, there is a video given by Mark Zuckerberg, the founder and CEO of Facebook. He talks about the impressive statistics of Facebook and the exciting world of the new Facebook Platform. There is section for developers which shows you how to integrate with Facebook and create your own Facebook applications

Go on, sign up, you know you want to and make sure you add me as a friend. For interest, there are currently 17,396 people in the New Zealand network. I'll be interested to look back at that statistic in a new weeks and see how it has changed.

Friday, 8 June 2007

2GB Free Online Backup with Mozy

If you're looking for a simple way to backup your files for free, then Mozy might be the answer. You get 2GB free when you sign up which you can upgrade to unlimited storage for $4.95/month. You can backup files from multiple computers and Mozy takes care of organising which files came from which computer.

You're stored files are accessible over the web and can be restored as a web restore for free and once your files are ready, you are sent an email. Mozy also includes a Windows Explorer context menu which makes restoring files easy. Right click on the file you want to restore and Mozy gives you a list of all previous versions of the file. There is also a virtual drive explorer in Windows that allows you to view all the files you've already back up online with out having to access the web.




Check out some of Mozy's features:

  • Open/locked file support
  • 448-bit Blowfish encryption
  • 128-bit SSL encryption
  • Automatic or scheduled backups
  • New and changed file detection
  • Block level incremental backups
  • Bandwidth throttling
  • File versioning
  • Public or private key encryption
The only caveat for me is that I use Windows 2003 server at work and Mozy (standard) doesn't run on server operating systems. However, MozyPro does accommodate server operating systems but it's not free.

It's well worth having a look - it's free after all! Sign up with Mozy here

Tuesday, 5 June 2007

Using Team Foundation Server Power Tools

There are lots of useful tools in the Microsoft Team Foundation Server Powertools, most of which should have been included in the the Visual Studio IDE. The tools that I find most useful are:

Annotate
The annotate command downloads all versions of the specified files and shows information about when and who changed each line in the file. To access the annotate command, right-click on the file you want to annotate in the solution explorer (or Source Control explorer) and select annotate. The annotate command is also accessible from the File, Source Control menu.

When working on a multiuser project, this is a very useful interrogation tool. Along the left hand side of the annotate window, is also displays a hyperlink to the change set which included the code change you are looking for. You can click on this hyperlink to see the other files that were included in the change set. The hyperlink also includes a tooltip which shows the check in comment - very useful. and treediff

Treediff



The treediff command displays a visual representation of the differences between files in two server folders, in a server folder and a local folder, or in two local folders. Treediff can be used from both the command line and inside Visual Studio. The command line version creates the same GUI representation as presented by Visual Studio. The command version is accessed using TFPT Treediff.
Treediff has 4 filtering options:

  • Items that exist exclusively on the server tree
  • Items that exist exclusively on the local tree
  • Items that exist in both trees that have different contents
  • Items that exist in both trees that have the same contents
Each of these options can be selected individually or combined to produce a comprehensive report on the differences between what you have on your local machine workspace vs what is on the server. From the output, you can compare, view, get latest version, add missing files and delete each of the files as necessary which makes this tools a good way of keeping your file system tidy. It can be particularly useful if you want to prune all the files in your local workspace that don't exist on the server.
Take care with the delete option - it changes between "Delete" and "Delete Local Files" depending on your selection. Fortunately, all the changes you make inside the treediff become part of your pending changes list and you have to check in for the changes to be accepted.

Process Template Editor



Team Foundation Server Power Tool installs Microsoft Visual Studio Team System Process Editor, which is a process template editor for editing Team Foundation Server process templates inside the Visual Studio IDE. The installation media includes separate documentation for the Microsoft Visual Studio Team System Process Editor, which includes a User Guide and a Readme file that includes known issues.

Although this tools is still pretty raw, it can save you a lot of XML editing and makes editing a process template a lot easier.


Undo Unchanged:
The undo unchanged command undoes redundant pending changes. This means that is the state of an item with a pending changes is the same as on the server, then the change is undone. This command is very useful if you have Visual Studio setup to check out files automatically. It helps prevent files being check in the have had no changes made to them and have been checked out unnecessarily. During the undo unchanged operation, any files that have not been checked out but are not up to date on your local workspace are retrieved from the server. This feature can be suppressed using the /noget command line options.

I'd like to see the undo unchanged command being run before every check in to freshen the pending changes and integrate your changes with the server before you start your check in procedure. This coupled with the tfpt review command which show a window of all your pending changes and allows you to go through each change doing a diff against the sever. As you diff each file, it is ticked on the review window which is a nice way of working though and validating each of your changes and helping you track where you are up to.

For a list of other command available on the team foundation server power tools, type TFPT at the command prompt. Note: depending on your path setup, you may need to change to the team foundation server power tools directory to get access to the TFPT command. I've added the default installation directory for this tools to my environmental path statement which makes more useful as it can be accessed more easily. The default installation directory is C:\Program Files\Microsoft Team Foundation Server Power Tools.

Download the Microsoft Team Foundation Server Power Tools

Friday, 1 June 2007

Project Startup Guidelines

There is such a diversity of projects that a developer can work on, it's very hard to know if you've started doing things the correct way. A startup checklist is a good place to start but they can be hard to come up with - then someone sent me a link to Patrick Cauldwell's blog which is an excellent account of items that should be considered when starting/working on any project. Well done Patrick - it's far too easy to steal this and adapt it for your needs but many of the disciplines in there excellent. It's well worth a read

One item that caught my eye whilst reading though was "only the public interface should be public". When using test driven development, you can end up making methods public purely for test purposes. This is not a good idea and as Patrick suggested, you should take advantage of the InternalsVisibleTo attributes which allows you to test private methods from test assemblies. Very useful and very easy to setup. I'll post on this technique later.

Tuesday, 29 May 2007

Microsoft released Enterprise Libraries 3.1 - May 2007

Microsoft have release Enterprise Library 3.1 which contains a few updates from the previous January 06 version. I've installed it and I much prefer the cleaner start menu options which just take you to the source folder and let you browse away.
Note: If you already have the Enterprise Library 3.0 installed, you must uninstall it before installing the Enterprise Library 3.1. However, you can install the Enterprise Library 3.0 or the Enterprise Library 3.1 when 2.0 is already installed.

The patterns & practices Enterprise Library is a library of application blocks designed to assist developers with common enterprise development challenges. Application blocks are a type of guidance, provided as source code that can be used "as is," extended, or modified by developers to use on enterprise development projects. This release of Enterprise Library includes application blocks for Caching, Cryptography, Data Access, Exception Handling, Logging, Policy Injection, Security and Validation.

Monday, 21 May 2007

Generic collection classes allow nulls

Something to bear in mind when using generic collections in .NET is that they allow you to add null into the collection for reference types. This is not a bug but it means that you need to be careful when iterating through the collection.

For example, if you had a collection declared as
Collection<Customer> customers = new Collection<Customer>();

then add a null into the collection like so:
customers.Add(null);

it adds a null reference into the collection. This means that customers.count returns 1 and all looks well, but this is not so good if you try to iterate around the collection like this:

foreach(Customer customer in customers)
{
customer.Firstname = "test";
}

You would get a null reference exception as the customer object in this case is null. This means you have to clutter your code with null checks as you iterate through the collection. Wouldn't it be nice if the .NET framework provided non-nullable generics collection classes? It's on my list to create a class that enables this. Watch this space.... :)

Thursday, 17 May 2007

How parameters are processed in the Microsoft Data Access Block

I've been using the Microsoft Data Access Block for a while and only came across something that isn't clear in its operation and can have some very nasty side effects. Inside the SqlHelper class, there is a method called AssignParameterValues which "...assigns an array of values to an array of SqlParameters". This sounds good although it's not clear that it does this using index position rather than matching on the parameter name. Therefore, if you create a procedure with 2 parameters both varchars, the order in which you pass the command parameters array to the method is the order in which the SqlHelper executes them against the server. This defeats the purpose of naming your parameters in your code. For example, if you create a method to build your parameters like this:

private static SqlParameter[] CreateMyParameters(string firstname, string surname)
{
SqlParameter firstnameParameter = new SqlParameter("@Firstname", SqlDbType.Varchar);
firstnameParameter.Value = firstname;

SqlParameter surnameParameter = new SqlParameter("@Surname", SqlDbType.Varchar);
surnameParameter.Value = surname;

new SqlParameter[] { firstnameParameter, surnameParameter };
}


then use the

public static int ExecuteNonQuery(SqlConnection connection, string spName, params object[] parameterValues)

method, your nicely named parameters array is attached to the command object based on their position on the array position and not their names. The method that does this is called AssignParameterValues.
However, the same problem does not happen when you use the method

public static SqlDataReader ExecuteReader(SqlConnection connection, CommandType commandType, string commandText, params SqlParameter[] commandParameters)


The ExecuteReader just attaches the parameters as you created directly to the command object and therefore the parameter names are preserved.

This makes naming the parameters pretty useless for nonquery or scalar operations. It would be nice to see this method modified to use the parameter names which would take advantage of the some of the methods in the SqlHelperParameterCache class.

Tuesday, 15 May 2007

ClearType Font for Visual Studio 2005

If you use ClearType then you may find the Consolas Font Pack for Microsoft Visual Studio 2005 useful.

Optimized for Microsoft ClearType
The Microsoft Consolas Font Family is a set of highly legible fonts designed for ClearType. It is intended for use in programming environments and other circumstances where a monospaced font is specified. This installation package will set the default font for Visual Studio to Consolas.

Ok, it does look a bit typewriterish, but that's the point. However, you do get slightly more text on the screen than you do with the standard Courier New font both vertically and horizontally. It's worth a try anyway. It's easy to switch off if you don't like it. In Studio, goto Tools, Options, Environment, Fonts and Colors and click the use defaults button.

Download Consolas Font Pack for Microsoft Visual Studio 2005

Friday, 11 May 2007

Free books from InfoQ

Whilst trawling the web for information on domain driven design, I came across Domain Driven Design Quickly which can be downloaded in pdf format from InfoQ. If you want to know about domain driven design, this book is an excellent place to start.

There are a lot of free books on InfoQ so it's worth having a browse around their site. Some others of note are:

and some web casts:

Wednesday, 9 May 2007

Converting MMV files to other file formats

Last weekend, I spent some time getting videos off my video camera and onto my computer. I never thought it could be that hard! Then again, I did buy a Sony camera and Sony like all corporate multi-nationals insist on creating proprietary encoding on just about everthing they produce which removes all the choice of software from the end user.
To set the scene I have a Sony DCR-IPV7 which is a nice small camera but as this review states, getting the video off the camera is a awful. Sony not only created a proprietary Micro MV tape, they also encoded the files on the tape as a non standard format. They are saved to the tape as MMV files which are MPEG2 transport stream files which will only play in QuickTime or the software that comes with the camera.

However, you can actually play these files using other players like Media Player Classic. There are also loads of free codec packs like K-Lite Codec Pack, XP Codec Pack to support most file formats that you will come across. With the full codec pack which includes an MPEG2 decoder, you can play MMV files in Media Player Classic.

There is a tool called mmv2mpg.exe which converts mmv (MPEG2 transport stream) files into mpg (mpg program stream) files. There is some help on using it here. I didn't have much success with this tool so started searching for someting else and came across Windows Media Encoder (WME). This is an excellent tool and deals with converting video files from one type to another. It also provides basic screen capture utility which is very handy and the best bit, it's free! It can convert MMV files into wmv files and offers very high levels of compression which is excellent for posting the videos to the web. However, internally, WME uses Media Player to render the files so in order for it to successfully load an MMV file, Media Player must be able to play the file. Media Player 11 can play MMV file, however, it warns you on load that there is no native decoder available so it makes it's best attempt to play the video and it does so successfully. However, when I try to load an MMV file in WME, it crashes! It seems that unless Media Player can play the file natively, WME can't process it. I downloaded the trial version of a Media Player plugin that allowed playback of MPEG2 files called Elecard. Incidentally, www.wmplugins.com is a good site for all your Media Player plugins and you can find Elecard on that site here.
After installing this plugin, WME can successfully convert MMV files to WMV files with a good level of compression. WME also offers a few additional features like video resizing and cropping.

Hello and welcome....

It's been on my todo list for about 2 years and finally, it looks like I've got liftoff. My blog has arrived!

Now the challenge is to make sure posts are added on a reasonably frequent basis ;)

Happy reading... :)