- July 2014
- June 2014
- May 2014
- April 2014
- March 2014
- February 2014
- January 2014
- December 2013
- November 2013
- October 2013
- September 2013
- July 2013
- June 2013
- May 2013
- April 2013
- March 2013
- February 2013
- January 2013
- December 2012
- November 2012
- October 2012
- September 2012
- June 2012
- May 2012
- April 2012
- March 2012
- February 2012
- January 2012
- December 2011
- November 2011
- October 2011
- September 2011
- August 2011
- July 2011
- June 2011
- May 2011
- April 2011
- March 2011
- February 2011
- January 2011
- December 2010
- November 2010
- October 2010
- September 2010
- August 2010
- July 2010
- June 2010
- May 2010
- April 2010
- March 2010
- February 2010
Doctor Who, Series 5
In reverse chronological order:
- C. S. Lewis on intelligence in Christianity
- Programming Pearls
- Steve Jobs “never had any designs. He has not designed a single project”
- Another challenge: can you write a correct selection sort
- Still hatin’ on git: now with added Actual Reasons!
- The long-overdue serious attempt at The Silmarillion, part 1: what it isn’t and what it is
- Writing correct code, part 1: invariants
- Only 10% of programmers can write a binary search
- The long-overdue serious attempt at Lisp, part 2: is Lisp just too hard?
- The C Programming Language
- The eleventh Doctor: first impressions
- A brief, yet helpful, lesson on elementary resource-locking strategy
- The hacker, the architect and the superhero
- Programming the Commodore 64
- Where Dijkstra went wrong
- The Elements of Programming Style
- Whatever happened to programming?, redux
- Whatever happened to programming?
Most viewed today/yesterday
- Ages of <i>Doctor Who</i> actors on their debuts
- Dammit, Amazon.com, will you <i>please</i> let me use my store credit?
- My solo set at the Mitcheldean Festival
- I wish Jackson hadn't ruined Galadriel's speech
- Are you one of the 10% of programmers who can write a binary search?
- "You can do anything if you believe in yourself"
- If I buy a US Kindle from amazon.com, will it work in the UK?
- Building a model railway, part 0: our old railway
- Still hatin' on git: now with added Actual Reasons!
- The eleventh Doctor: first impressions
- Art Bad habits Books Challenges Culture Design Doctor Who Food and drink Frustration Good code Guys from Bell Labs Life Me singing folk songs Movies Music Not my favourite Politics Programming Reviews Ruby Series 5 Series 6 Series 7 Sheer, mind-bending stupidity Shiny digital future The Real World Tolkien Train wrecks TV Uncategorized
- 1,622,742 hits
Category Archives: Guys from Bell LabsImage
To my astonishment, I see that it’s been a whole year since the last installment in the Programming Books series (1, Coders at Work; 2, The Elements of Programming Style; 3, Programming the Commodore 64; 4, The C Programming Language). I got distracted. But today I want to write about what I would judge the second best book on programming I’ve ever read: Jon Bentley’s Programming Pearls [amazon.com, amazon.co.uk]
I tried to write about this book once before, but I was distracted by what it has to say about binary search, and that ended up being a whole series of its own (part 3, part 4a, part 4b, part 4c). Continue reading
The contributions to the original binary search thread continue to trickle in, and now stand at an astonishing tally of 679 comments, most of them containing code. Thanks once more to all of you who’ve attempted this challenge, and to everyone who’s commented.
In one of the more interesting comments, Darius Bacon tested a sample of 20 of the Python submissions, and found that exactly 10% of them both passed the functional test and appeared to run in O(log n) time — which of course is exactly in line with Jon Bentley’s original statistic, that 10% of the professional programmers he’d examined were able to write correct binary search code (albeit under rather different conditions). It subsequently became apparent, though, that Darius’s testing code was overly strict, and that a further two of the sampled routines did run correctly (though not necessarily in O(log n) time). Still — it’s a surprisingly low hit-rate, especially when you bear in mind that, contrary to the rules, many of the programmers did use testing to help them develop the code. (You should read the second linked comment, as it has plenty of other interesting observations, too.)
[Update, an hour or two later: as Darius Bacon points out in a comment below, I misinterpreted his results. Once the testing code had been fixed, his sample of 21 routines found 9 that passed all test, of which 6 were O(log n).]
Many, many thanks to all of you who have contributed to the astonishing response to the previous article on the difficulty of getting binary search right. I’ve never seen anything like this: in just over 24 hours since I posted the article, 541 comments have been posted, and they’re still rolling in. (That number is a bit inflated by people re-posting the same code-samples multiple times after seeing WordPress mangle their source, but even taking that into account it still amazes me.)
You guys rule. Seriously.
I have a lot to say in response to it all. Read on …
There are some programming books that I’ve read from cover to cover repeatedly; there are others that I have dipped into many times, reading a chapter or so at a time. Jon Bentley’s 1986 classic Programming Pearls is a rare case where both of these are true, as the scuffs at the bottom of my copy’s cover attest:
(I have the First Edition [amazon.com, amazon.co.uk], so that’s what I scanned for the cover image above, but it would probably make more sense to get the newer and cheaper Second Edition [amazon.com, amazon.co.uk] which apparently has three additional chapters.)
It’s 32 years old, and it remains the single greatest book ever written about a programming language. Its crown is secure; even if you’d not already read the title of this article, you’d know what book I’m talking about. It’s the only language-specific book in Top Five programming books of the Programming Reddit’s FAQ. Co-written by Reinvigorated Programmer regular Brian W. Kernighan and Dennis M. Ritchie, it’s not just the definitive book about the language in question, it’s the book the rewrote the book on what it means to be definitive. Step forward, please, The C Programming Language! [amazon.com, amazon.co.uk]
The hacker, the architect and the superhero: three completely different ways to be an excellent programmer
Like most programmers, I suppose, I’m arrogant enough to think I’m pretty good (although see The Dunning-Kruger effect). But through the last thirty years’ programming, I’ve worked with plenty who I know are better than me. Today I want to talk about three of them, and about how very different their skills are; and I’ll finish up by thinking about what the rest of us can learn from them, and what we can do to maximize our own abilities.
I agonized about whether to name them, but eventually concluded that I can say more about their work if I am specific; and what the heck, they might enjoy being held up as examples. They certainly deserve it! So step forward (in chronological order) Steve Sykes, Mike Selway and Adam Dickmeiss!
I said in the first part of this series that one of the books I wanted to talk about was written in 1974. My colleague Dennis Schafroth guessed that it might be Kerninghan and Ritchie’s classic, The C Programming Language, but the first edition of that book actually came out in 1978. But I awarded half a point anyway, because the book I had in mind (A) was co-written by Brian W. “Water buffalo” Kernighan, and (B) had a second edition in 1978, the same year as K&R. It is Kernighan and Plauger’s The Elements of Programming Style (amazon.com, amazon.co.uk)
(This isn’t a cover image from Amazon, it’s a scan of my personal copy, because I wanted you to see how well-thumbed it is.)
I work for an open-source software house, Index Data, which is the world’s smallest multinational: although there are only twelve of us, we represent seven nationalities (Danish, American, Polish, German, Finnish, English and Canadian) and work out of eight different locations in five countries.
Last week, one of the American-based guys was in Copenhagen, so there were six of them all together, which is a bit of an event for us. Purely to spite me, they all went out for sushi, and sent me a photo of the empties stacked up.
Living in the wilds of rural Gloucestershire as I do, there is no sushi to be had for love nor money for many miles in any direction, so I had to make my own. And here it is: