Friday, March 03, 2006

Where I'm going to hide from Google

I finally gave in to temptation to give my life over to this newly sinister entity that may one day succeed Microsoft on the throne of evil. Like Aragorn, if he hadn't been wise enough to turn down The Ring, it may give in to the corruptive seduction of power. I'm talking, of course, about Google. I signed over the contents of my hard drive, and by extension, my soul, to Google, when I installed Google Desktop on my computer.

I was inspired to do that by this article in Washington Post:

Google's Latest Bundle of Goodies Is Worth Opening.

"Last month, it introduced a free bundle of Windows XP software called Google Pack. [...] The Pack ( http://pack.google.com/ ) consists of five Google programs (Google Earth, Google Desktop, the Picasa photo organizer, the Google Toolbar for Internet Explorer and the new Google Pack Screensaver)," [and some other software I am not interested in].

I had almost forgotten about the once-viewed-as-controversial Google Desktop. The program that applies Google search algorithms to the files on your desktop, allowing you to search them as easily as the web. It was controversial when it was first announced, because there was some concern that Google may get hold of the contents of your desktop.

It so happens that lately I've been in need for a program that would let me search inside the PHP files on my machine. I was looking into modifying some of the Joomla source code to customize the Joomla installation on my web site. Joomla is an open source content management system. It's written in PHP. I have Joomla source code on my machine, and I want to be able to search it.

Normally I would use Windows built-in search mechanism for that. It does a pretty good job at letting you search files -- or so I thought until I tried searching within Joomla source code. Windows can't find files that are right under its nose! Or, rather, it can't find text strings in those files. I don't understand why that is. My only guess is because those files have a .php extension. Maybe Windows views them as different from text files, even though they really aren't. The text in them is "different" in that it's written in a programming language, but it does not contain any special characters. It's no different from documents written in English! Why should it be hard to search inside it?

Yes, Windows. I'm running Windows. For those who say I should use Linux, the answer is in this digression below.

<digression>

I do have Linux on my laptop. It usually refuses to work with the wireless connection at home (RoadRunner), although it sometimes works with wireless in public places, such as coffeeshops. With RoadRunner, most often it is unable to obtain an IP address. Occassionally, though, it does obtain an IP address, even though I am not doing anything different. A lot of times even when it obtains an IP address, it can't see anything on the internet. And, in the rarest of cases, it gets an IP address and sees the internet. It happens so rarely that I can practically count on not having an internet connection when booted into Linux. (My laptop is dual boot Windows XP and Linux.)

Because of that, it seldom makes sense for me to boot into Linux, because there's little I can accomplish without Internet access. For example, if I want to experiment with changes to my Joomla website, I need to be able to login into my hosting service to make those changes.

But, yes, Linux has the incredibly handly find command, which I so sorely miss on Windows.

My lappy is weird. Other Linux computers at our home don't have a wireless connection problem. RoadRunner or not, they work just fine. My lappy, though, experiences wireless glitches in Windows, too. It sometimes loses the wireledss connection for no reason at all, even though all the other machines at home are not experiencing any interruptions. Usually, after losing it, it regains it automatically in a few minutes. Other times it doesn't.

Steve thinks it's the Centrino chip in the laptop that's causing the weirdness. Maybe. Whatever it is, I know I'm not likely to figure out on my own how to get it to work with Linux. Not without getting a degree in Electrical Engineering, or something. There are machines out there that play with wireless better, but I like this lappy and won't give it up. It is very small, lightweight and neat. An ultimate portable machine. It fits my needs better than any other computer I've had.

</digression>

So I thought, well, it's some Microsoft idiocy. Surely Google Desktop will not suffer from the same. Surely I can use it to search inside the PHP files.

So I downloaded the Google Desktop as part of the Google Pack. (Other components of the Pack, such as a photo application Picasa, and a photo screensaver, looked appealing, too.) I let it run overnight indexing my files. Next day I let it loose to hunt in my PHP files.

And... nothing. After some playing around I determined that Google Desktop does not index the PHP files. As far as it's concerned, they don't exist.

How stupid. Of course, I am in the minority with my need for this. But still... why would it exclude perfectly good, perfectly searchable source code files?

After some looking, I found links to Google Desktop plug-ins written by third-party developers; some plug-ins let you index certain source code files. For example, Java. So apparently some people had the same problem as me, if they wrote their own software to index "special" types of files. (That are not really special at all.) There are no plug-ins to index PHP files, though.

Grumble. Grumble grumble grumble. How useless.

But, come the day when Google takes over the world, I will know where to hide my seditious thoughts. I'll just put them in .php files. :-)