Rory Primrose

Learn from my mistakes, you don't have time to make them yourself

View project on GitHub

At war with F1

After implementing the double F1 solution a few moths ago, I now get continuously bitten by the change. I keep pressing F1 just once and then wait for help to come up only to remember that I need to hit F1 a second time. It probably doesn’t help that MSDN from Visual Studio takes a long time to come up the first time, but eventually I realise that I need to hit F1 a second time.

It’s a war between my automated single F1 press for help vs my misfiring over from the ESC key. I will keep the setting how it is though. Forgetting the second F1 press isn’t as bad as accidentally hitting F1 instead of ESC.

Read More

Load test results not available

I have received an email report from TFS for a nightly team build that I have set up. The build ran the unit tests successfully, but failed on some of the load tests. The warning provided is Warning: only a part of test result was loaded because test type implementation is not available. If I try to open the test, I get a message box saying There are no Test Result Details available.

Google fails to provide any insight into this error.

Load Test Results Error

Anyone come across this before?

Read More

WCF service contract design article

I had a conversation yesterday regarding WCF service contract design with my tech lead at work. Funnily enough, I then got a comment on an old post that afternoon from Ciaran O’Neill which is really about the same topic. I thought that I should write up my thoughts on the subject. See here for the article.

Read More

WCF service contract design

A good place to start looking at service contract design is the standards document published by iDesign (found here). This article contains some additional thoughts to add to these standards.

These ideas have come about because of a desire to achieve service designs that have minimum impact on configuration for both the client and the server. The intention is to design service contracts that will live happily with the default limits defined in WCF. The most common reasons for tweaking the WCF default configuration values are that services are returning data that is too large, or has too many objects in the graph for serialization.

Here are some things to think of when designing service contracts:

Read More

Cache expiration policies article

I was asked recently about caching expiration policies in response to my rant in my Caching should not be the source of truth post and a comment I made in a post by Chris Blankenship. I have written an article about cache expiration policies which you can find here. It discusses the high level concepts in expiration polices and some suggestions about which options to pick. It makes references to HttpRuntime.Cache and the Caching Application Block in EntLib.

Read More

Cache Expiration Policies

This article aims to provide an overview about caching expiration policies and how they can be used. While the concepts are technology agnostic, the article references the System.Web.Caching.Cache exposed from HttpRuntime for code examples and also some references to the Caching Application Block in EntLib.

What is a cache expiration policy?

A cache expiration policy is a combination of concepts which define when a cache entry expires. Once a cache entry has expired, it may be removed from a cache. The policy is typically assigned when data is added to the cache and is normally custom to a single cached entry based on characteristics of the entry.

Read More

IServiceLocator - A common IoC container / Service locator interface

This is great news - My Technobabble : IServiceLocator a step toward IoC container / Service locator detente. This diverse group of people have been able to collaborate to create a common interface to use for IoC container / Service locator frameworks. Hopefully the adoption rate will be swift by the creators of the IoC frameworks. Congratulations guys, this is a great achievement.

It would be good to see the same outcome for a common logging interface.

Read More

Caching should not be the source of truth

I just read the Two Reasons You’re Not Using the Cache and How To Deal With Them article on VSMag. Overall, I like the intention of the article which is to promote caching, but I have some issues with some of the points made.

In the article, Peter addresses two of the common reasons that cause people to not use caching. These are data being stale and losing data. There is some good advice regarding stale data. People need to determine the volatility of their data to decide on cache expiration policies. There are also some notification services that can be used to flush the cache when data stores are updated.

The article then discusses issues about losing data. This is where I don’t like the guidance provided. What I can’t agree with in the article is the concept of having the cache as the source of truth of the application data. The article promotes the idea of keeping application data in the cache (usually in memory) when it is created or updated and only providing that information to the back-end data store when the item is removed from the cache.

Read More

I finally got the black belt

It has taken a lot longer than expected, but I finally got my black belt this weekend.

Black belt

It has been a long road, but I am glad I have finally hit this mark. Unfortunately I now need to stop doing Taekwondo because of how my joints are going. It’s been a fun ride and I will miss it.

Read More