jlm-blog
~jlm

25-May-2011

Hand grenade primer for writers

Filed under: misc — jlm @ 17:41

When I read about someone putting the pin in a dropped grenade, I think “Why is he doing that? He’s going to die! No, this didn’t happen, it’s just made up by a hack who doesn’t know how grenades work.” Congratulations, you just destroyed the immersion in your story. Similarly for a grenade exploding while still held pending the throw, or a thrown grenade with the spoon still against it (for graphical media).

No need to trek through the snow to the library, research is now as simple as visiting http://en.wikipedia.org/wiki/Hand_grenade from the comfort of home, yet curiously, this seems to be a disease of newer works, despite older works having hand grenades in their stories if anything more often.

So, evidently there’s a need for a primer for writers. Here goes:
Anatomy of a hand grenade: The body of a grenade is a shell containing explosives and a timed fuze. Against the shell is a lever called the spoon, which is connected to a spring-loaded trigger called the striker, which starts the fuze. A safety pin holds the spoon in place.
Operation: Hold the grenade in your throwing arm, pressing the spoon against the body. Pull the pin. Throw the grenade at your opponent. With the pin removed, the spring will now push the spoon away and the striker starts the fuze, which in a short time will detonate the explosive.

Note that the fuze can’t be stopped, and it’s the spoon which triggers the grenade, not the pin. So a held grenade can be re-safed by replacing the pin, which might be the seed of the myth that the pin will deactivate a cooking grenade.

6-Apr-2011

Peahens on my roof

Filed under: animals, so. cal — jlm @ 20:28

This dusk, some of the Pasadena peahens decided to go scampering around above my and my neighbors’ ceilings. They’re pretty large birds, so I could hear them up there clearly!
[Peahen on neighbor's roof]

20-Feb-2011

River maps, conformal maps, misc. maps

Filed under: misc — jlm @ 18:54

Daniel Huffman has produced some interesting maps of the US’s major river systems, done in the style of intracity rail line maps. I especially like the one of the Columbia’s system.
He talks about generating these river maps here.
Naturally, he has other interesting things to say about maps, such as a discussion on projection conformality.

8-Feb-2011

How to shoot yourself in the foot with Python

Filed under: programming — jlm @ 21:40

Accidentally compare a character and an integer.
$ python -c 'print "\0" > 1024'
True

Wait, what? Any character is larger than any integer? Why are chars and ints intercomparable then? Shouldn’t I get either a type error or a meaningful comparison? This seems like it’s guaranteed to be wrong!

10-Jan-2011

Got an Eee? Forget Easy Peasy

Filed under: linux — jlm @ 00:56

So, I just upgraded Easy Peasy on my Eee. And surprise, surprise, it broke WiFi again.
Fortunately, there’s a user-contributed fix available, like the other times this has happened!
Unfortunately, the maintainers aren’t adopting it, also just like the other times!

This is a distribution targeting one specific line of netbooks, and in every version of it, WiFi doesn’t work. Scrapheap time for Easy Peasy.

30-Dec-2010

Incentives in action: Airport tarmac delays

Filed under: econ — jlm @ 09:50

When the New York airports re-opened following the recent blizzard, there was a backlog of flights, and short-staffed airline terminal support personnel couldn’t process them as fast as they arrived. Which planes do you think got serviced, and which delayed on the tarmac for hour after hour?

It’s no surprise if you know that the rule put into effect after repeated and persistent multi-hour tarmac delays by the airlines applies only to domestic flights. Miraculously, just enough personnel were found to keep the domestic flights coming to the gates without hitting the delay lengths which would trigger fines — but not enough to service the international flights, for which there are no tarmac delay penalties.

And that’s why the flight from Vancouver, BC to Kennedy Airport sat on the tarmac for over 12 hours. Airlines had no incentive to service it, but did have an incentive to prioritize domestic flights over it. Corporations don’t feel shame or guilt for bad behavior, but they do feel the sting of fines and act to avoid them. We need to choose our incentives carefully.

25-Dec-2010

Dec. 25

Filed under: misc — jlm @ 08:27

Centuries ago, we lived in ignorance, our vision dim, not even knowing what we didn’t know. Now and then some people struck sparks as we stumbled in the darkness, and saw something others had missed.
But, on this day, a man was born who was to kindle a torch and connect heaven and earth.
Though his work and teachings, he changed our worldview forever. He revealed truths and laws that mankind had had no conception of before. He turned our old notions upside-down with a new understanding of the heavenly realm, and of the world on which we live. His teachings have stood the test of time, still being taught, analyzed, and widely used in practice to this very day. The great thinkers of later ages have taken what he revealed, and built magnificently upon it, each generation using the work of the previous to go further.

Happy birthday, Isaac Newton!

22-Nov-2010

Back from Skepticon

Filed under: travel — jlm @ 10:39

I went to Skepticon 3 this weekend and it was a blast.

John Corvino had an excellent talk comparing atheist and homosexuals’ rights movements. This is a tricky topic, needing to avoid trivializing the gay rights struggles while not minimizing the issues faced by atheists in communities of believers either. John struck this balance deftly — I’m not sure someone who was not both an atheist and GLBT activist could have pulled it off.

There were interesting talks on skepticism’s relationship with feminism and sexuality, and another on diversity inside the movement. The Con had a good gender balance, but was very, very white. Part of this has to do with the location in a less-diverse part of the country, but much had to do with the white-skewed demographics of the skeptics movement. Unfortunately, the talk on diversity was lacking when it came to concrete suggestions.

The first day ended with a panel discussion on whether skepticism begat atheism. James Randi brought up that there were two types of atheists, the first who believed there was no god, and the second who didn’t believe that there was a god (ie, actual belief in nonexistence vs. lack of belief in existence). D.J. Grothe segued from this to say he found the arguments in favor and against the existence of god lacking, so he disbelieved, pending new information (so far, so good) and didn’t think there were really type 1 atheists, or maybe a very few. This statement was “WTF?” for me, so at the Q&A I pointed out that there really were people who believed there was no god, because of the problem of natural evil or other arguments. And the next day, during his talk, Grothe made this “no type 1 atheists” claim again! At Q&A Corvino called out again that plenty of atheists have real belief in god’s nonexistence. I’m disappointed in Grothe — he knows better, so claiming that “strong atheism” is a fringe of the atheist movement is simply dishonest.

Before that panel was one on accomidation vs. confrontation. This seemed to quickly settle on a consensus of “we should pick our battles wisely”, and lacking dispute consequently wasn’t that interesting.

The second day had a talk on faith healers by James Randi, which was entertaining, but was mostly video clips. Alas, Randi seems to be suffering from his age. A talk on debunking ghosts and cryptic creatures and spontaneous human combustion was interesting. Dan Barker’s story of going from faithful to faithless was touching. P.Z. Myers talked about teaching genetics by analogy with poker, but I found it unconvincing. Then there was a talk by Rebecca Watson on the so-called War on Christmas, which was hilarious.

The third day was easily the weakest. Victor Stenger’s talk used unsettled cosmology, and was weak. It’d been better if when he’d gone into elementary particles and their wave functions, talk about how the waves interfere and their particles interact. And at least gone into quantum interpretations a little. These are the bits of QM that “quantum spiritualists” misuse, and the talk gave little ammunition to combat them.

Sam Singleton was amusing for his gimmick of impersonating the affect of an evangelical preacher, but that wore thin quickly. His grandfather dying from snake handling was a sad story, another grain in the immense pile of suffering religion has caused. J.T. Eberhard’s was the best of the day, funny, and absolutely true to how talking atheism to the religious runs.

Not actually part of the conference, I spent the non-conferring parts of the weekend wandering Springfield, MO’s city center. I was struck by how utterly inactive the city was. But not like a dead city: The businesses were open, not shuttered, but there was very little traffic, pedestrian or automotive, very strange.

I had a great time talking with complete strangers also there — lots of friendly and intelligent folks. I’m overall very impressed with the conference. I’ve been to industry technical conferences that weren’t run as well. That a college freethinkers group could pull this off without even charging admission is doubly impressive.

26-Oct-2010

Kinked pipes

Filed under: math — jlm @ 12:04

Our friend Keith Devlin poses an interesting question about expanding pipes: A pipe expands by one foot over its one-mile length; how high does it arch?

Keith assumes a single sharp kink in the center and uses Pythagoras to calculate that the pipe arches slightly over 50 feet! Yet if the pipe had its sharp kink near one end, it’d arch slightly under 1 foot. This suggests a calculus of variations problem: Of all the ways a pipe can bend, which way generates the highest arch? The dual problem would be: Of all the ways to arch to a given height (let’s say 50 feet), which way uses the least length of pipe?

Our pipe path will go from one pipe endpoint up to some point with height 50’, thence to the other pipe endpoint. If either of these paths weren’t a line segment, we could shorten the path by using a line segment. The angles the segments make with the horizontal line at 50’ will be equal, otherwise we could shorten the path by equalizing them. So the shortest path is a line up to the center 50’ up, kink, then a straight line to the ground at the other end.

Because this isoceles path is the shortest path to reach a given height, it’s also the highest-reaching path of its length. Keith’s assumption that the pipe sharply kinks in the center gives the highest arch of any possible path!

Minimizing the height isn’t so interesting: By making arbitrarialy fine accordion folds, we can keep the maximum height arbitrarialy small.

What if the pipe makes a parabolic arch? Depth below the arch height at distance x from the center is kx². For our case of a mile-long pipe, we have arch height k(2640)². The curve length is ∫02640 √(1+(2kx)²) dx. If you’re like me, you can’t integrate this without a reference, but it gives (2kx √(4k²x²+1)+sinh-1(2kx))/4k | x=2640. Numerically solving this for length 2640.5 gives k=6.385×10-6, which gives an arch height of 44.5 feet.

That was messier than I expected. I expect a catenary arch, which IIR my physics correctly is what a pipe should assume under gravity, would be much the same.

Why are the arches in the center so much higher than arches at the ends? Going back to the triangle case, if we increase our pipe length by an amount δ over a flat length x, we have height related by x²+h² = (x+δ)² from good old Pythagoras, which gives h = √(2xδ+δ²). δ will vary from near 1 at x=0 to near 0 at x=5280, δ ≈ 1-(x/5280), varies only slowly with x. So with the square root curve being steep at small values, at small x, x has a big impact on h! Toward the other end, δ’s decrease overpowers x’s increase, and as δ gets small h is pulled steeply down.

23-Aug-2010

Permutation puzzle in Futurama

Filed under: math — jlm @ 12:26

I finally got around to watching last week’s Futurama late last night, and there’s an interesting permutations puzzle involved. The puzzle itself is a minor SPOILER, so stop now if 5 days isn’t enough time for you.

Puzzle: There’s a machine that can swap minds between bodies, but can’t swap two people if it’s already swapped that pair of bodies. A group of people use the machine to perform an arbitrary sequence of swaps among themselves. How can this group and two outsiders use the machine to restore everyone’s mind and body?

My solution is here.

I wonder if this is a recasting of a classic swapping puzzle I’m not familiar with.

Powered by WordPress