An archive of the Open Source category

By Greg  |  June 22, 2011  |  Humour , Open Source  |  Be the first to comment

A picture of a temple in Kyoto, Japan

Japan is one of the places I most want to get lost – when my sabbatical started, I seriously weighed the decision to condense my life into a backpack and pull a Kerouac. The plan was to travel around Asia, bootstrap a startup and start to live. Images like this remind me why I have such an incredible draw to that part of the world

If you know me at all, you know that I’m a pretty extreme Star Wars fan. By ‘pretty extreme’, I mean that I live for having debates about the myriad of continuity problems that mar the relationship between the original trilogy and the bullshit films known as episodes 1 – 3. There is even a chance (not that I will ever admit to this) that I have read all the books that make up the official Star Wars canon.

Being a Star Wars geek who loves to read code, I was delighted to find this Gitbub project. Titled “Darth Vadar Wins an Election” this project (written in Ruby by someone named Zachaysan) represents electoral fraud taken to the extreme by the Jedi turned Sith Lord. Consider this code:

while true
# we take in who we are going to vote for and uppercase it
vote_for = gets.chomp.upcase
break if vote_for == 'QUIT' # the quit command
vote_for = rand > 0.4 ? vote_for : "DARTH VADER" # sneaky darth stealing 40% of votes
# register the candidate in the voting total and add the vote
voting_total[vote_for] ||= 0
voting_total[vote_for] += 1
end

Now, I’m all for democracy, but electoral fraud of that magnitude? Come on Darth, I expected better of you…

If anyone in Toronto is reading this, please trackdown/badly beat Zachaysan. This blog normally does not condone vigilante style violence, but this is a special situation. Consider Zachaysan’s final comments of the project:

# Total lines of "real" code: 17
# Total number of jedi dead: a great many
# I for one welcome our Sith overlords

I don’t know about the rest of you, but I sense a disturbance in the Force….

According to his Twitter feed, this code is meant to “show how stupid electronic voting systems are”. Definitely a cool project – I especially love how he covered up all traces of his fraud from the program’s output!