Subscribe to
Posts
Comments

Archive for the 'Programming' Category

The website I work on recently received a large increase in visitors due to a marketing drive. This caused IIS to start recycling the worker process very often as memory consumption was increasing out of control. The user experience wasn’t affected by this problem as we run a load-balanced system, however we had to fix [...]

Here’s a quick example of how we do layer seperation through interfaces to make each layer testable. Although the tests run, the UI section is untested. Download file.
[csharp]
using System;
using System.Web;
using System.Web.UI;
using NMock;
using NUnit.Framework;
using Socialanimal.Example.Business;
using Socialanimal.Example.Business.Implementation;
using Socialanimal.Example.Core.Entities;
using Socialanimal.Example.Core.Interfaces;
using Socialanimal.Example.SqlDatabase;
namespace Socialanimal.Example.Core.Entities
{
public class Employee
{
public string Forename;
public string Surname;
public Employee(string forename, string surname)
{
this.Forename = forename;
this.Surname = surname;
}
}
}
namespace Socialanimal.Example.Core.Interfaces
{
public interface [...]

It’s been a while since I wrote about the C# tools / frameworks i’m currently using, so here we go.

log4net - for all our logging needs.
nunit - automated testing.
nmock - for mocking interfaces and writing more testable code. (see my blogpost)
nant - automating our build cycles (although we’re looking at msbuild to replace Cruise Control, [...]

Announcing my first Google maps mashup - my Pub Finder. It integrates content from the great www.BeerInTheEvening.com site with maps, and then gives variably coloured icons denoting the rating of the pub.
To use it: move the map to an area you’d like to visit. If no pubs appear, then enter the placename of where you [...]

Everybody is talking about AJAX nowadays since Google Maps and Google Suggest showed the world how cool it can be. We used this technology at a previous employer 3 years ago for displaying live gambling odds… but anyway I thought i’d take a look at what libraries are out there for doing this in .NET.
Top [...]

Having spent a couple of days trying to load a 30.5Gb Xml file, i’ve discovered that there is a problem in the XmlTextReader class in that is uses an integer to track the file position. Now, I guess that having massive Xml files isn’t really what they were intended for, but that’s why i’m using [...]

I’ve been working on a 30gb Xml file today, importing it into one of our systems. There are always problems working with files this big - how do you get just a small segment to test on? how can you view small regions of it, or search it?
Most tools available for Windows aren’t up to [...]

You will need…
NUnit
This lets you write test scripts / methods etc for your code. There is a tutorial on how to use it (word doc) on their website, and if you’d like to go a step further and use NCover with it, check out my previous blog article. (NCover will monitor your testing and tell [...]

Having spent some time trying to get an ASX file playing in different browsers with different Windows Media Player versions, I came across the Windows Media Metafile Guide. This describes the different metafile extensions which should be used based on the content of the metafile.
Note, the content of the metafile can be exactly the same [...]

So, you write your form tags and the browser renders extra space after the closing tag. Solution linked below.
Problems with extra vertical space after forms

« Prev - Next »