Skip to content


Order in Google arguments

Does Google give a different answer if you reorder the words in the search? What? A trivial question? Have you ever tried to refine a search by reordering the words? Wouldn't it be useful if you knew for sure that it would or would not make a difference?


ruby rails bureaucrat gem examples

rails bureaucrat gem examples ruby

These two searches indeed did produce different results! And not just a reordering of the results. There were at least two results in the top 7 which were present in one and not the other.


Vote Buying measures and countermeasures

An interesting question, and an expert answer from a friend of mine. If you are interested in elections and voting and how they can and cannot be bought, you might find this intriguing. By the way, this scheme would never work in the US as we have many mechanisms that would prevent that, but these might apply in other countries that are not as sophisticated.


Say a bad guy made an offer secretly to the population that he would give each voter $100 for a vote cast for himself. Say they are using optical scan ballots. Say that cell phone cameras are easily snuck into the polling booth.

If you were the bad guy, what proof would you ask for so that people couldn't trick you and collect lots of $100 for votes that they really didn't cast. And if you were the government or an activist, what would you tell people about how to trick the bad guy and collect a bunch of $100 bills?:

Here's the analysis:

Before the Australian ballot, it was easy! Anybody can print a ballot, lots of straight party ballots printed. You go to your party boss in your polling place, he gives you a ballot, you put in the box, simple. When the party bosses were excluded, well, you had to get your ballot from him, and minions could observe you not getting a different. With some slight of hand you could trick them, but still very effective b/c most people won't attempt the slight of hand under threat of kneecapping. The almost as soon as Australian ballot was adopted (you might get a blank ballot from a government official in the polling place and mark it in the polling place), chain voting was invented.

Now, today, chain voting is too pesky and low throughput, how about we use the voter's digital camera in the polling booth! The can take a picture of the ballot that they marked as instructed by the boss. You show the boss a picture on your camera, he gives you money and/or spares your kneecaps. But wait! The digital photo can be faked? Hmmm.

I think that is the stage you've set. There are two main questions. What methods can the boss put in place to increase the difficulty of faked photos? What measures can election officials take to make it more difficult for real photos to be produced?

A separate question, new to me: if you were the government or an activist, what would you tell people about how to trick the bad guy and collect a bunch of $100 bills? You bear in mind that it is not just money. The deal might be this: you show me you voted right and I'll give you money; you don't show me, and my goons bust your kneecaps.

Well, if I were the gov't, I would be forbidding the use of cameras or cellphones or any kind of recording device in polling places, rather than telling people it is OK. Allowing recording devices in the voting booth is creating the opportunity for vote intimidation. You never want that.

So let me go back to the two main questions. I would suggest to election officials that ballot marking be done in three sided carrels made of translucent plastic that will mask a view of the ballot being marked, but allow a view of the use of recording devices.

There would need to be lots of training both of voters -- we really don't want you to using recording devices! -- and poll workers to intervene by asking a voter to please mark a ballot again, because this one you marked and then did some weird stuff in the carrel that looked like taking a photo.

The boss has a harder time. Clearly a photo of a properly marked ballot won't do, b/c anybody can make one of those. The photo would need to include something that showed the ballot and me, together. So probably it should include my hand as something that should be unique and distinguishing. Maybe the boss could stamp my wrist with a unique number, in ink that takes days to wear off. Even so, I could prepare a photo combining a properly marked ballot, and my hand, but not the ballot that I cast! If pre-printed ballots are freely available, then I can prepare a photo that the boss expects, but still vote a real secret ballot in the polling place. I could even make a fake picture in the voting booth, using a pre-made ballot, but then marking a real blank ballot and casting that. From there you are in a spy vs spy sort of games with more boss requirements on the photo, making it more difficult to fake, but also more difficult get away with in the real voting booth.

A philosopher defends religion

I recently subscribed to the New York Review of Books. Not sure this was a good decision as the last thing I need is more stuff to read. I came to it because I kept seeing interesting articles from the NYRB come up on various blogs and searches.

Here's quite an interesting book review of "Where the Conflict Really Lies: Science, Religion, and Naturalism ". This sets the tone:

"One of the things atheists tend to believe is that modern science is on their side, whereas theism is in conflict with science: that, for example, belief in miracles is inconsistent with the scientific conception of natural law; faith as a basis of belief is inconsistent with the scientific conception of knowledge; belief that God created man in his own image is inconsistent with scientific explanations provided by the theory of evolution. In his absorbing new book, Where the Conflict Really Lies: Science, Religion, and Naturalism a distinguished analytic philosopher known for his contributions to metaphysics and theory of knowledge as well as to the philosophy of religion, turns this alleged opposition on its head. His overall claim is that “there is superficial conflict but deep concord between science and theistic religion, but superficial concord and deep conflict between science and naturalism.” By naturalism he means the view that the world describable by the natural sciences is all that exists, and that there is no such person as God, or anything like God." (from New York Review of Books)

How much power does it take?

I remember wondering about this when I was in college -- this is before I really knew anything about computers.

I noticed that our computer center charged by theminute of processor time and it was a lot! I remember people freaking out because their random prime number generator ran overnight and the department got billed an unexpected $1,000.00. And they were in trouble!

So it must cost a lot to get these computers to do all these calculations, I thought. So, I asked the local expert, how much does it cost, then, when the computer isn't doing any calculations? He laughed. He said, it costs the same, whether it's calculating or not. How weird.

Here's an interesting article in the New York Times about the data canters of companies like Google, Microsoft, Facebook and many many others, use and waste a ton of electricity. Here's the hook:

"Jeff Rothschild’s machines at Facebook had a problem he knew he had to solve immediately. They were about to melt. The company had been packing a 40-by-60-foot rental space here with racks of computer servers that were needed to store and process information from members’ accounts. The electricity pouring into the computers was overheating Ethernet sockets and other crucial components." (fromNew York Times)

But beware, here's something from an immediate rebuttal from Forbes, "Why The New York Times Story "Power, Pollution and the Internet" is a Sloppy Failure"

"So here’s the first problem that requires a clarification if not a correction. The utilization rates of servers in data centers is cited as between 7 and 12 percent. Nowhere is it pointed out that this statistic is derived from IT data centers, not from the state of the art data centers run by the Internet companies. Huan Liu based on an external model, estimates Amazon’s EC2 utilization at 7 to 25 percent. But Amazon, Facebook, and Google, don’t report their utilization rates. It is not accurate to make this implied association." (from Forbes)

You may read both articles and draw your own conclusion.

Great new book on Object Oriented design (in Ruby)

I first came across Sandy Metz in this video:

[vimeo 12350535 w=500 h=281]

2009 - Sandi Metz - SOLID Object-Oriented Design from Gotham Ruby Conference on Vimeo.

If you are interested in Object Oriented design you will enjoy this. She is a wonderful speaker, and fun to listen to. Even if you don't agree with (or understand) some of the concepts, I promise that you will enjoy listening to it. Since then Sandy has come out with a wonderful new book which I highly recommend: Practical Object-Oriented Design in Ruby: An Agile Primer (Addison-Wesley Professional Ruby Series). You should definitely take a look at it. I won't even attempt to summarize it but I really love her writing and how she expresses herself. The writing here is a cut above all the other techie books I've read recently. I'd go as far as saying that it's "literate" … whatever that means, exactly!

The book starts with a wonderful expression of "purpose" as an engineer thinks of it:

"We want to do our best work, and we want the work we do to have meaning.

And all else being equal, we prefer to enjoy ourselves along the way."

is that not just perfect?

I created this quick and dirty list of useful resources for some friends who wanted to dig into the latest thinking on web and mobile user interface design. I am sure this list is incomplete and quirky but I thought it would be good to share:

Is Skype “Full Duplex”?

What an antiquated term: Full Duplex. I don't know if that term is used anymore but what i mean is this:

I use Skype on many many voice calls, either to other Skype users or to telephone. It seems to me that while the other person is talking, I cannot interrupt them. In other words, either I am talking or I am listening, but not both.

Am I mistaken? Or is my Skype set up incorrectly?

Full Duplex is a term that used to mean, maybe still means, that both parties to a connection can be active at the same time. Last time I used it, it was in reference to a teletype machine!

Sparrow vs. and Mountain Lion

Did you hear that Google bought Sparrow? Sparrow is a really cool email client that I for one have been using very happily for a while now.

Did you hear the announcement that there would be no more development of sparrow?

Did you hear that some people were upset at this, while others defended Sparrow's "right" to let themselves be sold? (Huh????)

Anyway, I am not getting into that discussion. I was selfishly sad , because I am very fond of Sparrow and I know (from first hand knowledge, more than once, but also as a customer) that the product that is acquired doesn 't often do well in its new home, and so I need to end my addiction to Sparrow.

But then came the announcement that Mountain Lion (the new OS X for Mac) was coming out today. I thought I had a theory: Maybe on Mountain Lion would be every bit as good as Sparrow.

*Sparrow, seeing the writing on the wall decided better*not to wait for the inevitable, and ran into Google's arms. (After all, I can think of many worse companies to be acquired by.)

For that and other reasons (like impatience) I bought my Mountain Lion ($20 for all three computers -- good deal!) First impression: Hmm, what's changed? Second impression, quick let's go look at!

Bad news. is a clunker compared to Sparrow. It's slow to launch and slow to work with compared to Sparrow. Sparrow works much more nicely with GMail than

I guess I will stick with Sparrow, for now.

Stand up! No, Sit Down!

You know the old joke that today they say something is good for you, tomorrow it's bad, and the day after it's good again? Recently there was a lot of press that sitting 3 hours a day could take years off your lifespan. "Sitting for More Than Three Hours a Day Cuts Life Expectancy", so said the Wall Street Journal:

"Sitting down for more than three hours a day can shave a person's life expectancy by two years, even if he or she is physically active and refrains from dangerous habits like smoking, according to a study to be published on Tuesday in the online journal BMJ Open." (from the Wall Street Journal)

Yeah but I thought: nowadays, a major part of the economy involves sitting for more than 3 hours. Start with office work. But add truckers, and pilots, and other kinds of drivers, people working in many kinds of factories, I mean, are we all doomed?

Oh don 't panic just yet. "Don't Blame Sitting-Yet-for Shorter Lives", so said the Wall Street Journal a short while later:

"Headlines last week suggested that people who spend a lot of time sitting were in mortal danger. Sitting too long each day could shave two years off one's lifespan—or, for the glass-half-full crowd, sitting less could extend life by two years, the media reports said.

The study that led to the news accounts cautioned that no such conclusion could be drawn from the available research. Sitting studies haven't yet fully gotten off the ground, thanks to technological, cost and ethical limitations. Yet the evidence so far all points in the same direction: that sitting more is tied to higher mortality.

But that doesn't mean the act of sitting itself is deadly. Instead, it could be that people who spend more time sitting are less healthy to begin with, or that those who sit less are using that time in healthier ways such as exercising." (fromthe Wall Street Journal)

Phew. That's a release. I can sit down again!

Hey, you’re an entrepreneur!

I like this quote:

"Everyone here introduces themselves as an “entrepreneur.” It’s as if they hand out the title at the airport when you arrive. “Welcome to San Francisco, you are now an entrepreneur! Which start-up T-shirt would you like?”

This belief that everyone is an entrepreneur has a stultifying effect. It can drive founders to seek an easy acquisition instead of a quest for true innovation and a sustainable, profitable business — a truly entrepreneurial challenge." (from Bits Blog, NYT)