We Have To Get the Money Out of Politics

It costs a lot to get elected to high political office. A lot. So much, in fact, that a candidate has to either be independently wealthy, or they have to sell their souls votes to those who would finance their campaigns. This is one of the many things that is wrong with our political system. There is no possible way that someone like me could run for anything higher than local office; I don’t have the money, and even if some donors wanted to fund me, I would’t want to be beholden to them on their pet issues. So what do we do about it?

For one, we overturn the horrible Citizens United case. Senator Sanders is introducing a Constitutional amendment, called the Saving American Democracy amendment, to do just that, stating in no uncertain terms that to be considered a “person,” a pulse is required. It would forbid corporations from being classed as “people” and from donating to any politician. It will never pass or be ratified, but at least he’s trying. You should watch this video of him explaining it on the floor of the Senate.

The second is public financing of elections. I used to think this was a horrible idea, but upon more level-headed reflection, it’s the only way to go. Michael Moore has a post today about this very thing. The worst example of the amount of money in elections was Meg Whitman, running for Congress in 2010, who spent $119 million of her own money. You can’t compete with that, unless you also have access to that sort of money. If elections were publicly funded, and everyone who runs for office has the same financial limitations placed upon them, the need for obscene amounts of cash to campaign goes away. Now, I don’t know how the determination would be made of who counts as a viable candidate, since we can’t very well fund everyone who says they want to run for office. That would have to be worked out later. But, just like Senator Sanders’ amendment, this will never happen.

Third, we have to stop the “revolving door” between the Congress and the lobby. In that same Michael Moore post, he mentions Senator Michael Bennett, a Democrat from Colorado, who has introduced something he calls a Plan for Washington Reform that would, among other things, place a lifetime ban on former Congressmen from becoming lobbyists. You have to read this! I just developed a man-crush on Senator Bennet as I was reading it. The things he proposes would fix so many problems in Washington. That means, of course, it has no chance of passing.

Oh, one more thing. Have you ever wondered what sort of financial distribution there is among our elected “representatives”? In other words, how many millionaires are there vs. how many average joes. Here’s a handy chart to answer that question.

Anyway, this wasn’t the most eloquent explanation, but that’s what I think needs to happen. Go read Michael Moore’s blog post, then watch Senator Sanders’ video, then read Senator Bennet’s proposal.

Fizzing and Buzzing With Clojure

I’ve known about the FizzBuzz problem for a few years. I’ve written solutions for it in a few languages, but never posted them. I’ve been working with Clojure lately, and after reading articles about how many job applicants can’t solve a simple problem like this here, here and here, I decided to do a Clojure version. (It baffles me that someone who claims to be a developer can’t come up with a solution for this, no matter how good or bad it might be.)

I ended up doing it three different ways. The first is a simple first-cut solution. The second is somewhat better, I think, and the third is a refinement of the second. In all three cases, they use a nested function to do the evaluation, and return a lazy, infinite sequence. Here’s the first

[clojure]
(defn fizzbuzz []
(map (fn [i] (cond
(and (= (rem i 3) 0)
(= (rem i 5) 0)) "FizzBuzz!"
(= (rem i 3) 0) "Fizz!"
(= (rem i 5) 0) "Buzz!"
:else i))
(iterate inc 1)))

(doseq [i (take 100 (fizzbuzz))]
(println i))
[/clojure]

This solution does work, but I have a problem with the fact that the division tests are done twice. I think doing those tests twice increases the chances of making a mistake. The second version does the tests one time, assigning the results to locals. It then checks them for nil, and concatenates them together, relying on the fact that a nil will not print.

[clojure]
(defn fb []
(let [fb1 (fn [n]
(let [fizz (if (= (rem n 3) 0) "Fizz")
buzz (if (= (rem n 5) 0) "Buzz")]
(if (or fizz buzz)
(str fizz buzz "!")
n)))]
(map fb1 (iterate inc 1))))

(doseq [i (take 100 (fb))]
(println i))
[/clojure]

In this version, instead of passing an anonymous function to map, I assigned it to a local in a let expression. You can see that I only do the math once, assigning locals with either the appropriate word, or nil. I then check that one or the other of the locals are non-nil, cat them together and return it. If both are nil, the number itself is returned.

The third version is almost identical to the second. The only difference is that the second one used a let expression, and the third one uses a letfn expression. It’s effectively the same thing, but the third one is ever-so-slightly shorter, and I think every-so-slightly easier to read.

[clojure]
(defn fb2 []
(letfn [(fb3 [n]
(let [fizz (if (= (rem n 3) 0) "Fizz")
buzz (if (= (rem n 5) 0) "Buzz")]
(if (or fizz buzz)
(str fizz buzz "!")
n)))]
(map fb3 (iterate inc 1))))

(doseq [i (take 100 (fb2))]
(println i))
[/clojure]

I don’t claim that these are particularly good solutions, though I do claim they work correctly. Any Clojure experts care to point out problems and/or offer suggestions?