Thursday 30 December 2010

Seven Languages in Seven, er, Months

A week or so before Christmas, an intriguing book popped up on my recommended list at Amazon. This was Bruce Tate's Seven (Computer) Languages in Seven Weeks (ISBN 193435659X). The idea behind the book is to teach certain programming concepts through the medium of the languages that embody them the best. Object orientation and dynamic typing are taught using Ruby, a language in which Tate does most of his work; prototyping, which I'm not very familiar with, is demonstrated through Io, a language I'd never even heard of before; functional programming is through Haskell; concurrency (using actors not threads!?!) through Erlang, and so on. There is also a chapter on Scala, which I've had some experience of, so I'm intrigued to see what he has to say about that.

Saturday 18 December 2010

New Sodastream Flavour

I was shopping the other week in Maplin when I spotted some new Sodastream flavours.

The first is American Cream Soda. Not bad, but with a slight soda water after taste. Definitely recommended, though, and very much as I remember.

The second is Dandelion & Durdock. Fantastic!!! Not as good as a Fentimans, but on a par with the better own brands.

Monday 6 December 2010

And The Turner Prize winner is...

A few months back, I blogged about the Turner Prize, which was exhibited at Tate Britain. Well, my second choice, Susan Philipsz, won it for her "aural sculptures".

Wednesday 10 November 2010

Wednesday: A walk to Shoeburyness

I thought I'd take a last walk from Southend to Shoeburyness today, as with starting the new job next week I might not get the chance for a while. Unfortunately, in what seemed like a bad omen, the train line was shut down between Chalkwell and Leigh-on-Sea, due to a faulty power line, and there was a replacement bus service.

The light was very good and I took a few photos. There's been some building work going on, on the sea front all year and I noticed these:

P1000761.JPGP1000763.JPG

They've got lights on the inside, angled to shine down onto the promenade.

At Southend, I visited a Victorian-style sweet shop, all very steampunk, and bought a packet of Victory V's and some cough candy (do Goths eat Goth Candy, K.T.?). It was a very nice shop and had gob stoppers about the size of my fist. They've even got a Facebook page.

Friday 5 November 2010

Friday: Signing off

There's a Judge Dredd story called "Sunday Night Fever", (2000 AD, Prog 416). In Mega City One, there's a gazzillion percent unemployed and jobs are quite rare, so instead of Sunday night being quiet, with most people preparing for the following work day, it all kicks off like a bad night in Bas-Vegas. The story concerns a guy in a bar. He says that he's lost his job as a human canary at the local Munce factory (Mega City One's equivalent of Soylent Green). Somehow, he mistakes someone at the bar for the guy who took his job and kills him in a fight. "You know what this means", says someone. "There's a job going at the Munce factory!!". The resulting job riot results in a chemical explosion at the factory, wiping out half the sector.

With that thought, I signed off at the job centre today. I got a job, starting on the 15th for a software company in Camden. The Job Centre is the only place in the world where you can say "I hope I never see you again", and get a smile.

Saturday 30 October 2010

Saturday: Surface Detail

Surface Detail

I finished the latest Iain M. Banks Culture novel, Surface Detail, last night. I'm afraid that it was a big disappointment and, for the first time with a Culture novel, I was looking forward to the end of the book.

The main problem is that the story is told from way, way too many perspectives. There is, essentially, a very thin story, or rather two intertwined stories, stretched to breaking point by telling it from several different perspectives in order to pad out the book to just over 600 pages. The main perspectives are:

  • A virtual person, a disembodied consciousness, fighting a never ending war;
  • Another virtual person suffering in a simulated Hell;
  • A reborn person seeking revenge for her own murder;
  • The person she's seeking revenge against;
  • A Culture agent sent to stop her.

In addition there were other perspectives, but these were simply walk-on parts, not even essential to the story, but adding to the confusion and tedium. I felt like shouting "For Christ's sake, GET ON WITH IT!" at regular intervals.

Olaf Stapledon's Last and First Men

I thought I'd have a bash at this next, as it's considered to be a classic. Written in 1930, it's the history of Mankind written five million years in the future by the last man.

Wednesday 20 October 2010

Wednesday: Shiny London and Typography

The Serpentine Gallery

After meeting with a friend up in London, I went to the Serpentine Gallery in Hyde Park. It was a bright, shiny day in Old London Town and I took a few photos.

The Serpentine Gallery is really small, only about two rooms, and contains only modern art (at the moment). One exhibit looked like the contents of someone's bed room squashed up into a really small space. Another was a set of photographs, like time lapse, being displayed on a wall. Another was a video of a bloke Moonwalking to some classical music. More intriguing was Anish Kapoor's mirror sculptres. Really simple, but rather beguiling:



Now this would get my vote at the Turner Prize.

Typography

As some may know, I have been interested in typography and fonts since I was a kid: my Dad brought home a Letraset book from work and it was facinating. There is currently a very good book on the subject called Just My Type by Simon Garfield, which is a very good read and highly recommended.

Tuesday 19 October 2010

Tuesday: Tunng and Duxford

Tunng

Yesterday I did my usual afternoon shift at the Oxfam shop. However, John, who's normally on the counter upstairs, was on holiday and so I replaced him. Although upstairs is quiet (it's the music/DVD section, full of old LP's), it has a little music centre and I took some CD's to play. One of them was a freebie from The Word magazine with the nicest, most charming version of Guns and Roses' "Welcome to the Jungle" you have ever heard, by Hellsongs.

Another CD was the latest album by Tunng, called "...And Then We Saw Land". They are a folk band, not a genre I have much to do with, but I heard them on "The Imagined Village" album, which won quite a few music awards, doing a version of "Death and the Maiden". They are a very original band, not avant garde exactly but as near as folk is ever likely to get. For instance, one song on the album ends with what sounds like someone dropping a scaffolding pole onto a concrete floor. I know it's hardly Throbbing Gristle, but we're talking folk music here, remember. The album is patchy, not all the songs work, but when they do it's quite something.

Duxford

I've spent most of the afternoon out at Duxford, photographing aeroplanes. The weather started okay, but by the time I got to the museum, it started to hack down, so a bit miserable. Still, I got to see the Duxford TSR2:



Wayne Rooney

As a long time Man. City fan, I can't help but feel sorry for the Salford Boys Club Football Team (a.k.a. ManU), and although I'm laughing on the outside, I'm also laughing on the inside. They've obviously run out of meat pies for Wayne, and there are rumours that he'll join the only real Manchester football club. City seems to get most it's players from Salford these days, anyway, and if he's as good as "El Torro", we've got the league in the bag. And even if he doesn't, it's still funny.

Friday 8 October 2010

Friday: The Wounded Platoon

The BBC showed a program a few months ago in the "This World" series about a US army infantry platoon, 3rd Platoon, Charlie Company, 1st Battalion, 506th Infantry Regiment. It's a revised version that came out in the states. The documentary describes the platoon's tour of Iraq and what happened after they came back. Two of the platoon are currently in jail for murder and attemped murder in Colorado Springs, where the regiment was based while back home. It's worth watching.

Thursday 7 October 2010

Thursday: Pharmacopedia Domestica and Surface Detail

Pharmacopedia Domestica

In a long and otherwise uneventful day at the Oxfam Shop, I came across an old book that Andrew was valuing. It's called Pharmacopedia Domestica by Thomas Fuller M.D. written in 1739! In it there's all kinds of bizzare recipes, including "Salts of Steel" and:

Oil of Earth-worms

Take of Earth-worms, well washed and cut into Pieces, six Ounces; Oil-Olive, a Pint and half; boil them together till the Wine is exhaled, and lastly, strain off the Oil through a Piece of Canvas.

It's Virtues

This Oil is Penetrating, strengthens weak Nerves, corrects scorbutic Acrimony, eases wandering gouty Pains, and particularly designed for the Joins.

For Oil of Adder's Tongue (maybe a kind of plant, not real adder's tongues) this is "To be made in the common way".

Surface Detail

The latest Culture book by Iain M. Banks is out today. It's called Surface Detail and has got some good write ups, some saying that it's his best Culture book since Player of Games. I bought a copy and started reading it this afternoon. I'll let you know.

Wednesday 6 October 2010

Tuesday: The Turner Prize

After meeting up with a friend in town, I decided to go and see the Turner Prize exhibition at Tate Britain. I took the Thames ferry which runs between Tate Modern and the old gallery and got quite a good river side view of the city (I took some photographs) . I recommend it.

The Turner Prize is to promote contemporary art and the four artists this year are:

  • Dexter Dalwood
  • The Otolith Group
  • Angela de la Cruz
  • Susan Philipsz

Dexter Dalwood

On entering the exhibition space, the first artist's work on display is Dexter Dalwood. Dexter paints canvases, which must be a refreshing change for the Turner Prize. It seems that part of appreciating the work of the artist is to know what the title of the work is and to have some knowledge of the subject matter. For example, this is quite a moody piece, a tree on a moonlight night:



But the title of the piece is "The Death of David Kelly", which puts a slightly different slant on the whole thing, Kelly's body being found in a wood, the controversy surrounding his death, etc.

The Otolith Group

This was lots of TV screens arranged around the room showing a documentary, with a larger screen showing another documentary. I think this is what is called "phoning it in".

Angela de la Cruz

Get a pile of builders rubble. Put a tarpaulin over it and cover the tarpaulin with thick paint. Then enter it into the Turner Prize. I kid you not:



One of the funnier things about this is that with a work of art, the media is listed, e.g. Oil on Canvas, Silverpoint on Coloured Paper, etc. One of the submissions was "Untitled (Hold No 1), Oil on Aluminium Box and Metal Filing Cabinet". Now that's what I call mixed media.

Susan Philipsz

The problem with this work is that it relies heavily on the location. When you walk into the room, it's empty apart from four speakers playing the artist singing an old Scottish folk song. Reading the catalogue, the music is meant to be played under some bridge in Glasgow. This seems like an original idea until you realise it's also the idea behind lift music and the songs they play in supermarkets.

Conclusion

To say which one will win the prize, I'd have to go with Dexter Dalwood, with Susan Philipsz as a close second. The other two didn't seem to be putting the effort in. However, even these two seemed to be lacking something. What I was hoping for was something which engaged the viewer on some level, like when you walk into the room, a motion detector tracked you and produced a sound depending on where you were and how fast you were moving. There's an interactive art piece in the Science Museum which does something like that and there used to be one in the Meadows shopping centre in Chelmsford. This is 21st century art.

I think the last words on the subject should go to Calvin and Hobbes:

Calvin: Art isn't about ideas. It's about style. The most crucial career decision is picking a good "ism" so everyone knows how to categorize you without understanding the work.

Hobbes: You do goofy drawings on the sidewalk.

Calvin: Right. I'm a suburban post-modernist.

Hobbes: Aren't we all.

Calvin: I was going to be a neo-deconstructivist but Mom wouldn't let me.

Thursday 30 September 2010

Thursday: Indepenent TV Review

The Independent newspaper has published a review of new US TV series coming to the UK soon. Mentioned are Terriers and Rubicon, two of my personal favourites.

Tuesday 28 September 2010

The Henry Rollins Show

With having access to Freeview at the moment, which I don't normally, I've been watching The Henry Rollins Show on Film24. It's a hoot and I'd recommend it to anyone.

Terriers

A rather peculiar show on FX at the moment is Terriers. This is about two guys, one a former cop and the other a thief he gave a break to once, forming a detective agency and solving crimes. It sounds formulaic, but it's not. Sometimes the cases end badly, sometimes there's fallout from the cases that don't. They're not licensed, which adds further complications. It's been created by Shawn Ryan, who was behind The Shield. There's just something a bit different about the show which makes it worth watching.

Tuesday: Hunter S. Thompson

Earlier this year, Matt lent me a copy of Fear and Loathing in Las Vegas by Hunter S. Thompson. I'd tried to read it before, but never quite finished it and I think the reason is that it seems to finish about two thirds the way through and then sort of trails off, or, more likely, comes unstuck. It's an entertaining enough read though, and Thompson, like Oscar Wilde, is very quotable.

I've recently bought a copy of Fear and Loathing on the Campaign Trail '72, when he followed George McGovern in his vain attempt at the presidency of the U.S. against Richard Nixon.


Nixon eventually resigned after the Watergate scandal in 1974 which was all about a break in at the Democratic headquarters in the Watergate building in Washington DC, part of a dirty tricks campaign against McGovern.

Thompson's book has been referred to by one of the Democrat organizers as "the least factual and most accurate" account of what happened and is quite a bit more substantial that his previous work, about 1" thick.

Sunday 26 September 2010

Sunday: All Our Working Lives

In the 1980's there was a TV Documentary series called All Our Working Lives. The programes concern the history of various industries, chemicals, the aircraft industry, electronics, etc. BBC4 have updated the series and the program today was on the cotton industry in Lancashire, a story of decline and fall, with almost no industry left today.

My grandmother was a spinner in one of the smaller mills in Bury until she retired at 65. I was taken into the mill when she retired and I was about four or five. The spinning machines towered above like some kind of metal canyon. It was so noisy that all the women could lip-read.

Tuesday 21 September 2010

Tuesday: It's the 70's all over again

Hawaii Five-O

CBS have remade Hawaii Five-O. I've got some Yes LP's but I haven't got any flared jeans...

Sunday 19 September 2010

Sunday: Bikes and Punk; Alan

Alan

I've tried to write about this before, but it's difficult.

Alan is my maternal uncle, and we've always got along well. He's very gregarious and always well dressed: I've never seen him wear jeans or trainers, always good slacks and leather shoes, a shirt.

About fifteen years ago he had a nervous breakdown and was hospitalised. He recovered and has been okay since until about six weeks ago when he started behaving oddly, the old problems coming back, and he was hospitalised again about two weeks ago. I've been spending the last two weeks zipping up and down the M11 and M6 to go and see him. He's in a pleasant enough ward, low security, and seems to be recovering slowly, three steps forward, two steps back.

Hollywood Doll at the NCC Custom Bike Show

On a lighter note, I went to see Keith (a.k.a. K.T. Glitz) and his band, Hollywood Doll, at the NCC Custom Bike Show. It always seems a bit weird to use the phrases "old-fashioned" and "punk band" together, but that's what came to mind, and jolly good they were too, playing with gusto and skill. It reminded me a bit of the B52's.

I took some photo's of the event, and some of the rather classy bikes on display.

Mad Men

I've been watching back-to-back episodes of the first three seasons of AMC's Mad Men, all about advertising executives in 1960's New York. It's surprisingly engaging and deservedly won umpteen Emmy's and Golden Globe's.

Friday 10 September 2010

Friday: Jobs and Job Centre

Jobs

I'm not going to say anything much about job interviews at the moment as it's at a fragile point in the development and I don't want to jinx it. I will say that taking along some of my work, as requested by the client, did have a positive affect, so fingers crossed.

Job Centre

The last but one time I signed on, I was told to attend a little seminar called a Back To Work session. A group of us all arrived a bit earlier than normal (usually 1:30PM but this was at 11:30AM), were shown into a room and given a little presentation about finding work, as well as given an expensive looking little handout. Basically, this was a shot across the bows about reviewing our achievements so far, which will take place in about a months' time in October. There is also an oportunity to gain, through a free training course, a fork-lift truck licence. This is aimed at warehouse work, of which there is rather a lot in Basildon, as we were told.

Monday 30 August 2010

Sunday: Deathwatch!!!

Deathwatch

As you may know, I have an interest in role playing games. It stems from when I was at University and was a member of the games club where I first played Traveller (I'm not a big fan of D&D). Recently, Games Workshop have collaborated with Fantasy Flight Games and produced a W40K series of role playing games, the latest of which is Deathwatch (it's best to pronounce the name with as much Gothic melodrama as you can muster: I do). Fantasy Flight have quite a good marketing strategy for these games. They produce a cut-down introductory adventure which can be played without the core rule book and just a set of percentile dice (two D10's, one for tens, the other for units). The Deathwatch adventures are called Final Sanction and Oblivion's Edge and are available as free PDF's.

Jobs

I've been a little busy recently coding in Delphi (?!?). The week before last, an agent rang me up and asked me for a copy of my most recent CV. The agent normally recruits payroll administrators, but one of his clients had asked for a Delphi programmer and he'd seen an old CV of mine on Planet Recuit. I sent him my latest CV and heard nothing more. The following week he phoned me back and asked me if I could attend an interview in London (Finsbury) on Thursday 2nd September. I'll be given a technical test but also, unusually, they wanted a sample of my existing work. The only Delphi work I've done at home in the recent past was to sort out problems at work: I'd e-mail a fragment of code to home from work and then e-mail the solution back, but I don't have anything standalone. So I've set about creating a little cryptographic application using the RC4 algorithm I mentioned previously. I've got a nice little front-end with big buttons and nice icons:

Crypto.png

and I've used TDD for most of the class work. I'll also do a little documentation to explain how it works and the design ideas behind it.

Tuesday 24 August 2010

Digital Ciphers

Digital ciphers have become very important due to the Internet and the desire for secure communications. They break down into three distinct types:
Sometimes included with in this list are message digest algorithms, but I've excluded these for the moment and I'll cover them at a later date.

Public Key Ciphers

Up until the 1970's, most ciphers, both stream ciphers and block ciphers, involved the use of a single key to operate. You use the same key to encrypt the message and to decrypt it. The problem with this is that the key becomes critical to the security of the system: if a third-party gets hold of it, the security is compromised. In the 70's two groups, one in the UK working for GCHQ and some academics at MIT in the US, came up with the idea that you can have one algorithm that encrypts using one key, a public key, and another algorithm that decrypts using another key, a private key.

The mathematics behind public/private key cryptography is complex, involving a branch of mathematics called number theory, and involved the use of huge prime numbers. This gives rise to the problem that public key ciphers are generally slower compared to the equivalent block or stream cipher.

Stream Ciphers

As explained before, stream ciphers operate on a bit stream, one bit at a time, XORing the plain text stream with a stream of pseudo-random bits to produce the cipher text stream:

Stream Cipher.png

Stream ciphers are extremely fast, much faster than block ciphers, but are less secure. For this reason, they tend to be used where speed is a critical factor, such as mobile phone telephony. The clever bit about stream ciphers is in the design of the algorithm that produces the key stream, as it must be able to produce a stream of bits which looks random, but is seeded from a unique key. I'll discuss the design of a simple yet surprisingly strong cipher, RC4, at a later date.

Block Ciphers

Instead of working on a single bit at a time, a block cipher works, as the name suggests, on a block of bits, encrypting the same block over and over. The most common way of doing this is using a design known as a Feistel Network. This splits the block into two halves. The right half gets swapped with the left half and the left half is encrypted using a function of the right half and part of the key:

Feistel Network.png

Block ciphers are, generally, more secure than stream ciphers and faster than public key ciphers, so they are used for encrypting large quantities of data, such as files and web pages. Also block ciphers can support different modes of operation, such as cipher block chaining, which can enhance strength of the encryption even further.

Monday 23 August 2010

Monday: Christmas at Oxfam

I only did a short shift today at Oxfam, just enough that Claire was able to do some book sorting instead of having to be on the till all the time.

We also got our first delivery of Christmas cards, about thirty boxes, so Merry Christmas, everybody, for when it comes.

Sunday: A Rainy Day in Lewes

I dislike being in the flat for more than a day so, for a change, I decided to go on a trip to Lewes in East Sussex. Lewes lives, to some extent, in the shadow of it's neighbour Brighton so there tends to be fewer tourists, especially on a wet day. The town also has a more business-like feel to it, being the county town, and I've always liked it.

After a two-hour journey (with a twenty minute stop-over) I was glad to pull over in a nice little car park. I walked around aimlessly for an hour or two, taking photographs, when it started to rain quite hard. I ducked into the local Cafe Nero, bought a cappuccino and did a number puzzle for a while. The rain didn't seem to be letting up, so I went back out, umbrella in hand, and wandered a little through the town and back to the car.

I got lost going back and ended up going through East Grinstead before ending up back at the M25.

Saturday 21 August 2010

Java and C#

A recent conversation reminded me of the debate about Java and C#. The subject is not as clear cut as might appear and there are things to consider beyond the purely technical reasons for using either.

Java's Age

Java has been around for a while now, since 1995, and was one of the first major commercial object-oriented languages designed as such. C# is relatively new, released in 2002, and has features, such as reflection, that have been invented since Java was released. Java has either only partially included these new features or not at all. The reason for this conservatism in language design is that Sun has been focused on backward compatibility, even at the byte code level, and has been reluctant to implement new features that break this. Microsoft has had a reputation for being somewhat careless about backward compatibility, although this has changed somewhat as they've tried to promote .Net as an open standard.

Java's age, however, is also a head-start and there are many application frameworks and tool suites for Java, such as Spring, Hibernate, and the Apache Jakarta project, which are very mature. C#, or rather .Net, equivalents are only just starting to develop, and some of those that exist are actually ports of Java systems, such as Spring.Net and NHibernate.

Web Enabled

From the start, .Net has been designed for use in web applications. The effect of .Net on ASP, for example, has been almost revolutionary. In particular, .Net has libraries which make the development of web services and SOA much easier than before. Java, on the other hand, has had web services introduced retrospectively, through changes to J2EE and frameworks like Spring and languages like JSP.

UI Applications

Like web applications, .Net has been geared up to produce Windows applications right from the start, although not to the degree that Delphi has. Java has the Swing library, which, although cross-platform, produces very poor applications. It may be worth noting, however, that Vuze, one of the most popular bittorrent clients, is implemented in Java.

Cross Platform

From the start, Java was designed to be cross-platform. The Java slogan has always been, "build once, run anywhere" and Java applications can be built on a Linux box and run on Windows. .Net applications can only be run on Windows and .Net web applications only on IIS, Microsoft's web server. There are ports of .Net to other platforms, such as Mono, but these are not compatible with .Net to in the same way that different implementations of Java are.

The cross-platform limitation of .Net also makes it easier to take advantage of features only available in Windows and nowhere else. This is particularly true of Windows applications.

Politics

Java has evolved in a very open culture at Sun, Java going open source in 2007. Even though Sun held the licences to Java, it included interested groups in it's decision making process, what Sun called the Java Community Process. This is probably because the focus at Sun was hardware, which is where it made the bulk of it's money, rather than software. With the buyout of Sun by Oracle, this may change as Oracle are a software vendor, like Microsoft, although not development tools.

In contrast, .Net is very proprietary. Microsoft have not developed a port for .Net to Linux, for example, because of the licencing problems involved with the GPL and because Microsoft has no control over the development of the Linux operating system. In other words, if you want to use .Net, you are stuck with Windows and Microsoft. In anti-pattern terms, this is known as "vendor lock-in".

Conclusion

The choice between .Net and Java is not an easy one. There are a lot of technical factors to be considered, as well as the one's I've listed above. I tend to go for Java, but this is based on the cross-platform nature of Java, in addition to it's maturity and the vendor lock-in aspect. There are good arguments for .Net, however, including Microsoft's considerable support for it for the for the foreseeable future, and it's close relation with the Windows operating system. It also depends on the nature of the work being done. If it's going to be mostly Windows applications, then .Net is the obvious choice. With web applications, it's more complex, but, again, if it's going to be based on Windows, .Net seems to be the right choice. There are other choices than .Net and Java for the web, however, Ruby and PHP for example.

Another consideration is how much is it going to cost to move to these development languages from wherever you are now. Java and C# are syntactically very similar (the claim that C# is a clone of Java has some truth), so the jump from, say, Delphi or Visual Basic, would be the same to some extent.

A good idea is to look at other companies and see the choices they made, but understanding why they made those choices. For example, why do Google use C++, Java and Python, especially Python? Wikipedia is made using PHP, which is also cross-platform independent.

And, of course, the worst choice is one made from blind ignorance.

Friday 20 August 2010

Friday: A Trip to the Science Museum

It's been a while since I went to the Science Museum in London. They've got an exhibition called "Who am I?" all about human beings. I remember something about it a few years ago, but it was a very small exhibit at the time. They've now expanded it and it's huge, covering an entire floor. It was quite interesting, but there were hundreds of kids milling about and you couldn't get anywhere near any of the interactive suff, which was a shame.

The Space exhibit was quite fantastic and they had a J2 rocket motor, used to power the giant Saturn V Apollo rockets:



Brilliant!! They also had the Apollo 10 re-entry capsule:



While there, I also bought some CyberClean to get rid of the gunge on my laptop keyboard.

Thursday 19 August 2010

Ciphers

Running on from the previous article about codes, I thought I'd write some more, this time about ciphers.

A cipher differs from a code, in that a cipher replaces letters, or numbers, with another, whereas a code can replace many letters or words with just one. For example, the phrase "Meet me tonight" can be replaced by the code 1254, or "blue", or whatever. If we encypher the message, however, by replacing the individual letters with the key to the right on the keyboard we get "<rry ,r ypmohjy". This is known as a substitution cipher. The other type of cipher is called transposition. This is simply taking the letters of the message and re-arranging them, as in an anagram:

M M N T
E E I X
E T G Y
T O H Z

Reading the letters vertically produces the message, with a little extra letters to make a square number. Horizontally produces the code, MMNT EEIX ETGY TOHZ.

Digital Ciphers

Instead of working on letters of the alphabet, digital ciphers work on bits, or blocks of bits, usually using an XOR function. For example, convert the message to ASCII:

M e e t
m e
77 101 101 116 32 109 101
1001101 1100101 1100101 1110100 0100000 1101101 1100101

The XOR function changes the bits such that unequal bits produce a 1, while equal bits produce a 0. If we now use an ASCII key phrase:

Plaintext M e e t
m e
ASCII (Decimal) 77 101 101 116 32 109 101
Binary 1001101 1100101 1100101 1110100 0100000 1101101 1100101
Keytext S e n d
t h
ASCII (Decimal) 83 101 110 100 32 116 104
Binary 1010011 1100101 1101110 1100100 0100000 1110100 1101000
XOR Result 0011110 0000000 0001011 0010000 0000000 0011001 0001101
Decimal 30 0 11 16 0 25 13

The result of XORing is a series of mostly unprintable ASCII characters, but the stream now bears no relation to the original message. For example, the three "e"'s in the message are now all different, 0, 11, and 13.

The mechanism above is roughly how a Stream Cipher works. Instead of a key phrase, the cipher generates an endless stream of seemingly random bits which are XOR'd with the plaintext stream to produce the cipher stream.

Tuesday 17 August 2010

Tuesday: Ergo Proxy

Tuesday being a quiet day, I've been watching DVD's.

I picked up a DVD from the shop the other day. It's an anime TV series from Japan called Ergo Proxy and I got sold on the blurb on the back of the DVD case:
"The domed city of Romdo is an impenetrable would-be utopia where humans and robots coexist, and everything is under complete government control, or so it appears."
It had me at "would-be utopia". Normally I wouldn't touch manga/anime with a barge pole, it's just too manufactured for me, but this seemed a little different from the norm, plus the image on the back of the case helped:



Unfortunately, the plot's a little turgid and it's been stretched thin in order to make a TV series, and I've only managed to find the first four episodes.

Monday 16 August 2010

Monday: Drupal

Drupal

I've been playing around with Drupal over the past few days. Actually, it's taken so long to sort out the LAMP stack that I haven't had chance to do any real development yet, so it's very much a work in progress. I had a look at Drupal a few years ago when I was looking at developing a Wiki. In the end I found MediaWiki, which handled all the problems for me, but I quite liked the idea of a web development framework which didn't require any real programming. When I did it, it was Drupal 5, but Drupal 7 is about to come out and there was recently an article in Linux User & Developer magazine which sparked my interest again.

Sunday 15 August 2010

Friday: Job Interview

Funny. I never thought I'd be sad about a job interview.

I went to an interview for a web developer job at South Essex College. The job title was actually "Informations Service Analyst", but you read the job spec. and it was HTML, ASP, JavaScript, VBScript, etc. and Oracle. None of these skills I have in abundance, other than a bit of Oracle I did many years ago when I was a contractor. How I managed to get an interview I don't know, but the money was a bit low (£20k) for anybody experienced.

So if I got the interview, why was it sad? There was another candidate for the job, a chap called Frank. He was about late forties, early fifties, a bit dishevelled, hadn't shaved properly, so nervous his hands were shaking and was generally a bit of a mess. As we talked throughout the day (the interview process lasted about three hours) it turned out that he'd been made redundant from some firm that specialised in pharmaceutical software about two years ago and hadn't had an interview since November.

It's the first time I'd been interviewed like this, at least as far as I can remember. Mostly, you are interviewed on your own and, although you are aware that you are not the only candidate, you don't normally see the others face-to-face.

We were both shown around the place, although the job was in Thurrock, not Southend, and given a technical test. Most of the SQL was straight forward enough, although there was some Oracle I just guessed at. There wasn't really much web stuff, no HTML for example, and there was some basic object-oriented design questions I could do in my sleep, but obviously no Delphi or Java. We were sent to lunch while they marked the test and then afterwards they told Frank that they wouldn't be interviewing him. Why they couldn't have done so, I don't know: it wouldn't have cost them anything other than time, and he may have shined in the interview.

My interview went OK, but was over in about twenty minutes. They asked me a few stock questions, actually written out in front of them. Although it was all very professional, it did seem like they were going through the motions: I clearly wasn't the guy they wanted, but I was the only to survive the technical test.

The punchline is, I didn't get the job. It did strike me that Frank was me in two years time, assuming that I don't find anything. He'd worked faithfully for a firm for twenty years and here he was scrabbling around for a job. A sobering thought.

On a different tack, I re-applied to the FTSE, but instead of doing it through the job site, I did it through the company web site. This gives me a bit of feedback.

Tuesday 10 August 2010

Codes

In both Rubicon and Sherlock last week, by bizzare coincidence, the plots involved the use of something called a Book Code (in Rubicon, one of the characters refers to it as "old school"). The method is simple.

Say you want to communicate with someone secretly. You both buy the same copy of a book, To Kill a Mocking Bird, by Harper Lee. It has to be the same edition, identical. You want to send the message "Meet me tomorrow at the station". "Meet" is on page 31, and is the second word on line 33, "me" is on page 183, the fourth word on line 7 (this is not the first occurance), and so on. "Station" doesn't occur in the book, but "stationed" does, page 112, line 5, fourth word. It'll do. You end up with a string of numbers:

31, 2, 33; 183, 4, 7;...

In Sherlock, these are translated into ancient Chinese numerals; in Rubicon, a string of letters by splitting the numbers up into groups that add up to less than 26. In the example:

3, 12, 3, 3, 18, 3, 4, 7, ...

which becomes:

CLCC RCDG...

In Rubicon, the protagonist figures out straight away that the letters represent numbers, probably because of the number of C's, D's etc. The receiver of the code reverses the process. The strength of the code is that without the book, the code is meaningless.

The KGB and GRU (Russian Army Intelligence) used a similar method. They had a purpose designed code book using four figure numbers, so "meet" would have been 5268, "me" 171, and so on. If there was a word that wasn't in the code book, the letters would have specific numbers, "a" 358, "b" 1051, etc. Encoding the example would, again, give a string of numbers:

5268, 171, 5454, ...

The agents had what was called one-time pads. These had random numbers printed on celuloid, which burns very quickly, and which were unique to each agent. These numbers would be added to first string, only being used once, thus the name. If we add the random numbers 8235, 2760, and 6473, modulus 10000 to give us four figure numbers, to the example we get:

3503, 2931, 1927...

These can then be translated into letters as before to make transmitting in Morse easier.

Tuesday: Rain! Rain! Rain!!

It's finally raining after what seems to be weeks of dry weather. It started lashing it down about six this morning, hard enough to wake me from my slumbers. I've checked the weather on the Met Office web site and it looks like it's in for most of the morning.

Oxfam

I did my shift at the shop yesterday and worked from 8:45AM to 4:45PM, with a half-hour break for lunch. It was mostly sitting behind the counter and shifting large boxes full of books into and out of the little lift that we have. We got the delivery from the book bank, based at Sainsbury's in Springfield, a suburb of Chelmsford, which was huge, in addition to a couple of house moves, so, as you can imagine, I was knackered yesterday evening.

I did manage to listen to some tunes in the morning, though. I got through the latest Mojo freebee CD, which had a selection of old blues numbers selected by Robert Plant. Not bad, plus I got part way though the previous months as well which was also quite good.

We also got shop-lifted. I was out at lunch, but apparently a customer saw someone slip books and a few records into his bag while in the shop. Everyone got a code red (we had to change the bulb), Gill phone the police, and Mark, who'd turned up for the afternoon shift, tracked him through the shop and out into the high street. He'd twigged that he was being followed and put a sheaf of records that he'd nicked back onto the shelf and scarpered. The cops came round and took descriptions off people. They said that they would look on the CCTV footage for the shopping area to see if they could find anyone of fitting the description we gave them. Good luck with that, boys.

Jobs

Half way through the morning, I got word from an agent about a Delphi job at the London Business School. This started a few weeks ago, but they've only just put together a shortlist, so here's hoping.

Also I've applied for another £65k/year job that's just popped up on the web, so you never know.

Friday 6 August 2010

Friday: Jobs

Since being made redundant from City Financials (the web site still exists, I noticed, even if the company doesn't), I've been casting around for a job.

I've been interviewed by JHC, a big firm up near London Bridge who were looking for an experienced Delphi developer. After three interviews over four or five weeks, they withdrew the job vacancy. Although this was a bit disappointing, I get the feeling that the job would have been quite a tough one and I'd have been on a learning curve for the next few years, although it would have been quite a rewarding role. Their attitude toward software development is very professional, plus I would have been doing Java as well as Delphi, which is the direction I want to go in. So mixed feelings about that one.

However, two other roles have sprung up at the same time. The first is another (Senior) Delphi role at the FTSE. This is for the unbelievable amount of £65k. So, obviously, I applied for it and just for good measure, I applied for the team leader role as well.

The other role my sister found me. It's a Senior DotNet Developer role at the NHS hospital where she works (she called it "DotNot", which was unintentionally funny. Or maybe dotnot), right in Basildon. I might not suitable for it: there was lots of web stuff, which I've avoided these past years, but there's enough connectivity stuff which is my speciality, so you never know. Plus it's local. Even if it was in Chelmsford or Southend, it would be a reasonable journey. I filled in the online application form and I'll keep my fingers crossed.

Finally, I got an interview at South Essex College for a Information Service Analyst, a sort of support/programmer job, at Thurrock (cheers, Pete). A good mix of different technologies and answering the phone. It doesn't pay much, but it might be just the thing.

Thursday 5 August 2010

Thursday: Oxfam, The Design Museum and Lizard Men

Oxfam

Today was supposed to be me at Oxfam most of the morning, but the person I was supposed to be covering for turned up unexpectedly, so no music this morning. After a few hours sorting through books in the basement, I decided to call it a day and leave early. Gill was okay with it as about five other people had turned up as well, so it was a bit overcrowded. At one point there was NINE of us in the shop. As I said to Andrew, there were more staff than customers (we had three customers at the time).

The Design Museum

I was up in London on Tuesday and went to The Design Museum, which is on the South Bank near Tower Bridge (over the road from Boris Johnson's current residence). It's modern structure right on the river bank:


It's more of an exhibition space than a museum and the current major exhibition, for which I got a catalogue and a free T-shirt, is Brit Insurance Design of the Year Award, the winner being a folding three-pin plug, which I thought was very innovative. Also on display was an electric aeroplane, component furniture made from bamboo laminate and some hurricane-proof architecture for Mississippi, my personal favourite.

Lizard Men

I've started to paint the Warhammer Lizard Men I assembled and basecoated a while ago. The aim is to get them looking something like this:


A long, slow process, knowing me.

Monday 2 August 2010

Sherlock and Rubicon

There have been two TV programmes recently which have caught my attention. One is very popular, prime-time fare and the other is obscure and possibly the best I've seen in a while.

Sherlock

Most of the people I've spoken to have complimented the latest adaption of Conan-Doyle's creation, transporting the Victorian sleuth and his companion into 21st century London. I've now watched it and I have to say that it's a very slick, knowing production. A sincere homage, from the Afghan War parallels to references to Study in Scarlet. The actors are good and well cast, from Martin Freeman's Doctor Watson and Mark Gattis' Mycroft Holmes to the lead played by Benedict Cumberbatch, who makes a very good Holmes. Even 221b Baker Street looks like the Victorian original.

I think that it will do until an original drama comes along, which doesn't seem to be happening any time soon. BBC drama seems to like grave robbing at the moment, ripping off The Sweeney (Life on Mars), A For Andromeda, Doctor Who, Quatermass and now Sherlock Holmes. They do it very well and it seems aimed for consumption by the American market.

If you look at the BBC web site from outside the UK, you get a totally different perspective on the organisation. Click on the TV section from outside and you don't get a list of the UK channels, what programmes are on when and how the licence fee is being spent. You get a (large) list of the commercial channels the BBC provides. The bedrock of BBC funding is the licence fee (£145 per household, per year), but the rest of the funding is increasingly coming from abroad, particularly the USA and Canada. The BBC is becoming a player, albeit a minor one, in the lucrative commercial American market. That's why Sherlock Holmes has been turned into CSI London.

Rubicon

So after that little rant, it seems a bit much for me to go on about an TV series just starting in the States. Rubicon is something you don't really get in the US, and something we used to do rather well. It's a paranoid conspiracy thriller, and a very good one it is too. The premise is very similar to an old Robert Redford film, Three Days of the Condor, but updated for the 21st Century and with a Grand Conspiracy, like the Illuminati, thrown in for good measure. It's got Peter Gerety, from Homicide and The Wire, and even Miranda Richardson (Queeney from Blackadder 2). I like it already.

Remember, you heard it here first.

Monday: W40K books

When I read books, I tend to go through phases of reading. I read very intensely for a few weeks and then read hardly anything at all for about a month or so, and so on. When an intense phase ends, it's usually because I get distracted by this machine (programming) or because the book I'm about a third of the way through starts getting a bit difficult. I think at the moment I'm entering an intense phase. This is helped by reading Warhammer 40,000 books (W40K), published by The Black Library, a subsidiary of Games Workshop.

W40K books are pulp military science fiction, but this is no indicator of quality as there are some very good authors, specifically Gav Thorpe, Graham McNeill and Dan Abnett. I've just finished Thorpe's Path of the Warrior and I'm about a third of the way through Abnett's Ravenor omnibus, having read the Eisenhorn omnibus previously.

Mostly, the books are from the human perspective, but Path of the Warrior has an Eldar, an ancient humanoid race, as it's protagonist.


Gav Thorpe does a very decent job of conveying the "otherness" of the Eldar, but the book takes a bit to get going and there are too few battles in it for my taste. How the protagonist progresses from warrior to "exarch" (leader) after only two battles isn't sufficiently explained, plus the novel, which is meant to be part one of a series, concludes with the death and transformation of the character.

Ravenor is much more mainstream, part of Abnett's Inquisition series.


In W40K, human religion is based on a semi-dead God-Emperor, opposed by demons, aliens and heretics. The Inquisition is intended to oppose these forces, and the novels are a bit like a kind of baroque sci-fi spy/horror novel. Sort of advanced steampunk, but without the steam and with a bit of Lovecraft thrown in for good measure. And they're great. The plots are a cut above the average W40K Space-Marines-kill-everything novel but there's enough shooty stuff so you don't get to miss it too much.

Saturday 31 July 2010

Saturday: GMail and Sodastream

Saturday is a day in.

Sodastream

For my birthday, my sister bought me a Sodastream. Everything seems to be going late 1970's, with a coalition government, a flourishing music scene (Private Trousers, Hollywood Doll, One Day Elliot, Wet Dog), rising unemployment and, to cap it all, Sodastream gets re-launched. I bought a sample box and some basic flavours from Lakeland and have been going through the samples the last few days.
  • Cola tastes like a superior own-brand Cola;
  • The Cranberry and Raspberry doesn't seem to taste of anything really: not unpleasant, just undefinable;
  • The Ginger Ale was about the worst, so far: didn't even taste of ginger;
  • Lemon and Lime tasted of, well, lemonade but not lime;
  • Zero Cola isn't bad considering it uses a sugar substitute;
  • Apple tastes of apple, but with a slight aftertaste.
The most interesting seems to be XTreme, which is their Red Bull copy. Not bad, and tastes a bit better than the original. A good mixer with vodka, apparently. Worth getting a Sodastream for that alone.

PopTray & GMail

I've also been looking at how to connect to GMail programmatically. I wanted a small email notifier, something that just sits in the system tray on the PC and checks my email every so often. I found PopTray:

PopTray
This is quite a nice little program which works fine but has some limitations, e.g. it won't work with the VPN I sometimes use. It's also open source and written in Delphi, although a later version than I have. It also has a GMail extension, which I couldn't get working. I've downloaded the source and have been tinkering with it the last few days, becoming gradually more frustrated. There doesn't seem to be an open API or web service for GMail, which would be handy and the GMail plugin source is all HTTP Gets and Posts, very crude. I've even resorted to looking at the source of a Python application which does the same thing.

Friday 30 July 2010

Friday Sign-on

This Friday is sign-on day at the dole office, sorry, Job Centre Plus. The office is at the other end of Broadmayne from the flat, Broadmayne being the large dual-carriageway running the length of Basildon. It's about two miles, so I walked in, which took about 40 minutes. I have to sign in once a fortnight and demonstrate that I have been looking for work, so I keep a list of job applications on a spreadsheet and print them out.

The last time I signed on, it took about an hour or so, because one of their systems had screwed up. In the end, I pointed out that I was just there to sign on and had been waiting a while. They just filled in a line on a form and asked me to sign to prove that I'd attended. This time was the same, but he paid attention to the spreadsheet and what was on it. He also asked me to bring a little form they'd given me about voluntary work. Plus everyone seemed to be on the ball and it all took about ten minutes from me walking in through the door: I'd barely got started on a new number puzzle.

And there could be worse times to be out of work...

Thursday 29 July 2010

Thursday and Morning Shift at Oxfam

I usually do about an hour or so in the afternoon at the Oxfam Bookshop in Chelmsford on Mondays and Thursdays. However, yesterday, I got a text from Gill asking if I could come in earlier to do the morning shift as the woman who does the upstairs till, which is the music and DVD's, was on holiday. The up-side of this is that a) it's quiet first thing and b) you get to play your own tunes. I made up some CD's last night to play and I started off with Miles Davis (Kind of Blue) followed by Dave Brubek (Time Out). Cool Jazz is easy on the nerves and difficult to object to by the punters, especially if it's good. I followed this up with a dubstep remix of Jeff Waynes War of the Worlds and an old-school rave mix by Moby, which made things easier while I sorted through a load of DVD's which needed culling.

After my shift ended, I went shopping and ended up having a look in Games Workshop. I exchanged pleasantries with the assisstant on duty and left. As I went out of the shop, a thought struck me and I went back in.

"Back already", said the assistant.

"I know it's a funny question", I asked, "but how do you get to work for Games Workshop?".

"I'll just get you a form", he said and disappeared into the back of the shop.

"Fill it in", he said as he handed me the form, "Bring it back and we send it up to HQ (Nottingham) and they take it from there".


The form is just like any other (previous experience, qualifications, etc), but with the Imperial double-headed Eagle emblasoned on the front and it's got questions like "What's your favourite Warhammer/W40K army and why?". All job application forms should be like that.

Wednesday 28 July 2010

The End of the Line

It's Wednesday and I'm sat typing with a (large) cup of coffee at my elbow, while the budgies are en-caged in the kitchen.

I usually go walking along Southend sea front at least one day a week and today's the day (Monday/Thursday I'm in the Oxfam shop and Friday is sign-on day this week, so Wednesday it is). Actually, I'm not travelling on the train to Southend Central, but to Shoeburyness, the end of the Fenchurch Street - Southend C2C/National Express line.

I was thinking of wearing my Vivo Barefoots for walking, but I'm not entirely sure what the effect on my feet will be. I usually wear the DM's as they're hard wearing and comfortable, especially for "off road", which you do get in Shoeburyness.

The town does have a kind of end-of-the-line feel about it but in a nice way. The developers have moved in and created a New-Shoeburyness, but this has the same empty feel as the original because, of course, it's a dormitory for London.

Update:
Here are some photos I took.

Tuesday 27 July 2010

Quiet Tuesday Morning

It's all quiet in Chez Lemon at the moment. I'm writing on the laptop and the budgies are sitting in the cage with the covers on. The curtains are closed, everything is as dark as a Goths makeup bag and the neighbours are not rowing, for a change.

Update:

I've cleaned the budgies:



So they've been a bit subdued for the last few hours.