Engine-ering

As kids, I think the first encounter most of us have with the idea of an “engineer” is “the person who drives the train”. By the time I started my undergraduate studies, however, I knew that the College of Engineering wasn’t just about driving trains. But I always wondered how a purely functional role could have the same name as what I now saw as an engineer: someone with a very active role in design and problem-solving. Or as wikipedia puts it, “An engineer is a professional practitioner of engineering, concerned with applying scientific knowledge, mathematics and ingenuity to develop solutions for technical problems.”

Recently I picked up some books at the library on steam locomotives and other fascinating train topics. And suddenly, I realized why the train-driver could also lay claim to the title of engineer. Historically, at least, the railroad engineer did not just drive the train. He (these were generally men) also had to be a top-notch engineer, familiar with all of the inner workings of his engine, as he was continually required to maintain, lubricate, tend to, and sometimes even repair the engine. One book noted that the “iron horse” was just as temperamental and required as much attention and grooming as the organic horse it had replaced.

Today, it seems we have a very different view of machines and their users or operators. Most of us who drive cars do not expect to have intimate knowledge of how they work; instead, we hire car mechanics to deal with the details and fix problems. No doubt today’s train engineers are also much more removed from their engines than those of the 1800’s. Computers likewise (or our attitudes about them) have evolved as well, so that users need not understand operating systems and file systems and network protocols, disk scheduling and memory allocation and pipelining, kernels and shells and scripts. Instead, one can hire an IT expert to maintain the machine and fix it when it breaks.

Is this trend a result of the growing sophistication and complexity of these machines, or a shift in our social attitudes towards the desirability of being involved in details? Or both? If it’s an evolution in the machine, are there other machines out there in their infancy and still requiring that the engine be a part of the engineer?

I can see the allure of both the low and high levels on this abstraction spectrum, for computers. I personally enjoy tinkering with the configuration of my computers and knowing what’s going on under the hood, even up to spending hours buried in an ancient Linux machine to get a wireless card working—but sometimes that loses its appeal when I just want things to work. And in truth, when the machine is reliable enough that I don’t need to be checking and tinkering constantly (as with my Mac), I’ve found that I stop doing it. Yet I still feel a tug of curiosity about other machines as well—I’d love to take a basic automotive mechanics course, and learn more about how trains work, and I’m fascinated by pulleys and linkages and astoundingly clever machines of all kinds. But then, I’m an engineer by inclination—or perhaps, I have a wish to be (in a friend’s charming coinage) an “engine-er”: someone who knows and tends and cultivates the engine, akin to a farm-er or a sail-or.

Newer, faster, better!

For some time—actually since the time this blog was created—I’ve been dissatisfied about the speed with which the pages load. My main site page, wkiri.com, and its associated straight-html pages loaded fine, but anything associated with the blog always seemed… slow. Pages would take 10-20 seconds to load, which is a really long time in web-land, and especially when you’re trying to write, say, a blog post, and this delay happens each time you save or preview the post. I went a few rounds with DreamHost, but each time they said connectivity to my site was fine. Now WordPress, which is what my blog runs on, uses a database to store all of the blog content. I started to wonder if maybe the database host was the slow factor. I contacted DreamHost again. This time, I got:

It looks like the server you’re on is a bit loadier than we usually like for older servers like yours and that is likely causing a good portion of the slowness. I can offer to move you to one of our newer servers that are generally better balanced and more closely monitored if you like.

After deliberating for all of 0.5 seconds, I replied in the affirmative. They replied almost instantly, got me moved, and so far nothing has broken—and all on a Saturday, too! The difference is like night and day! I don’t know if you as readers can tell, but for me it’s a huge speed improvement (about 1-3 seconds load time now). And good timing, too, to speed things up right before I head to Mars; posting mission updates will be a lot less effort. And, bonus: I learned a new word, “loadier.” Thank you, DreamHost!

Finally, I added links from each individual post page to the “previous” and “next” entry in the blog (something I had been missing for a while). Enjoy!

Programming with physics

Programming is the art of working out the logic needed to obtain some desired behavior from a system, such as a computer. I’m so used to achieving this with symbols, variables, and control keywords that it hadn’t really occurred to me that the same process has been used since long before computers were invented. Mechanical devices are “programmed” by specifying their physical design, and their behavior is “executed” with physics, not a CPU.

This came to me while I was reading a children’s book describing how a toaster works. What is the job of a toaster? To lie dormant until bread is inserted, then heat up for an appropriate amount of time, then automatically turn off and pop the toast up for easy removal. If I were going to create my own toaster, I’d go at it from a computer-logic perspective: acquire a sensor to measure the current toastiness of the bread (perhaps just its temperature), and then program a tiny embedded chip to respond when the sensor exceeds the desired threshold, at which point the toaster would send a command to the release lever so that the toast would be ejected. But is that how toasters are designed? No!

Toasters are a complete marvel of physics-based programming. There is no embedded chip, no logic to specify, no commands. Instead, the toaster relies on a bimetal bar, which bends to the left or right depending on the temperature, because its two metals expand at different rates. (I first encountered bimetallics when I asked my dad how our thermostat worked.) The same current that heats the toaster coils flows through this bimetal bar, and it gradually bends to the side, until it nudges the “heat-up lever” out of contact and instead engages the “cool-off lever”; as it cools back down and straightens, it then releases the cool-off lever which allows the spring-loaded release to pop the bread up.

Got that? There is no timer in your toaster! (Unless you have some new-fangled version that does in fact use a computer chip.) The timer effect is achieved by simple physics. This is an entirely different kind of programming which must have originally required a lot of trial and error: how long should the bimetal bar be? How thick? Which metals should be used, to get the right differential lengthening? And then there’s the clever puzzle of how to set up the system of levers so that the bending of the bar triggers them in the right order, purely mechanically.

I had always wondered why toasters don’t let you specify a toasting duration, instead of trying to figure out what a unitless dial that goes from 1 to 10 really means in terms of toastiness. Wikipedia relates that early toasters did have timers you manually set, but this caused problems because the first piece of toast needs longer than subsequent ones to achieve the same done-ness. Using the bimetal bar as a toast-proxy works better because it reflects the thermal properties of the heating elements and naturally adjusts the toasting time to fit.

This cleverness isn’t just about toasters: it’s alarm clocks and vending machines and cameras and all sorts of other devices. This kind of “programming” reminds me of dominoes: setting up all the pieces so that they fall into the right places at the right time. What contraints under which to operate! What an interesting development environment!

Maybe I’ve been living in the computer world for too long.

Next up: The transparent toaster.

Mars spacecraft… squared by Google

I recently discovered Google Squared, an interesting combination of web search and automated information extraction. Actually, it reminds me strongly of the strictly formatted report we had to write in 6th grade English class on frogs. You had to draw a square chart and then label the rows with different kinds of information about frogs, like how they reproduce, what kind of food they eat, and where they live. You then labeled the columns with different information sources, like “Encyclopedia Britannica”, and then you filled in each square with what source X reported about property Y. You then used this chart to write the report itself. This was supposed to teach you how to do research, in the “look up information” sense of the word.

With Google Squared, though, the system figures out what the rows should be (different examples of the category you searched on) and what the columns should be (different properties of each of the examples). It’s fascinating, although you immediately run up against the limitations of current state-of-the-art IE (Information Extraction) technology.

Exhibit A: mars spacecraft

This produces a nice collection of Mars spacecraft, with columns for “mass”, “launch vehicle”, and “launch date.” The first thing I wanted to do was sort by launch date. Unfortunately, the columns aren’t sortable. You can however add your own columns, so I tried “cost”. This looked mostly reasonable, except that “Phoenix” was cited as $350M, “Mars Phoenix Lander” was $420M, Mariner was $2.6 (dollars?), and the Spirit rover was $10,000 (if only!). However, a really neat feature is that each factoid reports its source if you hover over it, and you can click to see other candidate values as well as a confidence rating. All of the values under “cost” were rated low-confidence, even the ones that looked accurate to me.

Exhibit B: science fiction authors

This yielded a combination of books and authors, with the auto-chosen columns being “publisher”, “language”, and “Australia” (?!). Specifying “science fiction author” yields the same list of items, but with different columns: “publisher”, “ISBN”, and “language”.

Exhibit C: ballroom dance

This yielded an excellent list of ballroom dances. Unfortunately, the columns (“typical instrument”, “mainstream popular” (?), and “stylistic origins”) were almost entirely unpopulated with data. I tried to add “tempo”, but this yielded a result for tango only (33 mpm). That one could definitely use work!

In summary, I’d say it’s a very cool idea (and fun to play with), but still definitely at the beta level. Doing a good job of information extraction from unrestricted text (the Web) is a really hard task. Keep at it, Google!

Women in Technology: Missions to Mars and Internet Identity

Yesterday was Ada Lovelace Day, accompanied by a large-scale blogging exercise in which people around the world blogged about women in technology they admire. Yesterday was also a rather busy day for me, so I’m writing my entry a day late. I’m sure Ada would understand.

There are volumes to say (and that have been written) about Ada herself. She was gifted in mathematics and reasoning, and developed the first computer programs — before any computers actually existed. (She was developing hypothetical programs for Babbage’s Analytical Engine, which didn’t exist either.) Today it is challenging enough to learn languages already developed for machines that anyone can use; imagine starting from less than scratch to accomplish computational magic!

I’d like to draw your attention to two women who’ve made more recent contributions to the field of computers and technology. The first is Donna Shirley, a key player in the JPL Pathfinder mission to Mars in 1997. She led the team that built the Sojourner rover, as chronicled in her enjoyable Managing Martians autobiography. She was a trailblazer for women in high-profile (and high-stress) mission positions, but also remarkable for her accomplishments regardless of gender. She flew airplanes, became an aeronautical engineer, worked on the Mariner 10 mission to Venus and Mercury, raised a daughter, and more. I recommend this fascinating interview with her from 1998. I had the opportunity to meet her years later, when I was interviewing for jobs with my shiny new Ph.D. in 2002. At the time, she was the Associate Dean of Engineering at the University of Oklahoma, and I had a wonderful lunch with her. I didn’t end up taking that job, and she moved on a year later to start her own speaking and consulting business to encourage innovation and creativity in tech fields. There’s so much more to say about her delightful personality and her passion about space and innovation. I encourage you to take a look at her book.

Another fascinating woman in technology is Sherry Turkle. Her background is in psychology, which she’s applied to good effect in analyzing the world of technology. She wrote a book called Life on the Screen: Identity in the Age of the Internet about how people interact with computers (and the Internet), and the effect that interaction has on us in return. What’s even more remarkable is that this book was published in 1995, when the Internet was still something of a foreign country that only a fraction of the population had visited. She has some very interesting things to say about identity in a virtual environment and the challenge involved in drawing a clear separating line between events in the “real” world and events that happen online. She’s put forth a host of other interesting ideas, including:

I love new ideas and thought-provoking inventions, regardless of the gender of their source. Ada Lovelace Day is a chance to put the spotlight on female contributors, with one goal being to combat the perception that tech advances are produced solely by men. So far, they’ve collected a phenomenal 1,112 posts by bloggers (men and women) about these ground-breaking possessors of double-X chromosomes. Go ahead and browse, as a list or a world map. So many of these were new to me!

« Newer entries · Older entries »