Sunday, August 3, 2008

You're Damn Right I Will, Takahashi-sensei

Francis Takahashi-sensei is the chief instructor at my aikido dojo. A physically imposing yet charmingly grandfatherly figure, he's one of the kindest and most patient men I've ever met. He has infinite patience for newcomers -- if he didn't, I'd never have lasted there -- and he sets an inspiring example. Despite advancing age and a couple of nearly crippling injuries, he's never given up. He's found ways -- made ways -- to continue to lead and teach, and to practice and develop his own art. Thanks to his example, I've always come back to aikido despite my own injuries. If Francis can do it, I can do it.

Today, after practice, I left the dojo and started to drive home -- and thought a little, and turned around and went back. When I got there, Francis was just leaving the building. He held the door for me.

"Did you forget something?" he asked.

"Not exactly," I said. I took off my sunglasses. Almost without choking up, I said, "I've had a couple of reminders lately that you should tell the people in your life who are important to you how much they mean to you before you lose the opportunity."

He picked up on my demeanor before my words, and before I could finish the sentence, he'd already dropped his bag and was giving me a big hug.

"So," I continued, "just in case I get hit by a bus tomorrow, I wanted to say thank you."

"You're always welcome," he said. "You're always welcome."

That was about it. I started to walk back to my car; he picked up his bag and shuffled on toward his. Then he stopped and called to me.

"If that bus hits you," he said, "hit 'em back."

Saturday, June 7, 2008

Lord of the Flies

I wasn't at the absolute bottom of the social ladder when I was in middle school, but I was close. The kid at the bottom, just a rung or two below me, was named Paul Rooney. Paul was a lanky, goofy-looking kid, with dark curly hair and a complete inability to successfully resist the horrors inflicted on him daily by his monstrous peers.

I was among the worst of these monsters, because I was supposedly his friend. When it was convenient, when I needed a friend, I was friendly with him. But I was as nasty to him as anyone else when it meant keeping him down -- you know, so he wouldn't climb past me. So I'd be nice to him one minute -- usually when nobody was looking -- and vicious the next. Paul was bullied, teased, picked on, and continually betrayed.

Thanks in no small part to false friends like me, Paul was utterly bewildered by his world, perfectly conscious of the injustices he faced but unable to rectify them. He tried, it was just that nothing worked. He'd fight back against the bullies, but he was pathetically ineffectual; they brushed him aside with a dark laugh and punched harder. He knew better than to go to the school authorities; we'd have just teased him that much worse for showing weakness, and anyway they might as well have been stone giants for all the help they'd offer a kid like him. Why should they bother? It was just kids picking on each other -- kids do that. They had real problems to worry about, like keeping the football field green.

From what little I saw, his parents were worse. I vividly remember going to Paul's house for his birthday party one year. About half a dozen of us showed up, and we mainly sat around playing his Atari. Paul left the room; we kept playing. In the next room, Paul's dad told him sternly to go back into the den and hang out with us. "Your friends are here!" his dad growled, and Paul replied in high-pitched anguish, more than loud enough for us to hear, "They're not my friends! They're not here for me! They're only here to play my video games!" The thing is, he was right. I think we were making fun of him.

The next year, Paul's parents did absolutely the worst thing, the stupidest possible thing anybody could do to a kid like that: they sent him to a military school. (Admiral Farragut Academy, if you want to know.) I imagine that his dad thought Paul just needed some discipline, or something. Possibly, they thought the environment would be better there, that kids would be protected from teasing. Or they thought it would toughen him up. Who knows.

We didn't hear anything about Paul for a year. I went away that summer to visit my dad and stepmother in North Carolina, and when I came back, there was a newspaper article waiting for me.

Paul Rooney had had enough at last. He shot his dad, his mom, and his younger brother with his dad's revolver. They all died. (Only Paul's younger sister, who was spending the night with relatives, was unharmed.) Then he drove the family van across the causeway from St. Petersburg to Tampa, pulled over, and shot himself in the head.

He left a note in the van. The note read, simply, "I'm sorry."

That was it. That was the end of Paul's torment.

The newspaper called it a suicide. We never talked about it, but we all knew that wasn't the truth. The truth was, we had teased him to death.

Sunday, June 1, 2008

Shoes

The best fiction-writing teacher I ever had was Luke Whisnant. One day I was in his office, reviewing a story I'd written for his class, and he passed along an old piece of writerly advice: "You can tell a lot about a person by looking at his shoes."

Back then I owned one pair of shoes: black Converse high-tops. They were gradually disintegrating; I'd worn them every day for years, in all kinds of weather, and there were holes in the sides and the fabric was tearing away at the toes. I was ashamed of them; cheap as they were, I couldn't afford a new pair, and mainly I just hoped nobody would notice them.

"I notice you tucked your feet under your chair when I said that," Luke continued, not missing a beat. I blinked in surprise. He was right; unconsciously, I had done exactly that.

I Still Want to Smack Him, Thirty Years Later

I was six when Star Wars came out -- the perfect age, I think. I don't remember much about my childhood, but I'll always remember watching that movie for the first time: from the opening shot of the enormous Star Destroyer bearing down mercilessly on the valiant but hopelessly outgunned little rebel ship, through leaving the theater jumping-up-and-down excited.

And I stayed that excited. I wanted to be Luke Skywalker. (My much more clueful brother wanted to be Han Solo, but I digress.) I am probably personally responsible for the majority of George Lucas's ensuing fortune: my normally not terribly indulgent parents succumbed to my incessant supplications, my endless blandishments, my -- my whatever it took; they bought me the X-Wing toy, the remote-controlled R2-D2, the comic books, the dolls action figures, everything. I replayed the movie in my mind over and over, every day, obsessively.

So just imagine how thrilled I was, three years later, to hear there would be a sequel! I'm not even sure I knew exactly what the concept of a sequel was, I just knew that there was going to be another one of the greatest thing ever. In the intervening years, my parents had divorced, a deeply traumatic experience for me -- and suddenly I didn't care because there was going to be another Star Wars!

The anticipation built for months. We didn't go on opening weekend -- I don't remember why, but maybe because my mom wanted to let the crowds die down -- but at last the big day came. We were going to see Star Wars: The Empire Strikes Back.

I was practically in a frenzy, standing there in line outside the movie theater with my mom and my brother, in the hot Florida sun. As we waited, the previous showing's audience poured out. I could see in their faces as they walked by that they had loved it, that the movie was going to be awesome.

And as one guy walked past me, he said to his friend, "Wow, I can't believe Darth Vader turned out to be Luke Skywalker's father."

Friday, May 16, 2008

What's the Word For There Not Being a Word For Something?

The book I wish I had alongside my dictionary, my thesaurus, my dictionary of etymology, and so forth, would be this: a book that lets you look up words that parallel other words. An Ariadne, to lead you out of the labyrinth of ... oh, screw the metaphor.

For example, to render a particular sentence pleasingly parallel, I just now needed a word that means "to make taller" -- a word that is to height as "widen" is to width. The word "heighten" doesn't fit; it means to raise something higher, not to make something taller, and anyway it's mostly used figuratively. Nor is "grow" quite le mot juste, since it doesn't refer to tallness specifically. The word I want is "tallen," only there's no such word. (I ended up writing "grow vertically" -- ick.) To add insult to injury, there are at least two similar words for "widen" -- the other being "broaden" -- and no "tallen" at all(en).

So I want a book that, when I looked up "widen," would tell me the corresponding word for tallness -- or at least reassure me that no such word exists, so I could stop wasting my time looking for one and skip to the step where I either coin it or struggle on without. Alternatively, or in addition, if I looked up "tallen," it would tell me that that's not a word, but the word you want is ... well, whatever it is.

A thesaurus sometimes solves these problems, if you happen to think of the right related word to look up, but not always. In this case, I tried thesaurizing (is that a word?) words such as "expand," "grow," and "extend," until I gave up. Was I insufficiently creative in seeking synonyms? Not in a properly lateral frame of mind? Or does the word I'm looking for simply not exist? No thesaurus can tell me.

While it's a snap to find books of obscure words, they're invariably mere entertainment for logophiles and sesquipedalians; I don't find the kind of serious reference work I want. Maybe this is because the kind of people who might write one can't take the word "tallen" seriously enough to invest the effort. Occasionally, in specific cases (such as this one, which I ran into recently), good old Google can scratch your itch. Or you might find relief in a reverse dictionary. (Look under "r," har har.) Other times, you're just doomed to wallow in ... um ... what's the word I'm looking for?

Monday, May 5, 2008

Yet More Evidence, As If Any Were Needed, That I'm a Fool

Main reason I chose Blogger over other online blogging services: the Emacs client.

Number of times I have actually used the Emacs client: zero.

Blog

Listen: the term "blog" is a hideous, dysphonious neologism, a linguistic travesty, a ragged scar on the weird but beautiful English language. Its sole saving grace is that it's arguably onomatopoeic: it sounds like violent emesis. Worse, like any disease, it's spreading; witness "blogger" (the name of this very service!) and "blogosphere."

I admit that English is in a state of disrepair that makes this particular concern seem picayune, like filing your nails while you bleed to death. But to reverse the damage, we must start somewhere. Surely we can coin some relatively mellisonant term for these things now called "blogs." Anything I invent in my current snide mood would be dysphemic, so I won't pretend I can do it now. (I tried, but my first thought was "e-pistle"; I recognized the despairing sarcasm and shut down that line of thought instantly.)

Looking ahead, once we nominate a successor, we'll need to dethrone the existing term. I think the most effective approach will be to shame and ridicule those who say "blog"; this has helped rid us of the tiresome "cyber-" prefix, so there's hope. (Or, if not effective, at least it will be a sort of petty, snobbish fun, which makes a decent substitute.) We can lay the groundwork now: when you must say "blog" or one of its derivatives, do so as if you're not so much saying it as vomiting it. Whether you do this in mixed company is between you and your conscience, but keep in mind that it's one of those small ways we can all work together toward a better tomorrow. By which I mean, specifically, a tomorrow without the word "blog" in it.

Sunday, May 4, 2008

The JPL Open House

Every year, JPL turns into Disneyland for the weekend, at its annual JPL Open House. I volunteer every year. Sure, I'm spending my weekend standing around for hours on end, answering the same questions about the rovers over and over. But our visitors are excited, just thrilled to be there, to be seeing cool space technology and robots and the people who work with them, to be learning about the universe. It reminds me of how I was when I was one of those people -- when I was on the outside, when working at a place like JPL seemed so far away, when it was something other people did. It reconnects me with that feeling of excitement, pumps me up. Fixes my perspective.

(Usually. But not this year. This year, the crowds were nice, the questions were good, people were pleasant and interested and positive. They weren't the problem. I am the problem. I'm burned out. Intellectually, I see that as stupid. I have my dream job: I have a robot on another planet, and I get to drive it around and make it do stuff. And they pay me. But it's just not working for me any more.)

(But I digress.)

For the record, here are the answers to about 90% of the questions I get:
  1. Is this as big as the real rovers? Yes, the demo rover you're seeing is the same size and general overall appearance as the real rovers.
    • Extended answer: we built this model to practice getting off of our lander, the spaceship we rode to Mars, onto the Martian surface. You don't want to go three hundred million miles ... and then trip. Now that she's done that job, we retired her and just bring her out once a year to say hi to all you nice people. Hi, nice people! (If there are enough kids in the crowd at this point, I wiggle the high-gain antenna so it's like the rover's waving. They practically always laugh and wave back.)
  2. Why does it move so slowly? It moves so slowly because it weighs as much as a motorcycle (another common question is, How much do the rovers weigh?), but only about enough energy to run two ordinary light bulbs. If you imagine trying to drive a Harley with just enough juice to run a couple of light bulbs, you can see that it won't go very fast. But even though they're not very fast, they are very strong. (I put a rock in front of the rover and show how the rover just pulls herself right over, hardly slowing down at all.)
    • Extended answer involves joking that they are the fastest cars on the planet, that there aren't any cops around to pull us over for speeding, etc. Sometimes that takes the form of mock outrage: why do the rovers go so slowly? You mean, why do the rovers go so fast?
    • The question is sometimes phrased as, How fast do the real rovers go? And I point at the model and answer: that fast! And then I do the above spiel.
    • This is also often a good time to talk about Earth vs. Mars gravity. I usually phrase this as "The Martian Diet," and discuss how well it compares to the Atkins Diet.
  3. Are the rovers still going? Yes, both Spirit and Opportunity are still working and still doing science every day -- four years into our three-month mission.
  4. How long will the rovers last? Ninety days. We're now four years past our 90-day warranty, and they're still going.
    • Other useful lines: everyone who's bet against the rovers so far has lost, so I don't recommend it. Never bet against the rovers!
  5. How long does it take a signal to get from here to Mars? That depends. When Earth and Mars are on the same side of the sun, as close as they get (I hold my fingers close together), it's about four minutes each way. But when we're on opposite sides of the sun (I move my fingers farther apart), it can be up to about 20 minutes.
    • Extended answer: That light-time delay drives everything we do. We'd like to drive the rovers with a joystick -- push forward on the joystick, and the rover goes forward; pull back and it stops. But the light-time delays make that impossible. Imagine trying to back your car out of your driveway like that. You look over your shoulder, hit the gas ... and nothing happens for four minutes. And when it does happen, you don't know about it for another four minutes, because your back windshield hasn't gotten the return signal yet. If we tried to drive the rovers like that, then by the time we saw the cliff coming and pulled back on the joystick to stop (I mime all of this as I'm talking, and pretend panic when I'm talking about seeing the cliff and needing an emergency stop) -- we'd be too late, the rovers would already have gone over the cliff.

      So we don't do that. Instead, we just command the rovers once a day. As the sun goes down in the Martian sky, and our solar-powered rover has to go to sleep for the night, it sends us pictures and other data telling us where it is now. Then the rover goes to sleep, and we go to work. We look at all the data, use a simulation to figure out what to make the rover do next, and build up a list of commands to script out the rover's whole next day. Then, as the sun comes back up in the Martian sky and the rovers are waking up, we send them those new commands. Then the rovers go to work, and we go home and go to sleep.
  6. Is dust a problem? Oh, my, yes. Indeed, that's why we originally thought the rovers would last only 90 days, because we thought that's how long it would take for dust to build up on the solar panels and choke the rovers. But then the wind came along and blew the dust back off the solar panels.
    1. Extended answer: this year, we had a huge dust storm that blocked out about 99% of the direct sunlight. Fortunately, the rovers survived that storm, but when the dust settled out of the atmosphere, it settled onto our solar panels. On Spirit, especially, the solar panels are dustier than they've ever been -- about 70% of the light coming from the sun is blocked by dust on the solar panels, and that's going to make it a tough winter for Spirit.
    2. Extended answer: yes, we could have added something that would blow the dust back off the solar panels, but if we added that, we'd have had to take off a science instrument. Given that we're more than four years past our warranty, it's hard to argue with that judgment, no matter how nice it would be to have now.
  7. What's that stuff on top of the rover? This is usually either "solar panels," or an explanation of the three antennae:
    1. This big antenna is called our "low-gain" antenna. It communicates at only 10 bits per second, but it works even if the rover has lost track of time, doesn't know where the Earth is, or whatever. So it's the one the rover uses if it panics.
    2. This lollipop-like antenna is called the "high-gain" antenna. It swivels back and forth like this, and rotates like this, and that lets us point it at the Earth no matter where the Earth is in the Martian sky. This one's a lot faster, about as fast as a slow modem -- up to about 28 kilobits per second. And this is the one we normally send commands to.
    3. But this little, unimpressive-looking antenna, this one has sent back more than 90% of the data that the rovers have sent to Earth. That's because it talks to an orbiter in the sky over Mars, called Mars Odyssey, and Odyssey then sends the data back to Earth from there. It doesn't have to send a signal all the way back to Earth, so it can transmit a lot faster. This one's about as fast as a DSL connection, up to 256 kilobits per second.
  8. What are those holes in the wheels? (Actually, what people notice is usually the broken-up pattern surrounding the holes, but I pretend they noticed the holes because it makes the answer better.) Those holes in the wheels (I demonstrate by sticking my finger through) serve three purposes:
    1. They're where we tied the rover to the spaceship she rode to Mars, so she wouldn't bounce around inside too much.
    2. You can see how the wheels are open on the inside, to save mass. (I demonstrate by sticking my whole fist in there.) That means the rovers can pick up rocks and dirt as they drive around. The holes give the rocks and dirt a chance to fall back out as we drive. Otherwise, too much stuff would build up in the wheels and clog 'em.
    3. When we look back at pictures we take of our tracks, we can look at the pattern the holes make. If they're crisp and well spaced, that means we're on good driving soil; if they're mushy and too close together, that means we're bogged down.
      • (Note: we don't really do the analysis that way so much any more, but we used to do that a lot and sometimes still do.)
    That's a lot of value we get out of something that's really nothing at all, wouldn't you say? (I'd have said that it's a "hole" lot of value, except I don't want people throwing things at me.)
  9. Are those real Martian rocks? Nope, but they look like real Martian rocks. They were made the same way as a lot of the rocks we've found on Mars: by volcanoes. Those rocks are just here to show you what the rovers look like when they're going about their daily routines.
    • Extended answer: Although these aren't real Martian rocks, there are some real Martian rocks here on Earth. They probably got kicked here by an asteroid: a big rock falls on Mars, makes a huge explosion, and a few of the rocks that get kicked up by that explosion end up here on Earth. Doesn't happen often, but we have billions of years to play with. We know they're from Mars because we've carefully analyzed gases trapped in the rocks; they don't look like what we know about the early Earth atmosphere, and they do look like what we know about the early Martian atmosphere, so it seems reasonable to conclude that they must be from Mars.
  10. How many cameras are there on the rovers? Nine. There are two up here on the top that can take color pictures. These two next to them only take black-and-white pictures, but they have a wider field of view, so they're better for driving. And then there are two down here in front, and another pair just like them in back; those are how the rover gets a good view of what's right in front of it and right behind it. So that's eight cameras. The ninth one is right here, on the end of the rover's arm, and that one has a microscope lens on it, so that the rover can take really close-up pictures of the rocks to help us see what they're made of.
    • Extended answer: you notice that the rover's cameras come in pairs. That's so that the rovers can do what you and I do, build up a 3-D picture of the world. The rovers can then reason about what they see in that picture -- they can tell if a rock is too big, or if there's a cliff, and steer away from it.
  11. Also, there's rarely an explicit question about this, but it's clear that a lot of people think that the particular rover they're looking at has been to Mars and back, and/or that we're going to bring the real rovers back. When I detect that mistake, I try to politely correct it. Spirit and Opportunity are on Mars to stay; that's their home; this is just a demo rover.
(Incidentally, don't misconstrue any of this to mean I think the questions are stupid or annoying. Quite the contrary! I think a lot of those questions are pretty perceptive, especially if you're just seeing the rovers for the first time.)

Those are the most common ones, by far. I got some questions about the drive and steer actuators, but just two or three. One thing I noticed was that some questions that were routine in past years, weren't asked at all this year. In particular, nobody asked me how far the rovers have driven. (Nearly 8km for Spirit, over 11km for Opportunity.)

You have to scale these answers up or down to fit the questioner and the crowd. If it's a kid who's asking, I usually kneel so I'm about their height and try to couch the answers in terms I think are age-appropriate.

Let's see ... another thing that came up repeatedly was the whole bit about how the rovers were all folded up for their trip to Mars, and had to unfold themselves once they got there. About halfway through the day I got the idea of calling the rover a Transformer; the kids dug that. And another thing was, every time Mike just dragged the rover where he wanted it, I made a rueful face and observed aloud that there were many times we've wished we could do that with the real ones.

Mars is normally down by the 303 cafeteria, but this year, we were set up by the front entrance for the first time. So as fresh batches of people came in, I would say this: "Howdy, folks, welcome to JPL, welcome to Mars. If you're just arriving, I'd like to make a recommendation. Go ahead and pick up your goody bag at the entrance, then stand right about where you're standing ... for eight hours. And then go home. Because nothing else you're gonna see today is as cool as these rovers." And that would get a laugh, and then I'd go on and talk about the model and solicit questions.

There are also several types of questioners. Among them:
  • The Boy/Girl Scout. No, I mean literally. They come in with a list of questions they're supposed to ask as some sort of troop activity. Didn't happen this year (or not that I saw, though I saw some scouts there), but it's been a fixture of previous years.
  • The super-bright kid. They talk with a kid's diction but an adult's understanding, or something a lot closer to it than you'd expect from their ages. These are my absolute favorites, because they mix an adult's intelligence with a kid's enthusiasm. And they're always, always jazzed about being there. I had two of them this year.
    • One was an Asian kid named Max, who was incredibly excited to be there. Max told me he was five years old; he said this, and everything else, with an enthusiasm kids normally reserve for new Harry Potter releases. Max is going to be an astronaut, and his sister likes robots more than he does; he's really into airplanes. And did I mention he's going to be an ASTRONAUT! Max was awesome. Max is, he really is, going to be an astronaut.
    • The other was a white kid, I'd say about eight or 10 years old. I didn't talk to him for very long, but he had an astute observation. "You said this is a rover just like the real rovers," he said, looking at me narrowly. And he's right, that's how I'd phrased it that time. "But the real rovers have explosive pyros for cutting the cables [he gestured to show me how the pyros work], and that rover has something on it that looks like Velcro." So I explained that this was a demo rover and we made it cheap because it just had to look and act like the real thing, but he was right that a lot of the parts weren't like the real parts. He nodded in understanding, satisfied, and moved on.
An important technique to use when working the crowds: know when to walk away. You're there for everyone. If someone starts to monopolize your time, don't make them feel bad about it -- it's just a product of their enthusiasm, after all -- but find a reason to walk toward the rover while you answer their latest question, maybe to gesture at something on the rover to illustrate a point. Then notice a question from someone else in the crowd.

There. Having said all that ... maybe I can feel okay about not volunteering next year. I'll just drop off a sign with the URL for my blog, so people can read this if they want to know anything. I'm sure that'll be fine.

Sunday, April 27, 2008

Exit, Pursued by a Bear

"Exit, pursued by a bear." That's how Antigonus dies in The Winter's Tale. It's the most infamous stage direction in Shakespeare, and I have a story about it.

I took a Shakespearean Comedies class as an undergraduate English major, and The Winter's Tale was one of the plays we read. To kick off the discussion, the prof asked one of the students what she thought of it.

"It was too long!" she said. Think of a Valley Girl with a Southern accent. She kinda giggled when she said it.

"Well, that's a very insightful comment," the prof said with just the right touch of sarcasm. (I myself tend to pour sarcasm on my words like A-1 on a burnt steak; this was more of a light flavoring, just enough to let you know it was there. Magnifique!)

Then he went around the room and had every single student say something about the play. There were -- oh, I dunno, maybe 80 of us. Some of the comments were more insightful than others, but you can be damn sure nobody else said "it was too long." Hick/Valley Girl just sank deeper and deeper into her chair with each non-inane comment.

I was sitting in the back row, so by the time he got to me, most of what I wanted to say had been said. But I scrounged up something to say about that odd stage direction -- something to the effect that I didn't think a modern audience would buy it, but maybe it told us something about how Shakespeare's audiences differed from us in their expectations, in what they accepted as stage reality. (Or, I'd add now, maybe they just didn't care -- maybe they sorta accepted it as a bit of spectacle.) Hick/Valley Girl sank another notch and the prof moved on.

Nobody ever made another comment like that in that class.

Friday, April 25, 2008

GNUmake a Grown Man Cry

A co-worker asked me to help solve a thorny GNUmake problem the other day. When he did a make clean, GNUmake would apparently first do a make depend, and then do the make clean.

This might be simply a minor annoyance in many systems, but in this case, the unwanted make depend wasted a lot of time, because he has a lot of generated code and his depend target naturally depends on that. So GNUmake first built his code generator, then ran the code generator, then invoked g++ to scan all of the source to generate the depends file. Only then would the make clean run -- and, of course, to add insult to injury, that wiped out all of the auto-generated code (and the executable code generator, though not its source, natch). It also wiped out the depends file.

Seemed like kind of a waste. But what really bugged him -- and me -- was just the fact that we didn't understand it. In particular, the clean target had no dependencies, so why was GNUmake choosing this other random target to make first?

GNUmake's debugging output wasn't immediately informative, but after poking at the problem for a while, we narrowed it down to a side effect of the GNUmake include directive. His main makefile naturally included the depends file, and in GNUmake, for some reason -- I'm sure this must make sense to someone, but not to me -- the include directive first includes the named makefiles, and then automatically adds them to the list of targets to be remade. The other two flavors of include -- sinclude and -include -- also do that.

That explained GNUmake's behavior: GNUmake reads the main makefile, includes the depends file (since it's a makefile too; that's the whole point), then adds the depends file to the list of targets to make. Since the depends file depends on his source code -- including the auto-generated code -- that meant invoking his code generator, and so on and on and on.

But that's only part of the problem. We know why GNUmake is doing that seemingly weird thing, but how do we stop it? Our best guess after RTFM was, you can't: there's no option to GNUmake's include that turns off this behavior. If you don't want your included makefiles remade, tough luck.

But documentation is one thing, code's another. That's why God, or rather, RMS, gave us the source code. So I spent a little while trawling through the GNUmake source and discovered a way to work around this behavior. GNUmake has a special case that turns off the makefile-remaking: if the makefile is listed as the target of more than one double-colon rule, and one of the rules has commands but no dependencies, it skips remaking that makefile for fear of getting stuck in an infinite loop.

So the fix was to add such a rule to the depends file itself, something like this:


$(DEPENDSFILE) :: $(SOURCEFILES)
# ... invoke code generator ....
# ... invoke g++ to scan source and create $(DEPENDSFILE) ....
# Hack starts here:
printf >>$(DEPENDSFILE) '\n$$(DEPENDSFILE) ::\n'
printf >>$(DEPENDSFILE) '\t@echo suppress remaking $$(DEPENDSFILE)\n'

# ...

include $(DEPENDSFILE)


(He also tried another workaround, involving using a separate file to effectively be the timestamp for the depends file, but he liked that even less. So the above hack lives.)

With this change, GNUmake now reads the main makefile and the depends file, sees the second double-colon rule for the depends file in the depends file itself, and skips remaking the depends file.

One good longer-term fix would be to attack the problem more directly: add an include-like directive that has the effect we want, including the target file(s) without adding them to the targets list.

Meanwhile, the short-term fix is unfortunately ugly. There's a reason, I think, why the word "hack" sounds like a cat bringing up a hairball. But it at least gets my co-worker back in business for the moment. Doing a simple make clean is no longer a reason to take a coffee break.

And the big lesson: this may be an ugly hack, but without the source code, we'd have been simply up the creek -- and that would be even uglier. Score one more for RMS.

Wednesday, April 23, 2008

So I'm Jewish, Apparently

My wife is well along in the process of converting to Judaism. I was raised Presbyterian, she was raised Catholic; I've been a devout atheist since I was about 10, and she's agnostic. But she likes the traditions of Judaism, its questioning nature, the community and history around it. So she's taking conversion classes.

About a month ago, she tells my brother about it, and he says, "Oh, yeah -- you know, we're a quarter Jewish."

We're what again?

Turns out, eight or ten years back, he went to my grandmother's funeral. My grandfather's relatives were all there, and since many of them seemed to have stereotypically New York Jewish accents and mannerisms, he asked about it.

This is the story. My grandfather was born in the Bronx to a family of Russian (by way of England) Jews. He grew up and fell in love with my grandmother, but his mother insisted he couldn't marry a shiksa. He converted to Christianity, married her anyway, and nobody bothered to mention any of this for more than 30 years. (And my brother didn't mention it to me for another decade after he found out. I asked him, "Are we anything else I should know about? Were we raised by wolves until we were ten?")

So I'm Jewish, apparently -- a quarter Jewish, at least. But in a funny way. I'm not Jewish in the right way for Jews to consider me Jewish (because my mother wasn't Jewish, because her mother wasn't), yet I'm Jewish enough for the Nazis to have killed me. Perfect.

I have zero emotional attachment to the religion and culture, since it wasn't part of my world growing up. I consider the superstitious aspect of Judaism silly, same as any other religion. Yet there are aspects of Judaism I respect and relate to -- its emphasis on trying to be a good person, on learning, on questioning, on doing good in the world, on freedom and human rights -- and I suspect that's because these were family values, though never explicitly connected to Judaism.

So I'm a little Jewish, maybe. But not very.

And I'm sorry, but I love, love, love bacon.