Category Archives: 8273

If you have anything to suggest about the DSA Book then please read this…

Its been a while since I talked about the DSA book but to summarise its had over 20,000 (first, second) downloads which has largely provoked me into taking the whole thing a lot more seriously for the next edition which I expect will triple its content.

I don’t have any times at the moment because we are figuring out what we want to add to the book based on the current programming climate. So, if you have any suggestions then please let me know by emailing me via the contact page. Don’t hold back – what would be your dream book on data structures and algorithms look like? what would you expect it to cover? Does the language independent approach work for you?

Please let me know.



Data Structures and Algorithms book flying out (again!)

The updated version of the Data Structures and Algorithms book that Luca and I wrote is flying out once more! We are really very happy to see how many people are downloading our book. In total (counting the previous release) the book has had nearly 16,000 downloads! Amazing.

If you haven’t already got a copy what are you waiting for?! Its free so you don’t have to reach into those empty pockets at this time of year.

Download the updated version of the Data Structures and Algorithms book here!


Enjoy. Merry Christmas and a Happy New Year.

Code Contracts – my opinion on them anyway…

One of the great things that came out of the PDC for me was the confirmation that code contracts would be coming to .NET 4.0. I was a big fan of Spec# [1] but admittedly I never thought it would make it into the mainstream C# or VB.NET languages even though the prior solution provides the more concise and descriptive syntax. On Sunday I played around with the library released at the PDC [2] and in general it all looks good. For the astute reader you will know that I co-authored a book on Data Structures and Algorithms [3] with Luca [4] not so long ago (we will probably release an update just before Christmas, more on that later) and each algorithm within the book states both pre and post conditions. We did consider explicitly defining invariants as well; however we opted not to for conciseness.

While I’m very much encouraged by the inclusion of code contracts in .NET 4.0 I’m still a little apprehensive about it in API form, maybe it’s because I was set on a language based feature set? I’m just not sure.

The big thing here is that there will be something in .NET 4.0 and hopefully its inclusion in the official distribution will emphasise to developers the importance of specifying explicitly contracts to which their algorithms will adhere to. Another interesting thing that came up in the session on code contracts [5], which coincidentally shared its session with Pex [ 6] was the announcement that there would exist tooling that would analyse the contracts within your code and inject the necessary documentation in there. Whether this will annotate the source code with xml-doc or do something else I’m not sure though. The former was the one most alluded to during the PDC session.

Sorry about not posting recently I’ve just moved to Australia from the UK to do my PhD. Today actually I shared my desk with Gordon Bell [7] who was visiting the Microsoft QUT eResearch Centre [ 8] of which I am now a member.


1. Mike Barnett, K. Rustan M. Leino, and Wolfram Schulte. The Spec# programming system: An overview. CASSIS . 2004, Vol. 3362.

2. Code Contracts download. Microsoft Research. [Online] 2008.

3. DotNetSlackers. [Online] 2008.

4. Tongo, Luca Del. [Online]

5. Channel9. [Online] 2008.

6. Microsoft Research. [Online] 2008.

7. Bell, Gordon. [Online]

8. Microsoft QUT eResearch Centre. [Online]


DSA book on ‘This Week on C9’

First off thank you to all who have downloaded the first draft of Data Structures and Algorithms: Annotated Reference with Examples. At the time of writing this post there have been more than 3200 downloads within around 3 days of it being put up on DotNetSlackers which is great!

Thanks to all those who have helped spread the word by linking to the posts I made and to the actual project page. I’d also like to thank Dan Fernandez who gave the book a mention on This Week on C9 (a weekly review program on the popular Channel9 site). You can view the episode here.

If you haven’t checked it out already then go give the first draft of Data Structures and Algorithms: Annotated Reference with Examples a look.

Data Structures and Algorithms book (free) first preview available!

This is a little project that myself and Luca have been working on in our spare (spare) time in the last monthDSA_Book or so. The book is no where near complete but we wanted to get it out there now and progress with it in view of the public eye rather than just sit on it and wait months until it was a lot more thorough.

As this is just a preview don’t expect it to be all finely polished, we know what we are lacking in terms of explanations. No chapter in the preview is the final version of that respective chapter. It’s also worth mentioning that this is not the final list of chapters.

Our intended target audience are those who know how to use their respective language of choice, other than that you should be OK to follow the book. We have intentionally tried to keep the book compact and to the point.

The book is language independent. We use a form of pseudocode for all algorithms as such these algorithms can be easily ported to most imperative languages like C++, C#, and Java.

Why is it free? Because we want it to be. At this present moment in time all suggestions etc have come from a small number of reviewers, for which we are incredibly grateful. But we felt the time was right to throw it out to the larger audience so we can get more feedback on what we have thus far.

The book is hosted for us on DotNetSlackers, you can view the page dedicated to the book here.

Go check out the first preview of Data Structures and Algorithms: Annotated Reference with Examples now!!!

EDIT: if you could help spread the word we would be incredibly grateful 😉

Data Structures and Algorithms book

Myself and Luca are currently working on a free e-book that should be out near the end of the year, it will be a companion to the Data Structures and Algorithms project located on CodePlex.

The book use’s pseudo code to describe the solutions that we have created so that it can be easily ported to many imperative OO languages like C#, C++, and Java (amongst others).

We are targeting this book at intermediate to advanced programmers, however we do cover some of the basics to give the reader a hand in getting up to speed pretty quick with the terminology used etc.

Presently we have a few good reviewers on board, however if you are interested in this area and would like to be a reviewer then please get in touch with me so I can add you to the reviewers list.

p.s. as you may have noticed my blog has moved to so please post any comments there.