20.12.11
Scotland Loves Anime
List.It, FeedMe, NB, Exhibit
Usability of Programming Languages
29.11.11
Marshmallows and Pensions
[An open letter sent to the School of Informatics of the University of Edinburgh.]
We write to urge you to join the strike on 30 November, sponsored by UCU and EIS and timed to coincide with actions by unions across the UK. If you are not a member of UCU or EIS, we urge you to support the strike by not coming in to work and by refusing to cross picket lines.
In 1972, psychologist Walter Mischel conducted an experiment at Stanford University. Over 600 children, aged 4 to 6, were put into a room free of distractions, given a marshmallow, and told they would be left alone for fifteen minutes. They were free to eat the marshmallow, but if they held out for fifteen minutes, they would be given a second marshmallow as a reward. One third held out for the bigger payoff. A follow-up study, 18 years later, revealed that the one-third who deferred gratification were remarkably more successful across a range of activities, including scoring more than 200 points higher on SAT college admission tests. Holding out for the second marshmallow is a salient indicator of success in later life.
If ability to delay gratification correlates with success, one might expect successful people to take a long-term view. For instance, one might expect academics in a leading institution to rate receiving a decent pension more highly than the hassle of supporting a strike. But ask someone in the Informatics Forum if they are planning to strike, and they are likely to say "No, I have a meeting booked for that day." To whom do they owe more? The person they are meeting? Their future self? Or how about future hires, who will be hit hardest by the cuts, and future students, who deserve to inherit a university system that remains world-class?
Over the last year, USS has imposed a drastic cut in pensions: 36% of the value of the pension for Mary, a new lecturer promoted to senior lecturer after ten years; and 12% of the value of the pension for John, someone just like Mary except he's currently employed rather than a new hire. This is a classic divide-and-rule tactic. While staff may be less inclined to fight a 12% cut than a 36% cut, the two-tier system is unfair and unlikely to last: historically, two-tier systems are updated within a few years by moving everyone to the lower tier. Details of the cuts are listed below.
What about our students? EUSA, the student union, is supporting the strike. They know that these cuts will weaken universities. During the last strike, in March, sometimes there were more students than staff manning the pickets. If our students support the strike, shouldn't we support them?
Aren't pensions gold-plated? The UK historically spends less on pensions than other European nations. Private-sector pensions have degraded over the past few decades; we should support efforts to restore those to decent levels, not agree to decimating public-sector pensions as well. It's not fair for public employees to give up their pensions to pay for bank bailouts.
In this day and age, can we afford it? The UK is renowned for its world-class universities: Cambridge, Oxford, Imperial, Edinburgh, Manchester. Look at a list of the top-ten universities in the world, and you will see only universities from the US and UK. That excellence is a huge driver of innovation and growth. If the UK stops its investment in universities, it won't be long before we feel that loss throughout the economy. So the question should be, can we afford to shortchange universities, particularly the younger generation that is hardest hit by these proposals?
It may be easier to give in, but the right plan is to keep our pensions and our universities strong for future generations. Let's hold out for the second marshmallow.
Yours,
Philip Wadler
Nigel Goddard
Alan Bundy
A summary of the changes.
Introduction of a two-tier system. Current staff who pay into the pension fund for forty years receive a pension of one-half their final salary; new hires who do the same receive a pension of one-half their average salary. Basing pensions on average rather than final salary may be sensible, but to do so with no adjustment in multiplier suggests employers are using this as an excuse to slip in a large cut; it means new hires receive about 2/3 the benefits received by old hires. Further, if this follows the course of other two-tier schemes, the upper tier will be eliminated in favour of the lower, and old hires as well as new will see their pension slashed.
Capping cover for inflation. Previous arrangements offered full cover for inflation; new arrangements offer full cover to 5% and half cover to 15%---that is, a 10% increase when inflation is 15% or higher. Inflation averaged 16% per year between 1974 and 1980; a cut of 6% per year over six years compounds to a 31% reduction, lasting over the remaining lifetime of the pension.
Altering the index of inflation. The Retail Price Index (RPI) is replaced by the Consumer Price Index (CPI). RPI is calculated with an arithmetic mean, CPI with a geometric mean, which is always less. CPI runs about 0.7% lower than RPI; a cut of 0.7% per year over twenty years compounds to a 13% reduction.
Changes to conditions. Staff that take a career break of 30 months will be demoted from the final-salary to average-salary scheme, about a 1/3 cut; this particularly affects women. The same will happen to staff that are made redundant, a double whammy: if you lose your job, you also lose a large proportion of your pension.
15.11.11
Robin Hood
The standard argument against the tax is that any country implementing it unilaterally would drive business away. But the UK already imposes a Stamp Tax of 0.5% (as compared to the 0.05% of the FTT) on share trades, and this doesn't appear to have done the London Stock Exchange irreparable harm. Further, the tax can be arranged to apply to any transaction carried out by a UK business, regardless of where the transaction itself occurs; few companies would abandon the country just to save 0.05% on currency and derivative trades. Some other counterarguments appear here.
Happy 13th, Expression Problem
25.10.11
Alfred Ernest Marples, Baron Marples of Wallasey, is very sad because the Public Data Corporation wants to lock public data away behind fees.
Please respond now! Time runs out on 27th October 2011. It's just like the Mayan apocalypse, but for open data.
9.10.11
Goldman Sachs
5.10.11
Israel and Palestine
My thanks to David Harel, one of the signatories, for passing this on. Harel is a prominent computer scientist, winner of many awards including the ACM Karlstrom Outstanding Educator Award, the ACM SIGSOFT Outstanding Research Award, the ACM Software System Award, the Emet Prize, and the Israel Prize.The Land of Israel is the birthplace of the Jewish people where its identity was formed. We, the citizens of Israel, call on the public to support the recognition of a democratic Palestinian state as a condition for ending the conflict, and reaching agreed borders on the basis of the 1967 borders. Recognition of such a Palestinian state is vital for Israel's existence. It is the only way to guarantee the resolution of the conflict by negotiations, to prevent the eruption of another round of massive violence and end the risky isolation of Israel in the world.
The Land of Palestine is the birthplace of the Palestinian people where its identity was shaped.
13.9.11
The Seven Mysterious Book Sculptures of Edinburgh
For @scotstorycenter - A gift in support of libraries, books, works, ideas..... Once upon a time there was a book and in the book was a nest and in the nest was an egg and in the egg was a dragon and in the dragon was a story.....
7.9.11
An experiment about static and dynamic type systems
If programming language design is to become a science, we need more experiments like this one.
The author measured time for 49 subjects to build a simple parser in Purity, a language similar to Smalltalk implemented for this experiment in two variants. Twenty-five subjects implemented the parser in the dynamically-typed variant, and 24 used the statically-typed variant. Two measurements were taken: the time at which the lexical scanner passed all its tests, and the percentage of tests passed by the parser after 27 hours; the tests were equally divided between accept and reject, so a random program would pass 50% of the tests.
- Subjects using the dynamically-typed language completed the scanner in an average of 5.2 hours, statically-typed in an average of 7.7 hours; the difference is statistically significant at level p=0.04.
- Fourteen subjects using the dynamically-typed language failed to complete the parser (that is, passed only 50% of tests), 11 subjects using the statically-typed language failed.
- Subjects using the dynamically-typed language passed an average of 60.2% of the tests, subjects using the statically-typed language passed an average of 64.5% of the tests; but the difference is not statistically significant at level p=0.40.
Any test of this kind is fraught with difficulties. One issue is that experimenter, to reduce variables such as familiarity or different IDEs, developed his own language, Purity, in two variants. One way around that problem would be to use Java to compare dynamically and statically typed programming: that is, compare subjects using Java 4 with Java 5, that is, Java with and without generics. In Java before generics, a collection would have type List, while in Java with generics a collection would have type List<Integer> or List<List<String>>. This would let one compare the effects of presence or absence of type information without the need to create an artificial language. It would fail to measure the benefits claimed for completely dynamic languages such as Javascript or Python, but perhaps it is ok to walk before we run. Anyone interested in collaborating on an empirical comparison of two versions of Java?
Dance Your PhD
The dreaded question. “So, what’s your Ph.D. research about?” You take a deep breath and launch into the explanation. People’s eyes begin to glaze over…The winning entry from 2010 is above. This year there are prizes for the best entries in physics, chemistry, biology, and social science. Where's informatics? (Or computer science, if you want to use the old name.) I'm dying to dance, but no contest to enter ...
At times like these, don’t you wish you could just turn to the nearest computer and show people an online video of your Ph.D. thesis interpreted in dance form?
Now you can. And while you’re at it, you can win $1000, achieve immortal geek fame on the Internet, and be recognized by Science for your effort.
And this year, we have a new sponsor: TEDxBrussels. The creator of the best Ph.D. dance gets a free trip and hotel stay in Brussels to be crowned the winner at the TEDx conference on 22 November 2011.
Erik Schmidt on computing education in the UK
First: you need to bring art and science back together. Think back to the glory days of the Victorian era. It was a time when the same people wrote poetry and built bridges. Lewis Carroll didn’t just write one of the classic fairytales of all time, he was also a mathematics tutor at Oxford. James Clerk Maxwell was described by Einstein as among the best physicists since Newton - but was also a published poet.
Over the past century the UK has stopped nurturing its polymaths. There’s been a drift to the humanities - engineering and science aren’t championed. Even worse, both sides seem to denigrate the other - to use what I’m told is the local vernacular, you’re either a ‘luvvy’ or a ‘boffin’.
To change that you need to start at the beginning with education. We need to reignite children’s passion for science, engineering and maths. In the 1980’s the BBC not only broadcast programming for kids about coding, but (in partnership with Acorn) shipped over a million BBC Micro computers into schools and homes. That was a fabulous initiative, but it’s long gone. I was flabbergasted to learn that today computer science isn’t even taught as standard in UK schools. Your IT curriculum focuses on teaching how to use software, but gives no insight into how it’s made. That is just throwing away your great computing heritage.
At college-level too, the UK needs to provide more encouragement and opportunity for people to study science and engineering. In June, President Obama announced a programme to train 10,000 more engineers a year. I hope others will follow suit - the world needs more engineers. I saw the other day that on The Apprentice Alan Sugar said engineers are no good at business. Really? I don’t think we’ve done too badly!
If the UK’s creative businesses want to thrive in the digital future, you need people who understand all facets of it integrated from the very beginning. Take a lead from the Victorians and ignore Lord Sugar: bring engineers into your company at all levels, including the top.
19.8.11
A better tube
Two alternatives to the traditional London Tube map, one closer to geographically acurate and one with distortion grid in the background. Spotted on Boing Boing.
2.8.11
The City and The City
Workers facing a bleak old age says pension review
1.7.11
4-Profit University
13.6.11
The Economist notices

The concurrency crisis is upon us: Moore's Law will continue only if we learn to write parallel programs. This is important enough you might expect it to show up in the mainstream press, and at last it is. From the 2 June 2011 issue of the Economist:
Meanwhile, a group of obscure programming languages used in academia seems to be making slow but steady progress, crunching large amounts of data in industrial applications and behind the scenes at large websites. Two examples are Erlang and Haskell, both of which are “functional programming” languages.
Such languages are based on a highly mathematical programming style (based on the evaluation of functions) that is very different from traditional, “imperative” languages (based on a series of commands). This puts many programmers off. But functional languages turn out to be very well suited to parallel programming. Erlang was originally developed by Ericsson for use in telecoms equipment, and the language has since been adopted elsewhere: it powers Facebook’s chat feature, for example. Another novel language is Scala, which aims to combine the best of both functional and traditional languages. It is used to run the Twitter, LinkedIn and Foursquare websites, among others.
10.6.11
A combinator library for the design of railway track layouts

How cool is this? Barney Stratford, Journal of Functional Programming, 21(3), May 2011.
In the design of railway track layouts, there are only a small number of geometric configurations that are used in practice, and a number of constraints as to how those configurations can be fitted together to create a whole layout. In order to solve these problems, we construct a Haskell combinator library. The library has been used for the design of real-world track layouts.
RSAnimate
The RSA has a series of videos cleverly animated from lectures. I would love to illustrate a lecture this way! Spotted by Maurice Naftalin.
27.4.11
Case analysis

A Latin saying, heard on Escape Pod:
It is well to remember that there are five reasons for drinking: The arrival of a friend; one's present or future thirst; the excellence of the wine; or any other reason.
The Grim Threat to British Universities

From the New York Review of Books:
The British universities, Oxford and Cambridge included, are under siege from a system of state control that is undermining the one thing upon which their worldwide reputation depends: the caliber of their scholarship. The theories and practices that are driving this assault are mostly American in origin, conceived in American business schools and management consulting firms. They are frequently embedded in intensive management systems that make use of information technology (IT) marketed by corporations such as IBM, Oracle, and SAP. They are then sold to clients such as the UK government and its bureaucracies, including the universities. This alliance between the public and private sector has become a threat to academic freedom in the UK, and a warning to the American academy about how its own freedoms can be threatened.
25.4.11
VS Naipaul’s Seven Rules for Beginners

Following yesterday's post on Alfred Kahn, here is advice from VS Naipaul, winner of the Nobel Prize for Literature in 2001.
VS Naipaul’s Rules for Beginners 1.
Do not write long sentences. A sentence should not have more than ten or twelve words.2.
Each sentence should make a clear statement. It should add to the statement that went before. A good paragraph is a series of clear, linked statements.3.
Do not use big words. If your computer tells you that your average word is more than five letters long, there is something wrong. The use of small words compels you to think about what you are writing. Even difficult ideas can be broken down into small words.4.
Never use words whose meaning you are not sure of. If you break this rule you should look for other work.5.
The beginner should avoid using adjectives, except those of colour, size and number. Use as few adverbs as possible.6.
Avoid the abstract. Always go for the concrete.7.
Every day, for six months at least, practice writing in this way. Small words; short, clear, concrete sentences. It may be awkward, but it’s training you in the use of language. It may even be getting rid of the bad language habits you picked up at the university. You may go beyond these rules after you have thoroughly understood and mastered them.
24.4.11
Alfred Kahn's memo
Though written long before the Internet age, the memo immediately went viral. It was published verbatim in The Washington Post, which also praised it in an accompanying editorial. It generated a marriage proposal from a Boston Globe columnist, who gushed: “Alfred Kahn, I love you. I know you’re in your late 50s and are married, but let’s run away together.” A Singapore newspaper suggested that Mr. Kahn be awarded a Nobel Prize. A Kansas City newspaper urged him to run for president. And, shortly after the memo’s appearance, he was appointed to the usage panel of the American Heritage Dictionary, a position he held until his death.
Here is the memo in full, spotted at here and here. Spotted via Boing Boing.
23.4.11
Terje Sorgjerd, The Aurora
The Aurora from Terje Sorgjerd on Vimeo.
I've never seen the northern lights, I hope I will one day.12.4.11
Sorting algorithms as folk dances
11.4.11
An Empirical Comparison of Seven Programming Languages
Another paper bewailing the lack of empiricism for computing generally is Experimental evaluation in computer science: A quantitative study by Walter F. Tichy, Paul Lukowicz, Lutz Prechelt and Ernst A. Heinz. (Yes, it's the same Prechelt.)
27.3.11
Surface Detail
Surface detail from subBlue on Vimeo.
Video of a 3D fractal by subBlue. Anyone know which fractal this is or how it is generated? Thanks to Mike Fourman.23.3.11
Why I am on strike

An open letter to my colleagues in the School of Informatics.
Colleagues,
Here are four people to think of when considering whether to join the
UCU strike to preserve our pensions on Thursday 24 March.
Yourself. The changes to pensions are estimated to remove £150K in
value over the lifetime of your pension (presuming the two-tier scheme
stays in place, see below). The most significant changes don't take
effect immediately, but bite over time:
- Capping cover for inflation. Full cover to 5%, half cover to 15%;
that is, a 10% increase when inflation is 15% or higher. Recall
inflation averaged 16% per year between 1974 and 1980: a cut of 6%
over six years compounds to a 31% reduction, lasting over the
remaining lifetime of the pension. - Altering the index of inflation from RPI to CPI. The former is
calculated with an arithmetic mean, the latter with a geometric
mean, which is always less. CPI runs about 0.7% lower than RPI;
a cut of 0.7% over twenty years compounds to a 13% reduction.
- Introduction of a two-tier system, with significantly lower
payouts to new hires (see next point, re: Jill). If this follows
the course of other two-tier schemes, the upper tier will be
eliminated in favour of the lower, and old hires will see their
pension slashed.
fund for forty years receive a pension of one-half their final salary;
new hires who do the same receive a pension of one-half their
*average* salary. Basing pensions on average rather than final salary
may be sensible, but to do so with no adjustment in multiplier makes
it appear that employers are using this as an excuse to slip in a
large cut. The changes are estimated to remove £450K in value over
the lifetime of a new hire's pension.
Bill, a student ten years from now. In the long run, our goal is to
keep our Universities strong for students and the country. On the
picket line last Thusday, I saw more students than lecturers.
Me. I saw lecturers cross the picket line on the grounds that they
had an appointment, and did not want to inconvenience the person they
were to meet. If you are one of them, perhaps your politeness would
extend to allowing me to retire with a decent pension.
Thank you for your consideration, -- P
Law of Proverbs
15.3.11
Why you should consider a post at NSF
4.3.11
Theory B questions at Stack Exchange

Stack Exchange is a website for asking and answering technical questions. One part of the web site is set aside for Theoretical Computer Science. It tends to be dominated by topics in "Theory A" (algorithms and complexity), but there is a small, intrepid group attempting to establish it as a venue for topics in "Theory B" (logic, semantics, and programming languages). To encourage further participation, they've assembled a list of some of the interesting questions they've handled. Have a look, and contribute some questions or answers of your own!
Life-critical wording

I try to impress upon my students the importance of clear expression. Today's news contains an example where choice of the right word may be life-critical.
The experts reworded phrases that people found confusing, and then retested them in several sittings, including one-to-one interviews.
Prof Raynor said "avoid alcoholic drinks" was a good example.
"Our user tests have shown that the word "avoid" can cause confusion and that some people think it only means they should limit their alcohol intake.
"This phrase will now be replaced by the instruction: 'do not drink alcohol while taking this medicine', which is far clearer."
Other recommendations include changing "do not take indigestion remedies at the same time of day as this medicine" to "do not take indigestion remedies two hours before or after you take this medicine".
Another phrase, "do not stop taking this medicine except on your doctor's advice", becomes "warning: Do not stop taking this medicine unless your doctor tells you to stop."
16.2.11
Scientific programming does not compute

An article in Nature explains why scientists need to pay more attention to basic principles of software engineering.
As a result, codes may be riddled with tiny errors that do not cause the program to break down, but may drastically change the scientific results that it spits out. One such error tripped up a structural-biology group led by Geoffrey Chang of the Scripps Research Institute in La Jolla, California. In 2006, the team realized that a computer program supplied by another lab had flipped a minus sign, which in turn reversed two columns of input data, causing protein crystal structures that the group had derived to be inverted. Chang says that the other lab provided the code with the best intentions, and "you just trust the code to do the right job". His group was forced to retract five papers published in Science, the Journal of Molecular Biology and Proceedings of the National Academy of Sciences, and now triple checks everything, he says.—Zeeya Mirali, Nature 467:775—777 (2010)Spotted by Shriram Krishnamurthi.
2.2.11
Causal commutative arrows and their optimization
Extends arrows with two widely used concepts, loop and init. Both concepts arise quite often. Proves a normalisation theorem that reduces any program to a single use of loop, and show that in practice this can yield a speedup of two orders of magnitude. Lovely result!
As the paper notes in passing, 'loop' is closely related to the concept of 'trace' from category theory. Phil Scott is currently visiting Edinburgh, and I'm hoping he, Jeff Eggers, and I might explore the relation betwixt 'trace' and 'loop'.
An compelling example of the value of 'loop' and 'init' is the definition of integral:
integral = loop (arr (\ (v,i) -> i + dt * v) >>> init 0 >>> arr (\ i -> (i,i)))
This definition is valid for a stream of events, where each event is separated uniformly by time dt. An intriguing question is how to define integral in a similar style when the time between events is not uniform? Or for continuous behaviours rather than discrete events?
Low floors, low ceilings, and Alice

Matthias Felleisen just introduced me to the phrase "low floor, low ceiling", which characterises precisely the worry about Kodu I expressed in my previous post: languages with a low overhead when getting started may offer low payback later.
As an example of this effect, he suggested the following critique of the innovative Alice programming environment: Through the Looking Glass: Teaching CS0 with Alice. (Thanks to Shriram Krishnamurthi for the precise reference.) I don't consider Alice in the same bowdlerized category as Kodu, so I was surprised to see that "low floor, low ceiling" might still apply.
Meanwhile, Matthias, Shriram, and others offer Teach Scheme/Reach Java as an alternative, offering a curriculum based on widely-used professional programming languages to high school and middle school children. (Addendum: Matthias and Shriram inform me that the TeachScheme website is out of date, and the preferred alternative is Program by Design.)

Pea vs. Papert; Kodu; Bootstrap
Logo, and following on from it Scratch, Alice, and Kodu, promotes an implicit claim that in the right environment children can learn programming almost by osmosis, and that absorbing this skill improves other skills, such as planning. These implicit claims were challenged twenty-five years ago by Roy D. Pea, who discovered that school children exposed to Logo could still be confused by recursion after writing recursive programs, and that learning Logo did not improve their planning ability. Here is an overall summary, here is a paper specifically on recursion, and here is Pea's reply to an attack by Papert.
I found the second paper (Children's mental models of recursive LOGO programs) particularly interesting, as it helps to understand some of the issues my first-year students may face in learning recursion. I'm woefully ignorant of the literature on the psychology of programming, and need to learn more. Thanks to Matthias Felleisen and Emmanuel Schanzer for pointing me at this work.
What sparked my interest was a keynote on Kodu at POPL, by Matthew MacLaurin of MSR. The laudable goal of Kodu is to permit young children to program video games, as MacLaurin put it, 'to let them know the computer can do anything'. And Kodu can achieve quite spectacular results with very simple programs, but the programming model needs to be very simple to achieve this (a list of condition-action pairs). Because Kodu is so special purpose, I worry that instead of teaching children that 'computer can do anything', it will teach them that 'computers will let you build exactly what they are designed to let you build, and anything else is very difficult'. Pea's studies are orthogonal to this concern, so I'm left wondering whether Kodu will lead to a new generation of programmers or a new generation turned off by computing.
Meanwhile, Schanzer is running Bootstrap, an outgrowth of TeachScheme. "Bootstrap is a standards-based curriculum for middle-school students, which teaches them to program their own videogames using purely algebraic and geometric concepts." The start-up costs are higher than Kodu, but once started students have the full power of Scheme/Racket at their command. Seems preferable to me, but there may well be room for both in the world. More study needed! Not to mention more resources for getting proper computing (not just ICT) into schools at an early age.
5.1.11
Happy 2011!

(Photo by Mike Levad, spotted on Boing Boing.)