NGenerics Overview - The ObjectMatrix

Previous instalments General Data Structures HashList Trees GeneralTree and the Visitor Pattern Binary Trees and Binary Search Trees Looking at tree structures will make your eyes bleed, so we’ll take a break to discuss one of the simpler data structures NGenerics offers - the ObjectMatrix. The ObjectMatrix is a representation of a 2-dimensional array of objects, like, for example, a game board : Why not use a two-dimensional array in the first place? [Read More]

Tarjan's Algorithm

Thanks to a contribution from Andre van der Merwe (blog, twitter), NGenerics now features Tarjan’s strongly connected components algorithm on it’s Graph implementation. By using Tarjan’s algorithm, we’re able to find the strongly connected components (read : cycles) in a directed graph. You can invoke it via the FindCycles method on the Graph<T> class, available from build #1.0.0.55764 (30 Jun 09 13:40).

Photo by Simon Abrams on Unsplash

NGenerics Overview - Binary Trees and Binary Search Trees

Previous instalments General Data Structures HashList Trees GeneralTree and the Visitor Pattern If you haven’t read my previous post on General Trees, it might be a good idea to do so before reading further. A Binary Tree is a refined version of the General Tree that limits the number of children each node can have - two to be exact. Child nodes are thus referred to as the Left and Right child nodes. [Read More]

Developer Podcasts

I’ve found podcasts a good way to spend your time when you’re stuck in traffic - here’s a list of my favourite developer podcasts in alphabetical order : .NET Rocks - still one of the best podcasts out there. The banter is fun to listen too, and they have a wide variety of guests and topics on .NET. Also presents a large (but fun) challenge in catching up on previous episodes with more than 400 episodes recorded. [Read More]

NGenerics overview - GeneralTree and the Visitor pattern

Previous instalments General Data Structures HashList [ Note : This post feels a little like Computer Science 101 - but I felt it necessary to discuss the basic tree concepts before we move on to some of the more specialized trees like search trees. ] The GeneralTree<T> class in NGenerics provides a way of defining tree structures in a simple, recursive way. It has a simple, recursive definition : public class GeneralTree { T nodeData; List childNodes; } Visually, we can represent it, well, as a tree : In contrast to some of the more specialized tree structures (like binary trees and search trees), the GeneralTree enforces no constraints on the structure of the tree. [Read More]

Avoid the home page in Internet Explorer

More for my own records than anything else… I’m a big fan of the about:blank home page, but sometimes corporate policies dictate (and enforce) the company intranet site as IE’s home page. To start IE without going to the set home page, add the nohome command line parameter as such :

"C:\Program Files\Internet Explorer\iexplore.exe" -nohome

Photo by Colin Rex on Unsplash

tools 

NGenerics for Silverlight

The Code Better TeamCity guys were kind enough to install the Silverlight runtime on the build server a while ago, which means that NGenerics now has an automated Silverlight build.

If you’re interested in trying out NGenerics on the Silverlight platform, you can find the assemblies under NGenerics Trunk/Artifacts.  Be sure to let us know if you find any bugs/pain points/features that can need improvement on this particular platform.

Photo by Markus Spiske on Unsplash

NGenerics on Ohloh

I share the same sentiment as Ayende on the visibility of open source project usage - page views and downloads are not useful in determining usage. If you do use NGenerics in your projects (whether it be public or private), you can let us know on the Ohloh project page. If you’re using it in an public/open source project, drop us a line so that we can add a link to you in our Hall Of Fame. [Read More]

100% Code Coverage

I’ll say it once more - it’s not worth it. Let it go. Your aim should be at about 70% code coverage - as long as you know in your hearts heart that you have tested that you should have. What’s vitally important (and which is the whole reason why I run coverage tools in the first place), is not the warm, fuzzy feeling I get in my tummy when I see a high number - it’s the easy identification of untested code and pathways that yield value in this regard. [Read More]

NGenerics overview - the HashList

Something that I find a use for in almost every project I work on, is the HashList (also known as a MultiMap in the Java world) in NGenerics 1.2. A HashList is a multi-valued dictionary that uses a Dictionary<TKey, IList> under the covers. It still retains dictionary semantics but handles the creation and destruction of the key/list pairs itself. For example, adding a couple of items to the HashList will have the following result: [Read More]