Archive for January, 2009

I wrote my first Python program

Tuesday, January 20th, 2009

Last Friday. Knowing almost no Python at noon, by 5pm I had some code to munge XML and do something useful for my current project.

So it’s not bad. It’s good for productivity. Mostly because:

  • It has useful libraries.
  • Bread-and-butter data structures are built in, i.e. lists and dictionaries.
  • I don’t care too much about performance for small tasks.

I can deal with significant whitespace, and a few syntactic things trip me up (like colons after if statements), but that’s small beans.

There are a few things on the minus side:

  • All that stuff with self just seems like ugly boilerplate extra typing.
  • Philosophically, I don’t like a BDFL unilaterally breaking backwards compatibility and removing FP features.

    Overall, Python is just fine, but underwhelming. It doesn’t have a monopoly on the good features, which makes it really just another learn-on-demand scripting language.

Tips for night owls, midnight snackers, etc

Monday, January 19th, 2009

If, like me, you often stay up late, finding yourself in a dark, quiet house, with the rest of the family asleep, then you are probably accustomed to moving about stealthily and not really needing much in the way of light to do so. I almost never turn lights on when moving about the house, and I have a couple of night vision tips:

1. Peripheral vision is more light sensitive than your focal point. This is because rods are more sensitive to light than cones, and (probably; I’m no ophthalmologist) your fovea has a high density of cones and therefore fewer rods than the surrounding retina.

2. To preserve night vision when you have to turn a light on, simply open just one eye. Use just one eye to do stuff in the light, and the other eye will keep its night vision adjusted to darkness.