Tuesday, May 23, 2017

A Programmer's Explanation of Our Presidential Election System

Since this keeps coming up, and the fact that people seem to almost willfully be misunderstanding it keeps making me crazy, this former computer programming teacher is going to try to explain our presidential election system in terms of computer programming.

Now, before I go any further, I need to say three important little words to all the people out there who keep arguing that Trump didn’t really win because Hillary got the popular vote:

It doesn’t matter!

Really. It doesn’t matter. That’s not the way the system works. That’s not the way the system was designed. THE POPULAR VOTE DOESN’T MEAN SQUAT.

At least not on a national level it doesn’t.

Now let the old programmer explain.

In the programming world we have main programs and subroutines. The main program runs by itself, but can have subroutines inside of it. A subroutine can’t run by itself, and is always part of another program or subroutine. Let me give you a moment to assimilate that. Basically, programs are made up of subroutines.

Now we need to talk about variables. There are two types of variable in programming: global and local. Global variables exist for the main program. Local variables only exist within a particular subroutine. And now I’m gonna add one more type of variable: results. Results are sent from the subroutine to the main program (or the subroutine that used it). OK, take a deep breath and we’ll go on.

The result of a subroutine comes from working on the local variables that the main program never sees. Ever. The user might see the local variables if the programmer had them show up on the screen during the calculations, as a way of checking the math, but they’re going to the screen and not to the main program. They help create the result, but they are not the results themselves.

OK…our presidential election system is the main program and it counts the number of electoral votes each candidate has in order to determine the winner. There’s a global variable for each candidate, we’ll call them candidate1, candidate2, and candidate3. There’s also a subroutine that does the counting for each state, we’ll call that State. State has three local variables called candidate1, candidate2, and candidate3. This is really bad form in programming. You try not to give your local variables the same names as your globals, because people might get confused…especially since these variables don’t talk to each other. Better the local variables should’ve been called something like candidatea, candidateb, and candidatec, but it’s too late now.

As State runs on each state and territory in the country, it uses the local variables candidate1, candidate2, and candidate3 to figure out who won all of that state’s electoral votes. It doesn’t matter if candidate1 won by 1 vote or 100,000; if that candidate won, then the subroutine sends out the appropriate number of electoral votes to that candidate to the main program as the result.

But what of those popular votes in each state? Because they’re local variables, they don’t matter. At least not for the main program. They only exist to figure out the result for each state, and to check the results in each state. They never get passed out to the main program.

The problem arises when people look at the results for the local variables as if they meant anything to the main program…and they don’t. Even if the program is written so that you can see the local results onscreen in order to check the accuracy of the results for each state, those local figures still aren’t being sent out as results.


Now, most of the time the popular numbers and the electoral numbers will pretty closely resemble each other, but there have been a number of times in our history when they haven’t. And when they haven’t, people got all up in arms because they misunderstood the system, and were looking at the local variables instead of the global results.

This doesn’t mean that you can’t still be upset that Trump won the election. But it does mean that a lot you need to stop going on and on about how Hillary won the popular vote.

Because the popular vote never was the point in the first place.

No comments:

Post a Comment