Posted in Computers, Fun, Internet on December 24th, 2006 No Comments »
I’ve spent a short while today upgrading my Pub Finder to use the Google Maps 2.0 API. I’ve also added indexes onto the data set to improve the speed.
Finding any one of the 5,149 pubs now in the database is now even quicker so there’s no excuse to drink in a dodgy pub.
Spent a while trying to get sub-projects opening within Visual Studio today where the root project has SSL security setup. Every time VS tried to open the sub-projects it would error with the message “Secure channel failed”.
Figured it out eventually - you need to add a location element to the web.config for the get_aspx_ver.aspx to [...]
Posted in Computers on August 16th, 2006 1 Comment »
Since buying my MacBook a few weeks ago i’ve found that my evenings at home are now pretty quiet. That’s not to say that things on the MacBook don’t work - far from it, it boots amazingly quickly, gets on the Internet - first time, every time - and has not needed reconfiguring, updating, patching, [...]
This is interesting, a port scanner written completely in Javascript. It creates a series of image objects and points the URL to an image file which would be found on a default installation of some web servers. Once found, the script could be modified to do something malicious to that webserver using any well known [...]
Posted in Computers on July 5th, 2006 No Comments »
Vote here for your fave IT support anecdote. Some great quotes, including my favourite:
Someone telling me their “broadbean” connection may be down.”
[csharp]
using System;
using System.Text;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.ComponentModel;
namespace SocialAnimal.Web.UserControls
{
/// <summary>
/// If ControlToValidate has a value then DependantControl
/// must also have a value
/// </summary>
public class DependantFieldValidator : CustomValidator
{
private string _dependantControl = null;
private bool _showAlertBox = false;
[Description(@"If true, will show an alert box if the control validates false, otherwise will display an inline message"),
Category("Behavior")]
public bool ShowAlertBox
{
get { return _showAlertBox; [...]
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, [...]
Posted in Computers, Internet on April 7th, 2006 No Comments »
My site has been featured on Times Online -
Google spawns travel map mash-ups - Online Travel - Times Online
Bring on the referrals!