Cons Up

Today at work, somebody asked another guy to “cons up” a list of requirements for a project.

I don’t think the median employee at my work is that geeky, but the outliers more than make up for it.

I Will Be In St. Louis Next Week

I’ll be in St. Louis for a few days next week. If anybody who lives there still reads this and wants to meet my awesome biologist girlfriend, give me a call.

Procrastination and Constraints

Procrastination is my way of life. I used to think this made me lazy. More recently, I discovered that procrastination has amazing utility for problem solving.

Many problems start out with few constraints. Take, for example, writing the great American novel. You want to distill the collected wisdom of 30 years into a 200-600 page book, and you need to finish it before you die. So…what do you write about? This is a huge problem with few constraints. There are countless paths to the goal, and most aren’t intrinsically better or worse than any others.

Adding a deadline constrains the problem, forcing you to throw away the more fanciful ideas. You might have wanted to visit 100 countries before writing about a world-traveling hero, but the deadline won’t allow it. Instead, you’re stuck writing about things you already know about.

Even so, there’s a problem. Humans like to keep their options open. Prematurely committing to the wrong path has a huge opportunity cost. You don’t want to spend six months writing only to discover that the premise is unworkable. Maybe nobody wants to read a book about World War I seen through the eyes of a carrier pigeon and written entirely in puns on the word “tweet”.

To deal with this, you procrastinate. You write test outlines and chapters, play around with the form, hang out at the library reading great novels, and go on vacation.

Eventually, you’re two months from your deadline. All of your grand ideas are unworkable. You could push back the deadline, but your dear old sick aunt wants to read the book while she still can. Suddenly, you realize that you have to take what you’ve got and turn it into a novel.

This is the magic of procrastination. It takes an unconstrained problem you’ll never be able to solve and turns it into a highly constrained one that you know exactly how to solve.

So You Were Smart Enough To Make Millions…

I don’t understand how people could make millions of dollars, then turn around and invest it in a Ponzi scheme. This suggests that many rich people are greedier than smart.

Question Statistics

BBC Radio 4 has a show called More Or Less that looks at statistics in the news every week. Lately, they’ve been doing segments on the numbers used to measure the current credit crisis, such as LIBOR. It’s yet another good program to add to the list.

Who Ever Thought I’d Be Doing 6502 Assembly…

The 6502 microprocessor was released in 1975. It powered Atari consoles, C64s, Apple IIs, Nintendos, and all sorts of other stuff. In 2008, I find myself reading 6502 assembly code for something quite relevant to my job. This microprocessor was a pretty elegant solution to the problems of the mid 1970s. And that statement puts a lot into perspective…

Oh well. I can content myself with the knowledge that people have implemented 3D shooters on C64s, so anything I need to do can’t be that hard. And most anything I want to do should be easy compared to, say, PIC Breakout.

Trying To Be Social

I’ve got more wacky ideas than I know what to do with. Thankfully, I work with a bunch of crazy smart people who love a good obscure geeky conversation. Occasionally, I get my act together and go out to pub night with them.

The level of nerdiness is far beyond what I first expected. People talk physics, chemistry, obscure Japanese films, math, programming, etc. For some reason, conversation always ends up at Burning Man.

I guess this is why I moved to The Valley: to have pub conversations about what mechanism would conduct heat in a ball of neutronium.

Junk Poachers

On a walk around Santa Clara yesterday, I noticed something weird. Several run-down houses had pickup trucks and driveways full of scrap wood, paper, cardboard, and other materials.

Apparently the reason is simple: these are junk poachers. When the economy was booming, there was a lot of money to be made recycling stuff. People would steal the best stuff set out for recycling before the actual garbage men could get it. It’s particularly profitable in California because most of it used to be sold to China, and we have easy access to ports here.

Now that they can’t sell it, I guess it’s piling up in their driveways. It seems likely that the guys I saw loading up pickup trucks were going to go dump it in the woods somewhere.

Effective Engineering in an Organization

My dad tells me that good engineers can summarize data concisely so that management can make good decisions.

I’d be happy to debate all day whether or not it’s management’s role to make technical decisions in the first place, but the buck has to stop somewhere. Faced with constraints from marketing, manufacturing, and design organizations, someone has to decide what to actually do.

I have long thought that the best leaders would be those who could balance all of these constraints based on the actual data. In the real world, however, it seems unrealistic to expect any one person to understand it all. At some point, the data has to get filtered, and the leader has to trust people’s judgment.

My dad’s point, then, seems to be that a good engineer is someone who makes the leader’s life easier without degrading the decisions.

Now I just have to figure out the implications of this.

Did I Already Mention Staapl?

I can’t remember if I already mentioned Staapl here or not. It’s a way to write PIC firmware by metaprogramming a stack machine in Scheme.

I’m absolutely intrigued by the idea of metaprogramming for microcontrollers. It lets you get away from the constraints of C compilers and use modern programming languages, but still have a shot at producing reasonably compact code.

It looks like the author has been working on Staapl since 2006. If it takes that long to develop a good metacompiler, I guess I’d better get started soon.

Swedish-Argentinan Folk Guitar

I need to buy some José González CDs. In the meantime, this excellent live recording from NPR’s All Songs Considered will have to do.

I don’t know what it is about the Swedes, but they sure know how to make music.

Everyone Ends Up in NorCal, Eventually

Another guy I knew from school is apparently moving to the Bay Area, to work at Pixar.

I guess everyone who wants to do awesome stuff ends up in the Bay Area eventually (except those with more academic mindsets, who go to Boston).

The rest of the country isn’t exactly putting up a fight for all the smart people. Anywhere else, you’d have to work in defense or finance.

For the Price of an Ineffective CEO…

For what Citigroup has paid its executives, it could have hired dozens of engineers, physicists, and mathematicians to independently monitor the company’s internal health.

The weird thing about Citi is not that it lost so much money so quickly. It’s that the executives had no clue it was going to happen. They didn’t understand where the profits were coming from or how exposed they were to risk. They largely trusted the reassurances of middle management.

I’m not arguing against trusting people. It’s just that the incentives here create situations where middle managers distort the truth or hide important details. They’re very likely to give biased information. In this case, they accepted AAA ratings on worthless securities and listened to risk models that assumed house prices never went down. Their trust was based on wishful thinking along with dreams of new boats and ski condos. A truly independent watchdog group would just attempt to discover these kinds of biases and independently verify the information. Then, at least somebody would be asking, “does this make sense?”

I know a lot of organizations try this sort of thing, but they aren’t usually very speedy about finding problems. You can’t pay the group based on the company’s performance, because then it has an incentive to distort the numbers. If the group members’ jobs are guaranteed, independent of the company’s performance, then they’re in no hurry to fix problems! I think the solution is to find people who are intrinsically motivated to do this sort of thing and set them loose.

The Real World Doesn’t Care About Math

The past six months in the for-profit world have taught me something interesting: the real world doesn’t care about math.

I’ll give a simple example. Say you have a sensor that’s looking for a signal that’s just a constant on or off, but you don’t know the amplitude of the signal. This could be a passive IR detector in an outdoor floodlight. When a person is standing in front of it, there’s some constant signal, but the amplitude depends on where the person is standing and how big he is. The challenge is to detect a person even when the sensor measurements are noisy.

Decision theory has solved this problem with the “uniformly most powerful test.” If you choose a desired probability of false alarms and measure the signal noise, it’s easy to calculate the threshold for person/no person that’s optimal for the chosen parameters. It’s incredibly simple, straightforward to implement in almost any hardware, and easily extends to more complicated situations.

In the real world, nobody uses this theory. What they do is sit in the lab and play with detection thresholds until they find one feels right. I like to think of this as a heuristic method, as opposed to a theoretical method.

So far, I’m seeing that heuristic methods are the norm in industry. I think this is because they generally work well. The classic example is the least-squares fit, which solves many practical estimation problems, thanks to the central limit theorem.

The fact that the uniformly most powerful test reduces to a simple threshold is interesting. This says that a guy sitting in the lab tweaking a threshold can probably get the same performance as the theory guy—he just won’t know why that’s the sweet spot.

Heuristic methods fail on more complicated detection problems, like combining data from multiple sensors. People turn to canned solutions like neural networks or just give up all together.

I guess what I’m learning is that people out here don’t value being right so highly as being fast. Nuts-and-bolts practical engineers just don’t seem to have time for theory.

High School Kids No Longer Have an Excuse

Kids today have it so easy.

I had to learn BASIC by reading the source code of games my dad downloaded from BBSes and an ancient Microsoft Basic manual. I taught myself C using a discarded copy of The Waite Group’s Turbo C Programming for the PC that my dad had from his brief programming days. Programming books were expensive, so I had to save up my allowance for months to buy them. It was a treat to go to the local community college because their library had technical books.

I was lucky enough to have a DOS compiler. Most kids had to settle for QBASIC.

Learning about programming involved a constant hunt for scraps of knowledge. I remember being thrilled at finding a copy of the book PC Underground in a bookstore on a visit to Florida—so much that I think I spent all my Christmas money buying it. How else was I going to teach myself assembly language?

These days, you can learn real computer programming by downloading a free copy of The Structure and Interpretation of Computer Programs from MIT. Dozens of popular free programming languages come with excellent tutorials and tons of sample code.

But it’s more than just computer programming information. You can download sheet music for most well-known classical piano pieces. Project Gutenburg has stuff like a PDF of Euclid’s Elements. Sure, 9th grade me could have ordered the Dover edition, but 9th grade me didn’t know about Dover editions. The library was always a joke since the librarians were hardly subject matter experts on anything I cared about.

Then there’s the community aspect. As an isolated nerd, I didn’t know that I was supposed to be reading stuff like GEB or Stanislaw Lem.

Just a decade ago, it took endless patience and determination just to find out where the information was in the first place. Now, if I want to know something, I just ask Amazon what the best book on the subject is.

This means that high school kids no longer have an excuse for not knowing anything they want to know.

And they should get off my lawn.

People are Finally Noticing the Vapidity of Popular Science Books

Joel Spolsky has it right: the nonfiction popular science books of recent years are really not that good.

The formula is to resemble a book by, say, Jared Diamond, but to have no actual intellectual content. Come to surprising conclusions based on anecdotal evidence. Give catchy names to your ideas (alliteration is a must).

I first noticed this when reading The Long Tail, a book written by a Wired magazine editor who decided to turn a poorly reasoned article into a whole book. It amazed me that someone could write a whole book about economics without betraying any actual knowledge of economics.

It’s sort of like the string theorists who keep writing the same book over and over about how great string theory is. In Malcolm Gladwell’s case, however, it’s like a string theorist writing a cookbook. Yeah, he’s probably smart in his own field, but why should you listen to him about anything else?

It’s a symptom of intellectual laziness. We want to think we’re reading some intelligent nonfiction book, when it’s really just pure entertainment.

What’s worse is that it makes the author look like he takes himself too seriously. The world can’t be packaged up into neat little theories with clever names. Moreover, the parts of it that can be simply aren’t that interesting!

Why Are CEOs On a Different Pay Scale?

CEOs make a lot more money than I do. I think I understand why. It’s because CEOs are the kind of people who really want to make lots of money.

It’s sort of like investment banking. The reason people at investment banks got such ridiculous bonuses was because the companies were full of people who really, really wanted to be rich.

The job of a CEO is so difficult to quantify or evaluate that it’s tough to say who actually deserves the pay. At a good company, the CEO should have very little effect on profits or strategy. At a bad company, there’s nothing the CEO can do to fix things. The salaries and bonuses are difficult to justify. They persist because executives more or less set their own salaries.

Engineers think of this differently. We all want to be in the lab working on cool stuff as much as possible. If we can hire someone to manage the business so that we can go back to the lab, we don’t really care how much it costs (as long as the company can afford it). In small companies, the major job of the CEO is to deal with investors, and being freed of that hassle is priceless to engineers trying to work.

This is Why People Don’t Like the Police

Hayward had a problem: someone crossing the street was almost hit by a car. The intersection was too close to other stoplights to put in another light, so somebody came up with another solution: the police hold quarterly crosswalk stings.

This would be okay if they had just been warning people, but no, plainclothes police officers crossed the street in front of cars, and if they didn’t stop, the drivers got a $300 ticket. The Hayward police ticketed 153 people in 90 minutes, netting the city about $45,000.

Ticketing people would acceptable if it solved the problem, but it doesn’t. Most of the drivers are paying attention when they don’t stop for the pedestrians. It’s the infrequent few who aren’t paying attention that cause all the trouble. A better solution would be to redesign the street crossing so that drivers can’t ignore the pedestrians. Make the crossing at sidewalk level and grade the street up to it. Add blinking lights with motion detectors.

The job of the police is to promote public safety, but they have to consider the tradeoffs involved. A $45,000 tax on unlucky drivers that provides at most a temporary safety benefit isn’t a good tradeoff.

Videos From PyCon 2008

YouTube has videos from PyCon 2008. There’s some potentially good stuff there. It’s nice to see some of the faces behind the software I use.

What Do These Science Museums Do?

Someone at work recommended that I check out The Tech Museum of Innovation. It reminded me a lot of Chicago’s Museum of Science and Industry. I guess it’s really a museum about what all the large corporations around here do, since they provide much of the funding.

Museums like this puzzle me. They’re really just collections of stuff, like the old fab equipment in the microprocessor exhibit, with little interactive toys to make things less boring. Sometimes the toys are meaningful, but frequently, they’re just toys.

People don’t go to these museums to learn. They go to be entertained while they pretend to learn. It’s like watching a wildlife documentary where unrelated footage is spliced together to make it look like there’s an epic chase going on. Yeah, you’re probably learning a little bit, but you’re really just getting the highlight reel. It takes a lot longer to understand the nuances.

I think these museums would do much better by focusing on classes. It’d be like going to school on the weekend, but it would be at a really, really awesome school. Adults could watch the kids in the class or go get a tour led by somebody who actually knew what he or she was talking about. For example, right now, Applied Materials gives money and old equipment to the museum for the semiconductor fabrication exhibit. Maybe in addition to that, they should pay retired fab engineers to go give tours part time. Meanwhile, the kids would be doing a lithography lab class, making masks with magic markers on transparency paper or something.

The silly computer-based exhibits are probably the dumbest things museums do. For one, the computers are broken half the time. Secondly, I have a computer at home! Why not put this on the web site? Thirdly, they never turn out to be that interesting anyway.

Maybe next weekend I can go to The Exploratorium. I think they understand most of this stuff to a large degree. I get the feeling that most museums are probably run by professional educators, but the Exploratorium (at least, historically) has been run by scientists and science educators. Also, I think their funding has fewer strings attached than most museums.

Engineering Philosophy and Lifestyle