Sunday, February 20, 2005

"Can I Switch" marketing application idea

So as my nostalgia trip of a few days ago probably demonstrated, I'm more than a little tempted to get a mac. But, could I get by in with a mac in my non-mac work world? There are two ways to answer this question. I could just jump in and see, or I could identify all programs I'm now using at my job and do the appropriate web research to see what's available for the mac. I don't have the time or patience to do the research nor do I have the time just to jump in and try it now either.

There's a better way. And I think the marketing types at Apple should pester some of their techies to make it happen.

I want to install a new program on my work computer (running WinXP Pro) that will track every program I run for two weeks or so. At the end of that period it should report to me how much of what I ran is available under Mac OS X.

I've written more details on this, but some key points are that it can show alternatives even if the same program exists (e.g. Office), it must be open source, it must be honest about the mac capabilities (e.g. "program X will work for most users, but may not be compatible with a corporate server environment because of blah blah").

Of course, this might work to convince people to switch to a linux desktop as well, but the linux desktop has bigger issues to cover than just application compatibility.

Friday, February 18, 2005

My next keyboard?

Real Programmers don't need to look at the keys. So why not get a blank keyboard?
Blank key top happy hacking keyboard

Geeky Friday: An Illustrated Guide to Cryptographic Hashes

Via Tiny Apps.org's blog, "An Illustrated Guide to Cryptographic Hashes". I've used md5sum directly to verify big downloads and I had a basic understanding of how hashes are used to store passwords in plain text files. The author addresses something I've wondered about: "it seems obvious that many input streams are available that can produce any given hash." (also known as a collision). He goes on:
If so, this seems to undermine the whole premise of cryptographic hashes until one learns that for industrial-strength hashes like MD5, nobody has found a collision yet (well, almost nobody, but we're getting to that) .

This astonishing fact is due to the astonishingly large number of possible hashes available: a 128-bit hash can have 3.4 x 1038 possible values, which is:    340,282,366,920,938,463,463,374,607,431,768,211,456 possible hashes

Well, now it make more sense. Even though there are so many possible hashes, it takes some serious craftiness to make sure that the math to generate the hash values don't all cluster on a small percentage of those 3.4 x 1038 values. Those mathematician types are pretty clever.

Thursday, February 17, 2005

Google Cheat Sheet

Today I learned that not only does Google have a one page cheat sheet, but I also didn't know that you can search for synonyms (e.g. searching "~auto" will also find truck, car, etc) and you can search for words near each other (e.g. "red * blue" will find the words red and blue separated by exactly one word).

Wednesday, February 16, 2005

Nostalgia tripping

I just spent a half-hour sitting in front of Ika's Mac Mini, exploring the Xcode and InterfaceBuilder development tools. Xcode is the modern equivalent of the old NeXTStep ProjectBuilder tool (introduced in NeXTStep 3.0 in 1992), InterfaceBuilder is amazingly similar to the InterfaceBuilder which shipped with the first NeXT computer I ever played with, running NeXTStep 0.8 in 1989.

Pretty quickly I was able to put together a very simple GUI application for converting between Celsius and Fahrenheit. This was a first day exercise when I taught five-day NeXTStep bootcamps back in '93-'94.

Of course, some advancements have been made such as alignment guides within InterfaceBuilder. There are probably many more, but I didn't find them in my 30 minutes of play time. (I also had to get used to a one button mouse.)

Monday, February 14, 2005

"Do not fail your species"

Bork posted a link to My Little Golden Book About ZOGG. It sheds new light on why my children act the way they do sometimes.

Friday, February 11, 2005

Heavy metal umlaut and other scholarly topics

From an article in the Christian Science Monitor about Wikipedia's list of unusual articles which includes a discussion of the history and usage of the umlaut in heavy metal band names which is subsequently analyzed in a movie (flash) presenting a scholarly analysis of the evolution of this page.

How can people say the Internet is full of drivel?

Tuesday, February 08, 2005

Serialized Dickens (made two ways)

I learned in high school English that Charles Dickens' novels were published in weekly installments and I bemoaned the fact that he was paid by the word. Russ Beattie has brought this idea to the current day. His Mobdex site was originally created to distribute smaller chunks of novels to cell phones and other low-bandwidth mobile devices. More recently he has adapted this for RSS distribution. You can add a feed from a novel to your aggregator and get a new little bit every day. In addition to Dickens, Mobdex has many more authors and titles.

Take a look at the Discovering Dickens project at Stanford University for a different take on serialized Dickens. They are distributing reproductions of Dickens' Hard Times as it was originally published. You can download PDF files or you can actually have paper copies mailed to you. The site also has the PDFs for their past novels (A Tale of Two Cities (2004) and Great Expectations (2003)).

Friday, January 28, 2005

Geeky Friday: find, xargs, grep, and spaces

On linux/unix systems, the find command is often used along with grep to find text in a file somewhere in a multi-level directory hierarchy. Two ways to do this are:
find . -type f -exec grep "blah" {} \;
find . -type f -print | xargs grep "blah"
The second method is slightly better as the grep command will be run only once on all files found whereas the first will run grep for each file.

The second method breaks down if find finds filenames containing spaces. If, for example, there's a file named "How To Conquer The World.txt". The xargs grep part will try to search in five files: "How", "To", "Conquer", "The", "World.txt" and grep will complain that these files don't exist.

But wait, it's 2005, surely the geeks of the world have resigned themselves to the fact that some people like to put spaces in file names -- not out of malice towards linux geeks, but just because they don't know what it can do. The good news is that yes, in fact, the geeks working on find and xargs have done something about this.

Their solution is to provide an alternate file name delimiter. The new way to handle this is to do this:

find . -type f -print0 | xargs -0 grep blah
The -print0 tells find to output its list of files separated by nul (ASCII 0) instead of a space. Similarly, the -0 tells xargs to expect that its input is separated by nulls

Friday, January 21, 2005

Geeky Friday: The Daily WTF

I've had the occasion in my career to see some really nasty code. I hope I haven't written much. If you enjoy the good feeling that comes with laughing at other people's bad code, you'll like The Daily WTF (or add the RSS feed to your aggregator).

Here's a beautiful example:

    boolean exceptionFlag = true;
    try {
     initializeResources();
     compareAggregates();
     exceptionFlag = false;
    } catch(Exception e) {
     if(exceptionFlag) e.printStackTrace();
    }

    if(exceptionFlag) throw new Exception("An Error has occured");
(Sorry non-geeks, it'd take too long to explain the humor in this)

Thursday, January 13, 2005

Geeky Friday (but not as geeky as usual): Aggregator Bliss

You may have noticed the little icons around the 'net lately. They're sitting there just taunting you about a much better way to keep up to date on your favorite sites — you need to learn about and use an aggregator.

I started using an aggregator last summer and I think it's so cool that I wrote an article explaining how it has improved my surfing, what it does and how to get started.

Monday, January 10, 2005

Clever programmers

You may already know that if you search Google for a UPS tracking number, you'll get a quick link to track the package. Well, this morning I checked on a package and found that some enterprising programmer has added a lot of keywords to a porn site so that the gibberish that makes up the tracking number actually finds a page match. Caveat emptor: I haven't clicked through to that site, so I cannot vouch for what visiting it may do to your eyeballs, computer or anything else. (I also found it interesting that Google's spell-checking engine suggested an alternative spelling for "306 12".)