Merry Xmas

December 25th, 2011

This year it was a fairly quiet affair, seeing as we’d already visited family in late summer and at Thanksgiving.

The kids did well as usual. Mini-Elbeno got a Kindle Fire from the grandparents (and has been bound not to buy anything on it without the express permission and help of Mrs Elbeno or myself). Micro-Elbeno is apparently going to grow up to be a typographer because he loves letters so much. He got various alphabetic gifts.

I got Mrs Elbeno a wooden watch made from maple and sandalwood. As for me, I got a few items from my always well-stocked Amazon wishlist:

Our UK Trip

November 28th, 2011

We’ve been in the UK about a week now. Here’s what happened so far:

The flight was good because it wasn’t full. There was a spare seat next to us which meant the kids could both stretch out a bit and get some sleep. American Airlines has a new policy (brought on by some overly-litigious employee/customer, no doubt) that their weight limit on strollers for gate checking is 20lb. Any stroller heavier than that must be checked at the checkin desk, and ours weighed in at 22lbs. Never mind that Micro-elbeno weighed 3 or 4 lbs heavier than we know him to be on the same machine, or indeed the observation that they have a financial incentive for the machine to deliberately over-read and there is no apparent regulation. There’s no arguing with checkin desk automatons.

Our rental car is a Peugeot 3008 diesel automatic, and after about 20 minutes on the road I was used to UK driving again. The transmission is pretty sluggish though – it takes a second to respond to putting your foot down.

The first night we spent in Woking. After getting to our hotel, I took a quick shower and took the boys out to get some air and see the delights of Woking town centre – viz, a statue of a Martian (HG Wells was from Woking, their one claim to fame) and the Peacocks centre, with its huge Xmas ornaments hanging from the ceiling and occupying the central part of the mall. Mrs Elbeno rested a little and showered, and my parents, my sister and her husband and new daughter joined us for dinner in the hotel – quite a passable meal. Mini-elbeno enjoyed dessert.

Next day, we headed off to the Southwest to visit more family and friends. Down the M3 and the A303, our first stop was Wincanton where we visited my aunt and her family. We also stopped in to see both my Grandma and Grandad who are temporarily in separate care homes – one in Yeovil and one in Langport. They were both thrilled to see the boys – it was the first time they’d seen micro-Elbeno. It may be the last, so I’m glad we were able to stop by each of the places for a half hour. My grandma is in the end stages of heart failure, and while my grandad seems physically fit, he is 92 and the journey from health to illness can be quite short at that age. They have both lost significant short term memory ability, but they remembered us, including mini-Elbeno, and they knew who micro-Elbeno was too. Even though we had the same conversation 5 times, it was nice to be with them and see how happy they were to watch the boys playing quietly together.

Leaving Langport, we went further down to the Southwest to stay the night in Exeter. We had dinner at a pub called The Barn Owl right next to our hotel, and the food was pretty good. Against all odds I actually remembered the PIN for my UK credit card – a PIN which I set at university when I got the card, and which I have never used until now.

We were in Exeter all day Wednesday, where we met up with my old friend David. He has two boys as well – the older about a year younger than mini-Elbeno, and the younger one almost exactly the same age as micro-Elbeno – and independently named the same! The boys had fun playing in the morning, and then we went to lunch at my friend Lawrence‘s house. Lawrence fed us pasta, and we had a pleasant lunch conversation, then he kindly signed a few of his new books for me. Back at David’s house, the boys played some more and we had dinner after David’s wife got home from work – chicken Kiev, new potatoes, broccoli and leeks. We were introduced to a kid’s show called The Night Garden – a spiritual successor to Teletubbies – and David’s kids went to bed, and we went back to our hotel.

On Thursday we drove back up country to our rented cottage in Chipstead, near Redhill. We stopped on the way to spend half an hour at Stonehenge. Mini-Elbeno enjoyed the audio tour, but the thing he remembers the most is the warning at the end to return it lest an alarm sound. Anyway, we had lunch at a cafe in Andover and got to the cottage in the late afternoon. My parents and my sister came down and the girls had a night out while my dad and I looked after the boys.

Friday was the day that everyone had taken off work to prepare for the Thanksgiving feast on Saturday, so we headed to my parents’ house to be with the family. Most of our time was spent looking after the boys though. We chilled a bit and visited the local park to let out some energy. In the evening I went out with my dad and my brother and sister. We took the train to London Bridge and ate at a restaurant called Roast. I had a scotch egg with piccalilli to start, followed by roast belly pork with mashed potatoes and applesauce, also carrots and a nice apple and celeriac salad with candied walnuts. Dessert was apple crumble with custard. I was digging in the crumble and thinking, this is a tough apple, but I managed to slice off a bit with my spoon. After chewing it a bit I realized it wasn’t an apple at all, but rather a lemon. I was chewing a sizeable portion of lemon peel. I swallowed it, dug out the huge piece of lemon from the crumble, and continued. Everything after that rather tasted of lemon…

On Saturday, Mrs Elbeno did a 9 mile run in the leafy wilds of Surrey, and after that we headed to the parents’ house for the traditional Thanksgiving celebration. In the end there were 23 people who I will list here for my own future reference: Dad, GJ; the four Elbenos, Cara, Garth and Olivia; Alexander and Georgie; Anne, Joanne and Duncan; the Parry-Clarke clan including Georgie and Ben; Helen, Luke and Tom (who arrived a little later). We all feasted in a marquee in the garden – the usual excellent food with plenty of leftovers!

Sunday morning, we got out of the house and went down to Brighton to see our friends the Boards. The small Elbenos had fun playing with the Boardlets and then we went to Brighton Marina for lunch at Pizza Express, an old favourite of Mrs Elbeno’s. Leaving Brighton slightly later than planned because of micro-Elbeno’s temporary loss of a shoe, we arrived at Olivia’s christening a bit late. Luckily we didn’t miss anything important – we arrived in time to see everyone and eat more sandwiches and cake. On Sunday night Cara, Garth and Olivia joined us for “dinner” of leftover sandwiches and cake and a few games around the table.

It’s now Monday morning and today we’re going once more to see my parents and up to London to the museums. Tonight will be our final meal with the family and then tomorrow we’re back home on the plane – just in time, I hear, to miss an airport workers’ strike which threatens 12 hour flight delays! The weather here in the UK has been kind to us and our cottage has been a good place to crash and even do some laundry, although we haven’t figured out the arcane controls for the underfloor heating system. We are now content just to let one room be hot and one cold, even though all of the controls we can find claim to be set to the same temperature.

I’m not really looking forward to the flight home (small chance of a spare seat again, I think) but I am looking forward to the comforts of my own home and even to seeing what’s gone on at work since I left…

I’ll supplement this epic post with pictures once I get home and can get everything sorted out.

RIP drm

October 13th, 2011

This week, Dennis M. Ritchie, co-creator of C and Unix, died. His death has not made the front page like Steve Jobs’ did. But although the non-tech world had never heard of him, he was more important than Jobs.

I can still remember buying my copy of K&R, that slim volume that was my reference manual and introduction to C. Shortly before term in my second year, my Dad drove me up to Cambridge, and after unloading my stuff and having lunch, we went into Heffers on King’s Parade. On the upper tier, about two-thirds of the way toward the back on the right, was the Computer Science section. My Dad bought for me a copy of K&R and also a copy of Modula-3. K&R cost £25.

Modula-3 I seldom used after graduating, but C became a permanent part of my life. I spent my university summers compiling Linux kernels and fiddling with programs, and then I got a job in the games industry, and the rest is history. Until only a few years ago, I still used my copy of K&R now and then, mostly for reference (p53, operator precedence; p122, complicated declarations, and of course the appendix for remembering the order of arguments to fread() et al). At my last company, at one point it was issued to every engineer as a matter of course. It has now been retired only because of “proper” C++ I/O finally being acceptable in games.

As for the rest, Wired says it better than I can. Thank you, Dennis.

It’s October

October 5th, 2011

And that means the 17th Annual Interactive Fiction Competition is underway. This year there are many entries playable on the web! What will they think of next, eh?

Also, Blizzcon approaches (a little more than 2 weeks away), another Humble Bundle is out (and as good as usual), and today it rained quite a lot here. Hope everyone’s enjoying the Diablo III beta; we’re still working hard.

More exciting news: a new bookshop opened nearby: Mysterious Galaxy. They specialize in SF, Horror, Fantasy and Mystery. I popped in there with mini-Elbeno on Saturday and picked up a copy of The Invention of Hugo Cabret for him to enjoy.

Diablo III Beta goes public

September 20th, 2011

After a few weeks of being friends and family only (and sorry to my games industry friends, but you weren’t allowed in either) it’s now open season for the Diablo III Beta test.

Explaining Maths

September 11th, 2011

Recently, I was talking to my Dad about fiddling about programming the iPad (which I haven’t got around to yet) but I did mention that I might have a go at something simple just to get my feet wet. Beyond Hello, World there are many simple small-to-medium-size projects of course, and I mentioned I might do something like a Mandelbrot set explorer.

What followed was a bit of a Wikipedia-esque delve into some Mathematics as I tried to explain what the Mandelbrot set is.

Of course, everyone knows what the Mandelbrot set is. It’s the iconic heart-shaped box of springs and wire that is the poster child of fractal art. And as any mathematically-inclined person knows, it’s a colouring of the complex plane. It’s easy for computers to calculate: you take a complex number c, and iterate the equation zn+1 = zn2 + c, starting with z0 = 0. If the result tends to infinity, that number is not in the Mandelbrot set, otherwise it is. Anything in the set is coloured black, and things on the edge get coloured according to how many iterations it takes to pin down their non-membership of the set.

Most of that last paragraph is of course in Martian for many people, so I started explaining complex numbers. Which necessitated a bit of maths history.

To start at the beginning, we have the natural numbers, aka the counting numbers. These are the numbers we all learned as small children, starting at 1 and counting arbitrarily high. The natural numbers are conventionally called ℕ.

Natural numbers are fine for addition, but you get to a problem with subtraction: if you take 5 from 3, you end up with a number that isn’t in ℕ. So the next obvious way to expand is to add the negative integers and 0. Now we have the integer line stretching to infinity in both directions, with 0 in the middle, and this set, the integers, is called ℤ. As you can understand, ℕ is a subset of ℤ.

So far so good. ℤ is closed under addition, subtraction, and multiplication, meaning that if you take any two numbers in ℤ and either add, subtract, or multiply them together, you get a third number also in ℤ. However, what if you divide? You get a fraction – potentially a non-integer! And of course that’s not in ℤ. So the next set is the set of rational numbers (because they are ratios), called ℚ. Once again, ℚ is a superset of ℤ (any integer can be thought of as a ratio of itself over one).

All good, and this was as far as anyone thought for a while. Then a bright spark in Ancient Greece discovered numbers that couldn’t be ratios, and by many accounts, this was quite upsetting to the Greek geometers. Nevertheless, it was true, so Mathematics had to account for the so-called irrational numbers as well as the rational numbers, and taken together these constitute the real numbers ℝ.

At this point there are many fascinating asides involving mathematical efforts to tame infinity and infinitesimality, which meant that basis of much of maths (eg. calculus) was worryingly unstable and not well understood for quite a while, at least until brains like Georg Cantor had a go at it. There is also an aside about transcendental numbers (like π) which are a subset of irrationals that cannot be the root of any polynomials.

Anyway, sweeping all this under the table and assuming that the real numbers ℝ are perfectly well-understood, there remains a final snag for our story. Taking square roots is undefined for negative numbers, which in mathematical terms means that ℝ was not closed under exponentiation. To fix this final problem, we come to the complex numbers ℂ, each of which has a real part and an imaginary part (which is expressed as a multiple of i, the square root of -1).

Because they have two parts, the complex numbers can be thought of as a two-dimensional space: an x-y graph space where x is the real axis and y is the imaginary axis. And this is the complex plane. So finally we’re back to the original explanation with enough context to understand it: the Mandelbrot set is simply a colouring of each value in the complex plane (with suitable limits in x [real] and y [imaginary] parts) according to whether it’s in the set or not, or how fast the iterative process can determine that. Because there are an infinite number of values in the plane, you can zoom in without limit, and the fractal nature of the set means you will discover finer and finer detail.

Birthday

June 3rd, 2011

Thanks everyone for the birthday wishes.

I got a few cool gifts:

Blizzard Haz Talent

May 13th, 2011

Blizzard Haz Talent

This afternoon was the Blizzard annual talent show (expanded from the old “Battle of the Bands” of the past three years). It turns out Blizzard does have some talent!

We got to hear some cool music: electronica/rock/bluegrass/pop/etc, see a spicy salsa dance routine, a karate routine including breaking bricks (with a WoW magazine!) and in between the “official” acts there were some audience filler acts: tricks with a bullwhip, smashing a watermelon with Doomhammer or cleaving one with Frostmourne, and jumping a row of 5 people on a motorized cooler (well, almost)!

Maths is fun

April 1st, 2011

The other week, a colleague walked into my office and posed the following problem to me:

For all n where n is prime and n > 3, show that n² – 1 is divisible by 24.
Examples: 5² – 1 = 24; 7² -1 = 48; 11² – 1 = 120.

(If you’re interested, give it a go before looking at the solution. It doesn’t require any advanced Maths.)

First, what does it mean to be divisible by 24? Well, it means being divisible by 2, 2, 2, and 3 (the prime factorization of 24). So we have to find a factor of 3, and 3 factors of 2.

As any highschool mathematician knows, n² – 1 = (n + 1)(n – 1).

Since n is prime and n > 3, it must be odd. Which means that both (n + 1) and (n – 1) must be even (divisible by 2). Moreover, since they are consecutive multiples of 2, one of them must be divisible by 4, and the other by 2.

We also know that (n – 1), n, (n + 1) are three consecutive numbers, so one of them must be divisible by 3. Since n is prime and n > 3, it cannot be divisible by 3. So either (n – 1) or (n + 1) must be divisible by 3.

Which means that (n + 1)(n – 1) is divisible by 24. QED.

Keyboard fun

March 20th, 2011

One can have hours of fun with xmodmap. Especially if one has a Symbolics keyboard.

For a start, I get a “real” Meta key (not Alt) and a couple of extra modifier keys that emacs knows about: Hyper and Super. I mapped these to mod2 and mod3. Staying away from mod4 is a good idea because that defaults to the Windows key (on modern keyboards) and there are some Gnome shortcuts that would clash, e.g. show desktop (Windows-d). Modifier 5 is known by xmodmap as Mode_switch, normally mapped to “Alt Gr”.

I learned that a keypress can do 4 things according to the mode it’s in:

  • normal press – type the glyph
  • shift + press – type the shifted glyph
  • mode_switch + press
  • shift + mode_switch + press

The last two of these are outside of normal use, which basically means that you are free to map them to whatever. On the Symbolics keyboard I mapped mode_switch to the Symbol key. Then I had fun making the modmap to make the keys do various things like type Greek letters and mathematical symbols.

I think there’s a reasonably natural mapping between Greek and English letters thus:

  • A – alpha (α)
  • B – beta (β)
  • C – chi (χ)
  • D – delta (δ)
  • E – epsilon (ε)
  • F – phi (φ)
  • G – gamma (γ)
  • H – theta (θ)
  • I – iota (ι)
  • K – kappa (κ)
  • L – lambda (λ)
  • M – mu (μ)
  • N – eta (η)
  • O – omicron (ο)
  • P – pi (π)
  • R – rho (ρ)
  • S – sigma (σ)
  • T – tau (τ)
  • U – upsilon (υ)
  • V – nu (ν)
  • W – omega (ω)
  • X – xi (ξ)
  • Y – psi (ψ)
  • Z – zeta (ζ)

That leaves Q and J free with no obvious Greek letter equivalents. For the number keys, I added some mathematical symbols, and for the punctuation keys I added further punctuation (e.g. left and right guillemots) and things like copyright and trademark symbols.

But that’s not all… I have plans to alter the keyboard firmware (it’s just programmed using C and Teensy – I’ve already made some mods) to use the “Mode Lock” key more extensively. So Mode Lock basically is a hardware shift key, and when it’s on, I can make the entire keyboard send different key codes. Since there are a total of 255 possible keycodes recognisable by xmodmap, I should have room to fit in another complete set (again, 4 per key) and be able to type all sorts of weird and wonderful glyphs.

The only issue I have at the moment is around the keycodes that are in the “numpad zone” on a regular keyboard. The mode_switch doesn’t seem to work with them yet. I still have to figure that out.