Archive for the ‘Uncategorized’ Category

Am I the only one…

Tuesday, October 6th, 2009

…who finds the Google Earth icon eerily reminiscent of AT&T’s logo?

Twitter

Sunday, August 30th, 2009

I separated out my blogs because I believed that most people interested in my programming opinions would not be interested in my personal writings and vis a versa. Every once in a while, there is a little bit of crossover. I just wrote a post on my personal blog on Twitter, which may be of interest to what little audience I may (but probably do not) have here: http://writing.mad-computer-scientist.com/blog/?p=131

What it takes to take Google

Saturday, August 8th, 2009

Since Google’s meteoric rise, many self-proclaimed Google-killers have come along. Obviously, they were more smoke than flame. Google is bigger and badder than ever. The most recent is probably Cuil and Microsoft’s reanointed Bing, but none of them has of yet made any meaningful dent in Google’s size. The reason is simple. The search they offer is inferior to Google’s. Google has diversified a great deal, but their bread and butter is search. If Google lost at the search front, their other applications would not sustain them. Sure, there is some advertising space in GMail as well as Google Earth, but virtually everyone who owns a PC has used and knows of Google search. A smaller percent use Google’s more expansive offerings. So, to defeat Google one of two things must happen. Either Google has to be beaten on the search front or the internet itself as we know it must become irrelevant. The latter is hard to imagine, but, then again, the fall of the mainframe and the internet would have been hard to imagine a ways back.

So, as things stand, to take down Google, our hypothetical company must defeat Google in the search arena. Again, Microsoft and Cuil are, so far, thinking along the same lines. The problem is that they are not really building a better search than Google is. Google is not invincible, here. With Googlebombing and Googlespamming on the rise, the signal to noise ratio in Google searches as dropped off noticeably. Any search engine that mirrors Google’s algorithm will fall to the same problem. Research needs to go into what it takes to build a next generation search engine. In its essence, Google’s algorithm takes some combination of popularity (i.e. links to the page) with the number of times that  the search words (with some fuzziness built in) occur. It is actually a very good little algorithm, but we are seeing its weakness. I propose that the next generation search engine (whether it is built by Google or someone else), hereafter titled NGSE, will have to be a little more intelligent. In fact, I would go so far as to say that this NGSE is little more than a massive artificial intelligence riding the back of the spiders that crawl the web now.

Work in artificial neural networks (ANN) and pattern matching would be key in something like this. Rather than looking dumbly at what the page says its about and what other people say about it (and you’ll notice that the problem with links leading in is that it does not indicate that the person linking actually liked the site; they might be linking to it to run it down), it tries to see if the page matches the pattern of the person searching. This sort of engine would be based on what you mean, not just what you say. It would take the semantic web to the world, but without requiring the world to adapt to it, as every proposal has so far.

Case in point: Google Images. From firsthand experience, I can say that when I search for images there are almost always better matches for what I was looking for than what Google brought up. If I had to guess, I would say that the alt attributes on the img tags go a long way in determining the ranking. The caveat is obvious. Most web masters do not put alt attributes on all their images, even if they should. Imagine, instead, an ANN that could, with a high degree of success, scan the image and deduce what it is showing. The more precise it was, the better it would be at showing the users what they wanted to see.

Whether or not an ANN/spider based search engine is even really feasible is an open question. Especially for the image matcher discussed above, nothing close has even been created. Even if we could build such an engine, would its computational cost be prohibitive to using it across the whole internet? After all, one of the keys to Google’s success was their ability to paralellize their algorithm on the massive scales required. Ultimately, something like this would have to be built to defeat Google on their home turf. The way to win when the opposition has a massive advantage is to be significantly better. Parity just doesn’t cut it and Google got where they are for a reason. Their methods are nothing if not sound.

Stick a fork in Chandler

Monday, August 3rd, 2009

I wrote not too long ago about my impressions of Chandler and its development after reading the book Dreaming in Code. Now, before I continue, I would like to point out that I understand that the open source world has, by and large, forgotten about Chandler. For good reason, too. It is the open source world’s equivalent of Duke Nukem Forever–well funded, ambitious, and hyped vaporware. So, to some extent, the world has already stuck a fork in Chandler, but bear with me. The interest in Chandler may be minimal, but if you go to the OSF’s web site the dream is clearly still alive. When I logged into my Gmail today and was marking some mailing list messages read, I noticed that there was a new option: “Add to Tasks”. Hmm. Gmail now has an option whereby an e-mail can “become” a task. This sounds strangely like the Chandler concept of stamping, the goal of which was to “knock down the silos” dividing the different types of information. The dream that was behind that software is starting to leak out and spread. Pretty soon, they will have nothing to bring to the table, not even the vision that kept everything going. Gmail is rapidly heading, through evolutionary development, where Chandler has only dreamed of.

We’ll be back, after this brief commercial message…

Thursday, July 23rd, 2009

I think I have mentioned work on some websites, as opposed to super ultra mega cool compsci stuff. Well, one of them was relaunching http://www.saltmagazine.com/. I probably did the previous version six or seven years ago. While I was in programming, I had done no web programming–the site was poorly designed visually (now that was not entirely my fault) and all static HTML. Not even using Apache SSI, so the navigation had been copied and pasted to every page. That website had been one of my great shames. For this go around, we used a free template modified to show a SALT banner and ran it on top of the Drupal CMS with Ubercart and Authorize.net (die PayPal!). The off the shelf template isn’t as cool as I might like, but it doesn’t look cartoonish like the old one did. At any rate, it is nice to see an amateurish first attempt gone and replaced with a more professional approach.

Anyway, I am writing this post for a slightly different reason. My sister’s first novel (The Last Heir) is available for sale on the rechristened site along with three preview chapters. Read it, buy it. And now, back to Mad Computer Scientist…

A Century of Mad Computer Scientist

Saturday, July 18th, 2009

A century of posts that is. Not counting this little blogging equivalent of a “FIRST!!!” post, WordPress says I have 107 posts up. Considering the often overcrowded life and lack of time, this isn’t bad. I look forward to making another hundred. So,

ONE-HUNDRED-AND-EIGHT!!!!!

Notes on Building Bespin

Saturday, July 18th, 2009

Bespin is yet another cool project from Mozilla Labs. Ironically, Mozilla Labs seems to be geek through and through: they create stuff and it pretty much disappears. What software has come out of Mozilla Labs that really moved into mainstream use? Firefox does not count. It predates “the lab”. The idea of Bespin is that you do your code editing online. Cool. Especially for web programmers (which is how I spend the majority of my development time, of late), as it means that you can work on the fly, anywhere that you have an internet connection. That caveat is becoming a smaller and smaller one as of late. With the dawn of netbooks and easy to find WiFi, the idea of coding without an internet connection is becoming the harder sell.

You can already start using Bespin without the hassle of setting it up. Mozilla allows you to create an account and use their software as a service at http://bespin.mozilla.com/. This tends to make me uneasy and has the disadvantage of not allowing me access to the compilers and interpreters I love to play with. So, here is how you go about taking the latest source and running it yourself:

  1. Get the latest revision via Mercurial. Normally, I would suggest using a stable release, but in a package this young, no release is stable and the difference between release and head is much larger than usual. Use this command:hg clone http://hg.mozilla.org/labs/bespin/If you do not have, do not want, or cannot get Mercurial, navigate your browser (you do have that, don’t you?) to the URL above. Mercurial’s web interface will come up and you can simply download an archive (zip, gz, bzip2) of the latest revision.
  2. Bootstrap the setup. Bespin’s backend is written in Python and uses a fair number of Python libraries. The easiest way to get all the dependencies at their correct versions is to install the libraries into a virtual environment–which is basically all the bootstrapper is for. To do this, enter the directory you grabbed above and run the command:python bootstrap.py –no-site-packages
  3. Bespin uses some very specific versions of two libraries: Path and Paste. Development revisions, as of this writing. To install the correct version of Path, run this command:
    bin/pip install http://pypi.python.org/packages/source/p/path.py/path-2.2.zip
    
  4. Next, run:
    bin/pip install ext/Paste-1.7.3dev-r7791.tar.gz

    to install paste. The wiki is out of date here as it gives the default location has lib instead of ext.

  5. To build a package that you can run on a server, run:
    bin/paver dist
  6. This will spit out build/BespinServer.tar.gz; copy this file (if necessary) to your web server and unpack.
  7. Next, we need to configure Apache (at least, I assume we are using Apache; I am, but I would assume you could run this anywhere you could run it under IIS as there is an ISAPI filter for it, though I do not know how good it is).

Beyond this, I never got anything that worked. I installed the WSGI application, but got continuous complaints from it about missing files. I ran the development server out of the bespin source and it kind of worked, but I reached a couple of conclusions. Bespin is too finicky (dare I say buggy?) for anyone to really deploy outside of its creators and that I didn’t really want to deploy it. Ultimately, it felt like jEdit on the web. Now, jEdit is a fine editor, but I am too wired into the vi mindset to swap for a jEdit wannabe. At any rate, I can see some real potential here and I hope they do well. It’s just not for me. Finally, I am posting these notes to help anyone else who may want to give the whole thing a whirl.

Sources

Some thoughts on Linux Gaming

Friday, July 17th, 2009

As my previous post may indicate, I’ve been interested in setting up a few games on my Linux box. As I have been reading articles and browsing around, it seems that many of the highest quality games are not in official repositories and require adding new repositories (like UFO:AI) or compiling from source (like FreeOrion). There aren’t many high quality games available for Linux, but it seems like the official repositories do not have many of them available by default. When gaming is frequently cited as a reason not to leave Windows, this seems crazy. Heck, I’ve been using Linux on the Desktop (usually in a dual boot environment) for a few years now and I didn’t know about many of these projects until fairly recently. What would the more newbie-ish users see? Well, they would fire up Synaptic or KPackageManager or graphical YaST, or something like that and see no decent games. A few card games, maybe. The kind of thing that ships with Windows by default. They would google games and see only stuff that runs under Windows. Distros that want to capture the desktop audience (I’m looking at you, Ubuntu and Fedora) need to get on the ball.

QuickTip: Changing Linux Timezones

Tuesday, July 14th, 2009

Run:
ln -sf /usr/share/zoneinfo/US/Mountain /etc/localtime

Assuming, of course that US mountain time is what you want. Substitute the right country and zone. I read a couple of people saying that you have to logout to see it. You may have to–I didn’t.

Running Smokin’ Guns on Ubuntu 9.04

Sunday, July 12th, 2009

I first read about Smokin’ Guns (http://smokin-guns.net) on one of several reviews of the state of Linux gaming.

First, download the binary zip. I found it easiest to go to the quake.fr mirror (http://www.quake3.fr/index.php?f_id_contenu=1150&f_id_type=) for the download as it is one of the few mirrors that does not require registration (die, FilePlanet!). Once you unpack the download, you will find that the Windows and Linux binaries are packaged together. You will need to run:

chmod +x smokinguns.x86

To make it executable. Once I did this, I got errors about OpenGL and OpenAL not being found, despite both being installed. The bottom post of the linked page gave the first part of the solution. You have to sym link the libraries to the ones that Smokin’ Guns expects. The commands from the post below are:

sudo apt-get install libopenal1
sudo ln -s /usr/lib/libGL.so.1 /usr/lib/libGL.so
sudo ln -s /usr/lib/libopenal.so.1 /usr/lib/libopenal.so.0

Once I did all this, the game would start, but no sound would come. Here were the relevant errors:

—— Initializing Sound ——
ALSA lib pulse.c:272:(pulse_connect) PulseAudio: Unable to connect: Connection refused

ALSA lib pulse.c:272:(pulse_connect) PulseAudio: Unable to connect: Connection refused

AL lib: alsa.c:344: Could not open playback device ‘default’: Connection refused
Failed to open OpenAL device.
Could not mmap dma buffer PROT_WRITE|PROT_READ
trying mmap PROT_WRITE (with associated better compatibility / less performance code)
/dev/dsp: Input/output error
Could not mmap /dev/dsp
Sound initialization failed.

A little bit of trial and error showed that the pulseaudio server needed to be installed. Ubuntu 9.04 ships with the client, but not the server (why, given that a number of apps apparently need it?). So, running

sudo apt-get install pulseaudio

solved the problem. Interestingly, this incidentally fixed another problem I was having. Playing Flash video (or games) in Firefox would lock up sound system wide until Firefox was killed. Once the pulseaudio server was installed, the problem went away.

I am going to give the game a shot (no pun intended) and see what I think of it. I just noticed that the game wasn’t quite click ‘n go for Linux users and wanted to make a note of my experiences.

Sources