Election reformers have seen a lot of ideas go viral in recent years, such as the Women’s March and Black Lives Matter. We know that voting reform would do more to actually fix the systemic problems at the heart of those movements, yet it barely registers in the public dialog and has yet to galvanize a true movement. I believe that movement might be possible, if only we election reformers can hone in on a clear and provocative message.

FairVote began as Citizens for Proportional Representation. Proportional representation is a clear idea but still not in most people’s lexicon. They…

def users
{ name: 'bob', email: 'bob@example.com' },
*([name: 'alice', email: 'alice@abc.xyz'] if inspecting_users?),
{ name: 'eve', email: 'eve@nsa.gov' },

If inspecting_users? returns false, the returns array will contain only the first and last elements.

One common mistake I see in Stimulus controllers is that people use the connect() callback to set up event handlers when they really should be using the initialize() callback. Let’s look at the descriptions of these callbacks.

It’s useful to note here that connect() and disconnect() can be called an arbitrary number of times as a controller is connected and disconnected from the DOM. As such, it doesn’t make sense to do initial one-time setup, such as adding a custom calendar library to a date input, in the connect() method. Use initialize().

One might suggest that you use connect() but…

An Epidemic in Economics

If you search the internet for the phrase “hypothecation is a fallacy”, you get essentially two results. First is this Twitter post.

Another is an article titled “Why treasurers should go back to economics school”, by Geoff Harcourt, Visiting Professorial Fellow, University of New South Wales. Key excerpts:

Obsessed with the relationship of government expenditure and taxation, many treasurers suffer from deficit size fetishism, and fall victim to the “balancing the budget over the cycle” fallacy. Many also get caught up with hypothecation — matching specific government expenditures with particular tax sources. …

Proportional Representation Without All the Hassle

Photo by Tom Radetzki on Unsplash

In 1949, Germany adopted a voting method called mixed member proportional voting, or MMP.

After the use of the absolute-majority Two Round System (TRS), see Two-Round System, in the German Empire, and the use of a pure proportional representation system in the Weimar Republic, see Mixed Member Proportional, a new electoral system was established by the Parliamentary Council in 1949.

With MMP, you vote for both a candidate, to represent your local district, as well as a party. Whoever gets the most votes represents your district. …

Lee Drutman recently wrote a post called “Approval voting vs ranked-choice voting: A hypothetical election”, aimed at demonstrating the superiority of his favored instant runoff voting (IRV) voting method over approval voting. (IRV has been marketed in recent years as “ranked choice voting”, but there are actually a multitude of ranked voting methods.)

By the time we reach the title, Drutman is already off to a bad start. Probably the most common novice fallacy in voting theory is to fixate on a specific cherry-picked anecdotal electoral scenario (“a hypothetical election”) rather than average results over a statistically significant sample of…

require: rubocop-rails

# TODO EnabledByDefault: true
NewCops: enable
rubocop-rspec: false # Disagree with 90% of it.

AllowParenthesesInMultilineCall: true
Enabled: true
IgnoreMacros: false

- app/controllers/**/*
- app/policies/**/*
- db/**/*

# Worry about complexity, not length.
Enabled: false
Enabled: false
Enabled: false
Enabled: false

# Unqualified constant names are unclear perhaps, but NOT ambiguous.
Enabled: false

# Cyclomatic complexity is useful; assignments aren't problematic.
Enabled: false

# Trailing commas make for clearer diffs because the last line won't appear

Here’s a proof sketch of Goldbach’s conjecture, which states that any even number can be formed as the sum of two prime numbers.

We start by envisioning any even number as the sum of any column within two rows. E.g. 14 is:

 2  3  4 5 6 7
12 11 10 9 7 7

The bolded “columns” are those ones that satisfy the conjecture, i.e. are composed of two primes.

Conceptually, the conjecture merely says that it’s impossible to “eliminate” every number below the primes in the top row via division by one of the primes in the top row…

Trump cheated on his third wife with a porn star, and used illegal campaign funds to cover it up.

Trump’s sister Maryanne, a former federal judge, said of Trump, “He has no principles. None. None.”

Trump was recorded openly bragging of sexually assaulting women.

Trump has been accused of sexual assault by over 26 women.

In December 2019, Trump was forced to pay more than $2 million in court-ordered damages to eight different charities for illegally misusing charitable funds at the Trump Foundation for political purposes. As part of a resolution of the lawsuit announced on November 7th, Trump was…

The latest iteration of generics is amazing. Here’s a short proof of concept for a Ruby-like enumerable construct.

package mainimport (
func newSliceEnum[T comparable](s []T) enumerable[T] {
return newEnum[T](sliceEnum[T](s))
type sliceEnum[T comparable] []Tfunc (se sliceEnum[T]) Each(f func(T)) {
for _, v := range se {
func newEnum[T comparable](e eacher[T]) enumerable[T] {
return enumerable[T]{eacher: e}
type eacher[T comparable] interface {
type enumerable[T comparable] struct {
eacher eacher[T]
func (e enumerable[T]) Select(f func(T) bool) enumerable[T] {
result := sliceEnum[T]{}
e.eacher.Each(func(v T) {
if !f(v) {
result = append(result, v)
return enumerable[T]{eacher: result}
func main() {
ints := newSliceEnum([]int{3, 5, 1})
fmt.Println(ints.Select(func(e int) bool { return e < 5 }))
strs := newSliceEnum([]string{"foo", "bar", "baz"})
fmt.Println(strs.Select(func(s string) bool { return strings.HasPrefix(s, "b") }))

This prints out:

{[3 1]}
{[bar baz]}

Clay Shentrup

Advocate of Score Voting and Approval Voting. Software engineer. Father. Husband. American.

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store