Next permutation: When C++ gets it right. An investigation into a classic algorithm for generating the distinct permutations of a sequence in lexicographical order.
Code Rot. What happens when we stop tending to our code? It decays. This article investigates why.
Copy, load, redirect and tee using C++ streambufs. The C++ iostream library separates formatting from lower level read/write operations. This article shows how to use C++ stream buffers to copy, load, redirect and tee streams.
Longest common subsequence. An investigation into the classic computer science problem of calculating the longest common subsequence of two sequences, and its relationship to the edit distance and longest increasing subsequence problems.
comp.lang.name? Python was named after a comedy troupe. This note discusses what makes a good name for a computer language.
Sums and sums of squares in C++. Reduce is a higher order function which applies a another function repeatedly to a collection of values, accumulating the result. Well known to functional programmers, reduce is also a standard C++ algorithm.
Stop the clock, squash the bug. Which is better, a clock which loses a minute a day or one which is stopped? An investigation into how we find and fix software defects.
Top Ten Percent. The most efficient way to sort the top 10% of a collection.
Top Ten Tags. Choosing the right algorithm to select the N largest items from a collection.
Koenig’s first rule of debugging. The problems caused by the C++ compilation model, dependencies and cryptic compile diagnostics. If an expert like Andrew Koenig can’t get it right, what hope for the rest of us?
He Sells Shell Scripts to Intersect Sets. The Unix command shell contains a lot of what I like in a programming environment: it’s dynamic, high-level, interpreted, flexible, succinct. This article shows the Unix tools in action.
The Lazy Builder’s Complexity Lesson. A discussion of algorithmic complexity, and a demonstration of how the C++ standard library allows programmers to write code which is both concise and efficient.
String literals and regular expressions. An article about string literals, escape sequences, regular expressions, and the problems encountered when mixing these together.