AT&T’s Rube Goldbergian Web Form

I recently bought AT&T DSL and documented their frustratingly over-engineered registration process. In short: a simple web-form system shouldn’t end up installing Internet Explorer 8 for you. I think it’s interesting particularly because no lean startup would ever ever do this in a million years, yet we aren’t particularly surprised when a big company is flushing dollars down the toilet in this way.

When AT&T activated my service and I received the DSL modem and a manual in the mail, I assumed it would be a quick five-minute process. Configuring the modem itself was straightforward and went smoothly. When the modem is configured, you pull up a browser, which will automatically redirect to an AT&T registration page.

The landing page was a little too flashy, it automatically plays some audio instructions in the background, basically telling you to hit the “next” button. They inform you that you need to supply some information to AT&T and in return they will give you a username and password to add to the modem’s configuration, which will allow you to get to the internet. The obvious approach is a simple HTML web form.

Instead, when I hit next, there is a five minute pause as AT&T’s website “checks my system.” Why this takes five minutes is beyond me. It then complains that my browser is not supported — well, I use chrome on ubuntu, which is an obscure setup, so fair enough, I’ll switch to Firefox. Wrong. It requires an ActiveX control (a way to run native code on my machine, also, who still uses ActiveX? Its 2011, does AT&T also send smoke signals from one department to another to announce the results of their fancy abacus calculations?). This means I must find a windows box and use Internet Explorer. Why? For a web form? Ridiculous, but okay, another hoop to jump through.

So, I boot into an old computer that is running Windows XP. I launch whatever version of IE is on it which has never been used, endure the flashy landing page again, wait another five minutes for the website to “Check My System,” and then wait another five minutes for it to download and run some sort of ActiveX control. I’m getting frustrated by this point, because what should be just a simple platform/browser independent webform has turned into some kind of ridiculous circus. Now, the ActiveX controller informs me that my version of IE isn’t good enough!

I’m livid. But luckily the ActiveX controller will download a new version of IE for me! Well, that is a nice touch I guess, although ridiculous in its own way; a simple web form now necessitates complicated contingency considerations.

Not inspiring confidence in the speed or consistency of my newly acquired broadband connection, it takes forever to download the new browser version and freezes once or twice. When it freezes, I have to restart the browser and re-endure the five-minute checking process before the ActiveX controller chides me for my ancient version of IE.

 

Finally it’s done. It warns me before it installs IE 8 that ATT may also include some bundled crapware (I didn’t notice any though). Then it installs. And reboots my computer. And then I go to the flashy landing page, wait five minutes for it to analyze my system, five minutes for the activeX control to load.

AND FINALLY…WHAT MAGICAL DELIGHTS AWAIT ME…WHAT WONDERS NECESSITATED FINDING AN XP BOX, INSTALLING AN ACTIVEX CONTROL, DOWNLOADING AND INSTALLING A NEW VERSION OF IE, REBOOTING, ETC…??

Oh. It’s a web form. Cool.

Now: Would DropBox do something this silly? 37 signals? Even large tech companies like Amazon and Google wouldn’t. But somehow at AT&T some bloated process or disconnect between management and engineers resulted in an wasteful, irrational implementation.

Update: Wow, didn’t think this would hit #1 on hackernews.com, and want to exploit this incoming traffic, so go look at http://endlessforms.com/, a colleague Jeff Clune has launched this cool research-related site where you evolve 3d objects interactively and they can be printed out on a 3D printer.

Also, an anonymous commenter from the hackernews thread illuminates the true reason for the IE/ActiveX dependence:

What is called AT&T now is actually SBC, a Baby Bell with a penchant for out-sourcing. SBC bought Cingular, AT&T, Pacific Bell, lots of other companies. Their AT&T purchase was motivated in part by the name: everyione has heard of AT&T.

SBC brought with them metric tons of bureaucracy, all running in IE. Disgusting. It’s not just the external web interfaces. We have to deal with this BS internally, too. 1990s web interfaces that only work in IE (sometimes requiring 7, sometimes requiring 6) for every interaction with corporate. Taxes, mandatory training, time reporting, everything.

We have to grab a spare Windows machine or run a VM with XP in it. Most of the tech side of company knows and hates the whole thing. The impenatrable bureaucracy makes it impossible to find out who to complain to. There is no escape. The article is dead-on about what’s wrong, and I know first-hand, because we have to eat that dog food weekly.

The true cause of the crufty web-form is more insidious and historical than an outsider might intuitively guess. It is incredible how in less than three hours a single article can actually ferret out a strange nugget of truth.

Preferential Voting: Best Thing Ever

This was actually adapted from a toastmasters speech (great public speaking club if you’re looking to improve), but I think it is interesting enough to merit a blog post.

Electoral College: Outdated and Unfair

Let me set the stage: The year was 2000, and in this country we had an extremely close presidental election between George W. Bush and Al Gore. For the third time in United States history, the winning candidate received fewer popular votes than the runner-up.

This seems wrong. Political affiliations aside, whether we wanted Bush or Gore to win, this outcome violates our intuitive notion of fairness; the person with more votes should win, because everyone’s vote should be counted equally. In particular, the influence of one’s vote shouldn’t depend on the state in which you live — that would just be silly.

Strangely, what state you live in does matter in the electoral college voting system in the US. If you don’t live in what is called a “swing state”, where the number of democrats and republics is about even, then effectively your vote does not matter. Why? Because entire states are either won or lost, and all of a state’s electoral votes go to the winner. So if you are a Democrat in a mostly Republican state, or a Republican in a mostly Democrat state, your vote is meaningless, because it will not influence anything outside of the state. This should upset us! Why should we have such an inferior system of voting?

Now, while getting rid of the electoral college is important and could make voting more fair, I introduced that example to get us thinking about voting systems and how one can be more fair than another; we might mistakenly assume that the voting system we have is the best and cannot actually be improved.

I actually want to suggest a more radical change than just getting rid of the electoral college. I firmly believe that elections in this country should use a different voting system entirely, one that is used in some other countries, one that is more fair: It’s called preferential voting.

Preferential Voting

The idea is simple. Instead of only indicating only your favorite candidate on a voting ballot, you rank the candidates in the order that you like them. For example, you might indicate your top 3 choices, your first choice with a 1, your second choice with a 2, and your third choice with a 3. Preferences are better than just a single choice because they contain more information. This additional information can be leveraged to determine fairer outcomes for elections that will satisfy more people. And satisfying more people is what democracy is all about.

Now, it’s tempting to assume that a direct vote in which a majority of votes wins, which is called plurality voting and is what the electoral college is roughly based upon, is the best system already. But I’ll describe a simple situation in which such plurality voting actually leads to an unhappy outcome, where the candidate that most people would prefer to win actually loses.

Here is the situation: Imagine that there are three candidates for a presidental election, Candiate A, Candidate B and Candidate B+. A and B are main-stream party candidates that both have a good chance of winning the election, while B+ is a third party candidate unlikely to win. Now, what is important about B+ is that the policies of B+ are more similar to B than A.

Effectively, B+ will “steal” votes from B. If B+ wasn’t running, then B would get more votes, because B+ voters by and large prefer B to A, because B+ is more like B than it is like A. We can think of A and B as republicans and democrats, while B+ might be a third party like the libertarian party or the green party. If B is the conservative candidate, then B+ might be a libertarian candidate like Ron Paul; a vote for Ron Paul might steal away support from a conservative candidate like John McCain. If instead we think of B as the liberal candidate, then B+ might be a green party candidate like Ralph Nader; people who vote for Ralph Nader would likely vote for a Democrat over a Republican.

So imagine that A gets 45% of the vote, B gets 40% of the vote, and B+ gets 15% of the votes. Let’s also say that nearly all of the voters for B+ would prefer B over A. So here if we measure the outcome by the current system, pluralilty voting, then A would win because 45%>40%>15%, even though 45% (B)+15% (B+) = 60% voters prefer B over A, while only 40% of voters prefer A over B. This seems wrong!

Rancid Meat and Dismissable Objections

To show how crazy this is, look at it a different way. Imagine you’re trying to decide on a restraunt to eat at among a group of 10 people. To be fair, everyone will vote on where to go by putting their choice on a piece of paper, and the option with the most votes will win. Unfortunately for you, three people in your group have escaped from an insane asylum and all they want is to eat rancid meat. The other seven people are sane, and while they don’t want rancid meat, their favorite restraunts are all different, so no other option gets three votes. So while nearly everyone would prefer any other restraunt to rancid meat, rancid meat wins in a standard pluralilty vote!

Does this contrived example undermine your faith in plurality voting? It should!

Why not use preferences, where you could have the option of saying: I rank candidate B+ as my first choice, candidate B as my second choice, and candidate A as my last choice? So, if it’s clear that B+ cannot possibly win (because only 15% of people choose B+ as their first choice), then B+ is eliminated from the election and votes for B+ are recast to whoever those voters ranked next highly after B+. In this case, B+ voters would mostly have B as their second preference. So, in the end, after B+ is eliminated, B would have around 60% of the vote and A would still have 40%. So with preferential voting B would win, and the election would actually result with the winner being the one that most people prefer to win!

One argument against preferential voting is that it’s more complicated and confusing, and voters might not understand it. I don’t think so. All preferential voting means, is that instead of voting for one person, you rank the candidates. We’ve done this before in surveys and in school. We know what it means to rank something, to show what our preferences are, it’s not that complicated. You put a one by your favorite, a two by your second favorite, and so on. If such a simple system is too complicated for the American people to understand, then we are in big trouble anyways.

Another argument, that was once true before modern computing, is that preferential voting makes ballot-counting more complicated. To determine the results is not a simple matter of counting with preferential voting. You first count all of the 1st preferences, and then you eliminate the least-preferred candidate. Next you reallocate all of the votes for that eliminated candidate based on the next preferences of all those that voted for him. This process continues until there is a single winner. Before we had computers, it would have been too hard to do in practice. But now that we have ultra-fast cheap computers, it’s a piece of cake. Computers can do this sort of counting and reallocation of votes in a flash. So this counter-argument is not a serious obstacle either.

The Lofty Conclusion

Whether you buy my argument for preferential voting or not, as we get closer to 2012 and the next presidential election, we should all be willing to ask if voting in this country is done in the most fair way. Shouldn’t everyone’s vote matter the same regardless of what state you live in? And shouldn’t we elect someone that more people would prefer to be in office? We aspire to be a beacon of democracy in this crazy world after all, so shouldn’t we strive to have the fairest democracy with the fairest system of voting as well?

Human Oven Simulators and Theoretical Computer Science

“I like cinnamon, so I’ll season the soup with that. Well, the flavor of basil is nice too, so in that goes. And pesto! And chocolate chips! And chicken fingers! And motor oil!”

Cooking disasters

Those just learning how to cook often become overeager and combine too many conflicting ingredients. The inevitable result is an abomination of nature necessitating a thoroughly trained team of serious men in haz-mat suits who say grizzled things like “Holy mother of God,” in dramatic drawn-out timbre. The problem us novice cooks face is that how good something tastes is not a simple combination of how good the individual ingredients taste.

Cooking is surprisingly deep.  Nearly always, an outsider’s view of a particular subject is off-base. For example, people not familiar with the wild world of computer science generally assume that it is all about fixing computers, when in fact it all about hard drugs and loose women — fine, ok, not that either. Surprisingly, computer scientists are not always experts at figuring out why ITunes won’t load or deciphering arcane error codes in Microsoft Excel. Instead, computer scientists are universally adept at translating human thought and language into an algorithm that a computer can “understand” and run. Us computer scientists take a process (for example, sorting a list of numbers) and turn it into a recipe so unambiguous and literal that a dumb-as-rocks CPU can follow the instructions. Outsiders don’t generally know this, though. Silly geese.

I was mistaken about cooking in a similar way. My outsider’s view of cooking was that it was fundamentally about following directions. You take a recipe, and the more accurately you follow that recipe, the better you are at cooking. But this is a superficial view of cooking; to a certain point your technical ability to follow recipes is important. However, the undeniable rock star with only a tenuous grasp of English, traditional musical knowledge, and basic instrumental skills illustrates that technique is not everything. And for all those cooks that do master the technical skills, what then distinguishes a brilliant chef?

A deeper view might focus not only on technical skill, but also on the talents required to bring delicious new recipes into reality. The challenge in making good recipes is that on some level you need to understand how different ingredients and cooking methods will interact to produce a taste. That is, to tweak an existing recipe so that it tastes better, you might identify some deficiency in the flavor and then figure out how to remedy that problem.

This is sometimes easy — if the food is too sour, adding a sweetener like sugar will generally help. However, improving a complex mix of spices requires understanding how those spices interact together, what is missing from the interaction, and how adding or removing a quantity of another spice can remedy the flaw. In other words, becoming a master chef requires building a detailed mental model that maps recipes to how they will taste.

You must become a human oven simulator.

Besides the tasty products it leads to, cooking can also provide an intuitive metaphor that can illustrate complex issues in computer science or mathematics. For example, say you have a spicerack and want to make a mix of spices (say, to season a soup) that tastes better than some existing mix (suck it, Lowry’s seasoning salt). Surprisingly,this is actually a very hard problem because spices interact in complicated ways. The effect of a spice on your tastebud — whether it will improve the flavor or not –depends on the context of that spice, i.e. what spices it is mixed with. For example, chilli powder may taste good when mixed with paprika and black pepper, but less so with vanilla extract. So, making a better spice mix problem is surprisingly hard. So hard that it is an NP-complete optaimization problem in disguise.

NP completeness: Scary-sounding yet simple

Don’t be afraid. Here comes the segue into theoretical computer science. I promise that I’ll keep things understandable. First, take the triple integral of the hyperbolic tangent of x, and then obviously we will apply the Weissman transformation, because only a complete idiot wouldn’t! Just kidding.

Although at first you might reasonably think that it has absolutely no relation to real life, theoretical computer science deals with an abstraction of real-life processes called algorithms. This is similar to how the ‘x’ in ‘x+3=5′ in algebra is an abstraction of a number. So just as ‘x’ could represent any real-life quantity — in this equation it could readily represent the number of warm tequila shots needed to induce vomiting — an algorithm in computer science can represent any real-life process, like the steps in a recipe one follows when cooking.

Now, before this digression I had mentioned that trying to improve a mix of complex spices is equivalent to an NP-complete optimization problem in theoretical computer science. ‘Optimization’ is just a fancy word for ‘trying to improve’, but what is ‘NP-complete’?

NP-complete means that a problem is very difficult to solve, and yet a correct answer is easy to verify (for example, it is difficult to get a girl’s number at a club when you are dressed up like a giant banana, but you’d know you were successful by dialing the number on a piece of napkin and hearing her voice). For our spice example, simply by tasting both the better spice mix and the benchmark Lowry’s seasoning salt (sponsor me?), you can easily verify if the problem has been solved or not: Does the new mix taste better? However, to come up with this better spice mix may take a lot of work.

In fact, one of the biggest open problems in theoretical computer science is whether you can find some way to easily solve  NP-complete problems, or whether they can only be solved by doing an outrageous amount of brute-force work (e.g., trying every conceivable combination of spices). This is known as ‘P=NP?’. P is the set of easily-solved problems, and NP is the set of easily-verified problems. Most people think these two sets are not the same, that some easily-verified problems (for example, our spice rack optimization problem) cannot be easily solved. But as of yet no one has been able to prove it, though many geniuses have tried.

Reverse-engineering Coke’s secret formula or a rocking chair

There’s an interesting analogy between the idea of recipes in cooking and that of a computer program in computer science. Both recipes and programs describe processes, but a recipe is interpreted by a human and a computer program by a computer. With this rough analogy in mind, I’ll ask a seemingly unrelated question: Is it possible to reverse-engineer any recipe? That is, by looking at the cooked food, can we uncover a potential list of ingredients and how they are to be combined and cooked, that generates something that tastes the same? Perhaps a good enough chef, given enough time and smarts could deduce the recipe for any food.

But maybe this underestimates the trickiness of the problem. While chefs are well-acquainted with foods that taste good or that are made in typical ways, what about recipes that are random combinations of different ingredients and cooking methods (grilled cheerio-tuna paste with creamed-celery and vinegar marinade)? They might generate gross, weird foods that a chef would have no experience in dealing with. These strange creations would lie outside the chef’s mental model of food-tastes and might be more difficult to reverse-engineer into a recipe.

The difficulty of reverse-engineering a complex artifact (like a cooked food) is not specific to cooking. For example, take the art of wood-working. When doing wood-working, one applies tools (saws, drills, chisels) in a systematic way to achieve a certain appearance in the wood. That is, there are certain techniques that are performed on the wood in a certain order, like steps in a recipe, to transform the wood in a particular way. So, given a final assembled piece of worked wood, is it always possible to determine a reasonably short list of  actions similar to those that were actually taken? With simple pieces, it is probably easy to determine how to achieve a particular look. However, with a large set of complex cuts and chisels, trying to deduce the “recipe” to create that finished piece may be very difficult.

Woodworking with 1′s and 0′s

While these strange reverse-engineering situations might seem pointless, they relate to the grand issue of “P=NP?” in computer science (can difficult problems that have easily verified solutions be solved easily?). Computer programs can be seen as abstract versions of recipes or wood-working plans. But instead of  a cooked food or a finished piece of wood, a computer program crafts abstract data, a series of bits, 1′s and 0′s. Computer programs consist of instructions, much like recipes, that run for awhile and do various calculations on data.  For example: “Take the number 27, multiply it by 3, keep dividing it by two until the remainder is 0, then print out how many times we divided.” We can consider a type of program that prints out a single number on the display when they finish. We can view this lonely number as the product, what the algorithm creates, and abstract equivalent of food in recipes, or the final piece when woodworking.

So, we can ask a reverse-engineering question about computer programs similar to the ones we asked earlier about cooked food or finished pieces of wood. Can we examine any given very long number (say tens of thousands of digits) and then determine a small program, if one exists, that produces it? It is important that the program be small, because a simple way of generating any number is just to say “Print x” where x is that big number. This isn’t very interesting, it would be similar to if the recipe for a particular cake was an atom-by-atom description of the cake, or if the instructions for creating a table for woodworking detailed how to glue together a huge amount of tiny wood pieces.

For example, if the binary number (series of 1s and 0s) was “111111111111111111111111111″ a simple, quick algorithm for making this string is just “Print 1 thirty times.” This is a good recipe for making that string of bits. For a random string of bits, like “101101001011110010101111″ there may be no short recipe for constructing it. Can you think of one?

We also might want to say that a number-recipe program shouldn’t run forever. That is, some programs might specify really long calculations that could take eternity for a real computer to run. Like: “Consider all of the numbers less than 20 trillion, factor them, and add all of their factors together.” A time restriction makes sense because we also wouldn’t want a recipe for cheesecake that requires 33.5 degree heat applied for a millennium. So perhaps we add some arbitrary cutoff, say, that a number-recipe program can only run for a number of steps that is proportional to the size of the target number, the one to be printed out. If the cooked number is 1000 digits long, perhaps the program can only run for 1000 squared, or 1,000,000 steps. With these constraints considered, what we are asking then is if given a really long number, we can come up with a relatively short, fast recipe for generating that number.

For example, imagine our problem is to find a small, fast recipe for the number “10110111011110111110 …” (what is the pattern here?) that continued until there were a thousand ones followed by a last zero. A potential recipe is “Do the following one thousand times: Print ’1′ however many times we’ve done this step and then print a single ’0′.”

Look at me, now back at NP…I’m on a horse

Now to tie this sprawling post together: How does this number-recipe-writing problem relate to “P=NP?” Remember that this grand unsolved problem in computer science asks if every problem in which solutions are easily verified (NP) is also easily solved (P). Our reverse-engineering problem is easily verified (it is in NP): If you take a short program and run it, you can discover if it stops running within the time limit and if the number it outputs at the end is the one we are interested in. What is not clear is if it is also in P, that is, whether NP problems are easily solvable.

Intuitively, it seems like this problem shouldn’t be easily solvable, that it should not be in P. The space of possible programs is so vast, and the mapping between programs and output numbers so strange, that there should be no automatic way of reverse-engineering a given number to deduce its origins . This is why I, and most computer scientists, believe that P is not equal to NP, though it is still an unsolved problem.

So, as we reach the end of this long strange thread, the take home message is that although it seems far removed from reality, theoretical computer science actually does have something to say about what is easily possible in reality. That is, it may be impossible to easily reverse-engineer an arbitrary process, whether it is a computer program, a recipe, or instructions to craft wood. Another take-home message is that to avoid creating kitchen monstrosities, when first learning to cook it is good to stick to the recipes instead of boldly going where no man has, nor ever should go, into that wild and pungent frontier of culinary catastrophes.