blog dds

2012.12.05

Programming Languages vs. Fat Fingers

A substitution of a comma with a period in project Mercury's working Fortran code compromised the accuracy of the results, rendering them unsuitable for longer orbital missions. How probable are such events and how does a programming language's design affect their likelihood and severity? In a paper I recently presented at the 4th Annual International Workshop on Evaluation and Usability of Programming Languages and Tools I showed results obtained by randomly perturbing similar programs written in diverse languages to see whether the compiler or run-time system would detect those changes as errors, or whether these would end-up generating incorrect output.

Continue reading "Programming Languages vs. Fat Fingers"

2012.10.21

Chemical Element Trump Cards

I can still remember the weight of the Lancia Stratos car that featured in the Top Trumps cards were playing as children in the 1970s: 870kg. It was the lightest of all the flashy cars in the set, and therefore a much sought-after card. Other card sets that kept us busy included airplanes, motorcycles, and tanks. Through them we learned tens of useless trivia, but also got a feeling of the compromises inherent in engineering. Wondering whether I could leverage such a game to make it even more educational, I created a set of trump cards containing properties of chemical elements.

Continue reading "Chemical Element Trump Cards"

2012.09.22

How to Calculate an Operation's Memory Consumption

How can you determine how much memory is consumed by a specific operation of a Unix program? Valgrind's Massif subsystem could help you in this regard, but it can be difficult to isolate a specific operation from Massif's output. Here is another, simpler way.

Continue reading "How to Calculate an Operation's Memory Consumption"

2010.10.14

Synchronizing Thunderbird's Replied Flag

My main email client is Thunderbird, but I also use BlackBerry's and Apple's clients, all through the same IMAP account. Disconcertingly, email messages to which I have replied through the other clients don't show up in Thunderbird with the "replied" (replied icon) icon. This means that when I browse my email using Thunderbird, I waste time trying to remember whether I have responded to a particular message. Here is how I solved the problem.

Continue reading "Synchronizing Thunderbird's Replied Flag"

2010.05.20

Email Analytics

During the past six months I've been drowning in email. I spend a large part of my day responding to email messages and filing incoming messages I consider important. Yet I'm falling behind and this affects the quality of my work: I sometimes delay responding to important messages. Followng Peter Drucker's dictum "If you can't measure it, you can't manage it", I decided to write a tool to analyze my incoming and outgoing email messages.

Continue reading "Email Analytics"

2007.06.06

Palindromic Palindrome Checking

Stan Kelly-Bootle's column in the April 2007 ACM Queue, titled Ode or Code? — Programmers Be Mused!, was as always very enjoyable. However, I found its ending, a C function that returns true when given a palindromic string (e.g. ABCCBA), anticlimactic. The function given is recursive; I was expecting it to be palindromic. How difficult can it be to write such a function?

Continue reading "Palindromic Palindrome Checking"

2007.02.04

How to Embed Citations in Diagrams

Diagrams in scientific publications occasionally link to other elements of the publication, such as bibliographic or section references. Maintaining consistency between the citations in the diagram and the publication can be tricky, but a small Perl script can automate this process.

Continue reading "How to Embed Citations in Diagrams"

2006.04.12

Code Quality: The Open Source Perspective

My new book Code Quality: The Open Source Perspective got published, three years after I started writing it. The book owes more to open source software than any of the books dealing with Linux, PHP, Apache, Perl or any other book covering a specific technology.

Continue reading "Code Quality: The Open Source Perspective"

2005.05.01

Java Makes Scripting Languages Irrelevant?

Simplicity does not precede complexity, but follows it.

— Alan J. Perlis

In computing we often solve a complex problem by adding another level of indirection. As an example, on Unix file systems an index node, or inode, data structure allows files to be allocated concurrently and sparsely, and yet still provide an efficient random access capability. When we want to customize large and complex systems or express fluid and rapidly changing requirements a common tool we employ is to add a scripting layer on top of the corresponding system. An early instance of this approach was employed in Dan Murphy's TECO editor developed on the DEC PDP-1 computer in 1962–63: its command language also doubled as an arcane (to put it politely) macro language.

Continue reading "Java Makes Scripting Languages Irrelevant?"

2004.12.11

Measuring the Effect of Shared Objects

For the Code Quality book I am writing I wanted to measure the memory savings of shared libraries. On a lightly loaded web server these amounted to 80MB, on a more heavilly loaded shell access machine these ammounted to 300MB.

Continue reading "Measuring the Effect of Shared Objects"

2004.09.01

Digital Data Makes Anything Possible

Once data becomes digital anything and everything becomes possible. Consider arranging the books on your bookshelf by the color of their bookcover.

Continue reading "Digital Data Makes Anything Possible"

2004.04.18

Computer Languages Form an Ecosystem

(This is a copy of an article I posted on slashdot on March 15th, in response to a discussion titled C Alive and Well Thanks to Portable.NET. Many posters argued that the C language is dead. I add my response here, because one month after its original slashdot submission, I am still getting web site hits from it.)

Continue reading "Computer Languages Form an Ecosystem"

2004.03.19

Binary File Similarity Checking

How can one determine whether two binary files (for example, executable images) are somehow similar? I started writing a program to perform this task. Such a program could be useful for determing whether a vendor had included GNU Public License (GPL) code in a propriatary product, violating the GPL license. After writing about 20 lines, I realized that I needed an accurate definition of similarity than the vague "the two files contain a number of identical subsequences" I had in mind.

Continue reading "Binary File Similarity Checking"


Creative Commons License Last update: Thursday, September 22, 2016 9:56 am
Unless otherwise expressly stated, all original material on this page created by Diomidis Spinellis is licensed under a Creative Commons Attribution-Share Alike 3.0 Greece License.