Tuesday, March 15, 2016

How Bulls and Cows changed my life

In the 1970s, the Mathematics department at Rhodes University had some very talented staff.  Among these were Mike Lawrie, who later became acknowledged as the Father of the Internet in South Africa, and Doctor Pat Terry, who later became Professor, head of department and Dean of Science.  Both had an intense interest in computing and at some stage around about 1976 they decided to test the security of the University's  computer system by inviting computer science students to hack the system.

There were some simple rules and the simplest was that the only system you were allowed to hack was called MOO.  MOO was an early computer game that Pat and Mike had written in which you had to guess a four digit number.  As you typed in each guess, the system replied by telling you

  • how many digits were both correct and in the right position (a "Bull", signified by a B)
  • how many digits were correct but in the wrong position (a "Cow", signified by a C)
So you might type in a guess and get a response like this

    1234  BCC

In other words, your guess of "1234" had one digit correct and in the right place and two digits correct but in the wrong place.  By making further guesses you could logically deduce the number after a while.  In theory it should take about 5 guesses to get the right answer on average; in practice anyone whose average score was close to 6 was a good player.

The MOO system kept a log of each player's average score and each Friday Dr Terry pinned the league results to the board.

So, where does the hacking come in?

Well, for example, if you were smart enough, you could start a game and immediately make a copy of the computer's memory.  Once you finished the game and knew the answer you could check where that answer appeared in computer memory and in future games you could simply check that location to get the answer.  There were several other hacks that students came up with and, as each one was discovered, Dr Terry and Mike Lawrie found ways to stop them and, in so doing, learned a good deal about hacking.

I felt chagrined that I had not managed to hack in and, over the weeks that followed, this rankled.

Until, one day ...

... it seemed to me that instead of trying to break down the front door of MOO by a direct attack I might instead walk around the back and try an indirect approach.  I thought it might be possible to find the source code for the program.  Indeed, once I thought of the idea it only took a few minutes to get the source, but quite a bit longer to work out what it did:  building security into it had made  it very complicated.

Still within about an hour I had it sorted out and had set the league so I would appear at the top, way ahead of anyone else.

The league list went up the next day and there was a lot of speculation as to what I'd done.  I keep quiet and I heard later that Dr Terry and Mike Lawrie had spent most of the weekend trying to work out what I'd done. I was not popular with their wives.  I was also annoyed I hadn't done a better job of covering my tracks.

However ... I'm pretty sure that incident led them to ask me to write the computer dating system for the Arts and Sciences ball, part of the Arts and Sciences week the University held every year.

And that, in turn, came up at my job interview at IBM South Africa a couple of years later.  Since I had, at best, an undistinguished academic record I can think of no other reason that I would have been offered a job, particularly on their key account.

And that, in turn, led me to meet my delightful wife, Colleen.

So, kids, don't let your parents tell you that you are wasting time playing computer games.  A computer game found me my career and my wife.

No comments: