Archives for May 2012

May 2012 (7)
SMTWTFS
« Apr Jun »
12345
6789101112
13141516171819
20212223242526
2728293031

Like this Archive Calendar widget? Download it here.


Henning Mankell: L’homme inquiet (The Troubled Man)

When we were in Paris back in April, I picked up the latest (and final) Inspector Wallander novel. Yes, a Swedish book translated into French and read by an Englishman. There was method to my madness (just): the first Wallander book I read, I’d picked up as a French translation (it was Firewall , or, La muraille invisible ) in Montreal in order to try and recover some of the French I’d known and learned when a child. Fairly successful, except I then read the rest of them in English translations....

READ MORE

Awesome use of AND operator

I was reading some JavaScript code the other day, because, you know, reading someone else’s code gives you insights and inspirations to improve your own, when I came across this function to calculate the maximum element in an array: function max(a) { for ( var i = a.length, maxValue = a[0]; i--; ) { a[i] > maxValue && (maxValue = a[i]); } return maxValue; } Taking it slowly, first of all, check out the for loop. For comparison, here’s how I’d write it myself: var maxValue = a[0]; for ...

READ MORE

Random sample algorithm

Raymond Chen’s post this morning was about one of the most bizarre uses of GUIDs I’ve ever heard about. I’ll quote the relevant bit: A customer liaison asked, “My customer is looking for information on the GUID generation algorithm. They need to select N items randomly from a pool of M (jury selection), and their proposed algorithm is to assign each item a GUID, then sort the items by GUID and take the first N .” I was, to be blunt, horrified that this was the only algorithm the unnamed customer...

READ MORE

Checkerboard problem

I know the answer to this conundrum, but I still have problems recognizing the answer. If you’ve never seen it before, it is really baffling. Which is the true statement about the image below? Square A is a darker grey than square B. A and B are the same shade of grey. A is lighter than B. (Click to enlarge to full size. It might help.) The illusion was invented by Edward H Adelson in 1995. The best way to work out the solution empirically rather than by sight is either to import the full image into...

READ MORE

Pikes Peak and the Supermoon

I was getting coffee from Starbucks this morning when I looked at Pikes Peak in the early morning sunlight. There was the waning moon setting over the snow-clad mountain. (Yesterday was a day of drizzle and damp; obviously this settled as snow at higher elevations.) I laid down some rubber to return home and get the camera to take a shot. As you can see I just made it back in time… By the way, if you want to see what Pikes Peak looked like on Saturday, here’s a shot I took then: Yep, there was quite...

READ MORE

PCPlus 306: How 3D TV works

Without a doubt this article was an absolute hoot to write. I had the most fun researching the subject, buying an iPhone app, photographing my toy stuffed hedgehog, writing the article, reading press releases about Nintendo’s 3DS (it had only just been announced when I was writing this). In fact, doing everything except, you know, actually watching any 3D TV (we don’t have a telly, let alone a 3D one). In the article I quickly explain what a 3D effect is and how it works (each eye sees something...

READ MORE

Garden of the Gods and my Volvo 1800S

Poor old 64SAINT was looking a little moth-bombed this morning, so I took it out to wash it. Since it was a bloody glorious day – dare I say it, heavenly – I drove it to Garden of the Gods Park to photograph it. It was also a great opportunity to play around with my new Canon 60D as well. I had on the EF-S 18-55mm lens, so there’s lots of wide-angle shots. Without further ado, here’s a brief selection of photos. You can see the full set on my Flickr page . Or as a slideshow . This one was taken in...

READ MORE