Tuesday, June 20, 2006

Google calculator

I used Google's supercool calculator to estimate the wind resistance force from when I run. It's the same as Google's search interface. It's handly converts from strange units like feet and minutes into MKS. Sadly there are still some things I know in English units instead of metric.

I used it earlier today to figure out how much mass the sun converts into energy. I found that there's 1380 J/sq. meter/second hitting the earth. E-equals-em-cee-squared (for massless particles) so

1380 joules / square meter * 4 / 3 * pi * (1 AU)**2 / (c**2) equals 1.4E9 kilograms or a megaton of matter per second.

The reason I wanted to know was reading the wikipedia article on The Lensman books. "The result is so violent that Nth space planet launched against Ploor's sun makes it go supernova, still radiating the energy of 550 million Suns several years later." That's 1380 joules / square meter * 4 / 3 * pi * (1 AU)**2 / (c**2) * (1 year / second) * 550000000*3 or 7.5E25 kg. You can also think of that as about 10 earth masses annihilated or 1/25000'th of the sun.

I'm probably off by a bit. The energy/sq. m. number might be at the Earth's surface and not in space at Earth orbit. The clouds reflect some energy and the air filters other wavelengths out. I'll assume it's not including the neutrino flux. Probably within a factor of 2-5. Close enough.

If all the energy came from fusion via the proton-proton chain reaction then only 0.7% of the mass can be converted. For Doc Smith's super nutcracker that means nearly 0.2% of the sun fuses per year. Which can't happen because it requires a rare proton->neutrino+positron event. More likely Ploor's sun's atmosphere would have been blown outwards.

Face it Andrew, the Lensman books are not a good source for valid astrophysical information.

I was peeved that Google knows "radius of the earth" but not "earth's orbital radius" or "orbital radius of the earth". I figured out I could use 1 AU instead, but what if I wanted to calculate the solar energy on Mars. Would have have to remember that Mars' orbit is about 1.6 AU? (Okay, 1.5 but I remember this from Bode's Law, which is off a bit for Mars and a lot for Neptune and Pluto. For the Pluto I just remember 40 AU.)

The gym

I'm happy to report that dancing helps one's general fitness. The gym has a treadmill (a runmill? running machine?). I decided to try it out. The first time I decided to see what I could do in 20 minutes. Answer: 2 miles. Could probably do better since I was didn't know what I was doing.

The next week I tried to see how quickly I could run a mile. I didn't count the first minute because that 0.1 km was spent getting the machine up to speed and figuring out how the buttons worked. The next 1.609 km took 7m43s. That's an interesting number because in high school when we did track for gym class that was almost exactly my best time for the mile. I would have been 16 or 17. I turn 36 this August.

Running on a treadmill is boring. There are several TV screens to watch; subtitled in Swedish. The text goes faster than I can understand it. I hit the tedium wall 12 minutes in. Emily (from AZ) says that running outside is more interesting. She enjoys running on the path through the woods near work and is working her way up to a marathon (or was that a half-marathon?).

Running inside is hot, without any self-made breeze to cool down. Rayleigh's drag equation says wind resistance goes as v2. According to Google's calculator and various physical constants, my running drag is about 0.5 * 1.225 kg/(m**3) * (1 mile / (7 minutes + 43 seconds))**2 * (5 feet + 10 inches)*(2 feet)*0.9 or about 7 Newtons. Not much; a bit less than a kilo weight pulling backwards, or about 3-4 kilos for a world class mile runner.

To run outside I'll need another pair of shoes. The gym doesn't allow outdoor shoes inside. I already own 6 pairs of shoes. Everyday, gym, dance w/ latin heels, dance with low heels, jazz dance practice, and boots.

I never thought of myself as someone who can run. Okay, and I'm not saying I can run, only that I'm doing as well as I've every done, which surprises me. At the gym last year I found my body handles weights well. Growing up I never even considered that possibility. Or in my 20s. Then again, 5 years ago I never would have thought of myself as a dancer.

I saw some clips from "So You Think You're A Dancer." By the scale of the people who got selected in the first pass, I am definitely not up there. The closest to what I do would have been the swing dancer and he's still much better than I and with broader dance experience. What I've been saying is that I'm a city-class dancer, or a club dancer.

In an unrelated effort to broaden my dance skills I've been going to the gym group workouts for funk and BodyJam. (Guess there should be a TM in there somewhere.) I don't have much experience with choreography and often get confused as to which part is next. A big reason for going is to learn what to do with my hands. In pair dancing they are connected. When I go out to a non-pair dance dance place I end up moving my feet a lot doing shines but my hands are all very boring.

That's evident in the classes where my feet can follow what the teacher's doing but the arms and upper body are confused.

Two observations about my dance style. Even when starting I had problems remembering what goes next in the pattern for the lesson. I would alternate and try things out, or forget what goes next then need to recover. A woman here last week said she enjoys dancing tango with me because I don't follow a routine like some of the other men. I'm also an energetic dancer, even in tango where you might thinks it's more sedate than salsa. My favorite song by Nosotros (a local New Mexican band) was a fast flamenco influenced salsa song. Don't remember the name though.

Friday, June 16, 2006

Soccer, salsa and satellites

Well tonight was a pretty poor salsa event. The last tango at Oceanen was last Thursday so today I went to Hendricksberg for salsa. Rather few people have been going to Oceanen on Wednesdays for salsa and I was told that they prefer waiting a day in order to go to the club instead of the folkhus. ("community center" in English?)

This evening I went, and nearly everyone was watching the World Cup. Sweden against (... doing research ..) Paraguay. Few were dancing; perhaps 4 couples. It was also about 2-1 men. A couple of the guys did practice stealing a follow, which is pretty rare here.

Hendricksberg is on a small cliff overlooking the river. It has a roof patio. I spent a lot of time just watching the ships going up and down and the sun slowly setting in the north-west. The Volvo Ocean Race is expected to end tomorrow, with events a bit further downriver from that site. The semis were lining up (or the "lorries were queueing up") waiting for the next ferry.

With the sun hanging below the horizon so long I figured there should be some good satellite spotting. I read that ISS would be visible most nights for the next week. Looking it up just now I see that I read it perhaps because it's unusual to see ISS. No, that doesn't make sense. The orbit hasn't changed. Ahh, but the orbital plane stays constant while the Earth moves around the Sun.

In any case, there are very few satellites brighter than mag 3.5. I switched to brighter than 4.5 mag and that was a bit better. As I should have expected, they are nearly all Russian. US launches from Florida don't usually have a tilt this far north. Takes more energy. Russia launches out of the Baikonur Cosmodrome which is 46 degrees north, or about 12 degrees south of here. ISS comes this far north because it's supported by the US and Russia. Good thing too (kinda) since Soyuz does the resupplies while the shuttle is out of business. Kinda because I don't see the point of ISS, at least from a scientific or exploration standpoint.

I tried looking for a 4.0 magnitude Cosmos rocket just now. It was supposed to be high in the sky but 4.0 isn't that bright against a twilight sky and I couldn't see it. ISS is around 0.3-0.5 mag so I'll try again around 12:30am Saturday morning.

Lacrosse 4 will be visible at 3.8 magnitude about midnight (30 minutes earlier). That's a US reconaissance satellite. Rather, a "widely believed to be" reconaissance satellite. There was an interesting interview with Dr. Jonathan McDowell by Slacker Astronomy on the topic of amateur satellite trackers. McDowell recounted how the various officials refused to say that some military mission launched a new satellite. The tracker asking the question pointed out that they could look up and see it, in the same orbit as the shuttle which launched it.

BTW, Sweden won 1-0.

Monday, June 12, 2006

RFID Månadskort

The public transportation system in Gothenburg is a mixture of busses, trams, trains and boats. Until a year ago they used a paper ticket system. Each card has a magnetic stripe. When you get on the bus, etc. you put the card in a big green box and punch the number for how many coupons to deduct. Inside Gothenburg it's 2 coupons for an adult. The box sucks the ticket in, deducts the money from the stripe, and prints the date, time, and remaining money. That's for the standard card, called a "hundra kronor kort" because it starts with 100 kronor on it.

From flickr: picture of the inside of a tram including the green ticket box. There are about 100 pictures there matching "gothenburg tram" and a few more for "spårvagn" (Swedish for "tram". It's composed of the words for "track" or "rail", and "vehicle". The nearest English cognate for "spår" is "spoor", as in an animal trail, and for "vagn" is "wagon".). Nearly all the flickr photos are shots of the outside. Admittedly, the trams look cooler from the outside.

There are other cards. The month, 3-month, 6-month (I think) and a one year card. These are time-based in that you can ride as many times as you want during the month for a fixed price. The first time one of these cards goes in the machine the machine records the time in ink and on the mag stripe. The next times it checks that the card is still valid.

That's changed. Last year they started putting in a new RFID system for the month card. See their web site if you can read Swedish or want to see the picture. They have a picture of the new box, which is blue instead of green. In the tram picture I linked to you can see the RFID box from the side (which is black). It's to the right of the green box.

The RFID system is supposed to be more convenient. When it works I take my wallet out and swipe it by the sensor. The light turns green and *poof*, that's it. Faster than the paper cards. The problem is in the failure modes. I've been using it for two weeks now and it's failed in several different ways. The most astonishing was when the blue box said I didn't have enough money. That's not supposed make a difference with a time-based card. All three boxes on the bus gave the same error message, so I assume there's a single controller for them. Also, the driver said the boxes were acting up all day. Another time one of the boxes didn't accept my card while another did, and yet another time none of the boxes accepted the card.

Those failure modes should disappear as bugs are worked out and the system is made robust. That's why this is a staged deployment.

There are other failure modes. The cards have no indication on them for when they were activated. The very first time I rode a bus in Sweden there was an inspector on the bus who checked everyone's ticket and made sure it was valid for the trip. That is, made sure it was properly time stamped (if a 100 kronor card) or within the date range (for time-based cards). If not, it's a fine.

Strange thing is in all the trips I've made since then I've never seen another inspector doing that. What made it worse is I was going to pay in cash but the ticket dispenser was broken so the driver couldn't sell me a ticket. He let me ride anyway. Hence I had no ticket for the inspector. I didn't know what was going on because the driver spoke no English. (In high likelihood he was an immigrant to Sweden.)

When I bought the RFID card the cashier said I needed to keep the receipt with the card. I assume so you have something to prove when you bought the card and hence if it's still valid. Two distinct items to carry is definitely more annoying than one. Someday if the 100-kronor cards also go RFID then there will be no paper evidence stating just how much money is on the card and how much was deducted for each transaction. For the date-based ones it's less of a problem but I'm leery of that possible future switch.

For now, the 100-kronor cards are paper-based.

I considered possible privacy implications of an RFID system over mag stripe. The only real difference is an RFID can be read from a distance while a mag stripe cannot. Otherwise, both could have a unique tag to them, used to track the card and are equally usable in a system which records when the same card was used for different trams. But the cards aren't tied to a person. I could have paid with cash. Plus, as I recall, the cards are transferable. You can give the month card to someone else. I assume the cost burden of sharing is factored into the cost of the card. (Unlike in Glasgow where even for a week card for their subway system they require the card have a photo id attached so it's tied to a single person.)

In dancing news, I went to Liseberg for salsa tonight. There was a woman toward the end who insisted on dancing with me. She saw that I do dips and had a different style than the others. She thought I danced New York style. She goes sometimes and thinks that's the best salsa there is. I'm an on-1 L.A. style, and I thought she danced more L.A. style than New York (which I thought was on-2). We had a few good dances and I dipped her a lot.

There are only two other people that I've seen here who dip. Lars-Olaf does the fancy ones, and there's a guy who's part of the rueda crowd who does some dips and I've seen him do a few basic aerials. (More than I can do, but less then the swing people do.)

Friday, June 09, 2006


I came this >< close to starting an international incident. Granted, a minor incident, but still an incident.

Yesteday was the last Tango Cafe event for the season. They won't have it over summer (in Swedish, "under summer"). I'll go salsa dancing as Hendriksberg instead. The tango event was a knytkalas meaning a potluck. Not "knytkallas" as I originally wrote. "Knyt" means "tie" (as in "to tie") and "kalas" means "feast". It's from the days before Tupperware when people would tie up the food in a piece of cloth. I brought pita bread, tziki dip and feta cheese in olive oil. Yum.

I'm used to a potluck where if you see food you can take it. I reached for a shrimp. Johann made a comment to help myself, after I had one. It was strange the way he said it. Later I realized that people asked the bringer of a given dish for permission before taking something. Luckily, Johann was sitting next to me and we had talked some so I asked for clarification about the relevant proprieties. Because the dishes were not at a different table (the "bord" of a smörgåsbord), hence anonymous, it's polite in Sweden to ask first. All became clear and I apologized for my accidental slight. Rudeness averted.

Wednesday, June 07, 2006

long sunrise

I read a book in elementary school titled "Up Periscope." (Google tells me it was by Robb White.) Synopsis: navy lt jg dispatched on a US sub in WWII to infiltrate a Japanese base on some island and destroy something-or-other. It was not an assault on the site, but I can't remember the details now.

The sub is cruising across the Pacific. There's a comment about how quickly the sun sets in the tropics. Being raised in Florida and spending nearly all of the first 22 years of my life between 31 degress north and 1 south (with most at 26N), I didn't really know what that meant. We did visit my Mom's family in Michigan and I remember the long summer evenings, but as a kid I didn't really notice the difference.

Here in Sweden the sun has been raising for the last hour. It's 3am and still hasn't come up. I've been watching the sky slowly get brighter. Sunrise and sunset really do take a while up here.

The Amazon reviews for "Up Periscope" says it's based on a true story about one of the first navy frogmen, cleaned up for kids. I enjoyed it and probably checked it out or read it in the library 3 or 4 times. To this day when people refer to alternate names of coffee I remember a part of the book using terms like joe, java and battery acid.

Tuesday, June 06, 2006

I dance a lot

I moved a lot between 1988 and 2001. The longest I was in any one place was about 2 years, and the shortest were summer apartments during college. Because of that, I remember the year something happened by where I was living and the season. For example, I read the Science article on sequencing Saccharomyces cerevisiae in early spring when I lived in the apartment with Ken. That puts it as 1996 or 1997, and PubMed says it was February 1997. (I might have read it a month or two after it came out, but not much longer as I moved to California about then.)

These days I remember days by what dancing I did and where I did it. Friday evening I went to Club Cosmopolitan for tango. I had gone once before, last December, and danced with Ingela. The place is an art gallery. The atmosphere is a bit off-putting. It felt like I needed to be prim, proper, and precise in my style. I tend more toward the dramatic. The mood reflects the viewpoint of the owners who, for example, prefer people be dressed well and not in jeans. At one of Luren's milongas in Santa Fe I went in jeans, button down shirt and leather vest. The combination worked well, but then it was Santa Fe.

Saturday I could have gone to a salsa workshop near Liseberg but I decided against it. Instead I called up a friend of mine in China and talked for a bit (Vonage is great), caught up on various bits of reading, and did some work. Starting to get back into DAS development work. The problem I have is I don't have an end-user handy. I work best when I'm working with people who will use what I develop. Otherwise I have a combination of analysis lock (trying to figure out which approach to use, when there's no good way to judge appropriateness) and apathy (why work on this when no one needs it?).

Walked around a bit in the afternoon. Military jets were flying around in formation. I wandered down to the harbor, which seemed to be where they were circling. There was some event in the free harbor, with stands set up and large video displays of two teams racing each other to put togther a stretcher. There were small navy boats on the river. Looked like some military event, or perhaps a Red Cross event. I did read "försvarsmaktendag" on a sign. Let me see. för = for, svars = responsible, makt = power, en = definitive form, dag = day. "The responsible power day"? I'll just go with "the Swedish equivalent of Armed Forces Day" until I talk with a Swede.

Sunday was more tango. There's a festival called Glada Göteborg (Happy Gothenburg) organized by a culture society. They want people to learn more about the culture in the city. "Together with more than 250 organisations. "Happy Gothenburg" will be carried out by approximately 4000 participants - musicians, singers, dancers, gymnast, jazz and Rockgroups etc - from all over the town of Gothenburg." They asked El Abrazo (one of the local tango orgnanizers) to get some people together and dance on a temporary stage just off the Avenue, between Stora Teatern and the botantical garden. (Hmm. Which places should I translate into English.)

In the evening many of us headed over to Röda Sten for more tango dancing on the small wharf in front of the building. Nearly everyone had bikes to get there, or a car. It's not quite 10 minutes from the nearest tram stop, which itself it 18 minutes from the Avenue. I should get a bit when I'm back here this fall.

Today was salsa at Liseberg. Didn't dance with that many people. One was Irina, who I know from tango. Because she knows both dances we danced a combination of salsa and tango, which is quite fun. There aren't many people who can follow multiple dances and switch between them during the same song. The most I've done is dance swing, tango and salsa to the same song, which even fewer can follow.

I continue to see people I met during my last visit. There was Johanna from tango and Ulrika from salsa. Ulrika says there's a salsa event in Halmstad in a couple of weeks. That's where she lives. B will be teaching the intermediate course there with Wyn. Johan will teach the intro course. Both will teach cuban style. Lars-Olof will teach line style.

I see this blog is on planet.python.org. I'm surprised. I have a technical writings blog which is much more relevant. Here I'll mostly be babbling on about dancing and people, meant mostly for dancing friends and family.

Friday, June 02, 2006


I had a good time at tango tonight. It was supposed to be the last of the season but there will be one more next week before they break for summer. It will start at 8pm and it's a potluck.

Saw 8 or so people I remembered from last fall, and a few more recognized me. My favorite dance was with Eva-Lena, a friend of Inger's. We danced some at the start of the night. She's learning to lead so I followed some as well. Towards the end we danced a bit more, altenative waltzes. There was the call for the last few dances so we kept on. There was a good connection between us. The penultimate song was Roxanne. I think it was the version for Moulin Rogue. Very cool, very powerful, very dramatic with mood changes from powerful, whirling to quiet stillness. The sort of music that I really enjoy dancing to and interpreting. It went well, and ended exactly on the final note with a nearly flawless deep dip. I like dips.

Thursday, June 01, 2006

gym, more dancing, work

The NeedForSpeed sprint last week was quite fun. In my paying work I often feel like I'm doing the same thing over and over again, so it's rarely deeply interesting. It pays well though. It was also a change because I'm rarely writing code I use directly. (I am not a pharmaceutical chemist.) This makes me think more about branching out into other work where I can do something more than write wrappers to binaries and (yawn) parse additional ah hoc file formats.

Instead of working on DAS I finished up the patch for Python's getargs.c. I went to a cafe this afternoon and worked from there until I ran out of battery power. It was a nice sunny day and a lot of people were outside the cafes. The high school students graduated recently so they were all out in their white caps, in cars and making a ruckus. It looked like fun. I finished the code and tested it, only to find it had about 0.5% speedup, instead of the expected 3% or so. I dropped the older prototype code in and got the original 5% boost.

The only real difference was I used a function instead of a macro. Even though the PyArg_ParseTuple is called a lot of times, I find it hard to believe that an additional function call causes the hit. Still, I rewrote it again, this time using macros. Indeed, I got the speedup. Kinda. The benchmarks weren't that repeatable so I can't tell. I got nearly 6% faster pystone numbers and a bit better than 2% stringbench times. I used a lot of gotos in it. Gotos located in macros. Scared yet? :)

Yesterday I went to a nearby gym. I didn't work out that much over the last year, in part because of all the traveling. I decided that since I'll be traveling for at least the next 5 months I might as well sign up for a month (more expensive) and get back into it instead waiting still longer.

Went to the gym in Landala, which is about 5 blocks from here. That's a bit closer than my old gym in Santa Fe. (Which I really like - Carl and Sandra's in DeVargas mall.) I did work out some last fall but chose a gym closer to where I was studying. It looked good at the start but I decided I didn't like it. This one feels better. I'll find out. At worst I'm only there for a month.

The two things I want to work on are upper body strength and intensity. I started going to the gym after Thanksgiving 2004 in part because I wanted to improve my dancing. I wanted to do dips and have a decent safety factor, in case something went wrong. It turns out you don't need that much strength - but only if she knows how to dip. Now I'm back because I would like to work on aerials, that is, moves where I life the woman. It's not so common in tango or salsa but quite common in swing. Which is why I'm looking into the swing scene here.

When I signed up for the gym yesterday I mentioned that I do dance. A woman who leads the dance exercises at the gym was there and invited me to her classes. I went today. It was a mix of salsa, funk, and ballet (I think she was trained in the latter). They had been working on a routine for a while, and she lead it in Swedish. I managed most of it by careful observation. Didn't have the form, especially in the upper body (my hands expect to be holding someone, not up in the air!), but did managed to follow along for most of it. I was the only guy out of a dozen or so. Energy-wise I thought it was about a medium. I'm looking for something more intense.

I got my tango events mixed up. Yesterday was the milonga nearby the apartment and today is the practice on the other side of town near the hospital. I got my days wrong and, surprise, no one else did. Wednedays is salsa at Oceanen, which is the best time for salsa dancing in this city. Despite my increasing love for tango, Wednesdays is for salsa. Besides, there are several other opportunies for tango in this town.

I submitted two talked for EuroPython this afternoon. This being the last day to submit. Oh, and I need to look into the BOSC deadline to submit something about DAS2.