It could just have been the effect of having Stargate on in the background, but for twenty minutes I sat here and couldn’t think of a topic. It’s day 3 of 21 in my attempt to establish blogging as a habit, and I hope that I’m not already out of ideas. I actually tend to have a lot of ideas about halfway through making a blog post (on days 1 and 2 I certainly did, at least), and I also come up with things throughout the day — perhaps I should note them down. If we can’t have one real topic, then let’s touch on a few smaller ones!
Decimal Time
Simple concept: 10 hour days with 10 ‘minutes’ each hour, and 10 ‘seconds’ within that, and so on. I think that using the same names for different units gets especially confusing though, so let’s ditch them and go with SI prefixes:
What I find to be striking about this is that the units seem usable in real life. A nan is functionally equivalent to a second, and it’s faster and easier to say. A mic (I’d say “mike”, but you can argue about pronunciation if you like — it’s from “micro”) is the least useful, but it’d be more functional to say “just a mic” than “just a sec” or “just a moment”, because we often need 10-20 seconds when we say that. A mil is extremely similar to a minute, and a cent at about 15 minutes is a very common unit of time we work in already.
Okay, so what’s the big deal? Why bother, right? I’d love to have some solid defense against that, but I’ve got nothing. Especially when it turns out that a great number of people have attempted to accomplish this sort of reform before and it has rarely found success. Near the turn of the century, a company called Swatch marketed and sold watches which had 1000 “.beats” throughout the day, which you would use to denote time, @264 for example.
Before that, the France made a number of attempts (or perhaps, one very long attempt) at introducing decimal time, but it regularly fell out of use. Their system was much as I’ve described here. Just look at this fun clock picture I pulled off of the wikipedia page about it:
The Chinese were at it even before that, and seem to have operated with decimal time in full swing for a very, very long time, alongside a similar system to the one which we use. So this idea is hardly original, and it’s also unlikely to suddenly take the world by storm.
Why think about it at all, then? Just out of curiosity. First, I’m interested in what it would be like to have a different standard of time: the second being slightly faster, but the minute and the hour longer. How would that affect my mind’s perception of the world Beyond that though, I’d like to try out living in a different time than everyone else. It may be the closest a boy can get to being a time traveller. I’ve also put some thought into living on unix time, just have that monotonic timestamp on a watch and try to use it to live by. It could make for a really interesting experience.
A brief related tangent
Something I have done in the past is deliberately, regularly choose to do foolish or unusual things. It’s borne out of a desire to have new and fresh ideas. My rationale is that if most people think similarly about things, then two people who have similar experiences might have similar ideas. To have a “new” idea, you have to be “first” to it, which means that you need to spend more time thinking about a problem than anyone else who has had a similar set of experiences to you.
Really good ideas then should tend to come from people who have thought about problems a great deal, or who have had unique experiences. Since you can’t magically think about hard problems for a long time, a hack would be to raise the uniqueness of one’s experiences. A simple plan to achieve that is to add rules into your daily life which cause you to go about things a little bit differently, and then maybe you’ll see what others cannot.
That’s one reason it would be cool to live on monotonic time counting forward in seconds from epoch. Or to have one hundred thousand nans each day, instead of 24 hours.
Writing better code
As I have more code to write, I find I’m getting smarter about a lot of things and seeing a lot of clever ways to use (particularly python) language features that I might not have thought of in the past. Today I learned about python dict-expressions when trying to filter a given set of columns out of an array of dictionaries. They’re new to 2.7, but have been being discussed since before 2.3 — they’re just like list expressions, except you use {} instead of []. I’m writing in a 2.6 environment, so they were unavailable, but a workaround is to pass a list expression to the dict() constructor, like so:
dict([(i, 2*i) for i in range(10)])
I was curious about what was ultimately best performance-wise, because that hack job with the dict() constructor is tough to read. A coworker suggested using the profile module, callable with
python -m profile my_file.py
and it is excellent! I had to write my own repetition into the test to get useful results(unlike with the timeit module), but it dumps total, per_call and cumulative time spent in each function, as well as a count of function calls, without any additional instrumentation. It was greatly useful — and interestingly, vanilla code without any list or dict expressions was faster, but not by a huge amount. In 1,000,000 tests, a double-nested for loop to iterate over the array and save individual columns took 8.250 s of total time, while the dict-expression (on python 2.7) took ~10 seconds, and the list-expression in the dict-constructor took ~11 seconds. I couldn’t find any way to simplify or speed up the expressions, so I wonder if that points to some cases where expressions are just slower than vanilla code.
Rain on the trees
I’ll finish up with a cool phenomenon I saw today as rain started to fall on the trees outside my window at work. There was no appreciable wind when the droplets started to fall, and the trees outside are very young, so that you could see each leaf bounce as it got hit by the rain. Letting my eyes unfocus a little to watch the pattern of leaf bounces was particularly rewarding as the rain became heavier; it made a magnificent optical effect. Keep an eye out!