Archive for the ‘fatherhood’ Category

Run a random file

Sunday, August 14th, 2011

I have a collection of childrens' TV shows on a computer connected to the family TV. It's a good way to allow the children to watch some TV for a limited period of time without adverts. When one show finishes and they ask me to put another one, I often say "Okay, but you have to wait 20 minutes". Usually in that time they find something else to do and forget about the TV.

Picking what to put on can be a bother though - if I try to play them in order I forget which one I put on last, and if I try to pick one at random I'll invariably pick some more often than others. So I wrote run_random (binary). This program takes its arguments, expands wildcards and recurses directories to obtain a list of files and then picks one at random and calls ShellExecute() on it (which, if it's a video file, will play the video).

It's a handy little utility but it's also a good testcase for some path and directory handling routines I wrote for various other purposes.

Half-size Lego

Wednesday, September 30th, 2009

I've been playing with Lego again recently, since Alexander enjoys it and wants me to help. He has three sorts - the normal Lego bricks, the double-size Duplo bricks and the quadruple-size Quattro bricks. The Lego bricks are not directly compatible with the Quattro bricks but the Duplo bricks are compatible with both and can be used as an interface. This allows one to create models that are very large (using the Quattro bricks) but also detailed (with the Duplo and Lego bricks).

This leads one to wonder whether a fourth size of brick would be possible, with a size half that of normal Lego bricks. It would not be directly compatible with Duplo or Quattro, but would be compatible with Lego bricks in just the same way that Lego bricks are compatible with Duplo bricks.

This is not always possible, since the "bumps" in Duplo and Quattro bricks have indentations in them which are necessary for compatibility. Most Lego bricks don't have these. But some (particularly Technic Lego) do. This leads me to wonder if the Lego company at one point planned to make such half-size bricks. I'm guessing the reason they didn't was that the pieces would be too fiddly for most fingers, too easily lost/swallowed and too difficult to manufacture with the required accuracy (the edges might also have to be dangerously sharp in order to join properly).

The Lego company did actually make a smaller version of Lego called Modulex but the bricks are 5/8 size rather than half size and are therefore not compatible.

Welcome Penelope

Thursday, September 3rd, 2009

Penelope Beatrice Fern Jenner was born at 4:22pm on the 2nd of September 2009, weighing 7 pounds 14.3 ounces. Mother and baby are both doing very well. Lots of pictures below - click to embiggen.

You can't learn something until you already almost know it

Saturday, October 18th, 2008

This is one of those ideas that seem completely obvious when you first hear of it, but once you've been made aware of it you keep noticing it again and again.

When learning something, you have to have a frame of reference in which to place the new piece of knowledge, or you can't understand it. This is why trying to teach can sometimes be a very frustrating experience - you might think that something is completely obvious and can't understand why your student cannot understand it, but that's because your student doesn't yet have the scaffolding required to hold up that understanding, scaffolding that you're taking for granted. Whenever you are frustrated by someone's lack of understanding, try to imagine what their scaffolding looks like and give them the next piece from the set of pieces that are missing.

This also sometimes sets the pace about how quickly you can learn something completely new and unfamiliar - there are lots of pieces of scaffolding missing and you need to take each one and internalize it before you can understand the next. Since it isn't always obvious what the "next" piece should be, sometimes you have to read the whole textbook to get each piece. The problem isn't memorizing lots of facts (though that helps) it's slotting each piece into the framework.

If you've read the information about the next piece but haven't yet internalized it, sleeping on it can help. When you dream your mind is playing a kind of tetris, sorting things out and slotting things into gaps so that it all fits together.

This theory also explains why young children want to have the same books read to them over and over again - they start off knowing nothing (not even how to learn) so they seek out familiar patterns. In the context of that repetition, a new piece of scaffolding will occasionally drop into place. When that happens, there is a satisfying "Ah ha!" feeling associated with it. We have somehow evolved a mechanism to recognize this event and derive pleasure from it in order to give us a drive for learning.

Sampling keyboard

Thursday, July 3rd, 2008

I'd like to write a piece of software which makes it trivially easy to record and instantaneously play back sound. This piece of software would be operated by holding down keys on the computer's keyboard. For example:

  1. Holding down 'R' records whatever goes into the computer's microphone while the key is held down and stored in the next unused buffer.
  2. Holding down 'P' plays back all the buffers at the same time (until the last buffer runs out or the key is released, whichever happens first).
  3. Holding down 'B' does both (with appropriate cancellation of the output signal from the input signal).

This software would enable a truly epic (and slightly shorter than normal) reading of the children's book "Doggies". For those unfamiliar with the book, there are ten dogs, each of which has a different bark ("Woof", "Yap yap", "Ruff ruff ruff" etc.). On the first page the first dog barks, on the second page the first and second dogs bark and so on.

With the aid of this software, the human reader/operator need only make each dog sound once. Furthermore, all the dog sounds would be heard simultaneously, making the immediate vicinity sound like a dog pound by page ten.

I'm sure there are other uses too, but this was the inspiration.

Everything I needed to know about life, I learned from "The Very Hungry Caterpillar"

Saturday, June 14th, 2008
  • When you are hungry, eat.
  • Fruit is good for you.
  • Eating too much junk food will give you a stomach ache.
  • Green leaves can cure all ills.
  • When you are not hungry anymore, stop eating.
  • When you want to change yourself, hide away while you do it.
  • Anyone can become something beautiful.

The little scientist

Monday, April 30th, 2007

I have told Gennie that I don't mind what Alexander does when he grows up as long as he grows up to be a scientist. I don't mean that that necessarily has to be his job title or that he has to wear a lab coat, just that I hope that he always uses science and the scientific method in whatever he does. I hope he continues to take a keen interest in the world around him, develops theories about the world around him and then does experiments to find out if those theories are true.

I do this in my job (and non-work life) all the time. Actually I suspect everyone does it, but most people probably don't realize that they are actually doing science when they (for example) try another channel when there's static on the TV to find out if it's a problem with the TV (or cable provider) or just a problem with one particuar channel.

Maybe I should have said "I don't mind what my child does for a living as long as he understands what science is and appreciates its value whenever he uses it". But that's less catchy as a T-shirt slogan.

The Lego Imperial Death Star II

Saturday, September 10th, 2005

Is it so wrong that I want one of these? At 3449 pieces, it is the largest lego set ever made. Yeah, despite the mortgage and forthcoming wedding I am still a child at heart. I really hope that when I have children of my own they like Lego and will let me play with it with them.

Talking of Lego, do you why Americans call Lego bricks "Legos"? It's because they needed somewhere to put the "s" from "maths". Thank you very much - I'll be here all night. Try the chicken.