Select your entertainment

> Make your own comic

Strip Editor | GTA online | 3D Pinball | 3D Printer | Carputer | Software | Films | Features


Design - how to do things right

  • Make things visibile
    Give feedback, show visible results of the action taken.
  • Don't be arbitrary
    Use obvious command names and actions.
  • Be consistant
    Every task should be performed in the same way, like adding to editing.
  • Make operations intelligible
    Don't use abbreviations. Give informative error messages and a solution.
  • Be polite
    Work with the user, not against.
  • Don't make operations dangerous
    Don't allow a single wrong action to destroy invaluable work.

I work full time designing and developing a wide range of software, mostly web-based systems that include a database back-end. I've put together this page as a history for my own reference and for the eyes of anyone who would like to work with me in the future.

The software shown here are a selection of the most interesting and varied pieces I've created over the years. Much of the software I create is fairly simliar in nature, so I'm only showing a few more distrinct samples here.

Also I hope that the lessons I've learnt over the years will be of use to others. If you'd like my advice, help or collaberation on a project. Please feel free to contact me.

General advice
Every industry and skill has its rules and regulations. They are there to help us, but they can also hinder us. It's important to learn the rules first, only then can you know when to break them.

Don't be afraid to go your own way - you don't have to leap on board and use every new technique, language and methodolgy that comes along. For example Test-driven development is something I've never gotten on with. That doesn't take anything away from the people it helps, but for me I find I can better my software through other means. Be open to ideas, but don't let those ideas control you.

I once told a friend off for writing ActionScript badly, the way he'd done it wasted computer resources, could have been written in less lines of code and generally looked messy. However the end result of his effort was exactly what he wanted, a beautiful looking piece of interactive software. Always remember the bigger picture.

I've been told off countless times for not doing things the right way, for not proceeding down the way worn path. But it's only by trying something different that we can stumble across new ideas and discoveries that we would otherwise have never found. Sometimes it pays to go the slower more scenic route.

I love writing software to solve problems, it gives me alot of fufilment. I read lots of books on software to keep up with various technologies but I make an effort to read non-software books like The design of everyday things, Why we buy and Next. Every single subject in the world inter-connects with every other in some way. You can never be a master of software design and programming without being knowledgable and well versed on a multitude of other subjects.

In early 2007 I kicked off a project with Microsoft UK to design and build a range of kiosks using their brand new WPF technologies. My mind was racing with possibilities for what could be created using this new technology, I knew that we could break new ground in interactive design, which was one of the reasons Microsoft was interested in me. However the deeper I delved the more apparent it became that version 1 of WPF had shortcomings and the tools to make use of it was non-existent or not yet ready for the prime time. In contract Adobe Flash has had years of crafting and refining and is presently a much better choice for such a project. You can write software in Notepad, but it's far easier and quicker using a well developed tool.

One of my first work related memories I have at the first IT company I worked for was impressing the CEO by fixing his laptop when the IT helpdesk had written it off as unfixable. "How did you do it Peter?" they asked me, my answer? I can't remember, but I do remember that I didn't tell them the truth because I didn't want them stealing my knowledge. Over the years I have been cagey about sharing or even showing my source code to others, for fear they would critisize the way I have done it or steal my ideas. But the simple truth is source code is like a song. You can analyise it and pick it apart, but that won't bestow you with the talent or creativty to produce a simliar project. Software design and development is a long journey, we all benefit from helping others along the way.

Since the release of Flash there must have been millions of games developed in it. But why weren't those same games written in C++ or Java, why did it take Flash for such mass development to take off? The simple answer is because Flash is much easier to learn and get results in than C++ or Java. Such games will never run as Flash or be as complex as those created in C++, but that is not the point. YouTube lets people do what the want to do, create videos, without having to worry about video codec, bandwidth or hosting issues. Sometimes its better to think about what you want to achieve, rather than how.

Professsional Content Management System (Codename: Gandalf)
C#,, SQL Server 2000
I spent a majority of my career writing many tens of dozens different CMS systems of different specialities and levels of control, from document processing and storage systems, image manipulation and analysing to complex information management systems. However this one is very different than most, this CMS system is designed to be used by web site professionals, it allows them to hand craft individual pages on the website. What the system does it manage the master templating of the whole website, inter-page linkages, automatic error logging, search integration, automatic image creation and many other little tasks that occur in running a large scale website.

The Gandalf CMS system is the back-bone of the Avon and Somerset Constabulary website and allows us to run the site with a level of degree and power that is unmatched by off the shelf software.

The front-end of the system is housed in a desktop C# application, made up of two web browser windows. The left hand window always shows the website tree structure. From here pages and sections can be created and altered, which then automatically take effect on the rest of the website.

Due to the hybrid design used, we have the free reign to hand create pages, to create sub-CMS systems for various pages of the website. While benefitting from all the useful management and time saving features an overall CMS brings to the table.
Code generator (Codename: Oz)
C#, SQL Server 2000
As the years go by, the more I learn about software development and design, the less code I write. That's not to say I produce less work, far from it, I'm more productive now than I've ever been. One of the main reasons, is because I write less code.

This code generator tool is something I've tweaked and improved over the years, so now it's gotten to the stage where it can manage much of the repetitive code creation needed in a software project. This allows me to concentrate on overall design and architechure, rather than writing lines of code.

My code generator creates three main types of code, which are the most useful for the types of projects I work on:
  • Object classes
    It's taken me quite a few years to really understand the power and the use of object oriented programing, but now I use objects is most my software projects. This part of the application generates an object from a database table, along with loading, saving and property access methods. It provides me with a solid starting point to add further functionality.
  • Stored procedures
    It looks at a database table, then it'll create the standard CRUD procedures, with the ability to pre-fix the procedure name according to the type of usage. After seven years of writing stored procedures, you start to see the similarities :)
  • C# database interface methods
    Finally a way to connect a C# software application to a database back-end, here you select which stored procedures you'd like to interface with and it creates the C# code to interface with them. Complete with the ability to gather return values for error reporting.
With these three main code generating abilities I am able to massivily increase the speed I can complete software projects. Something that may have taken me several days to complete, I can now do in a matter of hours. It not just the increase in speed of the creation of code, but the fact that the code produced is error free. Again this allows me to concentrate on the big picture, rather than hunting down bugs.

There are many code generator tools available - but whenever possible I prefer to write my own tools and software, why? It's so that I can craft it exactly to my needs and learn many valuable lessons in the process. If you are able to I would recommend this route too, as in the end you'll be a more knowledgable developer for it.

Once you are familar with a language a code generator is the best way to improve the speed, accuray and quality of your software.
Source Control
C#, SQL Server 2000
In all my years developing software, source control is something that I've only fairly recently begun to take seriously. I certainly make back-ups of the different versions of software I develop and have worked on teams containing a number of people, but somehow I've always managed to side-step using source control.

After a recent snowboarding holiday spent reading The Pragmatic Programmer I realised that a good way to get myself into using a source control system would be to write my own. So once I got back from my holiday I started to piece one together. After about three days I had a basic, but powerful enough for my needs, source control system.

The system allows for both files and database objects to get checked in, once they are the database tables, stored procedures and the various files can be viewing through the application. This means I don't have to check older files out to look at them, I can just browse through the files contained within a project.

All the files are held within BLOBs in a SQL Server database, which makes it easy to use the software from any computer on the network.

Although my software doesn't allow for many of the fancy features found in other open source and commerical systems, for my purposes it suits my needs perfectly. Perhaps in the future I'll move to using an existing source control system, but for now I'm happy learning the challenges of such a application by maintaining my own.
E-mail server (STOMP)
C#, SQL Server 2000 (Originally VB6)
A lesson that is constantly proven correct in career is that by learning more of various systems and technologies you use, the better you can do your job. Because I'm always interested in learning how systems work and in many cases writing them myselfs, I'm able to more easily understand and fix problems.

When I changed jobs in 2002 and started working for the police I inheritied the legecy left by the previous programmer. He had created an army of VB scripts to control the various automatic website functions. This wouldn't have been such a problem, if they all didn't have to be run from his old computer, under his logon - plus they took a long time to run.

After cutting some of these scripts open, I found one major bottleneck was when e-mails were being sent. To eliminate (or at least move) this bottleneck I instead made each e-mail sending request add a row into a database table, then had a server based application load in these e-mail requests and send them out. You may be thinking there was a simplier way to solve this particular problem and you may be right. But this solution laid the groundwork for a way of sending e-mails that we still rely on to this day.

Now it's a competely .net based solution that is much faster and flexiable than it's original incantation. But what are the advantages to sending e-mails in this way? Let me explain:
  • Statistics
    In business, as in life, nothing means much unless you can prove it. As every e-mail sent goes through this system, it provides us with very detailed logs of the quantity and type of e-mail sent. We can easily determine the number of news bulletin we sent out last week or see how many contact forms where completed by members of the public on the website.
  • Reliablity
    If our SMTP server goes down, with one change we can route all over e-mails through another SMTP server. If we realise the last days worth of e-mails failed to send for some reason, we've got those e-mail requests still in the system. The e-mail server even has the ability to use an externally hosted website to route the sending of e-mails through, which has enabled our website to still send out e-mails even when the entire police force has been unable to.
  • Portability
    As the e-mail server is accessible to any technology that can interface with SQL Server, which is made very straight forward through a library of components I've written, we have the ability to send e-mails from anywhere. With a few lines of code a database stored procedure can send an e-mail, so can any website or desktop application.
  • Speed
    It's typically faster to add an e-mail into our e-mail server than it is for the application to send the e-mail itself. This means that by using the e-mail server applications run faster and more reliabily.
I'm not sure if many, if any, other companies use a similar approach, but it's something that has provided me with many advantages over the years without any real drawnbacks. I wouldn't want to go back to the standard way of sending e-mails, as this way of doing things bringd so many benefits.
Website search spider
C#, (Master pages), SQL Server 2000
Search technology is a very difficult thing to get right, which is one of the main reasons Google is as big as it is, because they do it very well. Being the Senior Website Programmer at the police means I'm constantly working to improve the usability of our website, one of the key areas here is the search system.

I must have re-written our search system from scratch at least ten times over the years, each time trying a different approach to provide better, more accurate and quicker results. My most recent implementation has given me the best results ever, through the use of two key techniques.
  • A Google-like page index
    Search results are now sorted according to the popularity of a website page. How often is it linked to from other pages? How many visitors did it have within the last week? Through the data recorded by the Gandalf Professtional Content Management System, this information is easy to retreive.
  • Keyword search spider
    Again by using the Gandalf CMS system we know about all the pages that make up the website and because the entire website is built using master pages, the indiviual .aspx pages that make up the website only contain the specific content of that page, they're not bogged down with duplicate navigation and content code. So the search spider can easily index all the content contained within the pages of the website.
So how does my search spider work? It's pretty simple really, in terms of explaination and the amount of code that makes up the application.

Thanks to the Gandalf CMS system we have access to a list of locations and details about the various .aspx pages that make up the website. So the search spider loads up a list of website pages that are avaiable to scan. It then checks the last modified date of each page against a record of the last modified date of the page the last time it was scanned. This allows the application to determine which pages required scanning.

When the application scans a webpage it loads all the text in the .aspx, then uses regular expressions to strip out all the code and non-content related content. It then compiles a list of all the words that appear in the page and records how many times each word appears.

All this data is then saved to the database, providing us with a word list for the website and a record of were and how many times each word appears in the website.

By using these two search techniques, our website search system now returns the better search results than ever before. We've run userability testing on the new system which has proven the enhancements work very well.
Kiosk network
C#, SQL Server 2000, Flash, Web Services, Skype
Main menu of the touch screen kiosk interface Web-based kiosk administration
The majority of the work I do is web-based, which means creating systems and experiences through the use of web pages. This can mean a Flash based application or a webpage powered by a database behind the scenes. Sometimes though I get to work on something quite different and this is one such example.

Although the team I work with in the Police mainly focused on the police website we also made our services and content available on a variety of other channels. Primarly WAP , digital TV and kiosks.

Our kiosk network is quite special as it's made up of a series of physical kiosks installed at various locations through out reason. Our kiosks are made up of layers of technology that enable us to run and maintain a network of kiosks with minimial effort and time spent.

Each kiosk is connected to our web server via an internet connection, this enables each kiosk to access the most up to date content available. The front-end of the kiosk is written in Flash, this allows a nice looking and responsive user interface. The Flash inteface sits inside a C# application that allows the Flash front-end to access various features that it would not otherwise be able to, like the ability to print or provide text to speech.

The kiosk accesses data through a web service that ties into the various CMS systems that make up our website, these are things like news, wanted, police staff jobs, traffic, crime statistics and so on. As the kiosk ties directly into the same CMS systems that power the website, each and every kiosk gets automatically updated as our website is.

All kiosks are controllable through a web-based administration facility, which enables us to keep on eye on the kiosks. As each kiosk periodically sends information about it's memory, processor and CPU usage we can easily see the health of a kiosk. All kiosk user activity is logged which enables us to track kiosk popularity and usage.

The admin also lets us set start-up and shut-down times for each kiosk, using a graphical time scheduling interface. Each kiosk downloads their own schedule and interfaces with electricial timer built inside to turn themselves on and off.

Another key feature of the kiosks I'm quite proud of is the multi-lingual capibilities. When a user first activites the kiosk they are asked which language they'd like to use the kiosk in. From then on in the kiosk automatically translates all the content on the fly into the choosen language. It does this using a SYSTRAN web service at the server side. I've written caching mechanisms so that the same text isn't translated multiple times, which makes everything faster.

You can view videos of the kiosk in action and learn more about the service at the police website.
Flash, AJAX
I've written a few webchat systems over the years, the two most recent were written for different uses. My main chat system is written in Flash, which allows for a more complex front-end and less chance of different browsers causing problems.

The other real-time chat system I've created runs just through the browser in JavaScript, this allows it to run on computers that don't have Flash installed.

Both systems exchange data as XML over an HTTP channel. It would be faster to use sockets and exchange data in a less bulky format, but by doing things this way the system will work through any firewall configuration.

For the Flash based solution I've written a question queuing system that allows the chat moderator to pick up questions from the main chat and add them to a queue of questions. We've found this makes the chat run more smoothly as everyone can see when their question will be answered.
The Flash based solution is used for the public webchats we run regularly at work.