Saturday, November 27, 2004

Two books

The bulk of my library consists of books on mathematics or computer science -- or the intersection of the two -- but an increasing fraction of my books also deal with topics in engineering and physics. Part of the reason is that it's impossible to build models that are tractable and meaningful without first building some guiding physical intuition; part of the reason is that they keep coming up -- guess what journals contain a lot of the great work on spectral perturbation theory, symmetry-breaking, or all these other words that keep appearing in my favorite books and papers?; and part of the reason is just that I like learning about these things.

So here are two of the physics books that I have been perusing recently.

  1. In my freshman year, I took a seminar course called From Crisis to Chaos, which was about the major advances of 20th century physics and how they came about. The crisis in the title comes from a notion discussed by Thomas Kuhn in The Structure of Scientific Revolution; if you've never heard of Kuhn, go look him up -- we need more people in the world who know what paradigm shift actually means. Anyhow, besides an appreciation for Kuhn, that class also left me with The Character of Physical Law by Feynmann and The Force of Symmetry by Icke. I've read and re-read the former, but somehow I kept never re-reading Icke's book. Being a good packrat, I held onto the book regardless of its value; and on Wednesday evening, I picked it up again. I made myself put it down eventually, but I think I'm going to have to finish re-reading it.

    I think I might have picked it up because I was still thinking about the effects of symmetries after some reading earlier this week on numerical bifurcation analysis in the presence of symmetries; or maybe it was from reading about symmetry-breaking bifurcations in the review of quantum mechanics section of the book by Rob Philips on materials. Or maybe I just picked it up because I like the color blue. Whatever the reason, it's humorous and interesting, and it covers a lot of fun material in a non-technical way. Go read it, and tell me what you think! And don't skip the preface -- in fact, read it twice if you've read any book recently which tries to mix philosophy and physics.

    On a tangential note, let me quote a footnote by Werner Heisenberg from his book on Principles of Quantum Theory (English translation by Eckart and Hoyt):

    In this connection one should particularly remember that the human language permits the construction of sentences which do not involve any consequences and which therefore have no content at all -- in spite of the fact that these sentences produce some kind of picture in our imagination; e.g., the statement that besides our world there exists another world, with which any connection is impossible in principle, does not lead to any experimental consequence, but does produce a kind of picture in the mind. Obviously such a statement can neither be proved nor disproved. One should be especially careful in using words reality, actually, etc., since these words very often lead to statements of the type just mentioned.

    I like the sentiment.

  2. I may have previously mentioned Rob Philips' book Crystals, Defects, and Microstructures: Modeling Across Scales. If not, let me now recommend it to the handful of people reading who have a current interest in computational mechanics and related fields. All -- uh -- one of you, I think. Or maybe more than one (Rick, you do some condensed matter stuff, right?).

    The book has four main parts: Thinking about the material world, Energetics of crystalline solids, Geometric structures in solids: defects and microstructures, and Facing the multiscale challenge of real material behavior. I've browsed in all the sections, but I've only thoroughly read parts of the first section (most of it by now) and the last section. I really like the first section, particularly the chapters on Continuum mechanics revisited and Quantum and statistical mechanics revisited. The continuum mechanics chapter not only covers the usual basics of kinematics, linear elasticity, and variational characterization and finite element approximation; it also includes descriptions of Eshelby's notion of configurational forces, with intriguing teasers about defect dynamics, plasticity, and fracture dynamics. (If that last sentence seemed to make no sense, think of it this way: most of basic solid and fluid mechanics boils down to the balance of linear momentum -- also known as F = ma. The framework of configurational forces turns lots of other things that seem superficially more difficult to manage -- like crack propogation or permanent material damage from large deformations -- into yet another instance of F = ma.) The section on quantum mechanics is simple enough that I can follow it (one day, I swear, I'll take a class on quantum mechanics -- but that day hasn't come yet), and includes a few basic particle-in-box models (treated analytically or with finite element analysis); an example calculation to approximate the density of an electron-gas metal (which is used to develop a few important approximations); and a non-metal bonding example (bond energy in an H2 molecule). The section on statistical mechanics emphasizes information theoretic connections that make me happy, since I have a much better notion of entropy in that context than I do in any sort of physical context.

    The Further Reading sections at the end of the chapters are categorized and annotated, and I highly approve both the annotations and the choice of references: on the topics where I know something (continuum mechanics, finite elements), he has included some of my favorite texts; and on topics I've heard a little about second-hand (plasticity, quantum mechanics, computational statistical mechanics), he has included texts of which my friends have spoken approvingly.

Autumn in Berkeley

The city of Berkeley sits on a slope, bounded by water to the west and the hill top on the east. It's very difficult to get lost, here: up is east, and there are enough landmarks on the steep part of the slope that it's easy to figure how far north or south you are, except perhaps when it's dark and the fog has rolled in.

I think the slope of the hill enhances a lot of things I like about the Berkeley campus. The slope is pretty gentle until around Oxford, which runs along the east edge of campus; then it gets a little steeper. The campus is covered with trees, most of them pines; many of them are several stories high, enough so that many of the buildings about campus sit next to trees that reach to their rooflines. It helps that earthquake concerns and the mutterings of the Berkeley city council conspire to make very tall buildings rare. Between the trees and the topography, fir green is everywhere. You look at the buildings as you walk up the hill, and they're limned in green. The view changes a little if you turn around; but if you're high enough on the hill that you overlook the green, then you can probably see glimpses of the Bay.

I spent some time outside today, both sitting at an outdoors table at Cafe Strada on the south side of campus and simply strolling about. It rained this morning, but then the sky cleared, and so the campus had that faint aroma that grass and trees get when they're watered by rain and then dried by the sun. There was a breeze, and the air was just a little crisp. Campus was very quiet -- perhaps not surprisingly for the post-Thanksgiving weekend -- but Strada was doing a lively business even today, and between sections in my book, I watched the people come and go. The cafes of Berkeley are good places for people-watching: all manner of folks passed through, and I overheard snippets of conversation about experimental physics and wool-lined coats, and more than a few bits of French and Mandarin and other languages that I was unable to identify. I usually would just go to Brewed Awakening, which is just around the corner from Soda Hall and which is typically crowded with a mix of computer scientists, mathematicians, and engineers that from the north end of campus and theologians from the nearby seminary; but the sun was bright, and I was in no hurry, and today seemed like a good day to venture elsewhere.

I bought two things for my corner of the office this week: some milk crates and shelve boards to let me pack books more efficiently (it looks much more handsome than you'd expect from that description); and a clear glass mug from the bric-a-brac section of Goodwill, a souvenir from the 2001 System-on-Chip conference with the Cadence logo on it. It's great: it's clear glass, but it has a handle and thick sides and bottom, so it's possible for me to keep tea in it without accidentally burning my hands. I had a cup of Russian Caravan tea, earlier, while I listened to A Prairie Home Companion on the radio and replied to a few e-mails. And now, here I sit: books before me, tea beside me, and quiet around me. Life is good.

Time to get more tea.

Wednesday, November 24, 2004

National treasure

I saw National Treasure with a couple friends from the department this evening. It is a silly movie; but at least one of the characters seems to be in on the joke. My guess is that the director watched one of the Indiana Jones films, read The Da Vinci Code and then took a nap. I kept expecting the sidekick with the beard and turban to pop up and yell Indy! Well, not really, but it's not that much of a stretch.

It's not too much, I think, to mention that very near the beginning of the movie, while the main characters are searching an old ship, they break open a bunch of barrels, and gunpowder pours out. Guess what will happen within the next couple minutes?

Let us not go to Camelot. It is a very silly place. Be that as it may, though, I enjoyed the movie.

Tuesday, November 23, 2004

Hill of beans

This is a good time of year for lentils. They're tasty, they're warm, and they're cheap. And you can go from dry lentils to something edible in about 20-25 minutes (less if you don't mind a little crunch), which is more than you can say for most beans.

Spiced red lentils (masala dhal)

Cook a pot of red lentils (a couple cups) with a can of tomatoes. Season with cumin, turmeric, paprika, black pepper, cinnamon, and salt. A little garlic and some brown mustard seeds makes a nice touch -- you can pop the mustard seeds in a little hot oil in a pan (just cook the garlic and re-use the oil). If you don't think you have these spices, check the ingredients on any curry powder or masala mix you might have about. The lentils will turn to a wonderful salty, warmly-spiced sort of mush. About the only ways I've found to make it taste less than wonderful is to add too much turmeric or too little salt.

I learned this recipe -- or something like it -- from my friend Anant. He used a pressure cooker, but it doesn't seem to make that much difference: red lentils will turn into mush almost any way you cook them.

Brown lentil soup

Dice onions, bell peppers, and celery, and sautee them in a pan. Then add brown lentils and an appropriate amount of water -- the more water, the soupier the soup -- and (if you have them) carrots and potatoes. Add salt close to the end. I usually don't use other seasonings with this recipe, since the onion, peppers, and celery do the trick.

Lentil cabbage

Take a half-head of red cabbage. Steam cook it with soy sauce, and perhaps a little vinegar. Add a handful -- or maybe a cup -- of brown lentils about five minutes before you're done. They should still be a little crunchy still when you finish, with a sort of nutty taste.

  • Currently eating: Spiced red lentils
  • Currently drinking: Gen mai cha (green tea with toasted rice)

In a name

Between killing off wives, Henry VIII decreed that all his subjects should take surnames. Francis of France made a similar decree. Surnames became a necessity for 16th century rulers in order to keep track of their increasingly-mobile subjects; and since then, of course, we've become ever more numerous and mobile, and our governments still figure it's best to keep track of who is who. Even first and last names together are sometimes ambiguous now -- I know of at least two other people with whom I share first and last names, though I don't think I share a middle initial with either of them. Still, in most circumstances giving a full name is sufficient to establish oneself unambiguously.

In elementary and middle school, I usually went by Dave (or Dave B. in the case when my first name alone was ambiguous -- as it usually was). Around the end of middle school or the beginning of high school, I began to be called by my last name. My martial arts instructor called me Mr. Bindel, partly because he was particular about etiquette, and partly because there were several of us named Dave. When my brother Scott joined the class, he added big and little to Mr. Bindel; I've forgotten how he handled the few times when he saw us with our father. By the end of high school, I was Dave or Bindel or (in martial arts class) Mr. Bindel; and more rarely I was David. But I would answer to any of those names.

A curious thing happened while I was an undergraduate. I started meeting or interacting with people through e-mail and electronic newsgroups -- mostly those for my computer science coursework -- before I'd had much (if any) face-to-face interaction. I sign my name David, and so that's how I came to be addressed by those people, even when we actually met. By the end of college, I was David or Bindel, except for a few friends and acquaintances, mostly people I'd known from high school or the first two years as an undergraduate, who called me Dave.

And now? I answer to my first name, my last name, my nickname, or any reasonable superposition of the three, but I seem to be called Dave a lot less than I once was. It's interesting, though, to note who calls me by which name. I wonder, sometimes, whether the people who say different names would have different averaged perceptions of me -- though putting meaningful numbers to perceptions is beyond me, and taking statistics of such numbers is perhaps better left to pollsters, cognitive psychologists, astrologists, or people who fall into some combination of those categories. It's all the same person, but the different names do go with different activities. It was Mr. Bindel who stood on one good ankle and wondered why he was letting someone attack him with a knife; it was Bindel who caused much hilarity by explaining the idea of a differentiable manifold to his flatmate (So I asked Bindel what a manifold was yesterday... / And I'll bet he told you!); and the guy who walked a mile (more?) with a red office chair on his head was definitely just Dave.

If I have other nicknames, it's probably just as well that I don't know them.

  • Currently drinking: Hot water, lime, and honey

Weasel words

The article: When words hide the truth.

Sunday, November 21, 2004

Library

I'm getting more technical books! It may be strange that I got fed up with shopping and fled the store today rather than buy an extra package of socks, but still have the wherewithal to pitch in to a mass book-order that my office is making to SIAM; but so it goes.

  • Mechanics:
  • Iterative methods
    • Iterative methods for solving linear and nonlinear equations -- I want this book for the treatment of Newton-Krylov methods and analysis of inexact Newton methods, mostly. I have a bunch of papers that talk about results in this area, but no unified treatments. Newton-Krylov methods are particularly useful when taking analytical Jacobians becomes painful -- which happens a lot for interesting problems (including problems involving electrostatic-mechanical coupling that I find interesting).
    • Iterative methods for solving linear systems -- All sorts of useful analysis that's hard to find elsewhere. I've checked out this book before, too.
  • Structured methods
    • Spectral methods in MATLAB -- There are three main methods for discretization of partial differential equations: finite elements, finite differences, and spectral elements. Well, okay, there are finite volume methods, too. Still, I know a lot more about the first two than about the third. Considering how much I prefer to get compact models that fit onto a single machine, it sould behoove me to learn more about spectral methods, I think. Besides, Trefethen is an outstanding writer.
    • Fast reliable algorithms for matrices with structure -- This deals more with linear systems than with eigensystems (where I've done work on similar methods). Still, I don't have any books on this topic, and the methods are still sufficiently poorly unified that the talks tend to either be high-level or incomprehensible, and the papers all use different notations. Having one book reference on the topic, at least, will be a nice change.
  • Other

Time to stop gloating and go get food.

Saturday, November 20, 2004

Big Read

Today is the annual Cal-Stanford Big Game, which means there is more than the usual traffic, both pedestrian and motor. In honor of this game, I have printed a bunch of technical papers, which I intend to take with me to a cafe on Solano Avenue for an hour or two of reading before dinner.

You may think this has nothing to do with football. You would be right.

Double take

The article title was: Effects of alcoholic moderators on anisotropic etching of silicon in aqueous potassium hydroxide solutions.
What I saw was: Effects of alcoholic moderators.

Friday, November 19, 2004

Riddle

Q: What do you get if you cross Willie Nelson with a squirrel?

A: I'm not sure, but it has magnitude |Willie|*|squirrel|*sin(angle(Willie,squirrel)).

Mascot

Its cousins guard the rest of emperors.
It guards our spice rack.

They wear armor and bear arms.
It wears feathers and bears a beak.

They draw scholars and tourists from the world over.
It may draw my attention when I'm looking for cumin.

They are the Chinese terra cotta warriors.
It is a terra cotta chicken, and I'm told it's our new mascot.

Wednesday, November 17, 2004

Tuesday, November 16, 2004

Recent Happenings

I've done better at writing letters this semester than I sometimes do, but recently I've neither written many letters nor much e-mail about day-to-day life here. If you would normally be a recipient of such an e-mail or letter, read on. If not -- well, the beauty of the written word is that you can ignore it without being impolite, so you can read or not as is your preference, right?

A bit over two weeks ago, I went to Davis with some posters from the SUGAR group, including one new one on my recent research, for a CITRIS event (the Center for Information Technology Research in the Interest of Society is a multi-university research initiative in which my advisor is heavily involved). There were relatively few students there compared to the last time I went, which is odd since I remember reading at some point that they intended to have increased student interaction. I did cartwheels to get a poster ready in time, mostly because I decided to use PowerPoint (since I had an existing template and since I roughly knew how to print PowerPoint to a plotter). I'm not very good with PowerPoint -- I usually do all my presentations using a LaTeX package called Prosper -- but I was managing okay until the program crashed. Then it asked me if I wanted to save my presentation before exiting, and I foolishly said I did. I think the reason for the crash in the first place might have been that the file system flaked out, since it was spotty for most of the day; but in any event, the saved file was corrupted, and I had to restart. Fortunately, one of the other people in the SUGAR group had access to a plotter (a blessing on her head), and the Inkstone, a little store south of campus, had poster boards.

I got another pen while I was at the Inkstone, too. I've filled it with blue ink (in the other fountain pen I use black ink). I've been using it in my letter writing since then. It doesn't seem like I've written that much with it, but it's enough that I ran out of ink while I was on my trip to New York, and so switched back to the black pen for at least one letter. I still haven't finished cackling over the pen -- I can be worse than a hen with an egg, at least when it comes to socks, books, tea, and office supplies. By the way, you should look up the story of George Parker and the history of the Parker pens some time -- it's fascinating. One of my buddies from Soda got an impromptu lecture on George Parker's story after I'd finished reading about it (fortunately, I have some friends who find these things as fascinating as I do -- beats seeing eyes glaze over or hearing What I just heard was 'blah, blah, blah' any day), and he subsequently forwarded a pointer to a page on the best disposable pen there is, which also pleased me.

My flatmate asked at the very end of October whether it would be okay with me if his girlfriend moved into the apartment. I said that was fine with me if it was fine with them, and so it looks like there will be a third person living here starting in December. There will also be a Siamese cat, which means I won't have to be jealous of Vince's guinea pig any more. I'm looking forward to that immensely; I miss our cats when I'm away from home, but finding places that will accept pets here is tough. Given how hard I am on the plants, maybe that's just as well, particularly since I don't have any friends who would be willing to cat-sit when I travel.

I can already see the changes taking place in the apartment with Elena moving in. Jim (current flatmate) is not as tidy as Patxi was, and while we keep things organized enough, and I vacuum and pick up at least weekly, there are certainly aspects of this place that practically cry out bachelor pad. Or perhaps they cry out place where two somewhat absent-minded guys with no particular taste live, if they're inclined to be verbose. Maybe the stuff that I have more to do with uses longer phrases? Anyhow, there is a nightlight in the bathroom now, and a new shower curtain; there is a woven basket for magazines; and there probably are or will be a lot of things that I won't notice for some time to come, but are naetheless there. Or maybe they'll be pointed out to me with sparkling eyes; some people get as excited about getting decorative materials from Target as I get about getting new pens, and the world's the richer for it.

The start of November was hectic. One of my colleagues got measurements from a bunch of devices that I had simulated, and they matched the predictions that my code gave -- including one phenomenon that we hadn't expected before doing the simulation (which has a huge impact, but which is sort of hard to explain in one or two nontechnical sentences; if you're curious, I've linked the paper from my web page). I was ecstatic. This is, of course, the idea of what computational science is supposed to do, but it hardly ever works out so nicely with so little effort. Yes, I realize that so little effort is the culmination of several years of pondering on my thought and an even longer period of pondering on the part of other people, but still -- I'm very happy about it.

So there was data to match to my simulations, and then a paper to write on the topic, and all that was due on November 1. There was also an abstract deadline on Nov 1 for a linear algebra meeting to take place next summer; I wish I had more time to spend on the abstract, but we'll see what happens -- it's good work, so if I'm invited, I expect the talk to be stronger than the abstract was. On Nov 2, I gave a practice version of the talk that I gave on Nov 5 at NYU. I was on a plane Nov 3 and Nov 6.

The trip to NYU went well. I think my talk went well, and I certainly had a lot of interesting conversations. Also, this was my first trip into NY city, and it was fun to go exploring, even if the group was just me, myself, and I. I went to hear jazz at the Village Vanguard, I enjoyed a beautiful day in Central Park, and I got to take a couple long walks. I went into the original Barnes and Noble, and passed by the Strand bookstore (I would have gone into the latter, but it was late enough that it was closed). And it was nice to be out and about in the fall on the East Coast. I'm not sure whether it's the weather or the trees that make the difference, but fall in Berkeley doesn't feel the same as fall in the Midwest or the East. Fall is still one of my favorite seasons even here, but I think I prefer the East Coast variety.

It seems like I spent most of last week catching up, at least for the start of the week. It's amazing how much stuff can pile up. I took Friday off and went to the South Bay and helped to troubleshoot Linux problems. Also, someone apparently got hold of my credit card number who shouldn't have, and billed a bit over five hundred dollars for management consulting services to my account. Fortunately, Citibank figured out that this was fishy within 24 hours of the transaction -- long before I would have discovered it on my monthly statement -- and so they called me to tell me that I might have been defrauded. We cancelled one card, and I just got a new card in the mail yesterday; and, according to the representative I spoke with, an affadavit and some instructions should follow shortly. It's worked out with remarkably little hassle, though. I'm always shocked when I deal with a beauracracy and it doesn't turn into a dreadful mess; in a way, I'm more shocked that Citibank dealt with the situation so gracefully than I am that someone decided I was a good target for fraud.

I also seem to have lost my student ID, and with it my phone list. I'm not sure if it fell out of my pocket somewhere when I took out my wallet, or if I just misplaced it, but the fact remains that I'm now missing most of my phone numbers. This would probably cause me more concern if I spoke to more than two people on the phone with any regularity. As it is, I figure it will probably show up eventually, and it's not worth worrying about in the mean time.

And that's the news from Lake Woebegone. I should get going now -- I've finished my morning coffee, there's a meeting in half an hour, and I wanted to get one more task done before then.

  • Currently drinking: One last sip of coffee

Jasmine Tea

The apartment next door is lit with in that clear late afternoon light that only comes on a slightly overcast day. It makes all the edges and corners of things look a little sharper than they usually do.

The radio is on. Not headphones, but speakers and subwoofer.

This is why I work from home some days.

I have a tin of Jasmine Downy Pearls from Peet's which is among my favorite teas (do I have any teas that aren't favorites?). The pearls are tightly-curled whole tea leaves; put a few in the bottom of a glass, and you can watch them unfurl in the hot water. Because the leaves are whole, there's no need to use a teaball or filter to keep from swallowing bits of leaf. The leaves are good for several brewings -- I'm on number five with this batch -- and the taste changes with each successive cup.

The floating leaves are wonderful to watch, too. It's amazing how a small amount of dried tea unfurls to fill such a large volume: it makes the cup look like it's full of seaweed. Perhaps it's a Sargasso tea? Except with no eels.

(If you didn't catch that last reference, go find a reference that describes what we know about the life cycle of the eels. I recommend the description in the section titled Slippery Maketos at the beginning of part 3 of The Basque History of the World by Mark Kurlansky; if you follow this recommendation, don't stop with the description of the life cycle and culinary history of the eel -- the rest of the book is fascinating, too. If you did catch the last reference, I still recommend the book.)

  • Currently drinking: Jasmine Downy Pearls green tea

Monday, November 15, 2004

Dimensions of Character

A while ago, a friend of mine sent me a parody of Neil Stephenson's writing. You were thinking about the part of Cryptonomicon where he pouts his cereal? I asked. And he agreed that I'd got it in one. Later that week, while we were talking about books over cups of green tea, I observed that it seemed like many of my favorite authors could probably be parodied, but for different things: writing, character, place, pace, or plot shape. Kim Stanley Robinson writes wonderfully long sentences; Garrison Keillor writes much as he speaks; and Sir Arthur Conan Doyle is best known for the shape of his plots and for one or two characters.

I was reminded of that conversation today while I sipped spiced tea and ate chaat with a different group of friends. One of them commented on the Victorian habit of inventing fanciful names for groups of different animals: a murder of crows, a crash of rhinos, or a pride of lions. He suggested that perhaps we should to the same thing to distinguish groups of friends: a snark of Bens, a spaz of Jens, a bewilderment of Kens, a grunt of Lens, or a startle of Svens. You could do the same with book characters, I'm sure, particularly for authors who seem to write characters so narrow as to be unintentional caricatures.

Of course, real people are not caricatures, but there's certainly an element of caricature in the ways we identify and describe each other. It must be that way: most of us only see one or two facets of those around us, and it takes some time to even get a feel for those facets. At the same time, it's interesting to listen to people describing their friends, enemies, and colleagues (friends, Romans, countrymen?). A few words can tell a lot, particularly in a face-to-face conversation in which the words are accompanied by facial expressions and changes of voice tone. Of course, it's hard to tell the few words that someone would use to describe -- or perhaps to caricature -- oneself. Would my acquaintances describe me as a crotchety young man, easily exasperated? As a singer of silly songs? Would the characteristic picture be me absent-mindedly sipping tea, answering a question with a lecture that made the asker regret the asking, or perhaps loping along with a giant green backpack? I'm not sure whether I would be easy or hard to caricature, or how much variation there would be between people who have only interacted with me electronically, or only in an academic setting, or only in a social setting.

Various groups working on facial recognition write about eigenfaces: the idea is that it's possible to come up with prototypical faces, and that real faces tend to look like linear combinations of those prototypical faces. It has never been clear to me how one imposes a vector space structure onto faces -- what would twice a Bush face minus a Charlie Chaplin face look like? -- but the idea is entertaining. So what about eigenpersonalities? I suppose that's really the idea behind the Myers-Briggs personality inventory, or behind newspaper horoscopes, but surely we can make the idea sound more respectable by wrapping it in technical jargon. Or perhaps it would sound as ridiculous as I'm sure it would be in fact; but the idea of a vector space of personalities could certainly be entertaining.

I'm totally normal, but I wonder what you would get if you took my projection in the direction of Dumbledore?

  • Currently drinking: Jasmine tea
  • Currently waiting for: Psychology textbooks from John Frum

Perturbations, Parallelism, Performance

How can you improve the speed of a numerical calculation?

Ask many computer scientists this question, and they'll start thinking about ways to improve the code that does the calculating. If they're well educated, the first question they'll ask is Does it really need to be optimized? Then they'll ask where the time is being spent, and what available high-performance tools can be brought to bear. Would a faster processor or more memory help? If they're sufficiently over-educated, or simply sufficiently brave, they might suggest running the computation in parallel.

Alas, even among those who should know better -- anyone with an undergrad education in computer science should know better, and probably people with undergrad degrees in a variety of other disciplines should, too -- the first question often doesn't get enough attention. Does it really need to be optimized? It's a vague question, and not at all as obvious as it might first appear.

Numerical calculations are not done in a vacuum; as Hamming once said, The purpose of computation is not numbers, but insight (to which some later wit replied that the purpose of computation is not yet in sight). Somebody wants to better understand some phenomenon, perhaps physical. The phenomenon is described by a mathematical model, usually simplified; the mathematical model is discretized; and a computer code is employed to solve the resulting problem. If the question does this really need to be optimized? is first asked after the computer code is in place, is is asked too late.

Consider the physical problem. Is doing a computation the fastest way to understanding? If a five minute experiment can supplant five hours of setting up a model and computing with it, then the five minute experiment is probably worth doing. At least do a thought experiment first to ensure that you're asking a reasonable question.

Consider the construction of the mathematical model. How complex must the model be to accurately predict the behavior of interest? Can the real problem be viewed as a simple problem for which the answer is known? Or as a perturbation from such a simple problem? Is there a simple approximation which can be used as a starting point for more refined estimates (or even as an ending point, if not much accuracy is needed)? Ideally, the person setting up the model should ask these questions. Certainly the computer will not ask them.

Consider the construction of a discretized model for use on a computer. How faithful must the computer model be to the original mathematical model? This question works even if the original model is discrete; sometimes, it's possible to approximate one discrete problem by another discrete problem to very high accuracy. Can prior knowledge of how the system should behave be used to get the solution more easily? Is there one model or the other that provides particularly nice properties, in terms of error analysis or performance or both?

And now consider the construction of a computer program to solve the problem. Can someone else's code be of use? If the code available is too slow, is the right thing to do to speed the code up, or to reconsider the problem? If it's necessary to speed the code up, where is the critical bottleneck, the place in the computation where most of the time is going? And now it is time to use the computer scientist's bag of tricks to make things faster.

I've helped a colleague do a probability calculation which he thought would require extended precision by doing a back-of-the-envelope Taylor expansion. The expansion method not only required no coding, but it was more accurate than the method he had in mind. I've taken calculations of my own which originally took two hours to run and re-run them in milliseconds by replacing a generic finite element model with a semi-analytical formula based on finding singularities in a certain matrix whose entries were Bessel functions. I've used nondimensionalization arguments to reduce problems in two or three dimensions to problems in one dimension. I've used special structures in my problems, and in my models, and sometimes in my formulations to help me or help other people untangle problems that initially seemed difficult. I've taken a code that I thought I would have to run in parallel, profiled it, and discovered that all the time was going into file management and text processing tasks which weren't really needed, and replaced that slow bottleneck to get something which suddenly seemed blazingly fast on an ordinary desktop machine.

And some days -- many days -- I've been able to use existing software that gave me the answers I wanted sufficiently fast that it would have been inefficient, in terms of total time to solution, for me to spend any more thought on using a smarter solver or a more clever problem formulation.

How can you improve the speed of a numerical calculation? You can improve it by realizing that speed often means time to get useful numbers and not megaflops (millions of floating-point operations per second).

Overengineered

A pessimist sees a glass half empty.
An optimist sees a glass half full.
A realist drinks the rest of the water.
An engineer figures that, even accounting for a generous factor of safety, that container uses way too much glass.

Saturday, November 13, 2004

Linux

I first installed Linux on my machine in my freshman year as an undergraduate in 1995 -- a Slackware release, I forget what version. I dual-booted my system with Windows 3.1. One of the women who lived on the same floor as me in the dorms helped me set it up; I think she assumed I knew more about UNIX and such than I really did at the time, probably because my main means of meeting people in those first few weeks was to help them fix their computer problems and set up their network connections -- that and helping to move furniture. She didn't need the network help, though I might have helped her move furniture at some point; I'm sure I've forgotten things after nearly a decade. Naetheless, we became acquainted, and got along with each other reasonably well, and I wanted to give Linux a try.

I spent a very frustrating time trying to get things to work before I gave up, reformatted, and spent some time with a pure Windows-based system again. That summer, I gave it another try. One Friday evening, I sat down with my machine and a set of RedHat CDs, and set to work. By midnight, I had managed to spectacularly botch the drive set up -- the partition table was corrupt, the master boot record was no better, and any data my filesystems might once have contained was hopelessly lost. I also had neglected to eat dinner -- I did that a lot, to no lasting harm but to the dismay of my friends -- and the combination of tiredness and low blood sugar left me even more disgruntled than I might otherwise have been. But I perservered, and after spending most of the next day reinstalling and figuring out how to get the OS to play nicely with my network hardware and how to get X11 to play nicely with my graphics card, I was very happy to once again have a working system. At that point, I'd also had to use the Alpha clusters for a year for all my computing assignments, and so knew enough about manuevering in a UNIX environment that I had a starting point for learning more.

I've used Linux as my primary operating system since that time, though I did -- and still do -- use Windows some of the time, for games, or for viewing Office documents that people sent me, or for programs I wrote for my job. Both operating systems have come a long way. Plug-and-Play support has become ubiquitous, which has made life easier in most respects (remember diagnosing interrupt conflicts?); there are no longer so many network cards built with conflicting and backward interfaces; and driver support for new and old hardware is better in both systems. Windows 95 was tremendously more stable than Windows 3.1 -- it's remarkable what cooperative multitasking will do -- and, despite some... um... quirks when it first came out, Windows 2000 and the other successors have become still more stable. On the Linux side, stability was never such a concern. But for a long time, configuring a Linux system was a chore, and though my primary tasks were editing, compiling code, preparing mathematical documents, and web-surfing -- tasks for which the application base in even the early distributions did well enough -- there were lots of areas in which the application base was primitive or non-existent.

Despite getting to be quite comfortable with Linux and spending lots of time on systems programming tasks, I never quite got around to meddling with the Linux kernel. I wrote a kernel for my undergraduate operating systems class, of course, and there's nothing quite like spending hours debugging a kernel-space locking error to leave you impressed by how tedious kernel code can be. I've written code on platforms that were arguably even more obtuse -- a little embedded system called the HandyBoard in my robotics class, and an early tablet computer called the DataBoard for a job at the end of high school -- but somehow they didn't leave me with the same sense of disgruntlement as that one locking error (probably because it didn't take very long to reboot those machines). My later experience with parallel computers has had much the same feel: I can write code at this level, and I know how to diagnose and fix locking errors, but I also know it to be a pain that I'd rather not deal with. In the cases where I've written system-level code for Linux -- as in a cryptographic file system with metadata signatures that I co-wrote in my first year of graduate school -- I've been fortunate enough to push most of the work into user-space daemons which don't take down the entire system when they crash during debugging.

On this, though, Winnie is braver than I am -- perhaps because she already spends a fair amount of time working with embedded systems code. So when I went to visit her and to give a hand with the system she was using for a three-week intensive course on Linux device driver programming, I didn't really expect to be able to provide much more than encouragement. But while the standard Linux distributions have come a long way, they have not come so far that it's entirely trivial to get a working system which can boot with either a 2.4 or 2.6 kernel, which works with a very recent-model webcam, which is entirely unphased by the presence of two network cards (well, 1.5 -- one is on the motherboard and isn't a separate card), and which will gracefully start the X windows graphical interface system despite a somewhat quirky graphics card. Now multiply the difficulty by two machines (when you're debugging kernel modules, this is very useful -- one machine runs the kernel, and the other machine runs the debugger).

And so I spent yesterday doing something it seems I hardly ever do any more: helping a friend work through the quirks in a non-standard installation. And by evening, we had things worked out. Both systems worked fine, one with both a 2.6 kernel and a 2.4 kernel. All the bits of hardware were recognized, even to the web cam. And so, even though I wasn't very helpful when it came to the kernel module that Winnie had to write for the homework assignment -- the most I did was point out a place where something needed to be statically allocated rather than stack allocated -- I was very satisfied by what I'd done with the day. Even if what I'd done had nothing to do with the sort of modeling tasks and numerical computations on which I usually spend my days.

Besides, I got to share some egg nuggets (a type of Chinese sweet, perhaps distantly related to waffles), and I had milk tea with tapioca balls. And I finished reading Royal Assassin on the train ride home. And now I've had a break to think about something completely different for a while, and I have a couple days in front of me which I can spend thinking about -- really intently thinking about -- some of the mathematical ideas that I've meant to flesh out for a while. Is it any wonder I'm in such a good mood?

Thursday, November 11, 2004

Blinded by Science

Read the article.

  • Currently drinking: Black coffee

Wednesday, November 10, 2004

Cow-tipping

In a brief interlude around 5:00, when some folks were leaving the office and others were visiting, the conversation turned to cable television.

CNN has changed a lot. I remember realizing that fully when I saw a segment on a farmer who lost two cows. Isn't there something in Europe, perhaps, that might be more newsworthy than that?
Maybe the cows were kidnapped by terrorists? I asked.
And they'll soon be beheaded, right.
If we dressed up in turbans and took movies of ourselves going cow-tipping, I wondered, how long would it take before they were all over the Internet?

Let me be clear here: I think that a video of men in tuxedos or Mandarin jackets would be equally ludicrous, and would spread across the net nearly as fast. I can't help but think that if I had a handheld video recorder and access to a field full of cows (or, to be more safe and more humane, a field and a pile of sawhorses, pillows, and other items from which I could build fake cows), that this would be a wonderful experimental waste of an evening. Tape three videos: one of people in fake turbans tipping fake cows; one of people in fake tuxedos tipping fake cows; and one of people in Mandarin jackets tipping fake cows. Place all three videos on the network, and write a mail to a few friends saying that it's there. Wait one month and observe how far the video has spread.

I'll link anyone who wants to try it?

The Great Unraveling

On the plane, I read Eric by Terry Pratchett, and Assassin's Apprentice by Robin Hobb. Both were good reading, and I think I'll probably pick up the sequel to Hobb's book soon. For the moment, though, I think I've switched gears -- in reading if not in music -- and after I came home this evening I spent some time listening to the local jazz station and reading The Great Unraveling by Paul Krugman, a collection of editorial essays taken from Krugman's regular New York Times column.

In the preface, Krugman states his background clearly:

Why did I see what others failed to see? One reason is that as a trained economist I wasn't even for a minute tempted to fall into the he-said-she-said style of reporting, under which opposing claims by politicians are given equal credence regardless of the facts. I did my own arithmetic -- or, where necessary, fot hold of real economists who could educate me on the subject I wrote about -- and quickly realized that we were dealing with world-class mendacity, right here in the USA.

Whether or not you agree with Krugman's conclusions -- I find his arguments compeling -- I find this paragraph very interesting. The first point he makes is that, in many areas, not all perspectives are equally valid. Certainly neither science nor mathematics are democratic endeavours. We don't legislate the value of pi, and we usually accept that someone who has spent years thinking about a technical topic might have some intuition that we lack. But a scientist or mathematician is only credible insofar as he can demonstrate his conclusions based on available data -- which should, ideally, be something that a non-expert could follow (though in some cases you might reasonably need to be a tenacious non-expert with a long attention span, and by the end of your endeavour you might no longer qualify as a non-expert). And this is the second point: opposing claims that can be judged on a factual basis should be judged on a factual basis. If fair and balanced coverage means that I say pi is about 3.14 and you say pi is about 2.86, so really we should weight both perspectives equally to guess that pi is 3 -- well, I suppose that means that life isn't fair by all lights. But then, who said it was?

As for the specific conclusions that Krugman draws -- well, I'll quote again:

But have I been right? Read the book and decide for yourself.

  • Currently drinking: Black coffee

Monday, November 08, 2004

All that jazz

I never went back to Georgia...
-- D. Gillespie, Manteca

The trip to NY was excellent: the talk went well, and I had an attentive audience; I had lots of good conversations, some technical and some not; I met some very sharp people; and I was able to get some new ideas and to share some new ideas. I was impressed; I hope they were; and beyond that, I'm still sorting out my impressions and may or may not share them further on another day.

I also had the opportunity to get out and explore a little in my first trip to New York.

Sometime near my arrival at JFK, I got Manteca stuck in my head. It was there while I walked through Penn Station; and I'm sure I was humming to myself while I took a walk in the area around NYU. The song played intermittently in my head from Wednesday night until Friday afternoon. And then I went out on Friday evening.

I walked along Broadway to Union Square where -- perhaps unsurprisingly -- I ducked into a Barnes and Noble to find a quiet corner and record some of the day's conversations before they vanished from my head. The sound system was playing a fiery, bluesy sort of jazz, and the trumpets in my mental soundtrack were replaced by harmonicas. Then I went to see a group play at the Village Vanguard. Sax, drums, guitar, and bass fiddle supplanted the mental harmonicas, though now only the fiddle remains. Slap that bass, slap it 'til it's silly...

When I went back to my host's apartment, his CD player cycled through Dave Brubeck's Take 5, and when I left the next morning, Take 5 and blues and the bass fiddle lines from the previous night cycled through the back of my head, with Sinatra bubbling up in the in between moments. I walked down 5th Ave toward Central Park, passing by all manner of grand buildings and land marks on the way, pausing to admire the New York Public Library and to duck into the main Barnes and Noble store on 18th Street. My previous impressions of New York City were shaped half by The Muppets Take Manhattan and half by an architecture professor at Maryland who spent two weeks in a seminar course talking about Frederick Law Olmstead and the design of Central Park -- or at least, that's what I thought. But as I walked along the way, it was remarkable how familiar things seemed. New York City permeates so many images, through books and radio and television, that it hardly seemed such a strange place after all.

I walked to the lake in Central Park, and there I enjoyed the sun and watched a small child feed bread crumbs to a swan. The kid was young enough that the swan was much larger than he was. But when the kid threw his bread crumbs, the swan curved it's neck down to gobble up the morsels, and the kid was suddenly taller; whether it was this change in stature or the greedy behavior of the swan, quite out of keeping with its normal dignity, the kid was enchanted by the sight. He laughed, and did a little dance, and people all around him grinned a little. The squirrels and the pigeons and the ducks, though, steered clear of the whole scene -- I suspect none of them wanted to rile the swan.

It was a perfect fall day: the air was clear and a little crisp, the leaves were shades of brown and orange and red, and the sky was that special shade of blue that only seems to come on a few days each fall. But I eventually did walk from the park, since I had to catch a plane a little after 6:00. As I walked out, I passed two musicians. One was a guy with a sax and dark glasses playing what I took to be an unfamiliar jazz tune for a few notes -- before I recognized a tune from Fiddler on the Roof. If I were a rich man, said the sax; I would deedle-die-doh-deedle-idle-dum! I hummed under back under my breath. Not long after the sax had faded into the background, I saw an old Chinese man carefully setting up a pi-pa, a type of Chinese string instrument. I slowed as I passed, wanting to hear what he would play. He played Greensleeves.

  • Currently drinking: Hot water

Tuesday, November 02, 2004

Lights! Camera! Peanut doodles!

I cast my vote this evening during my dinner break. I used one of the Diebold voting machines; and whether or not I think they have enough safeguards engineered into them, I also think they're pretty nifty gadgets. I'm a sucker for touch pads.

And with that profoundly patriotic thought in my head and a rumble in my belly, I went home, listened to the radio while I ate my dinner, and then turned the radio off and walked to the bookstore to buy a book for the flight tomorrow. Or three books, actually, and they'll probably last me longer than the remainder of a busy week.

I'm not a doctor, but I play one on TV. No, not really. People have mistaken me for several flavors of scientist or engineer -- correctly, for the most part, since labeling academics by departments is a medieval notion, however time-honored -- but that's about the extent of it. And I'm not dramatic enough for television, and that's the way I like it. I can only imagine what my response would be to someone crying Lights! Camera! in my direction. I'm a mathematician and a computer scientist, and the television in the living room is broken, and has been for quite some time.

Monday, November 01, 2004

Spare time

You should have a slide at the end which says the things you do in your spare time.
Ah? Like finding roots of polynomials, writing software to infer packet loss rates in computer networks, helping simulate musical instruments, that sort of thing?
Exactly.
Should I mention sometimes sitting in a room and arguing in circles with a committee of floating point arithmetic experts?
Sure. Feel free to joke about it.
Of course.
Yes, I think that list is quite enough.
Really? I was just thinking that I ought to start some more projects...
Some day, you will find yourself in a job that leaves you feeling less ambitious.
Ah?
It's called 'being a professor.'

  • Currently drinking: Rooibos

Halloween

In 2001, one of my office mates dressed as a zombie bin Laden for Halloween. He was most put out when he lost the costume competition to a graduate student dressed entirely in purple with a BART ticket stuck to his forehead. What's purple and commutes? An Abelian grape! Yes, they staff entire departments with people who (like me) think that joke is funny -- or at least, a sufficient majority to clinch a costume competition.

And you do know what you call a baby eigensheep, right? I know I can't hold a candle to the former Iraqi foreign information minister when it comes to entertaining the world at large, but I do amuse myself.

Lots of things are different three years later, but both bin Laden and the Abelian grape joke are still around. And so are we.

I, and many other people my age, grew up half-expecting that nuclear war was inevitable, and that my mark on the world would ultimately be an ashen shadow on a brick wall somewhere. We saw the duck and cover films and laughed, knowing how ineffective that would be. I wonder if Cheney realizes how ludicrous that seemed then, and how equally ludicrous it seems now to make a nuclear scare into a campaign point? Things have changed, and now it seems likely that, for a whiel at least, we'll continue to kill each other more rapidly by accident with our vehicles than on purpose with our weapons. But the box is open, and there's no putting knowledge back into it. If some smart, determined person gets the backing of a large enough other group of people, I'm sure that person can kill a lot of people, or at least make the world a less pleasant place in which to live. Do you suppose we'll wake up some morning to hear that some leader, a person of focus who wishes to destroy his enemies and will not vary from that task, a person who is certain that God is on his side -- do you suppose that some day, such a person could come to command an organization, even a country with nuclear capabilities?

And yet, we're still around.

By flu, by car, by bomb, or by falling airplane parts, whether we're uninsured or have the best coverage in the world, whether Bush wins or Kerry wins or the election is declared a draw and the government is replaced by a military triumvarate -- we all will die eventually. How much land does a man need? Not very much in the end. Sometimes it seems like we're in an awful rush to get to the end, as though this were all some sort of race to be won.

And yet, we're still around.

Happy Halloween. Vote on Tuesday, however your conscience may dictate. And drive safely.