Tuesday, January 31, 2012

On The Number One Problem With the Human Race

I am an idiot. This is a fact. Trawling through the evidence for this is an insurmountable task, but you don't have to go through all of it to see that my original statement is true. I am, without doubt, an incredible idiot. I realise this, and I acknowledge it. And wherever possible, I try to take it into account when making decisions. The number one problem with the human race is that most people do not do this.

When I was a teenager, I was convinced that I knew exactly how to drive a car. I understood all of the basic principles of how the car worked, and had some knowledge of the intricacies of handling a vehicle in various favourable and unfavourable driving conditions (most of which had been gained from playing video games and watching TV). I had built working steering systems and gearboxes from Lego Technic sets, and was pretty confident that driving a real car would be simply a matter of adjusting to the size and feel of the controls. Needless to say, when the 17 year old me climbed behind the wheel the day after passing his learner's license, the resulting 3 second journey was enough to scare my poor mother to such an extent that she has never again been a passenger in a car with either me or my brother as the driver, in spite of the fact that we have seven and five years of driving experience respectively.

In psychology, this is known as the Dunning-Kruger effect. This effect causes people who are completely unskilled in a field to rate their ability in that field as much higher than average. And, unfortunately for us, it affects the majority of the human population.

However, there does seem to be a cure of sorts for the Dunning-Kruger effect. And, it is not that difficult to do. All that needs to be done is to provide some form of basic training in that field. Interestingly, a person is able to rank their ability more accurately after minimal training, even if the actual increase in their ability is negligible.

I can't wait for the day (if it ever arrives) when everyone receives very limited instruction in every field, just so that they can realise that all of us are incredibly stupid. Once we realise that, maybe we will be able to move on and just take it into account in our decisions.

  • Kruger, Justin; David Dunning (1999); Unskilled and Unaware of It: How Difficulties in Recognizing One's Own Incompetence Lead to Inflated Self-Assessments; Journal of Personality and Social Psychology vol. 77, No. 6; p. 1121.
  • Ehrlinger, Joyce; Johnson, Kerri; Banner, Matthew; Dunning, David; Kruger, Justin (2008); Why the unskilled are unaware: Further explorations of (absent) self-insight among the incompetent; Organizational Behavior and Human Decision Processes Vol. 105 No. 1; p. 98.

See also:
(On a side note: While I may come across as believing that I rate myself as an above average amateur psychologist in the above post, I'd like to point that I only get my knowledge through reading (something that any educated child can do), and that I do not consider myself an amateur psychologist at all. I'm just a guy who likes to point out stuff because I wish other people knew more.)

If you enjoyed this post, then don't forget to like, tweet, +1, or upvote on reddit. If you have any questions, comments or complaints, post them using the form below.
. . . . . . . . . . . . . . . . . . . . . . . .

Wednesday, January 25, 2012

On the Minecraft Bookshelf Dependency Part II: The 1.1 Changes

[Editors Note: For those who do not play Minecraft, you should. You can play it in your browser here, but I strongly recommend downloading the client from here.]

[Another Editors Note: This post is outdated. An updated version is available for the enchanting systems introduced version 1.3]

It took only three weeks for my post about the Enchantment Level - Bookshelf dependency in Minecraft to go out of date. One of the most welcomed changes listed in the version history for Minecraft 1.1 reads "Decreased randomness of enchantment levels at Enchantment Tables." I have admittedly been waiting for someone else to go digging in the source code and update the formulae on the wiki page, but no one has. So, I had to do it myself.

I downloaded the Minecraft Coder Pack and decompiled the source code for versions 1.0 and 1.1. Despite having practically no java experience, it did not take me more than a few minutes to find what had changed. In fact, the only difference was a single line, which had previously read
    j = 1 + random.nextInt((j >> 1) + 1) + random.nextInt(j + 1);
and which now reads
    j = 1 + (j >> 1) + random.nextInt(j + 1);

It is immediately obvious that saying that they "decreased the randomness" means they literally went into the code and deleted one call to the function "random.nextInt". At this stage of the code, j is the number of book shelves around the enchantment table, and is capped at 30.

What this means is that the enchantment level is calculated by adding together 1, half the number of bookshelves (rounded down), and a random integer between 0 and the number of bookshelves. Later on in the code, a random integer between 0 and 4 is added to this. Previously, instead of using half the number of bookshelves, a second random integer between zero and half the number of bookshelves had been used.

This obviously skews the distribution of the offered enchantment levels toward the higher levels, but it also makes lower level enchantments impossible to obtain if you have too many bookshelves. This is not an issue, however, because adding and removing bookshelves is not at all difficult. The net result is that instead of requiring an average of 2480 attempts to be offered a level 50 enchantment as before, the user need only make an average of 155 attempts. This should take less than a couple of minutes to find for most players. The updated probability distributions are shown in Figure 1, with the original distributions shown as dotted lines. The sloping distribution in the upper and lower five levels of the range are caused by the additional random integer between 0 and 4 that is added on.

Figure 1: Distribution of enchantment levels appearing in the bottom slot

The more important relationship for the player is the one that tells the player the optimum number of bookshelves to use to obtain an enchantment of some desired level. The fact that higher levels are more likely has an interesting effect. Previously, the probability of obtaining lower levels was high enough that the bottom slot was almost always the most likely to offer the level you wanted, even if that level was much lower than the maximum available. After the update, however, the top and middle slots play a significant role, resulting in the optimum number of bookshelves having local minima at levels 26 and 34. The optimum number of bookshelves required is shown in Figure 2.

Figure 2: Optimum number of bookshelves to obtain a desired enchantment level

Thanks go to FifthWhammy for pointing out a small error. It has been corrected.

If you enjoyed this post, then don't forget to like, tweet, +1, or upvote on reddit. If you have any questions, comments or complaints, post them using the form below.
. . . . . . . . . . . . . . . . . . . . . . . .

Tuesday, January 17, 2012

On the Third Arbitrarily Defined Solar Cycle

The thing that I am perhaps most proud of about this last year is how the Google searches bringing visitors to my site have changed. From the early searches about squirrels laying eggs, ants eating houses, and the finer details of inter species animal breeding, the internet has finally moved on to searching for things like "nether wart", "sun diagram", and " minecraft variable enchantment table". I still get many strange searches that lead to my blog, such as "pig on a blue screen" or "why is there a dead pakistani on my couch", but I suppose there is no helping some people.

This last year marked my first viral post, the post on Minecraft mining efficiencies, which attracted over 11 000 visitors within 24 hours of being posted.

My readership is more international than ever, reaching 92 different countries (or 40 before the viral post). The top ten countries contributing to my readership were the US, UK, Canada, South Africa, Germany, Sweden, Australia, Netherlands, Denmark and Norway, each of which contributed well over a hundred unique visits. At this rate, I'm spreading across the world even faster than those penguins, which for some obscure reason just turned around and marched (swam) straight back to Antarctica as soon as the seasons changed. They are up to something. I just know it.

So to the 20 091 visitors who contributed to the 35 034 page views that my blog has had in the last three years, thank you. If you are lucky, I just might have some more absolute rubbish to feed you for another year.

If you enjoyed this post, then don't forget to like, tweet, +1, or upvote on reddit. If you have any questions, comments or complaints, post them using the form below.
. . . . . . . . . . . . . . . . . . . . . . . .

Monday, January 16, 2012

On "Made from Real Fruit Juice"

It will hopefully come as no surprise to my readers that the the statement "100% pure fruit juice" on the label of certain fruit juices does not mean the same as, say, "100% fresh orange juice, no additives". In fact, if you read the label, it would likely list the ingredients as something like "orange juice concentrate, apple, pear and/or grape juice, sodium benzoate." If you are particularly lucky, the apple, pear and/or grape juice may be "deflavoured", whatever that may mean.

If it is only worrying to you that your orange juice is being mixed with other fruit juices, then I am obliged to remind you that the use of the "and/or" implies that even the label manufacturers are often not sure what juice the orange concentrate is being mixed with. If you are one of the nitpickers who points out that adding sodium benzoate means that it is no longer 100% fruit juice. The concentration of sodium benzoate has to be less than 0.1% by law, meaning that the juice is indeed 99.9 something percent fruit juice. There is no crime in rounding up, especially by such a small amount.

What is more concerning are sweets. I came across a couple of packets of sweets recently that proclaimed "Made from real fruit juice" prominently on the front of the packaging. Out of curiosity, I picked up a packet of the strawberry flavoured sweets and examined the ingredients, which did indeed state that it contained "apple juice concentrate (4%)". Out of curiosity, I picked up a packet of orange flavoured sweets, which stated the same.

On a slightly related note, it is incredibly likely that my laptop's casing was made from real dinosaurs.

If you enjoyed this post, then don't forget to like, tweet, +1, or upvote on reddit. If you have any questions, comments or complaints, post them using the form below.
. . . . . . . . . . . . . . . . . . . . . . . .

Monday, January 9, 2012

On Pigeons and Doves

Several times in my life, I have gotten into arguments about the identity of birds. The bird family of Columbidae can be very confusing, because, in truth, no one really knows the difference between pigeons and doves. Even ornithologists can't really decide what the difference between the two are.

Laughing Dove
Photo by Sandeep Thoppil, 2010.

Cape Turtle Dove
Photo by Muhammad Mahdi Karim, 2011.

Feral Pigeon
Photo by Alexander Gamauf, 2008.
Originally, the Germanic word that gave rise to the word "dove" refered to all birds in the family Columbidae, whilst the word "pigeon" was derived from the French word that specifically referred to the meat of these birds. After some time, when new species were found and named, the word "pigeon" began to slip in. Now, the birds that are referred to as pigeons and doves are so mixed up, that many species of pigeon are more closely related to doves than they are to other pigeons, and vice versa. In general, however, the words "pigeon" and "dove" are applied consistently within a genus, the only exceptions being the Rock Dove, Stock Dove and Lemon Dove - all of which belong to the genus Columba, which consists of thirty species of pigeon, and only three species of dove.

The only reliable way of telling whether a bird is a pigeon or a dove is to identify it and refer to its common name. Fortunately, in South Africa, it is very easy to tell the difference between the most common species of pigeons and doves.

The Laughing Dove is the most common species to be found in South African gardens. It is easily identified by it's plain colouring, the only decorative markings being faint speckles on the front of it's neck. The similar looking Cape Turtle Dove can be distinguished by the thick black stripe on the rear of its neck. There is very little variation in colouring with these species.

The Feral Pigeon is slightly larger, and has a more pronounced cere than the doves. Pigeons are most commonly found wherever someone may drop food. Feral Pigeons evolved from escaped Domestic Pigeons and have come to inhabit most of the world. Originally, Domestic Pigeons were bred from Rock Doves, which are only called doves because the name "Rock Pigeon" officially belongs to members of the Australian genus Petrophassa. They vary greatly in colour, from plain black to plain white, but are usually grey with a couple of dark stripes across the wing.

Interestingly, the white doves that are often released at weddings are usually domestic pigeons.

So, in future, just remember that the simplest way to tell the difference is:
  • Those stupid, plain-looking birds that won't get out of the way of your car are doves.
  • Those evil red-eyed demons that swarm you in packs at the slightest sign of food are pigeons.

If you enjoyed this post, then don't forget to like, tweet, +1, or upvote on reddit. If you have any questions, comments or complaints, post them using the form below.
. . . . . . . . . . . . . . . . . . . . . . . .

Tuesday, January 3, 2012

On the Quartering of Sandwiches

Of course, how you cut your sandwiches is entirely a matter of personal preference, but what happens if you have no preference? The majority of shop bought sandwiches are halved into two triangles of roughly equal size, but I find that quartered sandwiches are ever so slightly more convenient to eat with my hands. Exactly the same applies to slices of toast.

When I was much younger, I liked to have my toast cut into five long fingers. This had the advantage that 60% of the slices would contain almost no crust, but with the obvious disadvantage that the remaining slices would consist almost entirely of crust. In addition, this requires four separate cuts to be made. Cutting the slice into four resulted in half the pieces having an unacceptable large proportion of the crust. By the time I was ten years old, I had abandoned this and adopted the two cut quartering method for good - both for toast and sandwiches.

The two cut quartering method is illustrated in the diagram below.

The edges of the sandwich are given by the quadrilateral ABCD. The sandwich is first halved along the line FH, where F and H are arbitrary points along the top and bottom of the sandwich respectively. These two pieces are then halved again simultaneously by making a single straight cut along the line GJ, with G and J representing arbitrary points along the right and left edges respectively.

The big question that arises from this is where exactly should the points F, G, H and J be located. Obviously, locating them on the midpoints of the line segments AB, BC, CD and DA results in pieces of identical size, shape, and crust distribution. However, as I established from the four versus five fingered arrangement, I would much prefer the majority of pieces to have a below average portion of the crust. Locating the points F, G, H and J exactly on A, B, C and D results in four isosceles triangles of two different sizes - a shape that is very popular for cocktail platters. If we consider a sandwich that is a perfect rectangle of aspect ratio of 1.2, then the two larger pieces will have 16.2% more area than the other two pieces, and contain 20% more crust.

I have even considered locating F, G, H and J on the quarter points, producing the shapes shown to the right. This results in two of the pieces having 9.0% more area and 9.5% more crust than the other two pieces. Unfortunately, there is no possible way using the two cut quartering method method as described here that results in the larger slices having less crust, which would be my preference.

However, whatever the maths says, I always find myself reverting back to the standard four little triangles. I wish I knew why I preferred that shape.

If you enjoyed this post, then don't forget to like, tweet, +1, or upvote on reddit. If you have any questions, comments or complaints, post them using the form below.
. . . . . . . . . . . . . . . . . . . . . . . .