Jul 30 2008

LISP-based DSL for Biochemical Modeling

Tag: Uncategorizedadmin @ 1:37 pm

This LISP-based DSL for biochemical modeling, called little b reminds me a lot of some work that Tim Menzies and I did, Making Sense of Requirements, Sooner, which defined a toy DSL for expressing qualitative requirements and a mechanism for optimizing requirements specifications using machine learning.


Jul 30 2008

Could the Successor to Vista be a Microkernel Operating System?

Tag: operating systemadmin @ 12:59 pm

I just read an article in Inforworld suggesting that Microsoft is preparing a web-based successor to Windows, based on the Singularity Microkernel OS.

To start with, I have zero inside knowledge about this move (just lots of opinions :-) , and I would not put too much weight on the article, but I have been thinking along the same lines for a while.

First, the successor to Vista has to be great. Windows 7 is an evolution of NT and I am not sure whether this can provide the necessary edge.

What I would really like to see would be a new Windows, reengineered from the ground up as a modern, microkernel operating system. The Unix concept seems to me to represent the minimum operating system which is mature, powerful, and well-engineered enough to be a robust foundation for general purpose computation. There has been a lot of operating systems research in the last 40 years which surely can be used to build something much better than Unix. With the widescale adoption of virtual machine technology, it should be perfectly possible to run Windows NT type (XP, Vista) applications inside a virtual machine in a completely new operating system.


Jul 28 2008

Thoughts on Software Engineering: Interfaces

Interfaces Contribute to Software Risk

When I was at NASA, I did some research on software risk. The most common identifiable cause of software failures, apart from “functional defect” (i.e. the code was perfectly valid, but just did not implement the right thing) is “interface defect”, i.e. a failure in the interfaces between components.

Interface Problems are Worse in Large Multilanguage Systems

The reason why interface defects are particularly common is probably two-fold: compilers and other tools do not provide good support for preventing this kind of cross-component defect, components tend to correspond to the boundaries between the work of different people, and interface defects are due to lack of coordination between different people.

A large system – especially one providing a consumer web interface – is often composed from many components, written in several different languages, some of them running on a single machine and others broken into client and server parts. The system and its components may be evolving quite rapidly and different parts are usually written by different people. The checks provided by compilers are only of benefit on a component-by-component basis and so are not very helpful in this situation.

Check Types + Properties At Runtime

The kinds of type-checking available in programming languages are generally limited by the need to check types statically, which imposes a severe restriction on the notion of “type”. Many types in practice would be well represented by specifying an underlying data type plus properties which must hold of valid elements, e.g. lists (underlying type) whose elements are pairs (property), arrays of strings (underlying type) which are sorted (property). Such types are known as dependent types. Dependent types are not supported by most programming languages, because their use sacrifices automation of static type inference and checking.

Although dependent types cannot be checked statically, or used explicitly in most programming languages, a lot of the benefit of dependent types can be realized by writing functions which check whether given data have the right underlying data type and satisfy the required properties. Instead of statically checking types, which is mathematically hard or impossible, we just check data input to or output from functions to ensure they satisfy the properties, i.e. have the right (dependent) types.

Represent Interface Contracts As Types + Properties

These runtime checkable properties (dependent types) provide a good way to tackle part of the interface problem, by representing the interfaces in a machine-checkable way and building mechanisms to check the consistency of the component interfaces both at build time and at runtime. Speed is often important, so components should distinguish between a “development” environment, in which the interface checks are performed, and a “production” environment in which they are skipped.

My proposal is, therefore, to define APIs which specify the classes/functions/methods provided by the components in a system. Those APIs should specify at an appropriate level of detail the signatures, types, and properties of those classes/functions/methods. “Appropriate level of detail” here means exercising judgement about when to use heavy-weight, detailed representations, and when simpler abstractions are good enough. The functions which check the required properties of data can be used both at runtime in the development environment to check much or all of the data passing between components, and can be used at build time to check aspects of the correctness of test results. One way to view these functions is as test oracles.


Jul 27 2008

Thoughts on: Software Engineering

Tag: software engineeringadmin @ 8:54 am

Today I am starting a new “Thoughts on…” series, to distill some of my thoughts on work related matters. These will be published as I write them, and later edited together into a more compact collection.


Jul 24 2008

Hiking around Lake Sabrina

Tag: hikingadmin @ 10:44 am

I was talking this morning to some people at work about hiking in the Kings Canyon area. I mentioned that I went hiking around Lake Sabrina a few years ago, and Bruce told me that he and some other guys had rebuilt the trail there 25 years ago.

Now I am looking on my home machine for some photos. Have to get up there again. Bruce mentioned that Rock Creek is really nice.

I took this picture in 2003 during my hike with Howard Barringer in the mountains up from Lake Sabrina:

Reflections of mountains up from Lake Sabrina


Jul 24 2008

iTunes low bitrate songs

Tag: musicadmin @ 9:44 am

Yesterday I was superenthusiastic about Hecq, and decided to see what else I could pick up from their catalogue. I saw that “Scatterheart” is not available on emusic.com, and is only an expensive import at Amazon, and decided – what the hell – to buy a copy of iTunes. At $9.99 it seemed like a bargain, but when it had been paid for and downloaded I found to my dismay that the bitrate is 128kbps. Why?

Why is the download 128kbps? A very few people might pay for a 128kbps download, and then buy the CD if they really liked it, but to all intents and purposes, if someone pays good money for a download then that is the deal and no more buying will be done. From the point of view of the publisher, some people might be pushed up to a higher priced CD version. But in this case the CD is not available in the US, and anyway, does the publisher really make more money that way? There is certainly nothing in it for iTunes, they don’t sell CDs.

I almost feel like I am being punished for buying music on downloads rather than on CD. “OK, here you are then, here’s your music, but – hehehehe – I’ll just knock the quality down a tiny bit because where else are you going to go – hehehehe.”

I consider my relationship with the music part of iTunes terminated until they clean up their act quality-wise. (Of course there is still the App store – hehehehe.)


Jul 23 2008

Electronic Music: Hecq and Stars of the Lid

Tag: musicadmin @ 4:51 pm

A friend at work reminded me that I bought some Stars of the Lid recently on Emusic. I listened again and Stars of the Lid have published some beautiful music: slow, symphonic, with complex electronic, slightly glitchy, undertones.

Now I am listening to music by Hecq, in particular right now, Night Falls. It is very similar to Stars of the Lid. I would give it 6 stars on my iPod if I could. Some of the tracks have very clear references to Aes Dana. In particular, track 11, “Above”, seems to be carved out of “Aftermath 01″ from Aftermath (Archives of Peace).


Jul 15 2008

Being forced into an unstable equilibrium can be good

Tag: games, iphone, planesadmin @ 10:36 am

I just played Cube Runner on the train. Cube Runner is an excellent, fun, free game for the iPhone.

I was doubtful before I started, but seems it is possible to play accelerometer games on the iPhone on a train.

In fact, I just got my hiscore.

This seems counterintuitive, like breaking a bone to reset it, but it forces you out of the comfortably wrong equilibrium where you try to control everything smoothly and puts you in the rough zone where you have to respond quickly.

In fact, unstable equilibria often have significantly better responsiveness than stable ones: modern fighter jets are made much more maneuverable by being aerodynamically in an unstable equilibrium.


Jul 11 2008

iPhone Bricked – was: iPhone 2.0 Firmware Officially Out!

Tag: iphoneadmin @ 8:04 am

I had a hard time yesterday evening resisting the back door download of the new software, and told myself I would wait for the official release in the morning. In the morning… no official release. I checked a few times and nothing… nothing… nothing…

It has been released! The iPhone 2.0 software update has been released! I am downloading it now.

But something went wrong with the installation…

… and now my iPhone is bricked. Oh No!

Looking at Console log there are a number of interesting error messages, like:

7/11/08 8:43:21 AM ….com.apple.iTunes MobileDevice: AMDeviceConnect: This is not the droid you’re looking for. Move along, move along.

Update: I now seem to have installed the 1.1.4 firmware successfully, but the “contacting the iTunes store” step fails and the phone is left in emergency call only mode. It looks like the iTunes servers are down and so can’t activate the phone.

Updated update: finally, in the afternoon, I managed to successfully (and easily) install the new firmware on my phone. Awesome.


Jul 10 2008

Holy iPhone Awesomeness

Tag: apple, iphoneadmin @ 3:39 pm

The office today is filled with squeals of delight from early adopters of the 2.0 firmware and new iPhone apps. Super Monkey Ball is unsurprisingly incredible.


Next Page »