Recent posts

Hero Code Examples for Programming Languages: Revisiting Trabb-Pardo_Knuth

“The best way to grasp the spirit of a programming language is to read example programs” as Knuth wrote in the “The Early Development of Programming Languages” 1. Today, it is common practice to provide an example program on the front page of a programming language’s marketing site (i.e., a “hero code example” as it were). Since the objective of the example is to showcase the language’s value versus others, what coding tasks best fulfill that? Beyond Hello World, which is the most popular example coding task, there is little agreement between sites. I survey existing practice, discuss the utility of the Trabb-Pardo Knuth algorithm, and make recommendations on tasks that can demonstrate value versus the “next best alternative”.

Read more

Rosetta Code

Rosetta Code is a programming chrestomathy wiki, that is, it is a site with lots of examples of tasks completed in multiple programming languages. The site has been around since 2007 and now has 1,100+ tasks and 100,000+ code submissions over 900+ languages. To help other researchers, I’m publishing an export of the code samples as a sqlite database via DBHub.io and the source code via Gitlab.

Read more

PLATO and Approximate String Matching

In 1986, a survey of approximate string matching algorithms found the algorithm used in the PLATO computer-aided instruction system was third place in quality (F1 score) and was an order of magnitude faster than the best performing algorithms. The PLATO algorithm used an unusual dimensional projection approach, while the competing algorithms of the day used edit distances or phonetics. However, this approach failed to catch on and the design is rarely mentioned in the literature. This video describes how the algorithm worked and some reasons why it became forgotten.

Quality of early 1970s approximate string matching algorithms

Approximate string matching algorithms (ASMA) determine if two strings are the same, “close enough”, or are distinct. Spelling error detection and correction were early applications of these algorithms, and today ASMAs (or similar techniques) are used in natural language understanding applications. Hundreds of papers have been written on the subject (1980 survey, 2001 survey), but this post is focused on the subset of algorithms that were considered commercially viable for the field of computer-assisted instruction (CAI), an early hardware/software-as-a-service business.

Read more