Equality and Equivalence
If A <= B and B <= A then A and B must be equal, right?Wrong, actually.We could rank actors according to their Bacon number, for example. Hugh Grant and Daniel Day-Lewis both have a Bacon number...
View ArticleHiding iterator boilerplate behind a Boost facade
ContentsFilling in missing methods. PythonFilling in missing methods. C++Enter Boost iteratorsUsing boost::iterator_facadeTemplates and TraitsConstructors, destructors and operatorsWrinklesLess code,...
View ArticleDefine pedantic
My dictionary defines a pedant as:pedantn.1. A person who relies too much on academic learning or who is concerned chiefly with academic detail.Apparently the word derives from the Italian, pedante,...
View ArticleSet.insert or set.add?
Get set, go!Suppose you have an element e to put in a set S.Should you:S.add(e)or:S.insert(e)?It depends on which language you’re using. I use C++ and Python and I usually get it wrong.>>>...
View ArticleKnuth visited, Brains Limited
Lucky me, I did get a ticket to see Professor Donald Knuth deliver the 2011 Turing Lecture at Cardiff University. He started out by saying he’d been wanting to come here ever since seeing Yellow...
View ArticleDesktop preferences
Paul grumbled about the lack of new content on wordaligned.org and since he’d just bought me lunch I thought I’d better do something about it. He also said he didn’t like the stuff about algorithms and...
View ArticleLife on Canvas
I was lucky enough to be taught maths by John Horton Conway, if only for an hour a week for a single term. He was lucky enough to be teaching number theory: a subject packed with treasures picked from...
View ArticleLife goes on
In my previous post I described John Conway’s Game of Life as a hello world for computer graphics. Actually, it goes beyond that. Hello world is a complete program, a proof the toolchain works, but...
View ArticleACCU Bristol and Bath
Lightning talks. In a pub. Me first! I hadn’t actually practised but I knew what I wanted to say and had picked a subject so trivial I couldn’t possibly overrun.Yes, it was time, at last, for the first...
View ArticleTwo star programming
A few weeks ago Linus Torvalds answered some questions on slashdot. All his responses make good reading but one in particular caught my eye. Asked to describe his favourite kernel hack, Torvalds...
View ArticlePython’s lesser known loop control
I’ll break out of a loop if I have to but generally prefer to recast code so no break is needed. It’s not about avoiding the keyword; but rather that the loop control expression should tell readers...
View ArticleC++ Concurrency in Action
★★★★★C++ Concurrency in Action is an excellent book. You should buy it if you want to use the support for concurrency added by the new C++ standard, C++11; and if you’re using C++11 you’ll deepen your...
View ArticleFolded files and rainbow code
In one of my first programming jobs I worked at a software house which grew its own tools. We had a home made version control system, build system, test harness and programming language. We even had...
View ArticleSingly Linked Lists in C++
In a recent post I wrote about removing items from a singly linked list. I presented a couple of alternative implementations, and in the comments section readers suggested yet more versions.My...
View ArticleMore adventures in C++
bool operator<(version const & v1, version const & v2) { if (v1.major != v2.major) return v1.major < v2.major; if (v1.minor != v2.minor) return v1.minor < v2.minor; if (v1.patch !=...
View ArticleHosting for Life? TextDrive revived!
Towards the end of last year I was emailed by Jason Hoffman from Joyent. Joyent owned TextDrive, the company which, 6 years ago, offered web hosting for life in return for a single up-front payment....
View ArticlePatience Sorted
I gave a lightning talk today about patience sorting and its application to the longest increasing subsequence problem. It’s a subject I’ve written about before. My computer has been put through...
View ArticleAn Exploration of the Phenomenology of Software Development
I was lucky to be in the audience last week, when Charles Tolman visited Accu Bristol to preview his Accu 2013 conference talk: “An Exploration of the Phenomenology of Software Development”.The talk...
View ArticleACCU 2013
Brian Marick opened the second day of ACCU 2013 with a keynote presentation entitled: “Cheating Decline: Acting now to let you program well for a really long time”. He drew a distinction between...
View Article“Solutions”
I like working around enthusiasts and optimists but that doesn’t mean I want to use chirpy or bombastic software.These days I build programs using visual studio. Sure, it’s a decent tool but part of me...
View Article
More Pages to Explore .....