Is that a bug? Or a stupid programmer?

Slashdot ran a piece today about pet bugs—a programmer asking about “obscure, weird, and especially annoying bugs in languages/compilers/etc” that have frustrated developers.  In his query, the author writes:

Recently I found that Microsoft’s VB/VBScript(ASP) round function has problems (for example, ’round(82.845)’ returns ‘82.84’ instead of ‘82.85’). It took me an annoyingly long time to realize the problem wasn’t mine.

Never mind that this is the documented behavior of the Visual Basic round function, and in full accordance with the IEEE 754 standard.  Bankers, scientists, mathematicians, and anybody else who works with numbers have been rounding this way for over a century.

I find it difficult to believe that the person who posted the piece on Slashdot is actually paid to write computer programs.  You’d think that, if he suspected there was a problem with the function, he’d search the Microsoft knowledge base or, horror of horrors, read the documentation.  I suspect that this person is deeply embarrassed right about now.

This ill-informed note reminded me of the compiler bug that has frustrated me the most in my career—programmers who automatically assume that their code is right and the compiler is wrong.  I can’t count the number of times a programmer has asked my assistance in isolating a compiler or runtime library bug when he hasn’t yet fully checked his own code.  Sure, compiler and runtime library bugs exist, but they’re very rare.  If there’s a bug in your program, it’s most likely of your own making.

The Bourne Identity: Worth seeing

Debra and I went to see The Bourne Identity this afternoon.  I expected a reasonably good spy thriller, and the reviews were mostly positive.  I was pleasantly surprised.  I won’t say that everything in the movie was perfect, but they got a whole lot more right than they did wrong.  Matt Damon does an excellent job in the starring role, and Franka Potente does similarly well in the female lead.  Of course, the movie can’t stay even close to the book, but the general idea is there.  It’s not a must-see, but a good spy thriller.  It even has a fun car chase through the streets of Paris in which not one single car explodes.  Amazing.  Too bad they didn’t get the person who edited the movie to approve the design of the web site.  Most annoying, that.

Bejeweled

Bejeweled, a game on the MSN Games site, is one of the best puzzle games I’ve ever played.  A client showed it to me about a year ago, and I spent some (okay, perhaps too much) time playing it then.  Now I go back to it periodically just to relax.  The game is simple to learn, easy to play, and very well balanced—not too easy and not too hard.  The authors did a fine job with the art and the animation, making it visually appealing without making it too busy.  You can also download a demo of the standalone game from the site.  The standalone game has the same basic game play, but the art and sounds are different, and the bonus scheme is changed.  If you’re tired of Solitaire and FreeCell, give Bejeweled a try.

Ordering fireworks on the Internet

I got an email from US Fireworks, telling me that it’s not too late to place my order for the 4th of July holiday.  And if I order $300 or more, they’ll pay the shipping!  That’s perhaps a good deal, considering that freight companies charge quite a bit to ship the darned things.  UPS and Federal Express won’t ship explosives at all, as far as I know.  I’m just a little bit (okay, a lot) disturbed at the thought of Little Johnny ordering fireworks over the Internet.

SpamAssassin and Vipul’s Razor

My friend Darrin Chandler wrote regarding my June 16 entry about spam filtering.  He pointed me at SpamAssassin and Vipul’s Razor, two more attempts at spam filtering.  And, sadly, two more that are bound to fail.   SpamAssassin plugs into a number of different places in the email flow, and uses heuristics and blacklists (like Vipul’s Razor) to attempt to identify and filter the spam.  SpamAssassin is for Unix and Unix-like (i.e. Linux, BSD, etc.) operating systems.  Perhaps a Windows port is forthcoming?  Vipul’s Razor is, according to the web site:

…a distributed, collaborative, spam detection and filtering network. Through user contribution, Razor establishes a distributed and constantly updating catalogue of spam in propagation that is consulted by email clients to filter out known spam. Detection is done with statistical and randomized signatures that efficiently spot mutating spam content.

We’ll see how well it works.

Darrin also pointed out a fundamental flaw in my trusted server idea:  getting a critical mass of important ISPs to subscribe to such a thing.  If AOL were to do it, for example, they’d get millions of emails from irate subscribers who all of a sudden can’t get email from Aunt Tilly, because Aunt Tilly’s ISP doesn’t subscribe to the trusted server network.  That’s really too bad.  It leads me to believe that most people don’t really care about spam.  Sure, they’d like not to get it, but not if it means having to change ISPs or possibly lose communication with Uncle Harold.

Something Awful

I don’t know exactly what Something Awful is supposed to be, but their ICQ/Email Pranks page is hilarious.  Apparently the author spends a lot of time on ICQ, and is regularly harassed by inconsiderate people.  So he fights back by playing some prank or another—pretending to be somebody very wacky.  It’s some very funny stuff, although a little bit goes a long way.

Opt-in spam filtering

A friend of mine ran a spam filtering idea past me last week:  Rather than accept everything and then spend time filtering the trash from your inbox, why not create a list of people from whom you’ll accept mail, and then block everybody else?  The system he envisioned would still accept mail from non-approved senders, but put it in a separate folder for you to scan at your leisure.  This has the benefit of ensuring that what ends up in your inbox is all good.  He had a blocked senders list, of course, and also word filtering. Monday, Jeff Duntemann mentioned MailCircuit, which implements this “opt-in” type of mail filtering, in his web diary.  Perhaps some people will find this kind of filtering useful.  It seems like more work to me, though, or at least the same amount of work.  The only thing it does is unclutter my inbox, but I still have to scan those other messages.  I’m not interested in any anti-spam measure that requires more work on my part.

On Tuesday, osopinion.com ran this article by John Christie advocating what he calls “Reverse FIltering.”  His system, too, is an opt-in list.  You set up a list of approved senders whose mail will always be accepted.  Messages from non-approved senders will be bounced back, with a message describing how to get onto the approved list.  That method typically would be to visit a web page and fill out an application of some sort—presumably an application that cannot easily be filled out by an automated system.  This certainly would work, but it would block way too much legitimate mail.  For example, if you give your email address to anybody, you’d better be sure to add those people to your approved senders list before they send a message.  This includes friends and relatives, as well as web site signups that require email validation.

Others in the Talk Back Forum for the OS Opinion article have put forth variations on these opt-in systems.  All of them suffer from one or more of the problems that I’ve already pointed out.  Perhaps the most common mistake is relying on the “from” email address for filtering.  That value just isn’t reliable—it’s ridiculously easy to put a bogus address there.  The “Reply-to” and “Return-Path” addresses also are unreliable.  It’s impossible to write a reliable filter based on those addresses.

I’ll say it again.  The only reliable way to prevent spam from getting to your inbox is to prevent it from entering the SMTP mail system.  Period.  Once it’s in the system, it’s impossible to filter without also filtering some potentially legitimate messages.  I have yet to see (and I’ve been looking!) any proposal for filtering spam that would be as unobtrusive or as effective as the system of trusted servers that I suggested in my May 15, 2001 entry.  Is nobody giving this problem any serious thought?  Are they all sitting on their hands waiting for legislators to come up with a solution, so they can then complain about how the new law is ineffective and overly burdensome?  I’m very disappointed.

Butterfly and fawns

Debra looked out the kitchen window the other morning and saw this black swallowtail butterfly on her mint plant.  Thinking that it was there to lay eggs, she went out to shoo it away.  It was then she noticed that its wings were wet—it had just hatched.  We don’t know where it came from, but it couldn’t have flown here, so it was probably in the mint or one of the other herbs nearby.

Late last month, a doe gave birth to twin fawns in the neighbor’s yard.  They’ve been hanging out in our yard and the neighbors’, but I haven’t had a good picture opportunity.  Those fawns certainly grow quickly.  In another few weeks, they’ll be able to jump the fence around the yard, and they’ll have lost their spots by the end of the summer.

Who writes Open Source software?

Sandeep Krishnamurthy did the research that I should have done when I first started looking into open source software.  I’ve been saying for years (see my October 11, 2000 post) that open source software is primarily developed not by large disparate groups, but very small and tightly controlled groups.  In this article, Krishnamurthy describes his research on the top 100 mature projects on SourceForge, and how he arrived at the conclusion that (among other things) “most OSS programs are developed by individuals, rather than communities.”

That’s not his only conclusion, and it’s worth reading his research.  It’s also worth reading (if you can wade through the inevitable crap) the Slashdot thread discussing this article.

A cat in the sink

Yes, we have a very weird cat.  She’s liked water ever since she was a kitten.  When she was younger, she’d lay in the sink and let you fill it with water.  At 13, she doesn’t go for that anymore, but she still likes drinking out of the faucet and playing in the shower after we’ve finished in there.  And every once in a while, she’ll curl up in the sink.