Photos: 20th Biennale of Sydney

Over the past two months I’ve spent a few weekends checking out the 20th Biennale of Sydney. I haven’t been to all the locations where the Biennale is held this year, but I have seen the exhibits at Cockatoo Island, the MCA and the NSW Art Gallery.

Many of this year’s exhibits are audio/visual in nature but the few photos below capture at least some of the amazing art that’s there to be experienced.

Central Europe Adventures 2016 – Part Seventeen: Osnabrück and Münster

After four nights in Berlin I caught the train across to Osnabrück where I have a good friend. Osnabrück is only three hours from Berlin but it felt like a very long way. About halfway through the journey I realised I had given my friend the wrong arrival time and he ended up waiting in the cold and damp of the station for an hour. Once we had dropped my bags at his place we headed out to a cafe for cake and a hot drink.

Continue reading

Economic and Historical Perspectives

A few weeks ago I finished reading a book called “Russia Which Way Paradise” written by former ABC Russia Correspondent Monica Attard. The book was written around 20 years ago and documents the collapse of the Soviet Union. It’s an interesting book to read given the current political situation in Russia and the relationship between Russia and the international community.

There is one story in the book that I found particularly humorous:

Natasha told me when I first arrived in Moscow that I was now living in the richest country in the world, a comment that struck me as rather odd given the sad-looking shop shelves, the run-down buildings and poorly dressed people I was seeing.
‘How can this be the richest country in the world?’ I asked her.
‘Well, as we say in Russia, people have been stealing for seventy years and there’s still something left to steal.’

Code Structure, Random Number Generation and Conditional Probability

I had an interesting discussion with a group of students this afternoon which highlighted how important it is to understand conditional probability and how code structure can produce unexpected results.

The students’ code contained three lists and a random number generator. The random number generator was meant to randomly chose which list to take something from with equal probability (that is 1/3 chance of selecting from each of the lists). However, somehow one of their lists was being selected far more than the others.

Their code looked similar to the following:

if (random.nextInt(3) == 0) {
  // select from list 1
} else if (random.nextInt(3) == 1) {
  // select from list 2
} else {
  // select from list 3
}

Can you spot the bug? Why would this not generate equal probabilities of selecting from each list?

I wrote some of my own code to test this code structure almost 100 million times:
int count0 = 0;
int count1 = 0;
int count2 = 0;

// loop almost 100 million times
for (int i = 0; i < 99999999; i++) {
  if (r.nextInt(3) == 0) {
    count0++;
  } else if (r.nextInt(3) == 1) {
    count1++;
  } else {
    count2++;
  }
}

Which generated the results:
Count0 = 33333271
Count1 = 22221788
Count2 = 44444940

Which demonstrates this code doesn’t generate equal probabilities.

The problem is the second random number generation:

if (r.nextInt(3) == 0) {
  count0++; // this has 1/3 probability (0.333333333333333)
} else if (r.nextInt(3) == 1) { // this else will run 2/3 of the time
                                // and resolve true 1/3 of the times it runs

  count1++; // 1/3 * 2/3 this line will run... i.e. 2/9 probability (0.22222222222)
} else {
  count2++; // 2/3 * 2/3 this line will run... i.e. 4/9 (0.4444444444444)
}

Restructuring the code to only generate the random number once and storing this in a temporary variable makes a huge difference:

int rInt = r.nextInt(3); // only generate a random number once.
if (rInt == 0) {
  count0++; // this will run 1/3 of the time.
} else if (rInt == 1) {
  count1++; // this will run 1/3 of the time.
} else {
  count2++; // this will run 1/3 of the time.
}

And the results of this are:
Count0 = 33333907
Count1 = 33332586
Count2 = 33333506

Which looks much better.

(Note: alternatively you could make the second random number generation be out of 2 rather than 3 but this would be slower as the random number generator will take a few CPU cycles to calculate.)

Central Europe Adventures 2016 – Part Sixteen: An Additional Day in Berlin

On the morning that I was due to leave Berlin I decided to stay an extra day. Although I had been in Berlin for three nights, I had only spent one afternoon in Berlin proper as I had been ill almost all the rest of my time there.

I began the day by meeting up with a friend who had studied in Sydney for a number of years. We went for a walk along the runway of Tempelhof Feld – an airport that has now been turned into parkland – and the surrounding suburbs.

Continue reading

Central Europe Adventures 2016 – Part Fifteen: Exploring Luther’s Wittenberg

I’ve wanted to travel to Wittenberg since traveling past it on my previous visit to Germany. I wanted to know how a man from such a small town could have such a large impact on world and church history and beliefs.

Although I was still not very well after coming down with food poisoning I took some medication and caught a train from Berlin to Wittenberg for the day trip.

I was immediately lost on arrival at Wittenberg train station as the train station is not in the centre of the town like I had expected it to be. To ensure that I was even more lost there was no signage or map at the station showing the way to the centre of town.

I decided that the best idea was to follow the three people in front of me along the road. This plan worked until we came to the first intersection where the three people all walked off in different directions.

At this point I found a street name that matched the small printed map of Wittenberg that I had and despite realising I was in the complete opposite end of the town to what I thought I was at least I knew that I was heading in the right direction (For the record: Lutherstadt Wittenberg and Lutherstadt Wittenberg Altstadt are two different train stations).

My first stop in Wittenberg was at the Lutherhaus museum. I spent almost two hours here as the museum has a great overview of all aspects of Luther’s life and relationships with his family, community and contemporaries.

Continue reading

Central Europe Adventures 2016 – Part Fourteen: Travel Drama and Sickness in Berlin

My visit to Berlin was filled with unneeded drama. Upon arrival from Dresden I decided to drop my bags at my hotel before spending the afternoon exploring Mitte. To get to my hotel I needed to catch an S-Bahn from Berlin’s Hauptbahnhof to Hackescher Markt. As I stepped off the escalator onto the S-Bahn platform I just missed a train, and then the next one pulled into the station so crush loaded that you couldn’t get a suitcase onboard. After waiting a very long time for a third train I made it to my hotel.

Once I had checked into my hotel I started to walk towards the Brandenburg Gate along Unter den Linton. As we walked along the road through the area around Museumsinsel we noticed many police vehicles, and we then found ourselves stuck between two road closures as the police were closing down the area for the visit of the Israeli Prime Minister. After being allowed to jump a barricade to get out of the exclusion zone we took a detour to the Berlin Konzerthaus where Ai Weiwei had wrapped the pillars of the building in life vests used by refugees to get to Europe. We then walked back to Unter den Linton and got to the Brandenburg Gate as the sun was setting.

Continue reading

Central Europe Adventures 2016 – Part Thirteen: Bundeswehr Military History Museum Dresden

The Militärhistorisches Museum der Bundeswehr (Bundeswehr Military History Museum) in Dresden contains a large number of military exhibits covering the modern history of Germany and has free admittance on Monday nights. I was fortunate enough to be visiting Dresden on a Monday, so after spending the day exploring Dresden’s old city and New Green Vault my friend and I caught a tram the few kilometers to the museum.

My primary motivation for visiting the museum (other than free entry) was to see the Soyuz Space Capsule and V-2 Rocket. When I arrived, I decided to follow the recommended path through the museum which takes you from the middle ages through to current German military deployments.

The quality of the exhibits and the tone of the museum is really good. Over the last 150 years, Germany has experienced many wars. By following the historical timeline through the museum you see both the advancement of technology but also the history of the modern state of Germany. The museum did well to not express a statement about the might of German technology nor did it have walls of remembrance like many military museums in Australia and New Zealand have. I was most impressed by how it handled the Second World War exhibits which included historical German propaganda and other political items, they were presented them in a simple, clear and factual manner.

Below are a few photos from my visit. Despite originally going to see the Soyuz capsule and V-2 I ended up becoming more engrossed in the Prussian and Cold-War era exhibits.

Completely destroying all data on a Hard Drive

A few days ago while clearing through some old boxes of computer equipment I discovered an old hard drive. This drive had been removed from an old computer that had been disposed of. At the time of disposal I copied all information from the old computer its replacement and kept the old hard drive as a backup in case something went wrong.

Now more than five years later I no longer need the backup and want to dispose of the physical hard drive. But first, I want to ensure that the drive is completely clear of the old data. Connecting the drive to my current computer it can still mount and read the old drive and I can see all the old files on it. It’s good that the backup has lasted this long but to completely wipe the drive of all this old personal data is a little more complex than just selecting all the contents and pressing the delete button or doing a reformat under Windows.

Completely destroying all data on the drive is important. If the drive is not completely wiped (that is every single physical sector on the drive is written over) it is possible that someone using a few pieces of software could bring the old data back from the dead.

To completely nuke the drive I could pay for commercial software or take a hammer to the physical drive. But there is a free way to nuke the drive by using Ubuntu Linux and it’s quite simple to do:

  1. Boot Ubuntu (running from a live CD/USB should work too)
  2. Find the full device path of the drive you want to destroy by running at a terminal:
    sudo gparted

    If you don’t have gparted installed, then install it using

    sudo apt-get install gparted

    Then on the right hand side of the GUI window select from the drop down list of hard drives and check the partitions of each one to confirm the path of the device that you want to nuke is. For instance:

    /dev/sdN
  3. Shred the drive using the following command, replacing the path with the path you found in step 2.
    sudo shred –vzn 1 /dev/sdN

    This command will take a while to run. It will go over the entire drive writing random data into every single physical sector of the drive and then a second time writing zero into every single sector.

Once the command has finished your drive will be completely wiped. It can now be reformatted and reused without any worry about someone being able to resurrect the previously deleted data.

Central Europe Adventures 2016 – Part Twelve: Dresden

After a week exploring Vienna, Bratislava, and Prague it was time to return to Germany. The train pulled out of Prague just as the sun was setting on a Sunday evening. To get to Dresden the train runs alongside the Vltava and the Elbe Rivers which was a very picturesque until it became too dark to see outside. Darkness completely descended around an hour north of Prague as we pulled into the Czech city of Ústí nad Labem. Despite the darkness this city looked fascinating to visit and is somewhere I would love to return to.

As we crossed the border into Germany many hikers boarded the train who had been hiking in the nearby region of Saxon Switzerland. I got rather excited discovering new places to visit and I quized my German travelling companion about Saxon Switzerland and I began mentally planning my next trip to this area of the world.

Our train pulled into Dresden Hauptbahnhof just before 7pm and we immediately headed for the S-Bahn to take our luggage to our hotel before getting dinner. Our hotel was located next to the Dresden Mitte station and – as the German word mitte means centre – we were expecting our hotel to be in the middle of Dresden. However, both sadly and surprisingly the effects of the destruction of Dresden from the second world war are still visible. Our hotel was between a train station and a main road with nothing much else but light industry surrounding it.

Once we had checked out luggage into our hotel, my friend and I walked the 15 minutes from our hotel to Dresden’s Altmarkt, walking past the amazing Zwinger Palace along the way. At the Altmarkt we had dinner at a Hans im Glück restaurant on the very strong recommendation from one of my friends in Munich. The burgers at Hans im Glück are amazing, they are on par with the best that a Burgerfuel in New Zealand can produce.

Continue reading