Articles

Beautiful Code … ?

Recently, I’ve been reading “Beautiful Code” (edited by Andy Oram & Greg Wilson). This is a collection of short papers by academics and professional  software developers which explores the idea of beauty in software:

Beautiful Code!

I was looking forward to this, partly because we’ve just started a new course . . . → Read More: Beautiful Code … ?

Short Whiley Demo [VIDEO]

I’ve put together a little demonstration of the Whiley language in use. The demo only covers the basic idea of Whiley and, in particular, demonstrates how the pre- and post-conditions work:

Anyway, this was a bit of fun for a Saturday afternoon. Turns out making videos is harder than I thought . . . → Read More: Short Whiley Demo [VIDEO]

The X10 Programming Language

X10 is an interesting and relatively new language from IBM being developed as part of DARPA’s High Productivity Computing Systems program.  X10 is designed for high-performance parallel programming using a partitioned global address space model.  To my mind, I see X10 as being a modern Fortran … but perhaps that’s a bit disingenuous.  Anyway, . . . → Read More: The X10 Programming Language

Infamous Software Failures in New Zealand

I’ve been writing a grant application recently, and wanted to list some example software failures that occurred in New Zealand.  Here’s what I found:

In 1997, a software error caused the the Tiwai Point aluminum smelter in Southland to shutdown at midnight on New Year’s Eve, causing more than $AU 1 million of damage. . . . → Read More: Infamous Software Failures in New Zealand

Thinking about Recursive Constrained Types in Whiley

Whiley supports so-called Algebraic Data Types for constructing tree-like data structures.  For example, an expression tree might be defined like so:

define ADD as 1 define SUB as 2 define MUL as 3 define DIV as 4 define binop as {ADD,SUB,MUL,DIV} define expr as int | (binop op, expr lhs, expr rhs)

Using this . . . → Read More: Thinking about Recursive Constrained Types in Whiley

Whiley v0.2.9 Released!

Well, here’s version 0.2.9.   This includes numerous bug fixes, and several major feature updates:

Support for recursive algebraic datatypes Improved support for type testing, particularly of recursive types Syntax of function declarations has changed slightly to use where instead of requires + ensures.  See this post for more on why.

However, there remains a . . . → Read More: Whiley v0.2.9 Released!

Thinking about Pre- and Post-Conditions in Whiley

The notion of pre- and post-conditions is well understood in the context of software verification.  However, Whiley deviates from the norm by combining them into a single condition.  The following illustrates a simple Whiley function:

int f(int x) where x > $ && $ > 0: return x-1

Here, $ represents the return value.  . . . → Read More: Thinking about Pre- and Post-Conditions in Whiley

Language Designers … who wait?

Someone recently pointed me to the Rust programming language which has some very nice features, although it’s still in early stage development.  In particular, the system statically prevents null pointer errors, and does not permit dangling pointers.  The language FAQ also claims the “ability to define complex invariants that hold over data structures” … . . . → Read More: Language Designers … who wait?

On Object-Oriented Programming

There’s an interesting interview with Ralph Johnson and Joe Armstrong over at QCon.  They’re talking generally about whether OOP has been successful, and reflecting on the last few decades.

A few things from the interview caught my eye.  Ralph talks about a fundamental mistake made by the designers of SmallTalk.  In SmallTalk, you don’t . . . → Read More: On Object-Oriented Programming

Whiley v0.2.8 Released!

Here is the latest update for the Whiley-to-Java Compiler.  It now weighs in at around 47KLOC, spread over 272 classes.  There are 379+ distinct test inputs, which give rise to around 615 actual JUnit tests.  Anyway, the list of improvements includes:

Fixed numerous outstanding bugs Improved reporting of syntax errors Added list append Added . . . → Read More: Whiley v0.2.8 Released!