Posts from April 2009.

Code reuse according to Knuth

I stumbled upon this interview with Donald Knuth today. In addition to the celebrated The Art of Computer Programming, Donald Knuth pioneered the concept of literate programming, which emphasises writing code for human beings to understand, as opposed to writing it for machines to understand.

When being asked about current trends and fashionable practices that have undeserved popularity, Knuth says:

I must also confess to a strong bias against the fashion for reusable code.

His take, then, is that with highly readable, modifiable and accessible source code, reuse is unnecessary and dangerous. He would prefer rewriting the code for a new context.

I am one of those who would preach the “fashion” of reusable code. It does appear to me that reusability is very important, and in particular, I think there are tremendous benefits to be realised when the language implementation is able to reason about code. The success of languages like Java shows that the more managed and controlled the language is, the more human creativity and mental capacity is free to focus on the higher levels of abstraction. If programmers must adapt code to each context manually, surely they will be distracted from the bigger task. So my take on the issue is very different to Knuth’s.

But I confess to not knowing much about literate programming and to not having explored the tools (in particular Knuth’s CWEB). Perhaps I should learn more.

Blogging revisited

This marks the launch of my second (possibly third) attempt at serious blogging. Unlike previous blogs, I intend for this one to have some specific purposes.

Primarily it will be a vehicle for me to express ideas about software and software research that I can’t express elsewhere. This will probably range from random thoughts to essayish writings. The benefit for me is that expressing myself coherently aids my thinking and understanding. In this sense the blog will be a kind of public notepad, but hopefully more well written than my notepads are.

Secondly, though surely this is too much to hope for, maybe it could attract comments from people who share my interests. Any kind of dialogue or exchange of ideas is always welcome.

This time around I use WordPress, one of the most popular blog packages. Times have changed since around 2004, when I made my own PHP/MySQL based system. At the time I had lots of free time and a kind of do-it-myself ethic. Today there is less time and no clear benefit in rolling my own. My focus should be more on the content and less on the form.

So let’s see how this instance of my blogging attempts turns out.

Technorati Profile