Things I never, ever, want to hear. Ever.


Things I never, ever, want to hear. Ever.

  • In theory,… No, I don’t want to know what you think the code does, I want to know that it actually does—especially if you’re the one that wrote the code. If you haven’t verified, validated by actually testing stuff in a systematic manner, you have failed. Have you validated the functions with stringent unit testing? No? then get out of my face and go write code to test your code. Validate your hypotheses. Always.
  • Read the rest of this entry »

Suggested Reading:Unix Systems for Modern Architectures


Curt Schimmel — Unix Systems for Modern Architectures: Symmetric Multiprocessing and Caching for Kernel Programmers — Addison-Wesley, 1994, 396 pp. ISBN 0-201-6338-8

(Buy at

Schimmel proposes an introduction to cache hierarchies and their different technologies and the problems and complexities they incur for an operating system. The book starts off by presenting and comparing the various cache architectures—physical vs virtual caches, mostly. Another part is dedicated to the various locks and exclusion mechanisms such as spin locks, semaphores, etc., that may be found in Unix-type systems. He finishes with cache consistency problems for multiprocessors.

Read the rest of this entry »

Avoiding the Junkyard


Developing software isn’t easy. No, I’m serious. It’s not. Every year that passes brings us more experience, and sometimes reality bites us real hard in the ‘rear.

For example, people do not always remain with a project until it completes. Often, people join a team for a summer, or for a year or two, then leave. That’s normal and expected. Of course, if the project is large, or the stay short, the code portion that was assigned to a particular individual may not be completed by the time he leaves. Can you manage to leave a team gracefully?

Read the rest of this entry »



QuickSort, due to Hoare, is one of the best comparison-based sorting algorithms around. There are a number of variations, but the vanilla QuickSort does a great job… most of the times.

QuickSort Animation (Source: Wikipedia)

Indeed, there are occasions where QuickSort leaves its expected O(n \lg n) run-time to reach O(n^2) run-time, its worst case. But what does it take to push QuickSort into its worst behaviour?

Read the rest of this entry »

Wallpaper: Green/White


Green/White, 1920×1200

Wallpaper: After the rain


After the Rain, 1920×1200



Read the rest of this entry »

Radix Sort on Floating Point Numbers


Phimuemue, in a recent post (at the time of writing, anyway) present his variation on sorting floating point values using radix sort. His implementation wasn’t dealing with the pesky sign bit so I offered a slight modification to his algorithm as a comment on his blog. But for some reason, he did not allow to post it.

So I’ll present my solution here.

Read the rest of this entry »

Suggested Reading: Algorithms for Memory Hierarchies


Ulrich Meyer, Peter Sanders, Jop Sibeyn (eds.) — Algorithms for Memory Hierarchies — Springer, (Lectures Notes on Computer Science LNCS # 2625), 2003, 428 pp. ISBN 978-3540-00883-5

(Buy at

This book is a collection of chapters on various topics pertaining to memory hierarchies and their algorithms, but written by several different authors, without any special uniformity in tone or topics; but that’s OK because it allows the reader to have a broad view of algorithms for memory hierarchies.

Read the rest of this entry »

Suggested Reading: Advanced Data Structures


Peter Brass — Advanced Data Structures — Cambridge University Press, 2008, 492 pp. ISBN 978-0521-88037-4

(Buy at

The first part of the book concentrates on search trees and variants, whether balanced trees, interval trees, or heaps. Chapters are dedicated to connected components and like algorithms, one to algorithms for strings, and one for hash tables. Follows appendices on computation, cache oblivious algorithms, etc.

Read the rest of this entry »