Monthly Archives: March 2005

On the beach in Durban

I had a great day here in Durban, South Africa. After finishing up the morning's work we took a stroll down to the beach to enjoy the Indian Ocean. The left photo gives you an idea of what the walk looked like (scenic waterfront region). The waterfront is very pretty with a long golden sand beach, multiple piers for both relaxing and fishing, and lots of people swimming and surfing in spite of the signs warning not to. The right two photos below are from one of the piers.

After the first pier stroll we had a bizarre lunch with an Indian guy and his young South African wife who called us over, admiring our tattoos. He told us he was a “mystery guest” for Sun International, being sent around from hotel to hotel to check quality and service issues, but he was pretty drunk — and I was getting there myself — and we weren't entirely convinced he was telling the truth. It may have been some sort of scam that never panned out, either because we foiled it somehow or simply because he enjoyed our company, telling us prison stories about his various hand-poked tattoos and adventures (“I got this one after I laid a guy out in prison — I didn't kill him, I just gave him the beating of his life”)… among other tattoos he had a Hindu swastika and lettering on his had, a dot on his forehead, a sacred heart on his shoulder, and a dagger-cross on his forearm. The waiter as well showed us his full sleeve (flames and kanji, done by a friend) — apparently committing some service-industry faux pas, but I appreciated it.

There's a fine line between “hilarious” and “terrifying”, and I think most good encounters ride that line very closely, and this one most definitely did… but highly enjoyable. After lunch we walked further along the beach and ran into a Zulu vendor who didn't speak a lot of English but appeared happy to see tourists with stretched lobes… That said, he seemed a little beat down and broken by life, which was sad. So far the reactions about our tattoos and piercings especially have been fairly negative, so it was nice to meet a local who had stretched lobes himself.

We didn't actually go swimming (I don't think I even remembered to bring a bathing suit), but I did roll up my pants and wade… The water is wonderful, and was full of mostly locals and a few tourists taking advantage of the summer weather, tossing themselves with glee into the cresting waves. It's a little scary here, but other than the overwhelming feeling of everything being a little sketchy, I really like it here.

We're off to supper shortly, and then as I mentioned earlier, tomorrow it's off to Pretoria. You may not hear from me for a few days — we've been told that where we're headed next (the cheetah and wild dog reserve) is online, but I'm not entirely convinced.

Now I'm definitely getting arrested…

Steganography is the art of communicating in a way that hides the existence of that communication… that is, obfuscation (there's no encryption involved). Most commonly this involves things like hiding data in the least significant bit of an image file — it is said that terrorists have used this method to communicate using images in USENET newsgroups.

One of my interests as an artist is the work of Russian mathematician Andrey Andreyevich Markov, after whom Markov chains are named. In short Markov chains are sequences of events, followed by a statistical representation of potential future events. I thought it might be possible to use subtle variations and fluctuations in the statistical output of applications of such data in order to encode secret messages. For example, the string below, seeded with the Book of Genesis, encodes the simple phrase, “Hello, world!” followed by a carriage-return.

Jahzeel, and replenish the fowl of every living creature after their hand of Hagar the land by his father, and Accad, and Calah, And they brought forth his voice, and she conceived, that Pharaoh for my power I pray you, saying, Jacob: all these words? God saw Rachel envied him. And I offended their possession: he and thou shalt thou in the sight because I shall be gone. And they might not toward Israel's left communing with thy brethren, sons of the ark; And he could we may preserve seed of Pharaoh awoke. And Abram said to interpret it. And the nakedness of the earth. Make ready the word of the face to him a well; whose land ye shall tell me; that he saw that betwixt me swear, saying, He is Hiddekel: that I have made the tree, of Canaan.
= Hello, world!

Basically what it does is it splits the Markovian data into two sets rather than a single set, with one set representing a '0' bit and the second set representing a '1' bit. Encoding is fairly simple — here's the metacode (input is a seed word — the last word rendered — and a bit value):

find word
 if word has 0 markovian sets (ie. terminating word)
  select random start word
  add word to buffer
  seed array with new word and start over
 if word has 1 markovian set (ie. single possibility)
  add word to buffer
  seed array with new word and start over
 if word has 2 markovian sets (ie. normal data)
  for bit 0, select random word (statistically balanced)
   from first set, add to buffer, and exit
  for bit 1, select random word (statistically balanced)
   from second set, add to buffer, and exit

What's interesting if it's not obvious is that the output data will always be different — there are billions of different ways that the “Hello, world!” example could have encoded, each one just as valid — it's not the characters that are important, but the subtle variations their selections make in the statistical flow of the words. The decode process is of course the same in reverse. Again, here is the metacode (this time the input is two words; a potential Markov chain which may or may not contain data):

find word1
 if 0 or 1 markovian sets, return -1 (no meaningful data)
 if 2 markovian sets,
  return 0 if word2 is in set 1
  return 1 if word2 is in set 2

Simple! If you'd like to play with it, you can use any seed data you'd like, although I've used the book of Genesis personally. This version is case sensitive, and requires some words in the set to have capital letters (since it considers them potential 'start words'). Only spaces and linebreaks are considered terminators between words. Here's the links to the software and the seed data I use:

genesis.txt (seed data, text of Genesis)
markenc.exe (Win32 command line executable)

Note that it's a rather incomplete piece of code (the last option below doesn't work, there's minimal error checking, and it's far from optimized) — just a proof of concept really… The usage is pretty simple;

Usage: markenc seedfile infile action outfile [options]
Actions:   e  encode   ...or...  d  decode
Options:   y  confirm all
           t  use timer as random seed
           w=word  force start word
           b  byte mode

The command I used to encode the above data was 'markenc genesis.txt hw.txt encode hw.enc t y' and to test the decode (successful), I used 'markenc genesis.txt hw.enc decode hw.dec t y'hw.txt is the file containing the input text, genesis.txt is of course the data that's used to seed the Markov chains, and hw.enc and hw.dec are the encoded and subsequent decoded files.

Well, I thought it was amusing.

I'm thinking about using it to write a BRAINF*CK-style language using three bits to encode each command… I'm going to call the compiler “THE BIBLE CODE”. If that's got you laughing as hard as it got me laughing, well, first of all you're probably an autistic savant, and second of all, you can have a beer with me any time you want because I'd definitely enjoy your company.

Arrived: Durban, South Africa

Another day, another another three airports… Took off at about one from Windhoek, Namibia (left photo), and then landed at Johannesburg, South Africa (right photo), and eventually made it to Durban on the west coast of South Africa, at the southern end of Zulu territory. Some people have told me I may meet others with stretched lobes here, but I'm not keeping my fingers too crossed on it.

Flying in South Africa so far has been some of the most turbulent flying I've ever been through — many of the landings have been at very high speed, coming in fast and hard to minimize the chances of stalling I imagine. It's probably a great place to become a confident pilot (or dead). On South African Airlines they use steel silverware when the serve the in-flight meals… Rachel looked at me, holding a metal knife in her hand, with sort of a “holy crap, what have they given us?” look on her face — I told her we'd now have to hijack the plane to prove that American-style “let's use dull plastic” security is a good precaution.

Durban is very pretty from above, incredibly lush and green, but very industrial as well with a lot of refineries and processing plants (immense sugar refineries and so on). I wasn't able to get a lot of pictures of it because it was dark by the time we left the airport, but here are two photos taken as we were coming in for landing, the first of the beach, and the second of one of the harbors.

From the airport Rachel called a couple hotels to see who could provide us with highspeed Internet service in the rooms — I've got mail piling up and need to download it, and don't really want to have to sit in a business center for eight hours… The Sun International hotels (like the Kalahari Sands where we stayed in Windhoek) were charging R1.20 per minute (about $12 US an hour) for access about twice as quick as dial-up, so I wasn't looking forward to the bill to grab my huge bucket of bits.

Anyway, via a truly maniacal cab driver who drove a hundred and fifty kilometers an hour and ran at least five red lights, we made it to the Holiday Inn right on the beach… unfortunately what they'd told us on the phone wasn't quite right and they only had a business center, and nothing in the rooms… So off to the very swank Durban Hilton, or, as I like to call it, the church (sorry, ///, in-joke) in “Bobby's Cab”, a little car with broken doors and a collapsed window.

The left photo is their SuSE/KDE system booting up — a massive thunderstorm had taken their power grid out. I had to stand in line for quite a while with some unsavory Geologistics economic-hitman mining executives (a bunch of already-way-too-rich white guys here to steal the local resources and screw over and drive into debt the native population in the process) because the check-in system was being run manually. Luckily, Internet use here is only R130 for 24 hours (a lot cheaper than anywhere else we've been — about $0.90 per hour).

That said, so far, at very much at first glance, Durban is my favorite of the cities we've been to here in Africa , and seems the most diverse, with a heavy South East Asian (Indian, or perhaps from Madagascar?) population… Well, I've got some work to do but assuming the connection stays solid you'll hear a better report on the city tomorrow, and if the speed tests look good I'll do an image update as well.

Safari Namibia

I'm not sure yet exactly what the plan is for tomorrow, but before I leave Namibia, let me post today's pictures. First, a few shots of downtown Windhoek. It's really a pretty Western looking city, and you can see the German influence and presence clearly — there are more BMWs on the street here than I've seen in some time!

After lunch we went out to a ranch perhaps twenty minutes outside of town and took a drive across it. For starters we saw plenty of nice rolling landscape full of antelope of various sorts and lots of warthogs (although they're not easy to get a picture of; the third one in this set below is an example).

Most of the antelope (I hope I'm not using the wrong term) were in small groups, but sometimes we'd come across huge herds of several hundred at a time.

Now, I've seen — and eaten — plenty of deer in my life, so those weren't really all that exciting. However, at the far end of the ranch we saw four rhinoceroses coming toward us! I don't know if we were skirting with danger, but they seemed really docile and milled around us (within a few feet) for about twenty minutes. It was a family group with parents, a young child (a year and a half or so — you can see it in the middle of the center photo below), as well as an older one.

Not long after that we came upon a large herd (perhaps forty or fifty in all) of giraffes eating away at the trees and foliage.

After the drive across the ranch, Rachel and I decided to go and see a nearby lion feeding as well. After a short drive and hike we made it to a large wall and surrounding cage with slots about four feet by one foot knocked through it — meat, attached to a chain, was tossed over this wall and a minute later we heard the deep rumble of approaching lions. The male dragged the meat out to the women, who immediate forbid him from eating it and consumed it, as he occasionally tried to lick it, earning a swat in the face. Eventually he decided it would make more sense to have a nap.

We drove home as the sun was starting to set, and are now (as I write this, not as I post it) heading out for supper. We're both very tired and not entirely looking forward to tomorrow's time in the air.

As a point of trivia, most of the tourists here appear to be German, and many services are in German, so my ability to understand (if not speak) is quite useful and it's coming back very quickly. As a second point of trivia, people here seem really freaked out by escalators, pausing for a long time at the top and then making a nervous hop onto a step they perceive of as “safe” — that's not just locals, but tourists alike. It's very odd.