I started a Haskell course last week. One of this week’s exercises was to write a guessing game called Starman. All the necessary code fragments were provided in the course notes and a complete solution was provided on github. However, in the spirit of learning by doing I re-jigged the program structure a bit. I’m… Continue reading Starman
Category: software
Desert Island Books
The following is a piece I wrote for the ACCU’s CVu magazine in April 2010 as part of the Desert Island Books series. The ACCU is an organisation that promotes a professional approach to programming and the brief was to write about the books that have had the biggest impact on me as a jobbing programmer… Continue reading Desert Island Books
The Quartermaster’s Store
My eyes are dim, I cannot see. I have not brought my specs with me. Mission Impossible? It’s said you can find anything in the Quartermaster’s Store, even impossible things like fairy wings and unicorn tears. So that’s where I went to find some virtual function templates. The quartermaster is an old man now. His… Continue reading The Quartermaster’s Store
Visiting Alice
“The time has come,” the Walrus said, “To talk of many things: Of tuples, trees and composites; Of visitors and kings.”1 Welcome “Good morning, everyone, and welcome to the Wonderland Social Club annual treasure hunt. I am the Walrus.” (coo-coo coo-choo) “Well, not a walrus, but I am quite long in the tooth.” (groan) “This… Continue reading Visiting Alice
The Curate’s Wobbly Desk
The Vicar’s Lodger The story of the curate’s egg is well known [story], but I bet you’ve never heard about the curate’s wobbly desk. When Aubrey Jones was first ordained he was appointed curate to St Michael’s church, Belton Braces. It was a small parish serving just a few quiet hamlets and there would have… Continue reading The Curate’s Wobbly Desk
Grain Storage MIS: A Failure of Communications
Introduction In the early 1980s I was given full responsibility for a software development project for the first time. A Northumbrian farmer bought, sold and stored grain on behalf of other farmers. The Sunday colour supplements were writing about the new “micro-computers” and this farmer saw an opportunity to automate the administration of his business.… Continue reading Grain Storage MIS: A Failure of Communications
The Trial of the Reckless Coder
An Arrest Is Made “Joe Coder, I’m arresting you on suspicion of coding without due care and attention, and with reckless disregard for the welfare of other code users.” I had said this many times before, but this time I was uneasy. Something in Joe’s eyes suggested there might be more to this case than… Continue reading The Trial of the Reckless Coder
Evolution of the Observer Pattern
Back in the early 1990s four wise men began a voyage of discovery. They were trying to trace the origins of good software design. They crossed great deserts of featureless software and fought through almost impenetrable jungles of code. What they found changed the way we think about software development. Eric Gamma, Richard Helm, Ralph… Continue reading Evolution of the Observer Pattern
The Curious Case of the Compile-Time Function
A Crime Has Been Committed 18 months ago I described a version of my Event/Callback library in an Overload article [Bass]. This library is used extensively in my employer’s control systems software. A typical use looks like this: // A class of objects that monitor some event. class Observer { public: Observer(Event& event) : callback(bind_1st(memfun(&Observer::handler),… Continue reading The Curious Case of the Compile-Time Function
Implementing the Observer Pattern in C++ – Part 2
In part 1 of this article I presented an Event/Callback library intended to support the Observer pattern and hinted that it had some limitations. The library was based on the following Event class template: template<typename Arg> class Event { public: // Iterator type definition. typedef … iterator; // Destroy an Event. ~Event(); // Attach a… Continue reading Implementing the Observer Pattern in C++ – Part 2