Posts Tagged ‘science’

Idle Chit-Chat Idle Chit-Chat

An Important Science Question Investigated

January 9th, 2010

I give this to you without comment:

The Airspeed Velocity of an Unladen Swallow.

The Great Adventure The Great Adventure

Lite Brite

August 25th, 2009
One of life's mysteries explained.

Last night as my sweetie and I were sharing a big salad and watching TV, she turned to me and said, “We should do Lite Brite!” I readily agreed. I had never seen an actual Lite Brite in action.

You remember Lite Brite, don’t you? It is a backlit frame into which you can stick translucent plastic pegs. The colored pegs glow merrily. Lite Brite! You can paint with light! the jingle went (approximately).

I had given the Lite Brite a lot of thought back when I was roughly four years old, and occasionally thereafter. I only remember little bits and pieces of the kids’ program Captain Kangaroo, but I remember the Lite Brite ads that supported the good Captain and his loyal sidekick, Mr. Greenjeans. I remember the ads very well, because it was one of the earliest engineering challenges I ever tackled. How the heck did the dang thing WORK?

Lite Brite Masterpiece: Ducks

Lite Brite Masterpiece: Ducks

In the ads, the pegs are pushed into a black surface and light up. Sweet! obviously there is something backlit and when a peg is pushed in it glows. At first I tried to come up with a system where pegs could be placed anywhere, and stay in place. And then came the real engineering challenge: making the holes close back up when the peg was removed. This last feature was obvious—otherwise the toy would not be reusable, and the smallest mistake meant you ruined everything.

After more careful observation, I saw that the pegs were always in a grid pattern on the board. So, I realized, there was a grid of holes that the pegs could be punched into. With that knowledge, I imagined a system with little spring-loaded doors for each hole. Push the peg in, the flap opens and light comes through. Pull it out, and the flap closes. I watched the ads closely for any sign of the doors. There was none. The black surface seemed completely uniform. Perplexing. Over the years I mentally fiddled with different designs for the Lite Brite doors that would not be prone to light leaks.

Fast-forward forty years, when I came to live with someone who owns an honest-to-God Lite Brite. At last the Engineering mystery would be resolved.

The answer: black paper. No doors, no flaps, no self-repairing gelatinous layers. You mount opaque paper over the grid and punch holes in it with the pegs. There is no undo. The black papers that come with the LIte Brite have little letters printed on them, for color-by-numbers fun. And really, can you imagine how long the delicate little mechanisms I had been imagining since my very first days of TV watching would have lasted? In my gut I knew that there had to be a simpler answer, but I never let go of my assumption that you could take the pegs back out again.

We sat on the floor, my sweetie and I, taking turns punching in the little pegs (I had trouble differentiating the pink and orange ones before punching them in), and had a good ol’ time. When we were done we kept the Lite Brite plugged in to bask in the glory of our masterpiece. And it was good.

Bars of the World Tour Bars of the World Tour

The Big Day

July 22nd, 2009

My first total solar eclipse.

The eclipse is past, it was a success, and the folks on board are ready to party. Fortunately it’s still practically deserted here in the aft lounge on deck 9, tucked away behind the casino. The pianist has been joined by a trumpet player who is quite obviously not on the payroll but what he lacks in prowess he makes up for with a sweet tone and a good attitude. Everyone seems jolly this evening. We saw a total solar eclipse together today.

I woke up early, but not as early as I had planned. Outside our porthole the sun shone brightly over calm seas. By gum, it looked like it would be a good eclipse-watching day.

Many paused for a moment of reflection, and veterans told their stories.

Astronomy buffs prepare for the upcoming eclipse as the boat passes Iwo Jima

My plan called for breakfast first, a big meal in case the excitement later took precedence over meals. When I got up on deck, I changed my plans. Pictures first. On the port side was Iwo Jima, about as close as tourists can get to it these days. It is hallowed ground, dedicated to the memory of the blood shed over a few square miles of rock in the middle of the ocean. I thought about the marines who had looked over the waves at the same island so long ago, knowing that soon they would step ashore there. I took a couple of pictures in cooperation with Stereoptic Pete, who I have not mentioned yet in these chronicles, but I’ll get to that another day.

The island behind us, we set course for the center of the path the eclipse would take, balancing the longest possible totality with the occasional banks of clouds. “We’re good for Plan A,” the organizer said over the ship’s PA system. I went for breakfast and to make sure that I was as ready as possible for the main event. memory chip cleared, battery (and backup) fully charged, no funky settings on the camera. I went over in my head what I would do for the six and a half minutes of totality. 1) Look at eclipse 2) take pictures of eclipse. I reminded myself to get the priorities right. There would be plenty of pictures to share among the family, but there won’t be another eclipse as long as this one for more than a century.

Also, before I took my position on the sunny deck, I needed better sun protection. My hopes of finding a decent sun hat were thwarted, but the gift shop on board had baseball caps, and one of those would be better than nothing. I sprang for the hat, slathered on the sunscreen, and headed topside.

Sun goggles on! Sunscreen on! Hat on (for now)!

Sun goggles on! Sunscreen on! Hat on (for now)!

I took up a position on the patio at the stern of deck 10. It was less crowded (most of the patio is covered by an awning) and it was close to the beer. It also had the benefit of having a good view to the rear, and I hoped to see the cone of the shadow overtake us as second contact approached.

It wasn’t long before first contact – the moment when the disk of the moon first impinges on the sun. I pulled out my sun-looking-at shades and watched. Near me was a German couple and their cute-as-a-button daughter. The eclipse was going a bit slowly for a girl her age, so I took the daily newsletter, unfolded it, and punched a pattern of holes into it with my pen, creating the largest array of cameras on the boat. We had a good time looking at the dozens of crescent shapes projected onto the table top, projecting them on each other, and generally goofing around.

The day grew dimmer, and cooler. The ship adjusted course to run right down the center of the track, prolonging the totality by a fraction of a second. (“Because we can,” the director explained.) Unfortunately, due to poor math on my part, I had positioned myself directly under the ship’s exhaust on our new heading. As the deck became crowded with the ship’s crew, I crossed over to the other side of the boat, pausing to get a beer on the way. I found a spot on the rail, introduced myself to my new neighbors, and made another check of the camera. I was shooting with a big ol’ zoom lens and it seemed like about halfway zoomed would give the best results. I checked ISO, focus, shutter speed, and aperture. I was ready. The plan was to not spend too much time thinking, but just step through a whole bunch of settings, assuming at least one would give good results.

Second contact, the photo shaken as I grabbed in futility for my runaway hat.

Second contact, the photo shaken as I grabbed in futility for my runaway hat.

The cone of darkness appeared behind us as the world dimmed. The temperature, cooling steadily for the last hour, dropped abruptly further. The light took on an odd twilight aspect. I looked up, and saw the last flare of the sun vanish behind the rugged lunar terrain. Second contact, they call that moment in the biz. I raised my camera, almost vertical, and lined up my first shot. Shoonk went the slider for the zoom, pulling me back from the image. Fwip went my brand-new hat as it tumbled off my head, over the rail, and into the sea far below. I took the picture.

You’ve seen eclipse pictures before, better ones than these. Probably you’re read descriptions of the time spent in the shadow of the moon. Twilight in the middle of the day. Sunset-pink clouds on the entire horizon, 360 degrees. All I can add is “spooky”. Venus appeared, then elusive Mercury and some of the brighter stars. The whispy streamers of the corona cast an eery glow over the sea, and the sky was a color I’d never seen before.

I raised my beer to sun and moon and corona and speedy little Mercury and I silently toasted the spectacle.

The inner corona of the sun, with streamers and stuff

The inner corona of the sun, with streamers and stuff

I took some more pictures, pausing now and then to take it all in, not thinking about anything but the thing itself. Well over six minutes passed that way, then came the first peek of the sun through a valley on the lunar surface, a flash known as the diamond ring that means that we have reached third contact and the magic is coming to an end. I quickly made an adjustment to the camera and fired up at the emerging brightness. And waited as my camera beeped off ten agonizing seconds before taking the picture. It turns out I had adjusted two things. Maybe I was lucky, however; the picture came out right nice.

I hadn’t taken any shots of the crescent sun before totality, but afterwards I found a piece of solar filter blowing across the deck and held it over the lens with one hand while shooting with the other.

The "diamond ring" as the sun peeks through a valley on the moon, while the corona is still visible.

The "diamond ring" as the sun peeks through a valley on the moon, while the corona is still visible.

Eventually it was time to abandon my post and find the rest of my group, in the more crowded areas forward of my position. “Did you get good pictures?” people asked as I moved around. “I don’t know,” I said. I hadn’t gone back to look at them. It didn’t even occur to me until later. I was pretty sure that I was moving the camera too much anyway.

Before fourth contact, while the moon was still slinking back into obscurity, the moon geeks began to break down their fancy telescopes and clever moon-watching devices and the party atmosphere began. The ship hoisted the official ’successful eclipse’ flag and cheering ensued. Our boat shared horn blasts with other boats that had come to the ideal viewing spot. My cousin sweet-talked the head of bartenders on the boat to slide me a free Eclipse Cocktail.

The central lounge on the boat was packed this afternoon, filled with clusters of people (like us) reliving the experience, checking photos, and partitipating in the traditional cruise activities for the first time in days.

As the eclipse geeks below begin to celebrate, the moon slowly moves along.

As the eclipse geeks below begin to celebrate, the moon slowly moves along.

Tonight after dinner (celebrating fuego’s mother-in-law’s birthday) I followed my nephew out to the foredeck, kept dark for this cruise only, to allow people a place to see the stars. There was the Milky Way and a buttload of stars, along with the fiery trail of the occasional meteor. I stayed out there for quite a while in the dark and quiet, listening to the low conversations around me and thinking about how big it all is, this universe measured in time, and how tiny was the little island we had passed that morning.

Sun and Moon collide
bound by ancient formulae
meteors are free

Bars of the World Tour Bars of the World Tour

The Moon is Waning

July 12th, 2009

I'd better start packing!

Less than three days from now I will find myself at the airport, documents in hand, ready to go chase the new moon. Some moons, you see, are newer than others, and the upcoming one is going to get smack-dab between the Earth and the Sun. It will also be a particularly close new moon, so it will cast an unusually large shadow. My goal, and the goal of a brotherhood of geeks that my parents belong to, is to be in that shadow.

The best place for viewing this eclipse will be at sea, and happily there are enough moon geeks to encourage a cruise ship or two to make a special trip out to the middle of nowhere so people can spend a few hours risking eye damage. Our boat will be aiming for optimum totality time, modified by where clouds are at the critical moment. We eclipsists don’t like clouds so much. The boys steering the boat will have all sorts of gizmos to tell them about the weather (sailors have always been funny that way) and will try to put us in the ideal spot.

When the moment comes, we will be able to look almost straight up and see the moon eat the sun.

With only a couple days’ prep time left, I really should think about packing. I even went out and bought a pair of long pants just for the trip. Actually, most of the credit for that goes to my sweetie; left on my own I would have procrastinated on the slack-buying mission (slack slacking? Am I a slack slacker?) until just about now, then rushed about in a panic trying to find some. Apparently onboard and around and about in Asia, “semi-formal” doesn’t include cargo shorts and aloha shirts. What the heck?

Which brings me to the item that now I have to rush around in a panic to find. A suit jacket of some sort. Not only are we out there to ogle astronomical phenomena, we will be celebrating my parents’ fifty years of wedded bliss. There will be a dinner celebration on the boat, and it will be a fancy (on the Seeger scale) affair. I’m pretty sure I have a tie around here somewhere, and I have button-up shirts without flowers or martini glasses printed on them, but the coat is going to be tricky. Anyone have a spare they can loan me? Something in a meduimish size? I can roll up the sleeves if they’re too long.

Other than that, I’ll be packing a camera, lenses, laptop (but which one? the one that can edit photos or the one with a working battery?), a smaller camera, battery chargers (what plugs do they use over there and on the boat?), shampoo, and a toothbrush. Ooo, and a swimsuit. Snorkel and corrective diving mask? Probably not. Oh, and shoes. They’ll probably come in handy for that formal dinner thing.

Rumblings from the Secret Labs Rumblings from the Secret Labs

Quest for the Perfect Moon Widget

July 7th, 2009

If you want the job done right, find the right geek.

You may have noticed that as of this moment there are three different moon phase widgets over on the sidebar. None of them are perfect, alas (although the Japanese one is perfectly inscrutable). I looked around at other WordPress widgets and did not find one that gave out all the information I was interested in (especially for the eclipse) and was aesthetically pleasing. I thought I might spend a few hours and make my own.

The design was very simple. I would write a little Flash thingie that read XML data from a server and draw the moon with great precision and also look nice doing it. In addition I could put numerical readouts for more interesting (to me) numbers. Piece of cake.

I started my quest looking for a server with current moon info. The US Naval Observatory has all sorts of lunar data available, presumably calculated with far greater precision that I will ever need. The only problem is, they didn’t have data for right now. They had almanac generators and whatnot, but nothing that I could ping and get back a message that said, “at this moment, the moon is…” I couldn’t find anything at NASA, either. I broadened my search and found that nobody seems to be providing this service. “fine, then,” I thought. “I’ll make my own moon server. I’m sure there are plenty of places I can find algorithms for calculating this stuff.”

Only, that didn’t turn out to be so simple, either. The motion of the moon is incredibly complex. There exists a thing called ELP 2000-85 which is the latest attempt to make the math match what the moon actually does. What the thing does is loop through a set of calculations a bazillion times, each time with tweaked coefficients that make smaller and smaller corrections to the calculation. Compiling the tables of coefficients must have been a real pain in the butt. Refining the tables is still ongoing. The accuracy of your calculation comes down to how many times you loop through the coefficients before you decide that the computer power is better used for something else.

Nobody in their right mind would actually use all the tweaks in the ELP 2000 for anything as simple as a moon phase widget, or, for that matter, a moon landing. Along came a guy named Jean Meeus, who published a book full of handy formulas for calculating where things are going to be. He includes simplifications of the ELP 2000 (only looping through 64 iterations), and while they’re not as precise, they’re pretty damn good. I don’t have that book, either.

Time wasted so far: 3 hours. Completion of widget: 0%

But now my search began to bear fruit. I didn’t have Meeus’ formulas, but other people did, and had written software. I found some open-source code that implemented some of his stuff. Yay! I implemented the code, moving it from c to PHP so I could run it on my server. After a few routine hitches the code was up and running and telling me just where the moon was, relative to the Earth, accurate to a couple of arcseconds.

Time wasted so far: 6 hours. Completion of widget: 5%

Unfortunately, it didn’t tell me anything else. This particular code did not provide any information that required data about the sun — like, say, the phase of the moon. Harrumph. Back to the Internet I went. Fairly quickly I found some different code, this time in JavaScript, that also cited Meeus. It was much, much, simpler, ignoring many of the more difficult-to-calculate corrections, but I figured that the first code sample had already done most of that. It was simply a matter of adding the new code to what I already had. Naturally, despite having the same source reference, all the variable names were completely different.

After a great deal of forensics (that’s a big word for ‘wasted time’) I established which quantities I had accurate versions of and which I still needed to calculate. I got everything set up and ran some tests. The results were not good.

Time wasted so far: 12 hours. Completion of widget: 3%

I had expected some problems like this – perhaps in one body of code an angle was expressed in degrees and the other expected radians. Things like that. I started working through things. Only after another day of head-scratching did I test the code I’d based the second half of my project on. It was wrong. So there I was with Frankenstein’s monster of code sewn together from different sources, and one of the sources was broken before I even started. Sigh. Back to the drawing board.

Time wasted so far: 20 hours. Completion of widget: 2%

I should mention along in here somewhere that there are people who sell moon software for quite a bit of money. My little server could potentially put a dent in their sales by bringing accurate calculations to anyone who asks, but its not really the calculations they are selling, but the application around it. I’m not too worried for them.

Back to the Web and by now I was getting better searches because I knew the key terms to look for. I found two more code examples, both of which take precision to the most extreme available. One is a complete implementation of the ELP 2000-82b. This honey consists of 36 files with tables with hundreds of rows of numbers, and a sample program in Fortran that shows how to use them. For ridiculously accurate calculations, I couldn’t do much better. But… It only calculates the position of the moon, just like the first code I implemented. I’d still need to work out the phases and whatnot.

The other code I found is based on earlier math, but really concentrates on what an observer would see from a given point on the Earth. It includes corrections for the optical effects of the atmosphere and for the friggin’ speed of light. It’s got a lot of stuff I don’t need (other planets, for instance), but it has everything I’d be looking for. The thing is, the code is horrible. It’s in c, and the writer apparently never heard of parameters or returning values. Or structs, or anything else that might help organize the information. It is impossible to read a function and know what it does or where all the numbers it uses come from. It would be a big task to translate the pieces I need, mainly because it’s very difficult to tell which pieces I need. Still, it’s an option.

Time wasted so far: 24 hours. Completion of widget: 3%

And that’s where I stand. You know, maybe I’ll wait until I’m on a boat full of moon geeks. I bet one of them even knows a Web site that gives current moon data.

Observations Observations

A Science Question

June 18th, 2009
I've been sitting on this question for a while, but now seems the time (since I don't have anything new to report).

While living in Prague I probably drank more tap water than anyone else I knew, but I drank plenty of bottled water as well. Since I was a) environmentally aware and b) lazy, I ended up with a large collection of bottles waiting to go to the recycling bin up the road. After a while I began to observe a pattern, and as I packed up the apartment to move back to the states I took a brief timeout to document the phenomenon. Please observe exhibit A:

shrinking bottles

The bottle on the left is the youngest, the oldest is on the right. The burning question for today is, “why are the bottles shrinking over time?” All the bottles were stored with lids on, some with dribbles of water in them. Sometimes the water had been carbonated, other times not. Bottles do not puff back up when the apartment is particularly warm, nor can I find any other thermal explanation that would not even out over time. Age (on the scale of months) is definitively a factor.

So what’s going on? Is there a chemical reaction with the plastic that is reducing the number of gas molecules inside? Is there a sort of one-way membrane effect going on that lets air molecules out but not back in? Most likely the pressure is lower in the bottles than outside, due to the plastic wanting to revert to its original shape — unless there’s something about plastic that makes it want to shrivel up like that.

Any chemists out there want to hazard a guess? Physicists? Mechanical engineeers? UFO conspiracy specialists? Science Fiction writers? I’ll listen to any theory you care to offer.

Bars of the World Tour Bars of the World Tour

Balaton

March 14th, 2009
In my current fiscal crisis I must economize. Is the sacrifice worth it?

The cheapest (large) beer at Little Café Near Home is now well over a buck fifty. My preferred beer is nudging up against two dollars for half a liter. Therefore I’m spending more time at the Budvar bar next door. Tonight, however, I stopped by LCNH to snag a bottle of wine. Tea, bless her heart, a fine and happy soul who understands that life is but a joke, redirected my eye from the 95-crown wine selection to the hungarian outlier. Twenty crowns. Today, about ninety-five cents.

It’s sitting on the table in front of me as I write this. I’m a little bit afraid. I will open the bottle tonight. I will drink at least some of the contents. It’s just my imagination I know, but I already feel the hangover coming on. But for science, it must be done. Wish me luck.

Writing Writing

Relativity is Relative

February 26th, 2009
 

So I’m writing a story that takes place in the Tincaniverse, a neighborhood of the Sciennce Fiction world that suspends a couple of physical laws because they are inconvenient, while still maintaing a general feeling that science is real. Anyone who writes a story with faster-than-light travel or spaceships with gravity holding people to the decks is playing in this same universe. Everyone knows time travel is sci-fi hooey, but time travel and faster-than-light travel are pretty much the same thing as far as physics is concerned. This is the inconvenient bit that writers and readers would prefer to ignore.

Time travel stories are really tough to do, because the writer is obliged to create an elaborate set of rules to prevent paradoxes. Many writers go for the branching-universe model for time travel, that posits that when you change an event in the past you spawn a branch universe that reflects the change, while there’s still another copy of the universe crashing along as if nothing ever happened. Which means the catastrophe the protagonist went back in time to prevent still happens, just not on his new time line. He’s just blown off his friends to horrible suffering while he goes and has fun with copies of them. Selfish bastard.

Still, time travel makes a good story once in a while. (See “William Ashbless” and “Red Dorakeen”)

Anyway, here I am in the Tincaniverse, thinking about the most poetic way to wrap up a story, and suddenly selective relativity is attractive. Distance and time being synonymous really works in this case. The question is, am I brazen enough to go for it?

Idle Chit-Chat Idle Chit-Chat

Bamboo

December 4th, 2008
 

As I compose this I’m staring at bamboo shoots growing and apparently prospering in a glass vase with nothing in it but water. There’s plenty of the most important atoms available, Hydrogen from the water, Carbon and (depending on the plant?) Nitrogen from the atmosphere. I’m not a botanist; please don’t use my musings here on your biology pop-quiz tomorrow.

But what about the other trace elements that living things need? Is bamboo so well-adapted to mineral-starverd environments that it hardly needs any of these other elements? Does that in turn make it a lousy food? Would the plant die in distilled water? So many questions…

Get-Poor-Quick Schemes Get-Poor-Quick Schemes

On Radiators

August 6th, 2008
It's time to shed that aerodynamic ball and chain.

So, I’ve been thinking a lot about radiators lately. When you’re driving in a very low car, sometimes all you see of the vehicle behind you is the big chrome grille designed to let air through to reach the radiator. Even cars with excellent aerodynamics are forced to have this component that, by its very nature, requires wind resistance to operate. There is even a fan to expend more energy to make sure that air is passing over the radiator at all times. If there was a way to get rid of the radiator, fuel efficiency in vehicles would be increased. Maybe not a lot, but a measurable amount that would certainly add up.

The only catch is that the radiator is really important. Owners of old air-cooled Volkswagens can testify to that; those engines had no radiators and were not terribly reliable — plus, they paid the same aerodynamic  price to have the air pass through the engine compartment.

Internal combustion engines produce a lot of heat; in fact, thermodynamics says that the hotter they burn, the more efficient they are. My clever nephew Gerald, when presented with the Radiator Conundrum, realized immediately that one solution is simply to embrace the heat rather than get rid of it. If one builds the engine out of materials that can withstand much higher heat than modern engines, then you can let that sucker get really, really hot and actually burn more efficiently at the same time. It’s win-win! I know that there are experimental ceramic engines built around this principle, and it’s about time to get them into production vehicles.

Superhot engines may be good, but superhot engine compartments are not. There’s still going to be some waste heat to manage, if only for safety. My thoughts turned to ways to take at least some of the waste heat and make use of it. By converting the heat energy into some other form of energy, say, electricity, we can simultaneously cool the engine and reclaim some of the waste. Perhaps we could even do away with the alternator, which costs a typical car a couple of horsepower. By reducing the load on the engine once again we can increase efficiency.

Unfortunately, that’s easier said than done (or it would be done already). However, with a really hot ceramic engine, I think it would be possible to use the thermoelectric effect. All you need to do is embed series of different metals along the heat gradient within the engine to create thermopiles. (More modern thermopiles are used to power deep-space probes.) Thermopiles can supply large amounts of current, but only at low voltages. With enough of them, however, you would have a cooling system that simultaneously recharged the car’s battery. If the system worked really well, you could even use surplus current to power a small electric helper motor.

So, anyone up for investing in Jer’s Radiatorless Engine? If it works, we’d make a fortune!

Get-Poor-Quick Schemes Get-Poor-Quick Schemes

A New Application of Existing Technology

June 11th, 2008
You don't always have to invent something to get poor from it.

Sometimes the road to instant poverty is not in inventing a new device but in recognizing a new market for an existing one. (Actually, since you eliminate much of the research and development costs, the chances of striking it poor are somewhat diminished, but let’s not think about that.

One bit of modern gee-whizzery of which I am fond are noise-canceling headphones. These babies actually pick up the ambient noise around you and generate their own sound waves that cancel the noise out in the location of your ear canal. Pretty dang slick. The most popular place for the technology is on airplanes; it’s amazing how much of the engine drone is cut out by a good pair of noise cancelers. With the background reduced, it’s also easier to hear the people around you.

Pilots use noise cancellers all the time these days, but if I owned an airline I’d outfit all the flight personnel with inside-the-ear noise cancellers. Not only would they be able to hear what is being said to them better, but their ears wold be protected. That constant assault on their ears can’t be good for them in the long term.

So, the technology is without a doubt useful. Yesterday it occurred to me that if you wired up the headphones with a specific signal to cancel, that you could have headphones that virtually eliminated a very specific sound while allowing others to pass. There is one industry in particular that would benefit from such a boon, a group of men and women subjected to the same sound over and over, day in and day out, until it must haunt their dreams. I expect insanity is common among these people.

You know who I’m talking about already, don’t you? That right, ice cream truck drivers. I bet they’d pay a bundle to MAKE THAT SONG STOP! As a bonus, they’d be able to hear traffic and the calls of little children more clearly.

Idle Chit-Chat Idle Chit-Chat

The Science of Banana Numeration

June 4th, 2008
Perhaps my geekiest episode ever, but I think this way, sometimes.

Yesterday, as I was regarding a bunch of bananas in the kitchen, I mentally dashed off this code snippet:

#typedef enum {

Banana_Green = 0,

Banana_Yellow,

Banana_Spotted,

Banana_Brown

} BananaRipeness;

#typedef enum {

Take_Banana = 0,

Hold_Out_For_Banana_Bread

} BananaAction;

- (BananaAction) takeBanana:(BananaBunch *)bunch

{

if ( (0 == [bunch count]%3) && [bunch ripeness] > Banana_Yellow ) {

return Hold_Out_For_Banana_Bread;

}

else {

return Take_Banana;

}

}

People who live in houses where banana bread is made will, of course, understand at a glance that when the bananas are getting on in ripeness and there is a multiple of three bananas remaining, one does not take a banana, but rather one holds out for banana bread, lest they face the ire of their fellow residents. Some debate is possible whether the ripeness threshold should be past yellow, as in my code here, or whether one should start holding out earlier, even though the bananas still have a few days left.

It is very good to be in a house where banana count is important.

Code notes: this is written in (more or less) Objective-C, and assumes there is already defined a collection called BananaBunch. I generally avoid multiple exit points in a function, but this one is simple enough that I decided it was OK. I haven’t bothered checking the code for errors, it’s just not that sort of exercise.

Observations Observations

The Science of Fishnet Stockings

May 28th, 2008
I have a vague recollection that I wrote something like this before, but I'm sure this time it will be that much better.

This discussion will be hampered without diagrams, but I’m not about to draw anything right now. Let’s all appreciate the fundamental property of the fishnet: when viewed straight-on, they are practically invisible, and when viewed from the side, they are practically opaque.

What this does is make the fishnet-encased leg look not just more slender, but more well-defined. The subtleties of the muscles are amplified. The curves and contours of the calf and thigh are enhanced, making the resulting skinniness a healthy, athletic sort of skinny. I am, as I write this, comparing fishnets with dark stockings (all in the name of science, of course), and the difference in leg enhancement is striking.

Idle Chit-Chat Idle Chit-Chat

Mars! Hell Yeah!

April 3rd, 2008
Now here's a job I can get excited about.

The following is a script for a video I plan to enter in the Virgle contest to become a crew member on a Mars expedition.

Yeah, I know, the announcement came out in an April first-ish timeframe, and if the boosters were really under construction already I think I would have heard of it, and I don’t think robotics are up to the tasks expected of them in the plan, but you know what? I don’t care about any of that. Why not? Because I’m going to Mars, buddy.

Anyway, here’s the first draft of the script for my application, which will be posted on YouTube:

Mars! Hell yeah! Gas up the boosters and fasten your seatbelts, because we’ve been stuck on this rock way too long already. However, the mission to Mars is doomed without me.

Sure, I know a Higgs boson from a flux capacitor, and I know my way around computers, and I’ve succeeded in leadership positions in the past, but that’s not why Mars needs me. Virgle needs a writer, and I am the man for the job.

Whether on the back roads of America or the twisting cobbled alleys of Prague, I have spent the last several years wandering, exploring the mysteries of our planet and reporting them back to an eager public. It is more than journalism; the words must carry with them the mystery and wonder of forgotten places and the people who inhabit them. Facts are abundant these days, information ubiquitous; what is required of the writer on the Virgle mission is to convey understanding, following the progress of the first pioneers, watching as the true Martian culture develops. That is what I do.

I haven’t timed the above yet; the video is supposed to be 30 seconds. I think mine is a bit too long, and I never even got to my value as a defender of the arts in a culture that will by necessity be run by engineers at first. I never even got to say “I was born to live in lava tubes.” Oh, well; some cutting will be required, and other parts are probably awkward (hard to tell seconds after writing it). Any suggestions are welcome. Meanwhile, wish me luck!

Observations Observations

Tons and Tons

February 26th, 2008
 

Q: Which weighs more, a ton of feathers or a ton of lead?

A: A ton of paperwork.

Although, now that I think about it, if one were to weigh out a ton of feathers and a ton of lead at sea level, the mass of the feathers would exceed the mass of the lead. The feathers would be be more bouyant. Neither, however, come anywhere close to the crushing weight of a ton of paperwork.