Where leading programmers explain how they find
unusual and carefully designed solutions

Andy Oram

Recent Posts

Andy Oram

I just finished an unusual conference called Codework at the University of West Virginia, where computer science experts and writers batted around the similarities among their disciplines and the differences between writing code and writing fiction.

I've already blogged about Ted Nelson's presentation at the beginning of the workshop, and I'll write up some of the fascinating exchanges we had later this week, but in this blog I'll lay out some ways I found that programs are like stories and essays--usually in what they do wrong.

Ruby inventor Yukihiro Matsumoto gave us a chapter for Beautiful Code in which he compares programming to essay-writing, with many positive associations. I believe that comparisons between user interfaces and stories are so widely understood that many application designers engage in storyboarding to plan their interfaces. What I'm describing here, though, are the more unfortunate associations that come up when I feel like complaining (as we all sometimes do) about the difficult interfaces I've encountered.

> continue reading
Andy Oram

Beautiful Code won Dr. Dobbs Journal's JOLT award as the best general book of the year in computing at SD West earlier this month. JOLT awards are some of the most prestigious in the field of software engineering. Details in our publicist's blog.

Andy Oram

It's hard to remember to do simple code inspections--the oldest quality technique in the software field--amid the welter of graphical tools, measurement tools, and other fancy tricks the industry has thought up. Code inspections make sense. If you find a flaw during a program run and debug it, you've fixed just one bug. Only a code inspection can fix the potentially hundreds of other similar bugs.

But code inspections are a headache, because logic and consistency are hard to determine. Miska Hiltunen is trying to make them more agreeable by rigidly limiting what you have to look for, and assuring developers that they can get through each inspection in just about an hour. > continue reading

Andy Oram

The Association for Computing Machinery has given it\s highly prestigious A.M. Turing Award to the researchers credited for inventing Model Checking: Edmund M. Clarke, E. Allen Emerson, and Joseph Sifakis. > continue reading

Andy Oram

Just about a year ago, someone identified just as "ryszard" wrote about five tight lines of C code that calculate an approximate inverse square root (1/sqrt(x)). Mark Rickerby pointed the article out to me.

Like many chapters of Beautiful Code, this article challenges some assumptions about good coding that the software engineering literature has repeated to us over the years--notably, assumptions about hardware independence that's important for portability and thus for long-term correctness. Luckily, because neither integer nor floating-point formats are likely to change in the forseeable future, this Quake code looks risk-free. Still, ryszard seems conscious that it occupies one of the lower rungs of beauty, calling it a "really cool hack." > continue reading