Sunday, 27 March 2011

au revoir, GMT

We're now into spring, and the days are getting longer. The vernal equinox (equal day and night, sunrise at 6am, sunset at 6pm, 12h of daylight), on 20 March this year, is past. (It's a bit more complicated than that, of course: according to The Weather Channel website in York UK on 20 March, sunrise was 6.08 GMT, sunset 18:17 GMT, with 12h 9min of daylight. And it's a bit light before sunrise and after sunset, during twilight.)

York UK sunrise, sunset, dawn and dusk times, graph, http://photo.net/photodb/photo?photo_id=1216991
Yesterday sunrise was 5:53 GMT, sunset 18:28 GMT, with 12h 35min of daylight. Today, sunrise was 6:51 BST, sunset 19:30 BST, with 12h 39min of daylight.

Every year we hear this argument: "let's keep BST all year round, so we can have have more daylight in the evening!" Very few focus on the fact this means less daylight in the morning (very few except those pesky northerners with their later winter sunrises, of course).

Well, I think getting up in the dark is about as uncivilised as you can get. When I Rule the World, the second thing I will do is make it illegal to require anyone to get up in the dark. (The first thing I will do is outlaw lettuce.)

Neil McNabb, Sunrise on Millennium Bridge, York, http://photo.net/photodb/photo?photo_id=1216991
At the winter solstice in York, sunrise is 8:21 GMT, and sunset is 15:44 GMT, with 7h 23 min of daylight. So it's dark when I get up, still dark when I get to work, and dark again when I leave work. Ugh. (But the long summer evenings do make up for it. As I keep reminding myself in the depths of winter. Constantly.)

Those BST-all-year-rounders want me to wait for sunrise for an extra hour,
that's until 9:21 in the worst case, just so I can enjoy that extra hour of afternoon sunshine until ... wait for it ... 16:44. Well, no thanks. Dark mornings are bad enough, without making them longer! (I remember waiting in the pitch dark for the bus to school, back in the early 1970s, when this was last tried. It was not pleasant.)

If you want more sunshine, arrange flexible working times, and get up an hour earlier, in the dark, by yourself. Just don't force me to do it too.

Saturday, 26 March 2011

Cold dark sproing

Before recently starting my blog, I put bits of ephemera in my website's Commonplace book. One of the things mentioned there is a (very sketchy) plot for:
"Cold Sproing", a techno-thriller about one of the curled up space-time dimensions starting to uncurl when a low enough temperature is reached, causing spreading devastation around an Oxford cryogenics lab.
This idea was initially based on weird tea-time conversations whilst graduate students in the early 80s, spurred by an idea from Bill Saslaw that the early universe had fewer dimensions. When string theory and its curled up dimensions came along, hey presto: the "sproing" idea of the uncurling.

So we were amused to see that this idea is still around. Ian O'Neill has reviewed a paper by Mureika and Stojkovic (caveat: I've read the review, but not the paper!), who suggest that the early universe had fewer dimensions, but gets "promoted" to higher numbers of dimensions as the universe cools. Cool.

That reminded us of our story idea, and made us (briefly!) revisit it. Cosmology has moved on (in many ways) since our first decades-old outline. There's now Dark Matter (we don't know anything about it, except that it's matter) and Dark Energy (we don't know anything about it). Well, in our story at least, we now have a source for all that Dark Energy: those uncurling dimensions going "sproing".

The title is no longer "Cold Sproing", but now "Cold Dark Sproing". (The story is still, and doubtless will remain, unwritten.)

Sunday, 20 March 2011

Frog day

Suddenly, frogs! Hundreds of them!
Every year around this time, for a few days at most, our garden pond is invaded by frogs. We rarely see frogs at any other time, just the odd one here and there. But in the spring a young frog's fancy lightly turns to thoughts of spawn, and our pond is full of life making life.

This photo is from March 2008, when the pond was a little greener, but no more froggy than it is today.

Saturday, 19 March 2011

Mercury

I've been admiring the brilliant Jupiter in the night sky for the last few months. So I was interested to read on Bad Astronomy that Jupiter would pass close to Mercury in mid-March before disappearing from our skies for a while. I've only (knowingly) seen Mercury once before, in a marvellous four-planet alignment in 2002. Phil Plait mentioned looking on 14 or 15 March, but those nights were cloudy. Last night was clear, however, so I looked out, just after 7pm. I saw a really bright planet, and then another, slightly fainter one down in the twilight, a couple of degrees below it. Aha, I thought, Jupiter, with faint Mercury close to the horizon -- no wonder it's so difficult to see!

But a quick check in the astronomy mags showed I had it backwards. The higher, brighter spot was tiny Mercury, and the lower, fainter one was Jupiter. Given how bright and easily visible Mercury was, I'm sure I've (albeit unknowingly) seen it many times before.

I didn't get to take a photograph, but here's one from Greg Parker that shows almost exactly what I saw (except for the skyline details, of course).

Friday, 18 March 2011

Recommendations

I once overheard someone say "I singlehandedly pulled Amazon out of the red". That wasn't me, but sometimes I feel that it could have been.

So I get a lot of recommendations. Most make sense. Some even make sense even though I initially think they don't. But some ...

People who read Scalzi's blog also buy compressed gas?

Different demographics, surely? (Okay, maybe not. I have watched Shaun the Sheep, but on TV.)

This last one is weird more for what it says I purchased.

Monday, 14 March 2011

There's always one...

It's impossible not to anthropomorphise. It's not just the guy hanging. It's the ones on either side looking down quizzically.


This picture is cropped from the wonderful item #50D1-5830 by Hideta Nagai, whose View Finder Photography website has some spectacular shots.

Sunday, 13 March 2011

FractalLab


Okay, here's a compelling reason to upgrade my browser to one that supports WebGL:


FractalLab

Coincidence!

I've only recently started this intermittent blog, and a few days ago I sent off an email to a friend, notifying him of its existence. We haven't communicated for a few months, so it was amusing to get back the response:
(interesting stuff about stuff ....)
Hey, I was in the middle of this when YOUR e-mail came in! Telepathy?
Now, I know he doesn't really think it's telepathy, but some people do get exercised about this sort of coincidence. But things like this happen all the time. And it's easy to see why.

It might seem like the question is: "What's the chance of me receiving an email from you just as I'm writing one to you, given we haven't emailed each other for ages?" Pretty small, I suspect. But actually, the question is really: "What's the chance of me receiving an email from you just as I'm writing one to you, given we haven't emailed each other for ages, and given that I've just received an email from you just as I'm writing you one?". That is, what is p(x|x) (the probability of x having happened, given that x has happened)? Well, it's one. You can't get less unlikely than that!

Okay, that seems a little unsatisfactory. It still seems somehow to be remarkably unlikely. What's the probability it will happen again? Very small. But what's the probability that some weird coincidence will happen again? Now that is rather high.

Let's assume that we think some event has a probability of one in a gazillion of happening (the probability prior to it actually having happened, that is). But there are equally gazillions of unlikely things that could happen. Say you get an email from a friend just as you were thinking of them. But they might have phoned you, or texted you, or visited you, or written to you. Or you might have seen them on TV, or read about them, or about someone with the same name. And you could have been thinking of any of your friends, or of anyone else, or of anything else.

There are oodles of possible unlikely coincidences. What are the odds that one of them happens?

The way probability works, it's easier to calculate the chance of none of them happening. Let's say the odds of each one of these things happening is one in N, where N is very large (one in a billion, one in a trillion, or more). So the probability is 1/N, and the probability of it not happening is 1-1/N (very nearly, but not quite, certain that it won't happen).

Now let's say the number of unlikely things that might happen is also this huge number N (it could be 10N, or N/10; the calculation is cleaner using N, but the overall flavour of the result still holds for other values).What is the probability that none of the N unlikely things happens? That is, what is the probability that the first thing doesn't happen, and the second thing doesn't happen, and ... all the way up to and the Nth thing doesn't happen?

We just multiply the individual probabilities together, so we get (1-1/N)^N. That's the probability of no coincidences, so the probability of at least one coincidence is p = 1-(1-1/N)^N. For N larger that about 100, p is about 63% (for 10N it's 99.99%, for N/10 it's 10%). That's a pretty good chance of a weird coincidence. And that's just today!

The moral is: when individual events are unlikely, but there are also a lot of events that could happen, something will almost certainly occur.

So, that email: unlikely coincidence? That coincidence, yes; some sort of coincidence happening, not really.

Sunday, 6 March 2011

Packing in the text

I write many documents in LaTeX, and it is great for things like bibliographies, cross-referencing, and defining styles. But the default styles, such as 'article', are a bit wasteful of space. For example
\documentclass[a4paper]{article}
\title{Your Title Here}
\date{}

\begin{document}
\maketitle
\begin{abstract}
Lorem ipsum ...
\end{abstract}
\section*{Introduction}
...
\end{document}
gives the page shown on the right.

This is particularly a problem if you are preparing a document with strict page limits, such as a research proposal or a conference paper. Those places often put their own style requirements. Some provide a LaTeX style file, which is fine (provide the style actually works!), but others are a little less helpful.

Here is a typical requirement:
Font size 11 is the minimum font that is acceptable, and the minimum margin in all directions is 2cm. For accessibility purposes, a sans-serif font style such as Arial or Helvetica should be used as these are more easily readable to those with visual impairment. For the same reason, type should be justified only on the left hand side.
How do we get LaTeX to meet these requirements? Well, there are a few useful packages. 'geometry.sty' lets the margins be easily set. So we can get a conformant document with:
\documentclass[a4paper,11pt]{article} % 11pt font
\usepackage[top=2cm, bottom=2cm, left=2cm, right=2cm]{geometry} %min margins

\renewcommand{\sfdefault}{cmss} % sans serif
\renewcommand{\familydefault}{\sfdefault} % for whole doc

\raggedright % left justified
\parindent 1em % because \raggedright stops indenting

\begin{document}
...as above
\end{document}

Not only is it conformant, it also has more text on it than the plain `article' version. But we can do better. One reason the article style is so fascistic about its left and right margins (try to get more text by dropping a point size, and it reduces the line length!) is that very long lines are hard to read: you lose your place as you track back at the end of a line. A "11pt text, 2cm margin" format results in lines too long to read comfortably. So let's do what the newspapers do, and go to multi (here, two) columns. This actually saves space, as short section titles no longer take up a whole full width line.

Also, let's take the title and abstract into the main body, and tighten up the space around section headings using the 'titlesec.sty' package. Finally, use some 'negative leading' to get the lines a little closer together (without looking cramped), and we get:
\documentclass[a4paper,twocolumn,11pt]{article}
\usepackage[top=2cm, bottom=2cm, left=2cm, right=2cm]{geometry}

\renewcommand{\sfdefault}{cmss}
\renewcommand{\familydefault}{\sfdefault}
\raggedright
\parindent 1em

\usepackage[small,compact]{titlesec} % section headings in smaller font size, less whitespace
\renewcommand{\baselinestretch}{0.9} % closer lines
\begin{document}
\section*{\Large Your Title Here}
\section*{Executive summary}
Lorem ipsum ...
\section*{Introduction}
...
\end{document}
The result has about twice as much text as the original 'article' style, and is fully conformant to the stated requirements.

The 'titlesec' package also allows some fancier formatting of section headers (for example, when things get a little squashed, I like to put a rule over major section titles, to aid the eye), but that's another story.