Friday, June 29, 2012

Prince to Frog and back

I've never managed to disagree with Richard Dawkins before, so this is a big moment for me. He must be getting old. In his latest book: 'The Magic of Reality' he asserts that it's impossible to turn a prince into a frog.

Easy:

Put a prince into a sealed glass box. Add lots of water and boil. Leave to cool. Introduce plant seeds and open the box to the air. Leave it until you have a nice pond.  Introduce frogs (mating pair). Wait. Soon you will have many frogs, and they will be made mostly of prince.

The reverse transformation is harder because of the conservation of mass, but you can turn a lot of frogs into one prince, and it's actually easier. Sometimes you'll get princesses too.

I'm not sure that we'd learn much from the experiment though, so I imagine it might not get past the ethics committee. We'd have to do it as some sort of reality TV show. It's been a while since Dawkins did the Royal Society Christmas Lectures.

Thursday, June 28, 2012

Different Minds VIII (Surprise!)


So I've mentioned my new theory about different sorts of minds and how that explains how different people find that different things interfere with their ability to think.

And a lot of people seem to think it's plausible, and some people say that they think mainly in images, and some people seem to think that they think mainly in words.

And it appears that I myself do mathematical thinking in pictures, never in symbols (which is the opposite of how most mathmos work), but computer thinking in symbols, rarely in pictures (I often draw data-flow diagrams, or diagrams of data structures, or state machines or graphs on paper, but I can't do that sort of thinking without a piece of paper, because my working memory isn't good enough/large enough to hold the picture).

But the real shocker came when my friend Neil said "So you have a sort of inner narrator talking to you all the time?", and I said yes.

And Neil was quite surprised by this, because apparently he thinks entirely in pictures, and although he knows what the 'talking to yourself internally' voice sounds like he doesn't use it often.

And a bit later I was talking to my friend Gytha, who is a playwright, and she says that she doesn't have an inner voice either. She works out her plays in pictures, and she doesn't like the laborious process of turning them into words. She thinks that I'm the weird one, and she claims that that explains why I'm so articulate (because I'm always practising).

I hadn't realised that I was particularly articulate. But when a playwright who lives in Cambridge tells you that you are the second most articulate person that she knows, then you have to take that as evidence in favour, and come to think of it most other people seem to have trouble with easy things like 'giving speeches about something you care about with five minutes notice', which I've done a few times and which seems mainly to involve 'working out what you want to communicate and then just doing it'.

So am I the weird one? How often do you hear your inner voice? Does it speak in your native language, or is it speaking something else that needs translated into words?

And isn't it odd that we live in a world where other people have completely alien thought processes and yet we rarely notice.

If someone had written a science fiction story about an alien race that thought by forming and transforming pictures, I would have found it entertainingly weird, and probably dismissed it as an unlikely way of building a mind. But it appears that there are quite a lot of people whose brains work in just that way. And they think that the thing which to me is 'experience of being', is an alien concept.

There really are philosophical zombies. And I'm one of them.

Brainsss.....

Wednesday, June 27, 2012

Different Minds VII (A Theory)

By this time, I'd come up with the following theory of what was going on:

There are often several ways of thinking about the same thing. Some involve making and manipulating visual images. Some involve language.

When you're trying to think about something, you are actually using the bits of your brain whose real purpose is talking, or listening, or seeing (and reacting to the things you see).

If there's something going on nearby, it can activate one of these systems. For instance, if you see something flashing or moving that causes an alarm, that will refocus your visual system (all of it, including the brain part) to the suddenly interesting object. There's nothing you can do about this. An ancestor who was able to ignore things making sudden movements near him would one day ignore a snake. So he wouldn't be an ancestor of yours.

Similarly you can get alerts from your audio systems. Consider the famous cocktail-party effect, where you can be in a room with twenty conversations going on, and somebody in one of the conversations says your name, and suddenly you can hear that conversation above all the others.

What that means is that your audio system must be processing all the conversations, listening for interesting words, but not bringing them to conscious attention unless it detects something significant.

So even sounds that you don't realize are there are using bits of your brain.

So people thinking audio or language-type thoughts should do it much better in the quiet, and people thinking visual-type thoughts should do it better in the dark.

But worse than that, if you're thinking a visual thought and some sort of alert goes off (like seeing a movement, or something flashing, or a pattern being broken), then your entire visual system should be suddenly repurposed to assess the threat and YOU LOSE THE WHOLE THOUGHT.

And similarly for me, when I'm thinking about something, or reading, and some miserable bastard puts on the radiogramophone, that's it. Every so often something interesting (to my audio threat detection system) happens in the music, and my audio system focuses on it, and my stack of thoughts comes down and I have to build it up again. And once this has happened a few times, I am furiously angry and becoming averse to the very process of thinking.

Now this is kind of a weird theory, because it says that the programmers who don't notice ambient noise (and I would imagine this is all the programmers at github, because anyone like me would have managed to stand it for precisely one afternoon before walking out and never ever going back under any circumstances), are mainly thinking visual thoughts when doing their job.

Whereas the programmers like me (and I know a few examples), who don't notice the visual distractions must be thinking mostly language-type thoughts.

And this means that we are doing the same job in completely different ways. Which is kind of odd, if you think about it.

And there should be some people who can use either or both systems. I would imagine that those guys should be able to tolerate noise or visual distraction better than either Chris or I can, because they'll have alternative systems they can use, so they won't get completely stuck, but I would also imagine that they'd be much better at their jobs in a quiet and uncluttered environment where they can use both systems freely.

And if you are one of the people who uses only one system, then if you're able to learn to use the other one, you should become much better at what you do.


If you've got a theory, it should make predictions:

1/ An MRI scan of a man with music playing in the background should show audio activity

2/ There should be more activity if it's music with words.

3/ And even more if the words are in a language that the subject understands.

4/ Similarly for the visual stimuli, although you'd need to use an innocuous method of providing visual stimulation, and I can't think of any. Background music is ubiquitous and can usually be ignored. There isn't really such a thing as background television.

5/ Brain scans of people programming should show activity in visual areas if they identify as undisturbed by office noise.

6/ But should show activity in language-processing areas if they are disturbed by noise.

7/ Some people will show both or either. They should find that audio and visual noise reduce their productivity but do not disable them.

8/ People who are not disturbed by noise can become more effective thinkers by learning to think using the language parts of their brains as well.

9/ People who do not notice visual noise should learn to think visually.

10/ The best programmers will be driven up the wall by either.

Daniel Dennett says in 'Consciousness Explained', that he thinks that the inner dialogue starts when you use the bit of your brain which speaks to put thoughts into your own head via the bit of your brain that listens. Similarly he says that you can start off by drawing pictures to yourself and end up 'cutting out the middleman' and doing the same process entirely inside your head. Let's calls this sort of thing a feedback loop.

Further predictions:


11/ There will be other modes of thought I haven't thought of, wherever there's a feedback loop to be exploited. Maybe some people think using touch? or emotion? Perhaps that's why some people seem to be 'naturally good at sport' or 'emotionally literate'.

12/ Maybe these feedback loops can be trained too?

Tuesday, June 26, 2012

Different Minds VI (Clues)


A big clue came when one of my colleagues (another Chris), whom I know to be an exceptionally competent and intelligent man, said that although he literally hadn't noticed the noise, he also hated the overcrowded office because he was constantly distracted by people moving around in his peripheral vision.

I wondered why on earth that would be a problem. And he said that any visual distraction made it difficult to think. He looked at my computer screen and said "For instance, I couldn't get anything done with that messy arrangement of windows".

It hadn't occurred to me that my desktop was messy. I'd just opened various programs and moved the windows so that I could see them all.

So I asked him if he was disturbed by pictures hanging at odd angles, and he said that he couldn't think at all in a room where there was an odd hanging picture. WTF? I mean, if I noticed that a picture was at an angle, I'd fix it next time I was near the picture, but I'd be quite unlikely to notice unless it was about 20 degrees out, and even then I'd probably go through several cycles of forgetting about it and re-noticing before I got round to it.

Whereas to Chris, this was as annoying as music is to me. You can't think near it. It uses the bit of your brain that you want to use when you think.

At this point, I remembered an article I'd once read by Richard Feynman, describing how he'd taught himself to count time. With a bit of practice, he'd found that he could count at a nice even pace, and so could make accurate timings of things. But he'd noticed that there were some things he couldn't time like this, because he couldn't count while doing them.

So being Feynman, he made a list of all the things he could do, and all the things he couldn't do, and then he got colleagues to learn how to count evenly, and then got them to make lists of the things they could and couldn't do.

And to his amazement, the lists were not at all the same.

To cut a long story short, it turned out that some people were counting by saying the numbers to themselves, and some people were counting by looking at an imaginary clock and imagining it move. And that meant that different activities disrupted the process.

So I asked Chris what else he found interfering with his programming. And the list of things freaked me out completely.

One of them was the way the code was formatted.

Programming uses a lot of punctuation. For instance a piece of code might be formatted :

for(i=0;i<10;i++){do(thing)};

The punctuation lets the computer know where various bits of the program start and end. If you're talking to a human you might say 'Go and buy me 20 cigarettes and a mars bar', and it's obvious what that means, but computers are not terribly bright, and have trouble breaking the sentence up into its logical bits, so to help it 'parse' the sentence you have to say something like

Go; //and
Buy (me) { 
   20 * cigarettes ; 
   1 * mars bar ;
}
Come back;

This could be a real piece of code (meaning to do a thing 10 times):

for(i=0;i<10;i++){do(thing);}

But it's a bit dense for human eyes, so we tend to put extra spaces in to make it look better:

for( i = 0 ; i < 10 ; i++ ) {
     do ( thing ) ;
}

They don't change the meaning, they just make it nicer to look at.

And programmers fight holy wars over where to put the damned spaces.

Here's another popular style:

for( i=0; i<10; i++ ) {
      do( thing ); }

A lot of people seem to thing that this is terribly important. Most companies have a complicated document specifying exactly what the 'house style' is.

I have honestly never cared in the slightest. Even though I've never used the term 'special snowflake' about the people who do, it accurately sums up my attitude to anyone who'd get involved in an argument about where to put the damned spaces. If anyone tells me I'm doing it wrong, I usually let them reformat my code so that it suits them. I usually can't tell that they've done it afterwards, but it makes them happier, so what-ever...

But I've seen people get so angry about the issue that I thought they'd fight. And I've never known why.

The funny thing is, even though Chris could tell me exactly which bits of our codebase were well formatted and which weren't (In the same way that I can tell you which Cambridge pubs and cafes play music, which play music with words in it, and which tend to be quiet places suitable for thinking in), he didn't think that my stuff was badly formatted. So obviously even though I don't notice it, when I'm writing code, I have a consistent style I stick to. Except that I couldn't tell you what that style is. And I don't care about it.

Different Minds V (Asking around)


I thought I'd better check my assumption that people talking stops you programming.

Web searching produces contradictory results. Everyone agrees that it's a very complex task that needs lots of concentration.

Noisy crowded offices feature in several lists of 'top ten classic software mistakes'.

Tom DeMarco, a famous software productivity guru makes quiet and privacy the unconditional top recommendations in his famous book 'Peopleware', about how to manage software development. And has done experiments to back his advice up, which come to the conclusion that what is obvious (to me) is also true. You can't program well when people around you are talking.

A lot of programmers work very anti-social hours so that they can get things done when no-one else is around. (At the shop I'm talking about so many of the programmers were doing this that it actually got quite noisy and distracting in the evening. I tried coming in very early in the morning or at weekends to avoid the other avoiders. Anyone who knows me will tell you that I am not a mornings person, and I had to abandon this strategy because it was leaving me permanently exhausted).

Many people wear earplugs or earphones to work.

But some of those people are using their earphones to listen to loud music.

Those people are doing it to block out the ambient noise, and some of them say that it only works with instrumental music (no words), but some of them say that as long as they listen to songs they know well, it's not distracting.

And some programmers don't believe that there's a problem at all. They think that the people complaining about the noise are 'special snowflakes', or that they're trying to get offices for reasons of status. I wouldn't have been at all surprised by management types or HR people thinking this, but these are actual programmers saying this. Most programmers don't care about status. If they cared or noticed that sort of thing they'd stop wearing black T-shirts with the names of children's musicians on them covered in pizza stains. The ones that care about status signalling tend to become management.

One very successful and innovative shop I read about (Github) is actually proud to boast that they have rock music playing loud in their office. I could not have been more surprised if you had told me that they paid people to go around slapping their programmers with wet fish and stealing their computers.

So I asked the other people where I was working. After all we were all in the same environment.

And results were weird. Some people hated it like I did.

Some people found it just as distracting as me, but didn't care. They were getting paid whatever, it's only a job, isn't it like this everywhere?

Some people pointed me to sources of industrial strength ear-defenders.

Some people said what on earth is your problem? Can't you just shut out the noise?

And some people just didn't think it was that noisy.

I was reminded of a situation years ago where a colleague of mine was constantly complaining about the air-conditioning.

Apparently the air conditioning where we were working would randomly switch on and off every five minutes.

I tried to sympathise, but I hadn't the heart to tell him that I hadn't noticed that we had air conditioning before he'd started talking about it, and that even now I had to make an effort to tell whether it was on or not, and that I'd never noticed it switch on or off. Nobody else understood why it was a problem either. Chris found it absolutely infuriating and complained constantly. He eventually left over the issue. This was a sad thing because he was one of our better talents and we missed him badly.

Noise sensitivity is apparently a common symptom of Asperger's Syndrome, common amongst engineers and mathematicians. I wondered if that might be my problem.

I have some friends who are involved in autism research, and I asked them whether they thought I might have the syndrome. They were unanimous that there wasn't a chance. (Although one said "No, you're weird, but in a completely different way. Nothing like Asperger's.", which wasn't super-reassuring.)

Just to check that they weren't being nice to me, I did a couple of online tests, both of which said that I'm slightly less Asperger's than average. (Apparently that means that it's schizophrenia I should be worrying about. Sigh...)

Different Minds IV (Meta Open Plan Disaster)


So, I am sitting in an office where I am being very well paid despite being completely unproductive.

And it occurs to me that something is very wrong here. Once upon a time, engineers got offices to themselves, as is normal for lawyers and academics and other people who need to be able to think complex thoughts.

And yet somehow, over the last twenty years or so, open plan offices have become more and more popular amongst companies that do software for a living.

I can think of two obvious reasons why that could happen:

The first is cost. Obviously open-plan is a bit cheaper. But that's just ridiculous. Say that you rented a house in Cambridge for £1000/month. That would easily get you five large offices plus facilities, so we can put an upper bound on office cost of £200/person/month.

How much of that can you save by going open plan? Being generous, say half of it. Call it 160 hours, so you're saving ~ 50p / hour by having an open plan environment.

I'd guess that the average cost of engineering staff is a couple of orders of magnitude higher than that.

You wouldn't even notice a productivity change of 1%.  By my own estimates, my productivity has been completely shredded by having people talking while I'm trying to think. Even if I'm wrong and I'm only down to working at half speed, cost can't even be an issue.

The second reason would be communication, which is extraordinarily important amongst a programming team (that's why outsourcing never works). But programmers talk much less in open-plan environments than they do normally, because they're conscious of disturbing other people. In every computer shop I've ever worked in, the interesting complicated conversations go on in the kitchen or in meeting rooms, where people can bounce ideas off each other without annoying everyone else.

In the particular shop I'm talking about, it was hard to have meetings in the kitchen because everyone was having meetings there, and what with people making tea and such, it was sometimes hard even to get in!

So I don't think it can be communication either. There definitely are communication problems in the traditional layout, but they're easy to solve by having common rooms with water-coolers and tea making facilities and whiteboards and sofas.

So the only reason I could think of why open plan has caught on is that the people making the decisions aren't programmers.

They actually don't realise that with their big open friendly spaces (and don't get me wrong, I'd much rather sit in a cafe that was all one room than in one divided into separate private rooms) they're completely screwing the productivity of their company.

But then I'm not sure that that explanation can work either. Because isn't the market supposed to sort that sort of thing out? Wouldn't a programming shop that did something that weird and horrific just go out of business, out-competed by its wiser siblings?

Apparently that hasn't happened either.

So I've run out of candidate explanations.

I notice that I am confused.

Different Minds III (Open plan disaster)


So the reason I am thinking so much about what it is like to be me these days is that I suspect that what it is like to be me is not what it is like to be some other persons I could mention.

And this all starts when I am working for a very nice bunch of guys who have an open plan office.

And when we are doing the initial dance, I have noticed that they have an open plan office, and I say "I hate and fear open plan offices, because I can get very little work done, and it is no fun, and I get angry and guilty and begin to hate life itself and then I resign."

But they are all: "Do not worry, it is as quiet as the grave in here, and we have lots of space for very few people, and we are very aware of the problem of noise for engineers, and we will make sure that it stays quiet. And anyway we are going to take over another floor of the building soon and then we will all be lost like dust specks in the vastness of intergalactic space."

And you cannot say fairer than that, so I take the job. Although being of a suspicious cast of mind I make sure that the contract specifies one hour's notice on either side and no hard feelings.

And indeed everything is very nice for a while.

But this company is being funded by the sort of venture capitalists who have more money than sense, and there are always new projects to start, and always new money to hire with, and the new-floor-taking-over does not go so well, and six months later we are crammed in so close that even though everyone is making an effort not to disturb anyone else, there is always someone nearby talking, and so I can't think any more.

Because computer programming is very hard. You need to remember so many things at once that it is not true. A lot of what is called 'software engineering' is in fact clever techniques for making the complexity go away by establishing standard patterns that are easier to remember. But of course once you have those techniques, you can hold more complexity in your head at once, so you do. The point is not only to use the new tools to do the old things more easily. The point is to do better things with the new tools.

The day to day experience of my job is like trying to remember very long telephone numbers whilst doing crosswords and playing chess.

I am not moaning. This is my favourite thing to do. I like it when my brain is working. But I cannot do it when other people are talking. Because they are using the bits of my brain that I need to use to talk to myself with!

Different Minds II (What it is like to be me)


Everyone generalizes from one example. At least, I do....
For me, consciousness comes with a narrator. It's a bit like watching a film with a voiceover. There's a visual field, which goes all around even though I only see a broadish oval cone of it at once, that's full of colour and movement, and there are sounds, which are usually associated with a specific direction or thing or with one of the people I can see. Sometimes there are other human voices, which are streams of words which often have associated with them feelings like "probably to the left" or "middle-aged middle class male". Or both. Other times there are foreign voices, which have the associated labels, but sound like babble.  With French, which I sort of speak, the streams of babble have occasional words in. If I concentrate on the French, then I hear babble with odd words in, and slightly later, some of the other words resolve, and meaning fragments and partial English translations come available (as separate things)


This bit is very like a film. It's more like a 3d colour multilingual film with very good surround sound and alas no subtitles, than a black and white silent, but it's very clearly the experience that cinema films are tending towards.


Which is odd, when you think about it. Because that's nothing like what the incoming information looks like, as countless eyeball-tracking and speech analysis experiments have shown.

But there's also a continuous narration that is a stream of words that are not in the outside, a "stream of consciousness". At the moment it's saying these words, very slowly as I type them. But if I stop typing then it carries on talking, thinking out the next sentence. I (the conscious perceiver) don't produce the words! I just listen to them.

If I like, I can direct the stream to the screen of my netbook. I can still hear the words, but they slow down a lot, and my fingers move in patterns I can't really perceive (just a flurry of movement, like watching a cloud of midges), and the words appear on the netbook screen.

Apart from the initial decision to start typing, this is nothing to do with me at all. I just watch the words appear. Sometimes I notice that one of the words is misspelled, or that I don't agree with what I've just written, so I backspace and do it again, hoping for a better result.

Sometimes I feel a sense of completeness, and at the same time I feel the little finger of my right hand stretch out to end the paragraph.

The narrator is always talking, whatever I'm doing.

I can stop the narration. If I do, then I become super-sensitive to the colors and sounds around me. But the state isn't stable. Even if there's no-one talking near me. I just tried it for a minute or so, and I watched a man walk past and noticed the articulation of all his joints as he walked, and heard the sound of his footsteps, and thought no words. But then there was a slight scraping noise off to the right hand side, (I am sitting in the blessedly silent Eagle), and I heard my voice say "the sound of a barrel". And then I started thinking again.

And if I somehow managed to hold the silent state stable, in an important sense "I" wouldn't be present any more. Nothing I'd call "thinking" would be going on. I'd just be sitting there waiting for alerts from various systems that monitor the world for sound and movement.

Of course I know that this can't be the truth. Sometimes I think about something (yesterday's mole problem is an example) for a while, can't think of the answer, forget about it for a bit, and then have a method of solution pop into my head by magic the following day (and it still took me an hour and a half to actually draw the diagram, even when I could already see how it was all going to pan out).

So a lot of the thinking must be unconscious, and I must have monitors set to alert me when some sub-process has found an important result. And presumably that doesn't stop when the narrator stops.

In fact, maybe the subprocesses can only work when the narrator releases the resources that it's using to narrate?

I wonder if it's possible to solve a problem by just sitting there deliberately not thinking and wait for the 'answer alert' to go off?

Different Minds I


All children wonder: "Is the red that my friend sees the same as the red I see?". "How would we ever know if he saw green where I see red and red where I see green?"

Partially this question is answered by colourblindness. If you see red and green as the same colour, then your experience of the world can't be anything like mine!

So I think we know that it doesn't necessarily 'feel the same' to different people to be human. And the Lord alone knows what it is like to be a pigeon, with four-colour vision, or a bat who sees with sonar.

I always thought that the biggest differences between human experiences would be between men and women. I notice that at least as far as anything to do with sex goes, women act completely differently from men, and I find it very hard to imagine what it would be like to be motivated in such a way that I would produce the observed behaviour.

But I can at least imagine what it might be like to be a woman. I don't know if my thoughts are anywhere near the truth, but at least I can think them.

Talking to various people over the last couple of months, I've begun to suspect that the differences between the experience of being between me and some of my closest friends are very much greater than the male/female differences.

Some of my friends claim that they don't have anything like what I'd call thoughts at all. And I really cannot imagine what that might be like.

The Angels' Share (Film)

After an hour or so of the usual, the repellent Glaswegian scum put on kilts and the film becomes the closest Ken Loach is going to get to a remake of Brigadoon.

It's coming to the end of its run and there were only ten people in the cinema. We nevertheless gave it a round of applause at the end. Go and see this marvel while it lasts.

Monday, June 25, 2012

The Hunger Games / Catching Fire / Mockingjay

I have no idea why I read these. I knew before I picked them up that they were 'young adult' fiction (which I take to mean no complexity, no sex and the predictable triumph of the obvious hero), and they are, but the pretty yellow bird on the black book made me curious.

And the first chapter led me on to the second. And so on. All the way through I was thinking 'Why are you reading these?', and yet I kept going and buying the next one.

They're really not bad, if you like that sort of thing. I have a strong desire to buy a mockingjay pin and fix it to my favourite tweed jacket. I am resisting that desire as hard as I can.

I imagine idealistic teens will love these books. If you have an idealistic teen then I have a complete set of three in their original beautiful covers. Free to a good home.

Consciousness Explained (Daniel Dennett)

This glorious book is often referred to as 'Consciousness Denied'. Dennett takes a good look at the 'hard problem of consciousness' (What is the ghost in the machine?), and confronts it straight on.

The book is full of superb arguments and thought provoking examples and experiments, and throughout I kept wondering if I'd cease to exist mid-chapter.

In the course of the week it took to read this book, my entire view of what I am and how I work has turned upside down.

But still. Cogito ergo sum. I still buy that. I get the impression that Dennett does too.

This book is a mighty stride towards working out what it is that might be under the illusion of existing. But I'm still confused.

In fact I'm more confused. This is a very good thing and I cannot recommend this book too highly!

Thinking Fast and Slow (Daniel Kahneman)



This book is absolutely life-changing. Kahneman and Tversky started the 'heuristics and biases' movement in psychology. Now he's written a popular account of the last twenty years of the research. I already knew about a lot of the stuff in here, but after reading this I feel very differently about it all. He has Feynman and Dawkins' gift of making the subject matter look obvious and the reader feel like a genius. The mark of the true master.

Mole Trouble


This from my friend Matt's eleven year old son Alex. The little sod solved it in his head. It took me an hour and a half, two pieces of paper and two pens:

You got a garden.

There is a mole.

It has dug five molehills in your lawn, in a line connected by a tunnel.

The mole is under one.

----

You hit a hole with your hammer.

If the mole is under the hole, it dies.

If it is not, it moves either left or right.

And repeat.

-----

Example

Call the hills 1 2 3 4 and 5.

The mole is under hill 2. You hit 3. It moves to 1. You hit 4. It moves to 2. You hit 1. It moves to 1 ......etc.

------

Can you kill the mole? How many whacks?

Followers