2014-07-05

Mock 2014 Maine Gubernatorial election, using Approval Voting

A recent article informs us that, "Maine voters are looking at the three-way 2014 governor race strategically." This is because there are three major candidates, and independent Eliot Cutler is considered by many to be a potential "spoiler".

But there's a simple solution to this problem. Rather than urge Cutler to drop out of the race, Maine voters could push for a switch to Approval Voting. This simple alternative system is identical to the present system, except that it allows voters to select as many candidates as they wish. The candidate with the most votes still wins. You never have to fear a vote for your favorite candidate, because you can still support a more electable "lesser evil" compromise candidate if you wish.

Try it out for yourself, by voting below in a mock version of the election, using Approval Voting.

Vote for one OR MORE - the candidate with the most votes wins
  
pollcode.com free polls 

2014-06-28

Approval Voting is better than Plurality Voting, even in multi-winner races

There have been some cases where Approval Voting, which is ideally intended as a single-winner voting system, has been criticized when used in multi-winner "at-large" elections. The gist of it is, suppose you have the following scenario:

Voters are roughly split into three groups: left, right, and center. There are three candidates from each of those factions (i.e. nine total candidates), and we're electing three winners.

The critics will argue that a reasonable outcome would be one that is proportional, such that you get one winner from each faction.

Approval Voting will tend to elect all three centrists, which is less representative. Although note that this still gives a body with the same ideological center as the electorate, which is crucial.

While this is true, and is a fine argument for favoring Proportional Approval Voting over ordinary Approval Voting, it certainly doesn't favor at-Large Plurality Voting. That system could easily give you two leftists and a centrist, or two rightists and a centrist—a result which creates a body whose ideological center is significantly divergent from that of the electorate.

Incidentally, here's a video demonstration on how to tabulate Proportional Approval Voting in a spreadsheet, with a few simple formulas.

2013-12-30

Testing strong parameters

Pivot Robbie Clutton describes strong parameters as follows:
Strong parameters are a way of white listing HTTP query parameters and moves the burden of whitelisting from the ActiveModel/ActiveRecord classes and into the controllers.
Source
My view is that this testing strategy is far too complex, and here I outline a simpler approach.

First, let's understand the API. It was a bit tricky for me at first, partly because the documentation is vague.

We can whitelist attributes via the permit method, and we can require them via the require method.

Example

params.fetch(:project).require(:name)
params.fetch(:project).permit(:description)

Regarding the handling of missing or unpermitted keys, here's what the docs say:
By default parameter keys that are not explicitly permitted will be logged in the development and test environment. In other environments these parameters will simply be filtered out and ignored.
Additionally, this behaviour can be changed by changing the config.action_controller.action_on_unpermitted_parameters property in your environment files. If set to :log the unpermitted attributes will be logged, if set to :raise an exception will be raised.
The unpermitted key behavior happens instantly. That is, if you require a parameter that's missing, you get an ActionController::ParameterMissing exception. If you permit some parameters, any unpermitted parameters will instantly be indicated via an ActionController::UnpermittedParameters exception or a log line, depending on your action_on_unpermitted_parameters setting.

Note that this means you don't want to have a permit before a require if you're using the :raise option (which I strongly suggest you do, because that's confident coding), because the permit call would then raise an exception.

But what's this default behavior where keys that are not permitted are "filtered out and ignored"? This just means that the call to permit returns a hash in which the unpermitted keys are removed. The original params object is unaltered.

In any case, this brings us back to..

Testing

First off, recognize that it's easy to test that all the right parameters are permitted. We simply write a controller test using an update hash including all of the permitted parameters.

Now, to assert that any other params aren't permitted, we simply make a context in which we have a single unpermitted parameter, and assert that the unpermitted attribute isn't updated.

But now what about require? That's considerably more work to test, since you'd have to make nested contexts for every single required parameter. Therefore I advise simply not to use require at all. I'm not even sure why it was added. Feel free to tell me if you can think of a good reason.

This strategy is just radically simpler than the approach Robbie Clutton took.

2013-12-01

Score Voting vs. Approval Voting

A common criticism of Score Voting is that it is strategically identical to Approval Voting. For instance, one member of the German Pirate Party recently responded on Twitter to a Score Voting election using a -3 to +3 scale:
Best strategy for assessment choice by the way: Favorites to +3, all other -3. Otherwise, voting power is wasted.
The basic idea is that it's always strategically optimal to use the maximum and minimum scores (we often refer to this as "polarization"), which seems like an argument for using Approval Voting instead of Score Voting. There are a number of reasons why this argument is flawed.

First, it's not always true. There are some instances in which honesty is a better strategy than polarization. Having said that, I acknowledge that those are exceptions to the rule, which I point out purely to be thorough. So let's continue with the premise that polarization really is the best tactic, since it's approximately true. In that case, we must look at the pros and cons of using Score Voting instead of Approval Voting.

One major advantage of Score Voting is that it's more expressive, which many voters enjoy. For example, in the 2000 USA presidential election, polls show that about 10% of the people who preferred the Green Party voted for their nominee, Ralph Nader. They knew Nader had virtually no chance to win, and they could have made the tactical decision to vote for their favorite of the two major party candidates. But expressing their opinion was just so important to them, that they chose to "throw their votes away" on the Green Party.

This principle is actually at work within the very act of voting! Because in the vast majority of elections, a voter's odds of affecting the outcome are so incredibly small that it is economically irrational for him to waste his time voting. This is concept is actually called the Paradox of Voting. So if our Pirate friend from Twitter votes, that is proof that he actually agrees with us.

But there is more benefit here than mere self expression. It turns out that when voters are honest, they tend to "donate" more utility (aka welfare/satisfaction/happiness) to the other voters than they sacrifice, resulting in a net welfare increase. You can see this clearly in Bayesian regret figures. The more voters are honest, the greater the average satisfaction.

Critics will often respond that this only addresses those voters who consciously chose to be honest. What about those voters who simply didn't know any better, and were then unfortunately victimized by the tactical voters? There are a number of counter-arguments to this concern:

  • Those voters presumably are very few in number, meaning we should be skeptical about giving up the significant benefits of Score Voting simply to protect them.
  • One can make the argument that any voter so naive as to be unaware of strategy would actually be better off casting a sincere Score Voting ballot than an Approval Voting ballot. This is based on analysis of the effectiveness of these respective behaviors. I.e. observe that the values in column A tend to be lower than those in column D in the first table here.
  • It turns out that if there's enough sincere voting, then even the "naively honest fools" who vote sincerely do better with Score Voting than with Approval Voting. See table two from this page on the "Shentrup-Smith Experiment".

Summary

The bottom line is that if even one voter decides to sincerely use the intermediate scores, then Score Voting produces better average voter satisfaction that Approval Voting. And if you prevent sincere voters from using intermediate scores in order to protect the naive ones, you possibly hurt them, and you definitely hurt the voters who wanted to be expressive. Is it really worth it, just to make the voting procedure a little simpler? Score Voting is a little more complex than Approval Voting, but it is still much simpler than any ranked voting system. 

Approval Voting is a fantastic system, but a rational voter will want to take Score Voting instead, if he can get it.

2013-11-29

Intepersonal comparisons of utility

I occasionally run into someone expressing skepticism about the validity of Warren Smith's Bayesian regret calculations, due to the fact that they employ a Utilitarian or "Benthamite" social welfare function (i.e. the social welfare for is the sum of the utilities of the members of the group). The particular criticism I refer to is that individual utilities cannot be summed because they are not "interpersonally comparable".

Let's assume, for the sake of argument, that utilities are not interpersonally comparable. In that case, the uniquely best social welfare function is the one which maximizes the expected utility of a randomly chosen voter, in his own personal units of utility. That is, the best option is the one that maximizes the average of all voters' utilities. But note that this is mathematically identical to simply summing the utilities, for any given group of voters! And therefore the complaint about not being able to perform interpersonal comparisons of utility is academic, and doesn't invalidate the social choice function Smith employed for his BR calculations.

Regarding the aforementioned Twitter conversation, this also some bearing on the applicability of "labels" to the scores listed on a Score Voting ballot. That is, some folks would like to have something like:
0 - terrible, 1 - poor, 2 - mediocre, 3 - good, 4 - great
The most obvious problem, to anyone acquainted with basic economic theory, is that this introduces error. For instance, suppose that my subjective connotation with these words is such that
u(great) - u(good) = u(good) - u(terrible)
And suppose that my utilities for some set of options are such that
u(x) - u(y) = u(y) - u(z)
Without labels, I would vote (assuming I'm a sincere voter)
x = 4, y = 2, z = 0
But if I vote using the labels, that would be
x = 4, y = 3, z = 0
This would produce a lower expected utility for me, making me worse off. Of course, if I'm a tactical voter, then it doesn't matter anyway. But why add more text than is absolutely necessary to a ballot, if it reduces the expected utility of voters? Why make the voters worse off?

There is a potential counter to this. But it appears to require that you accept the validity of interpersonal utility comparisons. Here's how it works. Suppose that Bob and Alice have the following utilities, on a universal scale.
u(x) = 8, u(y) = 6, u(z) = 0
u(x) = 8, u(y) = 6, u(z) = 4
Their sincere votes (on a 0-4 scale) would look like
x = 4, y = 3, z = 0
x = 4, y = 2, z = 0
The scaling distortion makes it appear as though they have different opinions on y, but the same opinions on z—which is precisely backwards. But suppose those labels, like "great" and "mediocre", have highly similar mappings to actual utility values for both Bob and Alice. In that case, the labels could prevent more loss than they caused—by nullifying some component of the normalization loss.

The irony here is that our friend on Twitter supported the use of labels, but opposed the validity of interpersonal utility comparisons!

The caveat is, as I said at the beginning, that a welfare function that maximizes the sum of all individuals' utilities also maximizes the expected utility of any individual voter, even if we disallow interpersonal comparisons of utility. So my aforementioned defense of labels is still equally valid, even if we don't permit interpersonal utility comparisons.

@selylidne can thank me for offering at least some evidence in support of his own argument.

2013-10-14

Fun with Airbrake customer support

Exceptions going unreported

Clay Shentrup's Avatar

Clay Shentrup

Oct 01, 2013 @ 10:49 AM
We're experiencing exceptions on production leading to 500 errors, but nothing new is making it to the exception list in Airbrake, nor are we getting email notifications. The only notifications I see are for repeats of exceptions that already existed prior to the new site rollout.
  1. SUPPORT STAFF2 Posted by Morgan on Oct 05, 2013 @ 01:31 PM
    Morgan's Avatar
    Hello Clay,
    Thank you for bringing this to our attention.
    Can you please provide your account's subdomain and the name of the project(s)
    effected [sic]?
    Please get back to us when we can, when I have that I will do some troubleshooting on the account and make a bug ticket for the developers to take action on.
    From,
    Morgan
  2. 3 Posted by Clay Shentrup on Oct 07, 2013 @ 10:30 AM
    Clay Shentrup's Avatar
    I just want to make absolutely sure you got this, seeing as how multiple of
    my replies failed permanently. 
    [I had replied to their automated email, which is supposed to post the message to this thread, an Sat, Oct 5, 2013 at 1:38 PM. But it failed permanently. I sent that permanently failure message back to them two more times, and only received one more failure reply, so I assumed that the second email had gone through. I finally checked back in on the 7th, via email, resulting in this post.]
  3. 4 Posted by Clay Shentrup on Oct 08, 2013 @ 11:33 AM
    Clay Shentrup's Avatar
    Hello,
    Could I get an update on this? We haven't had exception notifications for 7 days now. This is a pretty big deal for us. It seems to have perfectly coincided with the roll out of the new site, although that could indeed be a coincidence for all I know.
    Thanks,
    Clay
  4. SUPPORT STAFF5 Posted by Matt on Oct 09, 2013 @ 12:51 PM
    Matt's Avatar
    Hello,
    This issue has been resolved by our dev team. They have deployed the code to fix this issue. Unfortunately you will have to remove the addon from heroku, then re-add it again, but you will no longer run into this 401 issue.
    Let us know if you have any questions or run into any other issues.
    Matt
  5. Matt closed this discussion on Oct 09, 2013 @ 12:51 PM.
  6. Clay Shentrup re-opened this discussion on Oct 09, 2013 @ 02:12 PM
  7. 6 Posted by Clay Shentrup on Oct 09, 2013 @ 02:12 PM
    Clay Shentrup's Avatar
    Matt,
    What does Heroku have to do with anything? We don't use Heroku.
    Thanks,
    Clay
  8. SUPPORT STAFF7 Posted by Ben Arent on Oct 09, 2013 @ 02:13 PM
    Ben Arent's Avatar
    Hi Clay, This looks like a bit of a mix up. I need to review this bug in more detail before I can tell you more.
  9. SUPPORT STAFF8 Posted by Ben Arent on Oct 09, 2013 @ 02:34 PM
    Ben Arent's Avatar
    Hi Clay,
    I looked at your app and it looks like it's reporting noticed just for NoMethodError: undefined methodto_sym' for nil:NilClas` Rake task, but may not be correctly setup for the rest of your app.
    Which version of the Gem are you using, and what's the output of config/initializers/airbrake.rb
    Ben
  10. 9 Posted by Clay Shentrup on Oct 09, 2013 @ 03:34 PM
    Clay Shentrup's Avatar
    We're using version 3.1.14.
    I ran "rails runner config/initializers/airbrake.rb" but it doesn't output anything. Which makes sense to me, considering that file is just:
    Airbrake.configure do |config|
    config.api_key = 'our API key' end
    I did a puts on it and got:
    #Airbrake::Sender:0x007ff0dbe81560
    Note that the Airbrake testing rake task succeeds.
    <URL REDACTED>
  11. 10 Posted by Clay Shentrup on Oct 10, 2013 @ 03:10 PM
    Clay Shentrup's Avatar
    Can I get an update? We're really suffering by not getting exception reporting.
  12. 11 Posted by Clay Shentrup on Oct 10, 2013 @ 03:31 PM
    Clay Shentrup's Avatar
    I just got a 422 that went unreported. The log says:
    Completed 422 Unprocessable Entity in 86ms
    ** [Airbrake] Failure: Net::HTTPRequestEntityTooLarge
  13. 12 Posted by Clay Shentrup on Oct 10, 2013 @ 05:24 PM
    Clay Shentrup's Avatar
    Now I'm getting a new exception, but it's not coming through in Pivotal Tracker.
    <URL REDACTED>
    I refresh and it just never shows up. Yet repeats of OLD exceptions still show up in Tracker.
  14. 13 Posted by Clay Shentrup on Oct 11, 2013 @ 05:12 PM
    Clay Shentrup's Avatar
    Hi guys. Any updates. Haven't had fully functional exception tracking for about a week and a half now.
    Thanks
    [Update: as of today, October 14, it seems like the Pivotal Tracker integration is be working again.]

2013-07-07

Revisiting my concerns over a Hillary Clinton presidency


On election day in 2012, I attended an event called "Election Night Gathering" at The Independent in San Francisco. There I got into a discussion with a woman who has been one of my wife's best friends for many years, during which she explained that she had been a strong advocate for Hillary Clinton in the 2008 election. I was a bit taken aback by this. I had come to view it as almost common knowledge (at least, among the net-enabled and highly educated) that Clinton had stooped to some appalling tactics during that campaign. I felt she had revealed aspects of her temperament, judgment, and honesty which were cause for legitimate concern if she were to become President. After a somewhat uncomfortable conversation about this, I pledged to put my thoughts into writing soon thereafter. What follows is the, admittedly off-the-cuff, email I sent to my friend.

I was thinking about our recent political talk at the Independent, and it prompted me to go back to old emails I exchanged with other political fanatics in the 2008 primary election. It was a slap to the face. I was powerfully reminded of how worried I was about the possibility of a Hillary Clinton presidency. I think of myself as someone who puts a tremendous, almost obsessive amount of thought into my political positions. I've spent much of the past six years promoting electoral reforms which I believe would improve human welfare more than anything since the invention of democracy in the first place. So I felt compelled to share some of the things that shaped my views at the time. This stuff really matters to me, and I hope you'll give this some serious consideration.

In no particular order:

Clinton voted for the authorization to use military force in Iraq (a move that gave Bush the power to, declare war, even though the Constitution says that only Congress can declare war). Meanwhile, Obama had been actively speaking out against it, saying that he does not oppose all wars but he does oppose "a dumb war". Note this speech he gave back in 2002:
http://www.youtube.com/watch?v=EhpKmQCCwB8

As Mike Gravel pointed out in the Democratic debates, Hillary supported the neocon saber-rattling, and drumming up the support for a possible "second Iraq", by also voting to declare Iran a terrorist state. See this video where he confronts her about this in the debates, and then she laughs at him.
https://www.youtube.com/watch?v=HLepLeJEWpE#t=72s

A little background on Mike Gravel is in order. He has been a tireless advocate for freedom and non-violence, for decades. He's known for divulging the lengthy texts of the leaked "Pentagon Papers" into the Congressional record for permanent posterity, in an effort to end the Vietnam war.
http://www.dailykos.com/story/2008/03/09/472987/--Video-The-moving-tenacity-of-Mike-Gravel-in-his-lone-fight-to-end-the-Vietnam-War

The prospect of killing hundreds of thousands more in a second Iraq was a deadly serious matter for Gravel, and whether or not Clinton's justification was valid, her belittling laughter in the face of such a grievance was tremendously disappointing to me. (And I have my doubts about the justification: an account at the time countered, "None of the other Democratic senators running for president supported the measure, arguing that it helps President Bush build a case for war with Iran.") And note that Gravel's no Obama lover—he dings Obama only a little less for not voting one way or the other.

On the general subject of character and temperament (which I understand is very subjective) there were a number of comments from Hillary Clinton in which the tone and content struck me as overly zealous, and lacking the kind of calm that I think is essential in a pragmatic and effective leader:

1) Here's a piece by noteworthy GOP activists Rachel Maddow and Keith Olbermann, addressing Clinton's claim that she and McCain would put forth a lifetime of experience, while Obama would run merely on a speech he made in 2002.
http://youtu.be/o1awkOMXO9U

Her original comments are here:
https://www.youtube.com/watch?v=E-fEmu7BlRs#t=45

2) Here was one of her responses to some negative ads from the Obama campaign:
http://www.youtube.com/watch?v=A9CRgFO2mnM

I think that in that clip, she truly seems unhinged. I don't doubt that the Obama campaign sent out some negative campaign literature. But I saw plenty of that from her campaign as well. Either way, responding calmly with objective facts would have instilled more confidence in me than a reaction in which she seemed to be letting her anger get the best of her, as if she was on the verge of exploding. By comparison, Obama operated as if he was on Xanax.

3) In this 60 Minutes interview, she says Obama's not a Muslim, "as far as I know".
https://www.youtube.com/watch?v=LHFREDHB-nQ

I think she should have said something more like, "Of course not, that's utterly ridiculous."

This all relates to the Rachel Maddow point that Clinton's rhetoric was more like what you'd say if you were running to be McCain's VP. Arianna Huffington actually responded with an article called "John McCain Should Go on Vacation, Hillary Clinton is Doing His Job for Him".

All of these character issues meant I didn't spend a great deal of time analyzing the details of their experience. Nevertheless, what I read in that area matched with my character-based perspective. Here's a piece I sent out to some of my friends in 2008, where one woman looked at what Obama and Clinton's legislative efforts and accomplishments said about them. They were very similar on policy, but Obama exhibited a tendency to get more co-sponsors on board, which may account for why he achieved more victories per session.
http://www.dailykos.com/story/2008/2/20/201332/807/36/458633

Lastly, an anecdote that you can take for what you will. At one point, Samantha Power (one of Obama's unpaid advisors) slipped up and called Clinton a "monster" to a reporter, who published the comment.
http://www.nydailynews.com/news/politics/barack-obama-forced-decry-adviser-monster-remarks-hillary-clinton-article-1.289708

She was rightfully dismissed from the campaign, and apologized for phrasing her views in such a simplistic way. But she elaborated in a subsequent statement:
"Obviously, I am deeply sorry for calling a career public servant like Senator Clinton a name. It was disrespectful and downright immature. But it wasn't untruthful. Listen, a lot of people including myself have devoted immense time and energy to the Obama campaign because we firmly believe that a different kind of politics is possible. And Obama's lead in victories, delegates and votes makes us hope that this time, this year, after all of the swiftboating, that the old negative tactics aren't going to win the day. So when Clinton runs fearmongering ads about sleeping children and when her husband dismisses Obama as a merely black candidate, when Senator Clinton herself says that John McCain is more qualified to be commander-in-chief than her Democratic opponent ... it just seems monstrous to me.

And that sort of behavior is monstrous, it's a sickness of our political system, one that we desperately hope to cure through our efforts in this election. Perhaps these despicable tactics will, once again, win the day, and perhaps I have contributed to their victory with my regrettable outburst. But that doesn't make them any less deplorable."
Wikipedia says Samantha Power..
runs the Office of Multilateral Affairs and Human Rights as Senior Director of Multilateral Affairs on the Staff of the National Security Council. She is also the Founding Executive Director and the Anna Lindh Professor of Practice of Global Leadership and Public Policy of the Carr Center for Human Rights Policy at Harvard University's Kennedy School of Government.
Power began her career by covering the Yugoslav Wars as a journalist, and was a winner of the Pulitzer Prize for her book A Problem from Hell, a study of the U.S. foreign policy response to genocide.
So at the very least, I hope you can see that I didn't choose my position in haste.

Sincerely,
Clay

Update:

Clinton also supported a bill to make flag-burning a crime.

She also introduced (with Joe Lieberman and Evan Bayh) a bill to criminalize those who "peddle" violent games to kids. This was later ruled unconstitutional by a 7-2 Supreme Court decision. I suggest you read this Rolling Stone article about it.

2013-05-24

Interesting excerpts from "Extreme Programming Explained"

I just finished up Extreme Programming Explained, by Kent Beck and Cynthia Andres. Here are some excerpts I found interesting.

But first, the bibliography:
Beck, Kent; Andres, Cynthia (2004-11-16). Extreme Programming Explained: Embrace Change (2nd Edition) (Kindle Location 2899). Pearson Education (USA). Kindle Edition.

Lowering the quality of your work doesn't eliminate work, it just shifts it later so delays are not clearly your responsibility. You can create the illusion of progress this way, but you pay in reduced satisfaction and damaged relationships. Satisfaction comes from doing quality work.

You can't get software out the door faster by lowering quality. Instead, you get software out the door faster by raising quality.

How do you implement daily deployment when you have projects that take weeks or months before they are usable? There are many tasks involved in a big project: restructuring the database, implementing new features, and changing the user interface. As long as you don't change the user's experience of the system, you can deploy all the rest of that work. On the last day you put the "keystone", the change to the user interface, in place.

Planning in XP is an activity, not a phase.

If everyone is trying to make sure his function is not seen as the constraint, no change will happen. If the developers say, "Yes, writing automated tests would be 'A Good Thing', but it will slow me down and I'm overloaded as it is," then nothing will change regardless of how beneficial the change would be to the organization and thus to the individuals in it. The reward system and culture need to align with overall throughput instead of individual productivity for the change to stick.

One of the objections to pairing is that pairing cuts effective programming in half. In my experience, pairs are more than twice as effective. The actual time required for me to complete tasks solo versus paired, accounting for debugging time, is more than double; so by pairing you actually come out ahead in completed, clean code. When comparing the value of pairs to individuals, you need to include both time and productivity in deployable code. The goal is valuable software development delivered on time and in budget. The numbers in the plan matter, but only in service of this goal. In planning, you need to include all the relevant numbers in your calculations.

The first edition of Extreme Programming Explained had a more abstract estimation model, in which stories cost one, two, or three "points". Larger stories had to be broken down before they could be planned. Once you started implementing stories, you quickly discovered how many points you typically accomplished in a week. I prefer to work with real time estimates now, making all communication as clear, direct, and transparent as possible.

More time at the desk does not equal increased productivity for creative work.

most defects end up costing more than it would have cost to prevent them.

The team's goal is to eliminate all post-development testing and shift testing resources to more highly leveraged parts of the development lifecycle.

XP teams prefer simple solutions where possible. Here are four criteria used to evaluate the simplicity of a design:

1. Appropriate for the intended audience.
It doesn't matter how brilliant and elegant a piece of design is; if the people who need to work with it don't understand it, it isn't simple for them.

2. Communicative.
Every idea that needs to be communicated is represented in the system. Like words in a vocabulary, the elements of the system communicate to future readers.

3. Factored.
Duplication of logic or structure makes code hard to understand and modify.

4. Minimal.
Within the above three constraints, the system should have the fewest elements possible. Fewer elements means less to test, document, and communicate. Projects that move toward simplicity improve both the humanity and productivity of their software development.

Software development is full of the waste of overproduction: fat requirements documents that rapidly grow obsolete; elaborate architectures that are never used; code that goes months without being integrated, tested, and executed in a production environment; and documentation no one reads until it is irrelevant or misleading. While all of these activities are important to software development, we need to use their output immediately in order to get the feedback we need to eliminate waste.

The challenge of XP is to encourage deep change, to renew individual values and mutual relationships to give software a seat at the table for the next fifty years. Unleashing the potential of the human spirit will lead to a future for computing that we can't yet imagine.

2013-04-11

CU Boulder upgrades to Approval Voting; could go even further

The recent student government elections at CU Boulder used an improved voting system called Approval Voting. Approval Voting means you can vote for as many candidates as you want, rather than being limited to the number of winners. This is a big improvement over the traditional system called Plurality Voting. Approval Voting ensures you can never be punished by voting for your favorite candidate, and solves the spoiler effect.

Approval Voting is a great way to elect in a single-winner election, e.g. for mayor, governor, senator, etc. But for multi-winner races (e.g. the CUSG Representative-at-large election, with five winners) Plurality Voting and Approval Voting can both produce lop-sided victories.

Consider, for example, the election of the Arts and Science Student Government board members. The Unite party took all five seats, despite earning only 54% of the votes. The Inspire party got almost 45% of the votes, but won zero seats. An arguably more fair outcome would have been three seats for Unite, and two seats for Inspire.

The tables were turned in the University of Colorado Engineering Council elections. Eight of the nine Representative-at-large seats went to Inspire, and only one went to Unite. But Inspire won 67% of the vote. Unite won 33% of the vote, but earned only 11% of the seats. A more fair result would have been three seats for Unite, and six seats for Inspire.

Inspire also swept the UCEC senator elections. There were four candidates (two Unite, two Inspire) running for two seats. Unite won 46% of the votes, but zero seats. Again, this was not a representative outcome. Looking at the results, it seems to me that the winners should have been Inspire's Benjamin Zatz, along with Unite's Rachel Sobke.

Arden Rose, UNITE 348 21%
Rachel Sobke, UNITE 407 25%

Jon Fearer, INSPIRE 430 26% Elected
Benjamin Zatz, INSPIRE 459 28% Elected

So what's the solution? Proportional Approval Voting!

It turns out that a Danish statistician figured out the solution to this problem back in 1890! Imagine if we elect winners one round at a time. Then after each new winner is selected, we "divide" each ballot by w, where w is "the number of winners that ballot has approved, plus one".

As an example, imagine you approved Benjamin Zatz and Jon Fearer:
  • In the first round, your ballot is just divided by 1, which has no effect. Your votes count at full strength.
  • Let's say Benjamin Zatz is the first winner, which he would be based on the actual election results.
  • In the second round, your ballot is divided by 2 (because you voted for Zatz, who won in the previous round). Now your vote for Fearer counts as only 1/2 a vote. This means that all the people who didn't vote for Zatz (i.e. Unite voters) now have the power to elect one of their candidates.
  • This process continues as seats are awarded, providing fair representation to any faction which has enough support to deserve a seat.

Proportional Approval Voting would have produced the kind of fair outcomes we just considered above. The total seats awarded apparently wouldn't have been much different. But the allocation would have allowed Inspire to have a voice in ASSG, and Unite to have a voice in UCEC.

But isn't this complicated?

Not really. Consider that Australia's senate has been elected via the much more complicated Single Transferable Vote system since 1938, far before modern computers or even electric calculators. It was all tallied by hand from paper ballots. Thus Australia has a truly representative democracy. Doesn't CUSG deserve that too?

Here I demonstrate how Proportional Approval Voting can even be tallied using a simple Google Docs spreadsheet.

 

In summation, Approval Voting is a big step forward for CUSG elections. But it can be even better in the multi-winner races. Proportional Approval Voting is worth considering.

2013-02-04

Maine's Rep. Diane Russell's mistaken views on Instant Runoff Voting

As a founder of The Center for Election Science, I spend a lot of time doing education on electoral issues. Unfortunately, a significant amount of that time is spent fact-checking well intentioned but misinformed proponents of Instant Runoff Voting. The subject of this post will be several Twitter posts by Maine representative Diane Russell.

Some background. Today I came across a Twitter post by FairVote, urging people to support Instant Runoff Voting (IRV) for Maine gubernatorial elections, by signing this online petition. The the idea is not without merit. Maine's current governor, Paul LePage, is one of the least popular governors in the USA. A news article grimly states:
LePage’s job approval rating is significantly underwater at -16, with 39% approving and 55% disapproving. 18% of Republicans and 54% of independents disapprove of the job that LePage is doing as governor.
This isn't surprising given that Maine voters never wanted LePage in the first place. In the 2010 gubernatorial race, LePage walked away with a mere 38.33% of the vote. His win was a result of vote splitting (aka the "spoiler" effect) between his rivals. Eliot Cutler—a wealthy independent who served as Associate Director for Natural Resources, Energy and Science in the Office of Management and Budget in the Carter administration, and was the principal White House official for energy—narrowly trailed with 36.49%. Democrat Libby Mitchell came away with 19.12%. It's safe to say that if Mitchell had dropped out, her supporters would have heavily favored Cutler. And probably vice versa.

IRV (which also goes by the misnomer "Ranked Choice Voting", despite the fact that there are numerous other ranked voting methods besides IRV) would have avoided this mess. Democrat Libby Mitchell would have been eliminated, and her 19.12% would have almost surely sent Cutler to victory—much like a traditional runoff, but without the second round election.

Now it appears that Maine may be in for a repeat in the 2014 gubernatorial race. From the previously cited article:
PPP’s latest poll finds LePage ahead by 4 to 7 points in every potential three-way contest while losing every head-to-head contest by 8 to 21 points. If LePage and independent Eliot Cutler were the only two candidates, Cutler would lead LePage 49% to 41%. But in every three-way scenario, Cutler’s strength as an independent candidate gives LePage the lead over their possible Democratic opponents.
Given these facts, Diane's Russell's support for IRV seems outwardly sensible. But a closer look at the details reveals some concerning misconceptions. The petition's description says:
Maine politicians should be elected with a majority vote. Please join me in supporting Rep. Diane Russell’s bill to elect the Governor and Legislature with Ranked Choice Voting (AKA Instant Runoff Voting). Her bill encourages voter choice while avoiding “spoiler” candidates.
This statement claims that IRV prevents the spoiler effect, and that it ensures politicians are elected with a majority. As anyone who's spend an afternoon studying election methods on Wikipedia can tell you, both of these claims are completely false. Here's a simple four-candidate electoral scenario which demonstrates this.
% of voters - their ranking
 35% W > Y > Z > X
 17% X > Y > Z > W
 32% Y > Z > X > W
 16% Z > X > Y > W
Instant Runoff Voting selects candidate X as the winner, beating W in the final round, 65% to 35%. But note that:
  1. A huge 67% majority of voters prefer Y to X (the 1st and 3rd rows). And Y received nearly twice as many first-place votes as X, 32% vs. 17%.
  2. An even larger 83% super-majority of voters prefer Z to X (and Z gets just slightly fewer first-place votes than X).
  3. Y is preferred to Z by an 84% super-majority.
  4. Y is preferred to W by a 65% super-majority.
Y is the indisputable "majority winner", but IRV elects X. So the very first sentence of the petition description was misleading, to say the least.

Further, W is a spoiler. If W would drop out of the race, then Y would win instead, even with no change in voter preferences. So the final sentence in the petition description was also false.

This situation is similar to what occurred in the 2009 IRV mayoral race in Burlington, VT. The Progressive won, but a large majority of the voters preferred the Democrat to the Progressive, and to all other challengers. And the Republican served as a spoiler—if he had dropped out, with all voters preferences unchanged, then the Democrat would have won. (Note that Burlington voters repealed IRV by a significant majority after that, their second, IRV election.)

In the ensuing discussion on Twitter, Russell responded to a comment from Maine blogger Gerald Weinard:
Ranked Voting worked well in Portland and has a lot of support. Majority leaders super important.
Here we see Russell once again making the false implication that IRV ensures majority winners. It's concerning enough for an elected official not to understand a substantial reform that she's vocally pursuing. But more so because Russell has worked with the IRV advocacy organization FairVote, which has been involved in electoral reform since 1993, and presumably should understand IRV by now.

This rhetoric continued over the course of several more posts. In response to a criticism about IRV's being less than intuitive, Russell replied:
I've been ranking ice cream choices since I was a kid. Also pretty intuitive.
This comment demonstrates a lack of appreciation for the deeper issue of whether voters understand the tabulation process. A usability study in the San Francisco area (SF has used IRV since 2004) produced a couple of relevant conclusions:
  • Some participants remarked that because they didn’t understand how the votes were counted that they didn’t trust the system.
  • Many participants theorized that ranked choice operates on a weighted or point system. A few participants suggested that it was for breaking ties, but they could not describe how the second place votes were tallied. It was not uncommon for participants to talk themselves into corners as they tried to describe how the counting was done. Most ended with “I don’t know.”
  • Very few people accurately described how ranked choice votes are counted, even in zip codes with high education and socio-economic levels; people in poorer neighborhoods had even more difficulty describing how their ranked choices were counted.
  • It’s unclear that reading the instructions for ranked choice voting would help people vote as they intend, because the instructions are only about how to mark the ballot, not about how the votes are counted or what the consequences of ranking are.
I work as a software engineer in San Francisco. And my informal polling of numerous co-workers has been consistent with these observations. Here's a brief instant message conversation I had with one particularly smart software engineer who claimed to be a voter. I don't think anyone can read that and seriously claim that IRV is intuitive.

I replied to Russell, linking her to the above demonstration that IRV does not guarantee a majority winner, and is susceptible to the spoiler problem:
I linked you to mathematical proof that IRV doesn't guarantee majority winners. Response?
Her reply was simply:
Answer: http://www.pressherald.com/opinion/brennan-ranked-choice-voting-both-winners_2011-11-12.html
That's a link to an article in the Portland Press Herald, which touts the virtues of IRV and repeats the same inaccurate talking points:
Brennan, the candidate who proved to have the broadest appeal, ended up the winner. He will go into office next month with a majority of voters at his back.
I pointed out to Russell that her article was actually not an answer to my criticism:
That article doesn't refute the mathematical fact that IRV *does not* guarantee "majority winners".
Her well reasoned rebuttal?
Again, you have no vested interest in Maine. Why do you care? Oh wait... this is all you do. FOR YEARS.
It's hard to know what to say to that kind of response. It's an extreme example of both ad hominem and red herring fallacies, diverting attention from her mistaken claims by personally attacking me. Nevertheless, I feel compelled to address this.

The Center for Election Science is a non-partisan 501(c)3 non-profit, devoted to the objective scientific study of electoral systems, and the advocacy of systems that we believe will improve human welfare. We are something like the FactCheck.org of electoral reform. To that end, we strive to make the public better informed about election methods. That includes the occasional response to people who make the sort of false and misleading claims discussed herein.

Rather than attacking myself or my colleagues at the CES, I would ask Representative Russell to consider reading up on the subject of voting methods, and trying to be more careful with her statements. Election science will be critical to solving issues like the Maine gubernatorial elections, so it's important that we get the facts right.

Clay Shentrup
Co-founder, The Center for Election Science