Talkin’ about my generation

My generation have all been wallowing in nostalgia at the Electronic Revolution strand on BBC4, in particular Electric Dreams – the 80’s and Micro Men – the story of Sinclair and Acorn computers. We grew up in a golden age for programming, the generation before us had no hardware and the generation after us had no need to write their own software. We programmed because we had to.

I had a Commodore VIC20, cheaper than the BBC Micro, more classy and substantial looking than the Sinclair ZX81, available slightly before the ZX Spectrum. All of these lovely old machines available for your viewing pleasure at Centre for Computing History, along with many others. Look around the internet and you can also find all manner of emulators and manuals for these early machines. We wrote our own programs, or we typed in games from magazines – this was often a rather lengthy process and a bit prone to error.

I found the “VIC20 Programmers Reference Guide” here re-typed by Asbjorn Djupdal. Here’s snippet: a program which allows you to enter the scores in each quarter for an American football game and then prints them out on screen in a table:

100 DIM S(1,5), T$(1)
110 INPUT “TEAM NAMES”;T$(0),T$(1)
120 FOR Q = 1 TO 5
130 FOR T = 0 TO 1
140 PRINT T$(T),”SCORE IN QUARTER” Q
150 INPUT S(T,Q)
160 S(T,Q) = S(T,0) + S(T,Q)
170 NEXT T,Q
180 PRINT CHR$(147) “SCOREBOARD”
190 PRINT “QUARTER”;
200 FOR Q = 1 TO 5
210 PRINT TAB(Q*2 + 9)Q;
220 NEXT
230 PRINT TAB(15)”TOTAL”
240 FOR T = 0 TO 1
250 PRINT T$(T)
260 FOR Q = 1 TO 5
270 PRINT TAB(Q*2 + 9) S(T,Q);
280 NEXT
290 PRINT TAB(15) S(T,0)
300 NEXT

Oh, this brings back memories!

To me programming and science (or at least physics) are intimately linked, almost the first programming I ever did was to visualise beat frequencies. To this day, if I want to really understand a scientific paper I’ll implement the equations in a program, as often as not a few typos in the equations are revealed in this way and I’ll have learnt exactly what the paper was on about. Teaching a student is a fantastic why to learn something, teaching a computer is almost as good.

Most the programming I do is of a workmanlike nature, it drives machines for measurements; it processes data; it analyses results; it computes equations, but there is scope in programming for a deep elegance, a pared down beauty which is difficult to describe – it’s like finding the answer to a cryptic crossword clue – perhaps for an artist it’s like finding just the right line to give a character personality. It’s an algorithm that does what it has to do with the least effort required. I still program a lot for my work (relatively small stuff that only I will use), and it’s not unknown for me to waste an hour doing something elegantly rather use the quick, dirty and obvious approach.

Programming is in my genes, in two ways really – my parents were both programmers from the sixties. We once found a leaflet advertising the Elliot 503 in our loft, 400sq ft of ’60s computer with substantially less processor power than the most lowly of today’s devices – this is the computer on which my mum learnt to program. Dad started on an early Ferranti of some description in the late 50’s.

Earlier programming for me pretty much amounted to shouting verbs at things, possibly because I used FORTRAN which at the time was ALL IN CAPITALS. Programming today feels very different, it’s more like visiting a library to get a book of spells to cast or the singing of a choir. I still enjoy doing it, in fact I’m writing a twitter client in C# just so see how to do it.

You might get the impression from all of this that programming is for the mathematically minded, but it isn’t – it’s really for the logically minded, for some mathematical applications maths is required but otherwise it isn’t.

I taught the basics of programming to first year physics students a few years ago, and the thing that really shocked me was that, out of a class of fifty, only one had any real programming experience. There is hope though, I suspect programming still holds a fascination – my single data point: father and son sitting down to program the BBC Micro on Electric Dreams.

Wordless Wednesday

Twitter, rumours and physics

The twittersphere avoided making a bit of a mistake this morning. Wikileaks had obtained a new version of the BNP membership list, which they released (the BNP claim this list is a fake). Prior to release it was claimed that a peer of the realm was on the list and immediately post release that peer was named. Only it turns out it wasn’t him, someone who styled himself Lord with a very similar name was the man on the list. Fortunately the released list was detailed enough that this could be checked, someone had the wit to check before blindly repeating the name. Once they’d done this they started correcting the false rumour (in what looks like quite a vigorous manual effort). It’s worth noting here that the fact-checker appears to be a trained journalist.

But it could so easily have been very different. It could have been very difficult to establish the rumour was false, it could have been that the diligent fact checker stopped to finish his cup of tea before tweeting his correction, the rumour could have been re-tweeted by someone with many followers. All of these things could have happened but didn’t, will this be true the next time?

On the plus side, twitter rumours do appear to be traceable back to source and it’s very easy to find the individual rumour-mongers and put them right. This is certainly true for non-malicious rumourmongering (that’s to say where people have not made a special effort to propagate a rumour, nor hide their tracks).

There is a scientific link here, modelling of all sorts of networks has long been a respectable scientific field. For example, there’s Per Bak’s forest fire model and work that follows on from there. More recently there’s been work focussing more explicitly on computer networks and social networks. To a physicist Twitter represents an example of a simple system which has nodes (with ingoing and outgoing links) and messages that are propagated between the nodes. The nodes could be trees in a forest and the thing passed could be fire, or the nodes could be computers in a network with the message being network traffic; the nodes could be scientific papers with the messages citations of other papers. The physics doesn’t care about the detail of these things, it cares about a small number of parameters in the system: how many links in and out of a node? What’s the probability of a message being transmitted from one node to the next?

So there’s an interesting bit of network analysis to do here. How fast can a rumour propagate on Twitter? What fraction of people refrain from tweeting a false rumour to stop it propagating? What’s the best way to squash a false rumour?

Having watched the no doubt frenzied activities involved in squashing today’s rumour. One useful tool would be an automated rumour-quashing robot. It would search for tweets containing the rumour (probably based on a manually selected keyword) and tweet the originator with a rebuttal.

Think before you tweet!

Confessions of a Twitter addict

Twitter is my new addiction, twitter is an elephant described by a group of blind men.

Instructions for using twitter:
1. Sign up here: www.twitter.com (It’s worth selecting a short username)
2. Follow @stephenfry
3. Start twittering like a monkey

After a while things might start to become clearer.

Twitter all depends on who you follow; I started off following a bunch of people around Ben Goldacre (@bengoldacre) (who writes the Bad Science column in the Guardian), so naturally I ended up with a load of skeptics and science journalists. I therefore assumed that twitter predominantly contained skeptics and science journalists. But that’s not true, twitter contains many groups and subgroups and they’re invisible unless you go looking for them (or more precisely, follow them).   So finding people to follow is key, if you’re not following anybody, twitter will be awfully quiet. It’s also worth remembering that by default everyone can see everything you write.

Here are a few strategies for finding people worth following:

1. Keep an ear out for the rich and famous announcing their twittery-ness – don’t expect them to say anything back to you but it does give you something to read. @Stephenfry has something like 750,000 followers, if he points to a website and says “Look at this”, a large fraction of his followers simultaneous click the link….and the website falls over. @Stephenfry then tweets “Oh bugger”.

2. Follow a hashtag and follow people you find there. You do this by searching for something like #xfactor or #electricdreams – if you follow the hashtag for a TV program whilst it’s on then you get live commentary, which may be a good or bad thing. I was introduced to this with the debate between Lord Drayson(@lorddrayson), science and technology minister, and Ben Goldacre on science journalism (#scidebate). Twitterfall is rather good for tracking a hashtag, it automatically updates a search in real-time – new results fall from the top of the screen.

3. I searched for scientists under “Find People”, birds of a feather flock together. David Bradley (@sciencebase) is compiling a list of scientist-twitterers to which you can add yourself.

4. Once you’ve found a few people, have a look to see who they’re following and who is following them, services such as twubble or MrTweet will help you do this.

5. Try out a directory service like wefollow.

So what are they up to once you follow them?

Chatterers – some people are pretty conversational.
Linkers – some people just drop loads of links, sometimes this is automated, other times it’s just what people do.
Pimpers – famous people pimp their newspaper columns and TV progs, the riff-raff like you and I pimp our blog posts. So overwhelming is this meme that I felt obliged to kick the old blog into action, in order that I would have something to pimp!
Proclaimers – some people are proclaimers, they produce a long stream of one liners. Some of them do it in the style of a historical character:

@KingAlfredRex Pærværted Skunke Signor Bærlusconi bemoanes hys Posytion as Moste Vyrtuous Manne yn Alle Ytalie… through noyse of Bangyng Head-Board.

Robots – some people aren’t people, they’re robots. Try a tweet with tea, oblong or wasp in it (prize for making any sense). I suspect a Monty Python fan wrote the @stoningbot. I’m scared to try putting two robots into a loop…
Britney and her sausage – the less said about this one the better, suffice to say if said lady starts following you best block her.

I must admit before I tried twitter I thought the 140 character limit was ridiculous (particularly since most people are not posting over SMS – which is where the limit originates). However, having used it for a bit – it’s actually really neat. How many people can bore you in 140 characters? And fitting a thought into 140 characters is an interesting exercise. Some people do seem to be able to start an argument in 140 characters (but very few) – my twitter is very civilised.

The strengths of twitter are it’s flexibility and simplicity; communities can coalesce around a hash tag or an individual very rapidly. Applications can coalesce around it’s simple messaging and following system. If you don’t like how your twitters looking, treat it like a big soft pillow – push it around until it’s comfortable.

Basic twitter functions

There are five routes to seeing tweets on your twitter homepage:
1. Home – shows the tweets of those you are following
2. @[username] – shows tweets mentioning your username (Mentions)
3. Direct messages – shows direct messages (only you can see these)
4. Favourites – shows favourites tweets
5. Search – search for tweets containing a word or phrase

When you are posting a tweet:
@[username] directs a public message at someone. They’ll see it as a mention, along with anyone following both of you. (Not realising this in the early days caused me some embarassment). If you put a character before the @ i.e. _@[name] then all your followers can see the tweet.

d @[username] sends a private message to someone (but doesn’t work if they’re not following you).

#[label] is a hashtag. Clicking on a hashtag will bring up a list of all the tweets containing the hashtag

If you like a tweet, you can retweet it, RT @[username] is the usual form for doing this although it’s just convention and doesn’t fire up any special behaviour.

With only 140 characters to play with you’re not going to want to post full length links bit.ly and other similar services squash your links down to minimum size (and allow you to compose your tweet at the same time).

If you want to break the 140 character limit then you can use twerbose, although I suspect this violates the spirit of twitter.

There are loads of twitter clients around I use hootsuite  it’s a web-based service and supports tabs so you can collect twitters and searches related to one area on one tab. To be honest, the twitter homepage does a pretty good job. If you’re interested in getting more stats on your followers then tweepular is okay.

For the data visualisation fans here’s a list of twitter visualisations, and trendsmap is fun too.

Wordless Wednesday