The jaundiced C programmer's view of object orientation

Back in an entry on inheritance versus interfaces I mentioned that I had what I said could becalled the jaundiced C programmer's view of inheritance. That labeldeserves an explanation and today is when I finally write it.

C has no inherent OO support (all of that arrived in C++); no syntaxfor it, no standard for it, no anything. Never the less, everyonewriting a large program in C rapidly winds up implementing any numberof OO features in the code (using 'design


The wrong way to harvest system-level performance stats

I've recently been looking at packages to harvest system-levelperformance stats (because this is something that we should really bedoing), and in the process I've repeatedly observed an anti-patternthat I need to rant about now.

One popular implementation technique is to have a central master programthat runs 'plugin' scripts (or programs) to gather the specific stats.Each time tick the master program runs all the plugin programs, eachof which is supposed to spit out some statistics that the


How we handle Ubuntu LTS versions

In a recent entry I noted that we haveproduction machines running all three currently supported versions ofUbuntu LTS (8.04, 10.04, and 12.04). This might strike people as alittle bit peculiar, so I'll describe how we handle Ubuntu LTS versions.

Machines that people actively log in to, such as our login and computeservers, always run the current LTS version so that people can get thelatest software versions and shiny bits. We don'


Speculation about what comment spammers think they're doing here

To summarize briefly, comment spam attempts here show some oddbehavior ; when I add sources to IPblocks, I see significant hits on those blocks but the level ofnon-blocked comment spam attempts stays more or less the same (butcomes from new IPs). It's as if the comment spammers keep tryingfrom the old IPs but also add new IPs.I'm a firm believer that spammers are generally not stupid. Whateverstrange things they're doing are being done for reasons that make sense


How I enter URLs in my browser

Aristotle Pagaltzis wrote in a commenton my alternative to bookmarks :

But that means when you open a new window, the address bar is a)already filled and b) not focused, right? I could not abide that...

One of my browser peculiarities is that in my primary browser I nevertype URLs in the address bar or otherwise modify the URL there; it'sstrictly read-only. I think that this goes back to when Firefox (orperhaps at the time it was Mozilla) acquired


My alternative to bookmarks: a page of links as the browser start page

For complex reasons beyond the scope of this blog entry, I amregularly browsing several sites with my 'testing' Firefox . Since I got tired of typing site names intothe URL bar every time, I bookmarked the most common ones and thengot reminded of how bad an interface bookmarks are and how much Idislike them. The big problem with bookmarks is that they are slowand inefficient because a pop-up menu is an extremely low-density andawkward way of presenting links (or really of presenting anything)


Two views of the argparse module

A commentator on my earlier entry about the options problem asked what I thought about the argparse module . I previously hadn'tlooked at it because of Python version issues , buttheir question prompted me to go read the documentation and form someopinions.

There are two different views of how command line parsing librariesand modules should behave. In the first view, part of the job of theselibraries is to be opinionated and to only support what (Unix) peoplehave decided are good practices for handling command line arguments.


My Python versions

A commentator on my previous entry about the options problem asked what I thought about the argparse module . One of the answers tothat is that I don't have any opinions on it because so far it hasbeen pointless to look at it since it only exists on Python 2.7+. Somereaders may be tempted to roll their eyes at me now; after all, Python2.7 was released in 2010 and is now just overtwo years old. Surely it is everywhere by now


The options problem in Python

Suppose that you have a Python program that takes command linearguments, including switches (a 'verbose' switch is common, forexample). These options change the program's behavior and logic inrelatively low-level places, possibly pervasively (again a 'verbose'switch is a good example, as is a 'dryrun' switch).

So, how do you pass information about these command-line arguments downto low-level code? I can think of at least four, most of which I


The problem with noise

The problem with noise is thathumans habituate to it very fast. This is a problem because humans see(and hear, and generally perceive) what they expect to see (hear, etc).If you are habituated to noise you hear noise and you ignore it. We areextremely badly adopted to picking up the one time out of many when whatwe are hearing is actual signal instead of noise.

(There are a number of fascinating and sometimes disturbing psychologyexperiments that demonstrate just how much of what we think