Idea: Human Anti Spam

I doubt I’m the first to think of that, but this idea might help cleaning the Internet of some spam. The idea is that people will install a small program on their computer that will send them from time to time (according to their preferences) some text that was publicly posted somewhere on the Internet. It could be anything: a blog post, a wiki edit, a forum post, a YouTube comment, whatever. The person will then click to say if this is spam or not.

The same content will be sent to multiple users, so that the system will not be easily gamed by people that are paid to create spam. If there’s a user that keeps marking almost everything as “not spam” he/she will be kicked out of the system (or even given data that is surely spam to test if we maybe have an “evil” bot.)

Hopefully we’re only talking about the “maybe spam” that was returned from an automatic spam filter, like Akismet. This will reduce the number of messages to check greatly. Regardless, this kind of system can only work if the number of “good” users exceeds by far the number of “evil” users, but since everyone hates spam and it’s a minimal effort I believe enough people will join in. Search engines can use this system to test if a fresh new blog is just a spam blog or a real one.

Unfortunately this will not work for any type of private communication, like email, simply because email is private and you can’t let other people see it.

So, do you think it’s a good idea, or did I miss an obvious way to game this Human Anti Spam system? If it’s good, maybe I’ll send it to Google’s Project 10 to the 100th.

Random Thoughts About Caching

Imagine for a moment that there is a place where the results of all non-trivial computations are kept. Kind of a universal cache with unlimited capacity. To access this cache and get the results of a desired computation you need to specify the computation type and the problem set. For example, a computation type may be sorting and the problem set is the collection of numbers you wish to sort.

Let’s further assume that this cache isn’t local on the computer requiring the result. If that’s the case, accessing the cache to even find out if the result of your problem exists costs you quite a lot and you have to consider whether it’ll be worth your while to try and access the cache, get a cache miss and compute the result yourself. Considering the amount of storage required to store everything and the time it would take to send the problem set, access the data and send the results back, most problems aren’t good candidates for such a universal cache. Today.

However, storage space is becoming cheaper and network speed is constantly rising, so more and more problems will benefit from a universal cache service like that. Creating such a service isn’t too hard. It can be implemented, as an example, using Amazon’s Simple Storage Service (S3) for results storage. The universal cache can be self learning – for example, if there is a high percentage of cache misses, enlarge cache storage space automatically. In addition, you can use Amazon’s Elastic Computing (EC2) for computing the cache misses instead of performing the calculations yourself. So in the case of high percentage of cache misses, you may choose to add more computers to the grid.

Programmatically Getting The Number Of (Online) CPUs On Linux

In case you wondered, if you want to know how many online (aka working) CPUs there are inside a program, use:

const int nCPUs = sysconf(_SC_NPROCESSORS_ONLN);

Note that man sysconf doesn’t mention many of the configuration bits you may ask about. See /usr/include/bits/confname.h for more options.

Facebook Is So 2007

After the initial joy of joining Facebook and playing around with it a little, I find myself entering the website less and less. Applications always seemed annoying to me (some of them are nice, but very few are useful.) I didn’t want to post anything too personal on Facebook because I have this blog and if I’ll want to publish something it would be here. Additionally, the privacy issues are really disturbing – did you know that if a friend installs an application then the application can read your data?

I’ve noticed, though, that my friends have also stopped sharing things on Facebook. One friend even simply disappeared. I have no idea why or what happened. The news feed, where you see all the updates from your friends, now contains very few new items every day, where before it used to fill the entire page. I don’t know why people stopped using Facebook, but the domino effect is apparent – once you realize your friends aren’t logging into Facebook every day, you have no motivation to update your photo albums, activities, etc. Then you gradually stop using Facebook as well.

Anyway, it was nice while it lasted. I still have my (very modest) profile on Facebook and it will probably stay there just so that people can find me. Other than that, I’m pretty much done with Facebook.

Three Good Things Microsoft Did Lately

Even if the following were motivated by business interests, they are still good things:

  1. Lowered Windows Vista’s price (I already switched to Ubuntu Linux)
  2. Opened “high volume” Microsoft software specifications (It’s still not a good idea to try and implement a “perfect” Office clone)
  3. Decided that Internet Explorer 8 will be standards compliant by default (I switched to Firefox a long time ago, when I was still using Windows)

Windows Vista Capable – _They_ Should Have Known Better

A class-action suit against Microsoft’s “Vista Capable” stickers is scheduled to go to trial in October. Microsoft decided to lower the bar on what would be considered a Windows Vista capable computer, and so if you bought a computer that had one of these stickers on it you would basically have a computer that wouldn’t really run Windows Vista in a compelling manner.

Additionally, during Windows Vista’s launch, many drivers were missing. Even drivers for things like top-of-the-line-best-selling printers, not to mention hardware that is not so mainstream. Even today Windows Vista lacks many drivers. NY Times brings the story of three people who should have known better but upgraded to Windows Vista and instantly became disappointment (free registration required).

Enabling Shared Folders In VMWare Player Manually

For some strange reason, even after installing VMWare Tools on the Windows guest VM, I couldn’t set up the Shared Folders feature on my Linux host. The reason seems stupid: it just won’t let me add new shared folders to the empty list. Eventually I edited the VM’s vmx file and added the shared folders manually. Here’s how:
First, you add the following line that says how many shared folders you have:

sharedFolder.maxNum = “2”

Next, for each shared folder, starting with 0 (zero) you add a few lines describing it. Here’s how to add two different shared folders:

sharedFolder0.present = “TRUE”
sharedFolder0.enabled = “TRUE”
sharedFolder0.readAccess = “TRUE”
sharedFolder0.writeAccess = “FALSE”
sharedFolder0.hostPath = “/home/gnobal/”
sharedFolder0.guestName = “gnobal”
sharedFolder0.expiration = “never”

sharedFolder1.present = “TRUE”
sharedFolder1.enabled = “TRUE”
sharedFolder1.readAccess = “TRUE”
sharedFolder1.writeAccess = “FALSE”
sharedFolder1.hostPath = “/tmp”
sharedFolder1.guestName = “tmp”
sharedFolder1.expiration = “never”

The properties of each shared folder are self-descriptive, so I won’t go over each one.

Obtaining VMWare Tools And Installing On A Windows Guest VM

If you have a guest Windows VM inside a Linux host, you really want to install VMWare Tools inside the guest. It makes the VM perform better and allows you to do some things that you can’t if VMWare Tools is not installed. Two things that I found useful are that the mouse can move freely in and out of the VM and screen resolution can be changed to anything I want.

For some reason my Windows VM didn’t have VMWare Tools installed. I don’t know if it’s because of a choice I made during the creation of the VM in VMWare Converter or something else, but apparently downloading a copy of VMWare Tools isn’t so trivial. Luckily, Brandon Hutchinson explains in length how to do it (and thank you for that, Brandon.)

Once I had the copy of VMWare Tools as the file windows.iso, I still needed to get it installed on the guest VM. Eventually I decided to do it the dumb (yet easy) way. I burnt the CD on the host and since the CD drive is shared inside the VM, I could then install it from there.

Ubuntu Linux – Continuing The Switch

Yesterday I finally had the time to continue moving to my new computer and the Ubuntu Linux installation on it. It was easier than I expected. I decided to put my old Windows installation in a VM and use it on the new Linux box, instead of burning all my data on DVDs and moving it bit by bit. I decided to go with a VMWare based solution because of two reasons:

  1. VMWare Player appeared on the list of software in the Add/Remove manager in Ubuntu. I thought this meant I can install it from there, but I was wrong. I had to go to VMWare’s website and download a command line based installation.
  2. VMWare Converter, which turned out to be a great tool (more about this in the next paragraph.)

VMWare Converter can take a physical machine and make a VM out of it that you can run inside VMWare Player. That’s exactly what I did. My entire Windows installation, complete with all the programs and user data, became a 10.5GB VM in 7 separate files, which I copied to my home directory on the Linux machine. There was a scary moment when I found out I can’t install VMWare Player from the Add/Remove manager, but the command line installation went smoothly (albeit with many questions I wasn’t sure about the answers to, but chose the default, which turned out fine.)

Another scary moment was when my (legal) Windows XP installation told me, while running inside the VM, that I need to activate the copy of Windows because the hardware changed. I was afraid it would lock up, but it managed to activate itself over the Internet without any trouble. An amusing thing is that Windows works faster in a VM inside the new computer than it did installed natively on the old one. It’s really an old computer. One thing I didn’t manage to set up is shared folders between the VM and the Linux host. It’s supposed to be easy, but for some reason I couldn’t get it to work.

I got Flash to work on Firefox as well. I was afraid I’d have to install Firefox 32 bit just to get Flash to work (like many websites suggest.) Luckily I continued searching and as it turns out (from this bug report) in Ubuntu Linux 7.10 64 bit, if you ever get this message after installing Flash but it still doesn’t work:

flashplugin-nonfree already installed

Then all you have to do is type the following two commands in the command line:

sudo apt-get remove –purge flashplugin-nonfree
sudo apt-get install flashplugin-nonfree

So now my Linux installation is my main computer. I still have to:

  • Transfer all the user data from the Windows VM (emails, pictures, documents.)
  • Set up MySQL server and Apache so that I can have a development environment for the website (without such an environment I can’t completely dump Windows.)
  • Move the hard drive from my Windows machine to the Linux machine. This would be the final step, after which I’m putting an old hard drive in the old computer, installing Hebrew Windows and giving the computer to my mom.
  • Make sure I have a decent backup solution that wouldn’t suck like my current burn-the-data-to-DVDs-every-few-months solution

Cold Boot Attacks On Encryption Keys

When I first heard about cold boot attacks I thought this was another disconnected-from-reality-cannot-be-used-in-real-life kind of research, but after watching the video on the Princeton University website I realized that this is a real problem. Namely, unlike common perception, computer memory takes time to fade out after you turn the computer off. So much time, in fact, that you can read it and extract encryption keys from it to later unlock encrypted data. A very interesting research.