Blog Posts

Priority Queue in C#

Priority queues are really useful for path finding algorithms like A*. Also, for applications like mobile games, memory management is still an important consideration. I have used…

Point in Polygon Hit Testing

Checking to see if a point is inside a polygon is useful for 2D game development. Here's an algorithm in Java to do check if a given point is inside a polygon which only iterates t…

Pager for ASP.NET MVC

I recently implemented a pager in ASP.NET MVC and thought it would be worth sharing. It uses fluent syntax - a technique I've not seen used much in MVC to solve similar problems so…

Recursive Select in C# and LINQ

To complement my post on recursive joins to create hierarchical structures, here's the opposite code to flatten a hierarchy by performing a recursive select in LINQ and returning a…

Event Broker for ASP.NET

The Event Broker is an implementation of the Observer pattern. The key benefit of an Event Broker is that it offers a loosely coupled mechanism to broadcast and receive events. Thi…

Symmetric Encryption in C#

Whenever I find myself needing to use a symmetric encryption algorithm, I always seem to write more or less the same code substituting whichever built in .NET cryptography class I…

Efficient AVL Tree in C#

The AVL tree is a rigorously balance binary search tree with very fast and stable insert, delete and search times. I like the various .NET dictionaries but have been unimpressed by…

Micro Caching in ASP.NET

I was recently involved in rewriting the homepage for a major airline company. Performance was critical as the site receives many hundred hits every second just on the homepage alo…

PayPal with ASP.NET MVC

PayPal is a cheap and easy solution for taking payments and is quick to implement in ASP.NET MVC. We will look at a simple scenario of taking a user to a PayPal payment page to che…

Stripping Tags from HTML in C#

It's a common requirement to strip tags from HTML documents whether you are trying to extract plain text from HTML, or remove tags users have entered in text input fields or textar…

Geocoding in C# using Google Maps

If you have ever worked on a project involving maps (such as Google Maps), the chances are you will need to get the longitude and latitude for an address or set of addresses that h…

Better FindControl for ASP.NET

There is one main limitation with FindControl in ASP.NET: it only looks in the NaminingContainer of the control you are searching within. Here is a better, much improved version of…

IE6/IE7 Peekaboo Bug Fix

The peekaboo bug is the name given to a bug in IE6/7 when DIV elements randomly disappear. Clicking refresh sometimes makes them reappear (hence "peekaboo"). The root cause is usua…

Browse by Tag

64 bit Algorithms Android ASP.NET C# Cryptography CSS Dependency Injection Google Maps Google Plus Graphics HTML Java JavaScript LINQ MVC OpenGL ES Patterns PayPal Performance Security Sitecore

Browse by Year

2014 2012 2011 2010 2009