wonko.com

Hi! I'm Ryan Grove: Sorcerer at SmugMug, lover of movies, eater of pie, connoisseur of awesome.

Posts tagged with “software”

Displaying items 91 - 100 of 104

Ryan's Anti-Virus Recipe

I’ve finally gotten around to releasing the Procmail script I use to keep annoying email viruses out of my Inbox. This is also what I use to help generate the lovely virus statistics for the Spam-O-Meter.

RAVR uses content-based scoring to filter out the most common email viruses currently in the wild. When an infected email is received, RAVR appends a header to the message identifying the virus and moves the message to a quarantine folder.

Enjoy.

m0n0wall, how do I love thee? Let me count the ways...

Once again, I’m afraid I must sing the praises of m0n0wall. In recent releases, the developer has added support for traffic shaping, something I’ve never seen in a point-and-click style firewall. Despite knowing nothing about traffic shaping, I was able to read some examples on the m0n0wall website and set up some rules that have greatly improved the perceived speed of my connection. It’s so easy, I feel guilty that I didn’t have to pay for it.

Well, okay, maybe I don’t feel guilty.

A few years ago I paid around $120 for a Linksys BEFSR41, which has limited support for DHCP, NAT, and one or two other things via an ugly and unfriendly web interface. The software is proprietary and riddled with security holes. Meanwhile, I could have downloaded m0n0wall for free, thrown it on any old machine I had sitting around, and I’d have had a real firewall running a real operating system with developers who actually care about security.

It’s not uncommon for an open source product to be better than a competing commercial product, but it is uncommon for an open source product to be both better than and easier to use than a competing commercial product. m0n0wall rocks.

Microsoft is from Mars, open source is from Venus

I’ve been spending tremendous amounts of time recently perusing the weblogs of various Microsoft developers, testers, project managers, and other folks. Aside from the fact that they work for Microsoft and some work on the same projects, they all have one thing in common: without exception, every single one of these people comes across as incredibly intelligent, insightful, and knowledgeable. Many of them frequently post long and very well written essays on various programming-related topics, from UI design to security to performance to the intricacies of the .NET common language runtime. They often post from a perspective of educating a user or developer who wants to know more about why things work the way they do and how to write elegant and well thought-out Windows applications.

“Elegant” is a word that floats through my head often. I try to hold myself to a standard of elegance and simplicity in the code I write and the software I design. Sometimes I think I’ve done a good job, other times I know I’ve created a muddled mess. But one thing that struck me about these Microsoft bloggers is that a lot of them design and develop some pretty complex software, and the sheer elegance that shows through in their explanations of how certain design decisions were reached is absolutely mind-bogglingly stunning to me. These folks are good at what they do.

Even more interesting to me is that every single one of these people seems to have a very selfless attitude. These are their personal weblogs, yet personal posts seem to be few and far between compared to coding examples and essays on design practices.

This is strange to me. Most of my software development experience has come from writing and collaborating on open source software. I’ve found that open source software is rarely well designed or elegant unless it has either a huge user base and a very small team of extremely experienced core developers or a small user base and a single developer, although those two things don’t, by themselves, guarantee a good design philosophy. I’ve also come to perceive many open source developers as hostile, which is unsettling. Considering the unselfishness inherent in giving your code away for free, you’d think that all open source developers would be kind, generous, considerate people, but this couldn’t be further from the truth. It’s not uncommon for a bug report, feature request, or support question from a user to result in flames or angrily-worded variants of “RTFM”, which hardly indicates a selfless disposition. And yet, I can certainly sympathize, as I myself have developed a habit of ignoring support requests from users who obviously haven’t read the documentation, or bug reports that aren’t reproducible, or feature requests for features that I would never personally use.

Even worse, the number of badly-written open source projects vastly outnumbers the well-written ones. Even some of the open source software I use every day seems have been designed from the ground up to be unnecessarily complex. It may still be marginally better than the closed-source alternatives, but merely being better than the worst doesn’t make you the best. And from what I’ve been reading, it looks like Microsoft’s closed-source software, at least, is getting a lot better all the time. Open source zealots love to point out how quickly open source alternatives are gaining market share, and I’d love to share their optimism, but if these Microsoft bloggers are any indication, the open source community is going to be facing some pretty daunting competition in the near future.

I’ll tell you a little secret: I’ve always had a deep, dark, guilty inner desire to work for Microsoft one day. That desire just got a little bit stronger.

iTunes, meet Windows

iTunes Crashes It seems the whole world was shivering in their pants on Friday when Apple unveiled iTunes for Windows. Steve Jobs even said it was ”...probably the best Windows application ever written.”

Needless to say, I couldn’t resist the opportunity to try it out. My housemate Steve (not Jobs) raves about his Powerbook and iTunes and his iPod at every opportunity, so I figured all that fuss must be based on something. I downloaded iTunes and fired it up. The first thing I saw was Apple’s standard brushed metal UI with greyed out (but still functional!) buttons everywhere and the occasional splash of aqua blue here and there. Meh. The second thing I saw, when I attempted to add my music folder to the library, was a lovely hard crash halfway through the operation (I even took a screenshot for you). The crash happens every time I try to add the folder, but always on a different song each time, so I’m fairly certain it’s not a corrupt file or something. The only thing I can think of is that my MP3 library is on another machine and I’m accessing it over SMB, but that should really be transparent to iTunes.

To be fair, I was impressed with the program’s features and the convenience it brings to the process of buying music, but I’m afraid I’d have to say iTunes is nowhere even close to being the “best Windows application ever written.” Sorry Mr. Jobs.

Piracy

Most people who know me would probably tell you I’m generally not terribly concerned about software piracy, music downloading, and other things of that nature. It doesn’t bug me because, while lawyers and the BSA would have you think otherwise, it’s not theft (not in the strictly literal sense, anyway).

Webster’s Revised Unabridged Dictionary (courtesy of dictionary.com) defines theft as: “The act of stealing; specifically, the felonious taking and removing of personal property, with an intent to deprive the rightful owner of the same; larceny.” It goes on to note that “To constitute theft there must be a taking without the owner’s consent, and it must be unlawful or felonious; every part of the property stolen must be removed, however slightly, from its former position; and it must be, at least momentarily, in the complete possession of the thief.”

Digital piracy, therefore, is hardly theft, since it is not depriving anyone of anything other than imaginary potential revenues. And if you think 15 year-old Jimmy Pirate downloading Adobe Photoshop so he can add some super-leet lens flares to his hacker website is depriving Adobe of revenue, consider that little Jimmy Pirate never had the means to purchase the software anyway, so Adobe isn’t losing anything. If nothing else, little Jimmy is learning to use Photoshop and chances are if he gets a job a few years later and they ask him to retouch some photos or tweak some logos, he’s going to ask for a copy of Photoshop. Ching! Money in Adobe’s pockets. Of course, that’s just little Jimmy Pirate. Big Corporation X pirating 2,000 copies of Photoshop is another matter, since they definitely have the means to pay for those copies and probably would have, too, if they hadn’t been able to find a pirated version.

But something happened recently that really tweaked me. It’s still not technically theft, although it will almost definitely result in embarassment and lost revenue for the company whose digital property was pirated. What happened was this: In mid-September, Gabe Newell, the CEO of Valve Software (although he prefers to call himself the “Managing Director”), fell victim to a nasty IE/Outlook security hole in an attack that was directly aimed at Valve. The attacker(s) managed to install several trojans on his system and others, gained access to his email account, and eventually made a copy of the entire source code tree for Half-Life 2, Valve’s much-anticipated upcoming game. They then posted this source code in its entirety on the Internet. Thousands of people have now downloaded it, looked at it, and some have even gotten it to compile (although none of the game’s artwork or sound effects were included).

This could have a devastating effect on Valve. Half-Life 2 has been one of the most anticipated games of the last few years. By all accounts, the game engine Valve has developed is phenomenal and does things no other engine can do currently. Valve is a company that makes a lot of money from licensing their game engines to other companies for use in other games. With the complete source code now out in the open, chances are high that a shady game developer (and there are many) will simply steal from the Half-Life 2 source rather than paying Valve for a license.

“But Uncle wonko!” you’re no doubt saying, “those shady companies probably wouldn’t have licensed the HL2 engine anyway!”

And you’re probably right. Now I have to decide whether my justification for software piracy extends to software source code piracy, which, technically, it should, but which, for some reason, makes me feel really uneasy. I hate when that happens.

Of course, I’m also pissed off that this might push the Half-Life 2 release date back even further.

LazyFTP

Now that my servers and I live in completely different houses, I can’t use Samba to make working on my websites easy (at least, not without opening a big can of wriggly security worms). Using an FTP client to upload files every time I change them is a huge pain in the ass, and it makes me feel like it’s 1996 again, so I whipped up something to do the work for me.

LazyFTP is a PHP script that keeps remote files in sync with local files via FTP. It does this by monitoring the local directory tree for additions, changes, and deletions, and uploading or deleting files on the FTP server when necessary. It runs from the command line on any operating system that PHP supports (Windows, Linux, FreeBSD, MacOS X, etc.).

Enjoy.

Update: I’ve renamed the script from Filemon to LazyFTP, since it turns out there’s already a widely-used Linux tool named Filemon (although it does something completely different).

m0n0wall

If there’s one thing I like, it’s good, free software. I started using m0n0wall as my home firewall/NAT gateway a few weeks ago, and I’m completely in love with it.

m0n0wall is a small (<4MB) FreeBSD distribution that can be run from a compact flash card. It has a beautiful and intuitive PHP-based web interface for configuring and tweaking firewall rules and other settings. It’s got more features than you can shake a stick at, and it’s very professional and polished. As an added bonus, it’ll even act as an 802.11b gateway if you’ve got the right hardware.

It’s what’s running on the little gray box buried underneath all those Linksys boxes in this picture. If you’re looking for a quick, easy firewall solution, I highly recommend m0n0wall.

Moving, dinnertime conversation, and things

Since Friday, Lillis and Steve and I have been moving into our new house. Things are going nicely so far, and I really like the place. No broadband yet, but we should have cable Internet on Tuesday.

By the way, I’ve given up on referring to people by their nicknames. From now on, it’s first names all around.

Saturday evening, Lillis treated us to a fancy dinner at the Hall Street Grill, just for being her friends. What a classy thing to do. Needless to say, the food was delicious, and of course the company was second to none. By some strange fluke, the six of us ended up sitting in a boy-girl-boy-girl pattern, which, given the perfect size of the table, facilitated some conversation patterns that I’d never seen before.

Generally, in any group with three guys and three girls, conversation will have a tendency to split along the gender line. In the past, this has always resulted in either a pattern of cris-crossed conversation (like an X) or two clumps of conversation, one at each end of the table. This time, however, there were triangles, and at one point even a parallelogram.

It got me thinking about whether it would be possible to model such a conversation in software. Each software conversant would have a list of “topics” they were interested in, with some of the topics overlapping with those of other conversants. Topics near the top of the list would be more interesting to the conversant than topics near the bottom, with topics not on their list being not very interesting at all. The conversation would begin with a random topic choice by one conversant. Other conversants would join in based on their interest level and proximity to the originator.

As the conversation progresses, conversants who are mildly interested in the topic being discussed, but are more interested in another topic, might try to change the subject of the conversation. In turn, this might alienate one or more conversants, who would either listen idly or begin a new conversation of their own, giving birth to new conversation patterns that would grow, falter, and eventually die or transform into different patterns.

The model could even be scalable past just six conversants. You could have an entire banquet hall of conversants; conversations would be more likely to occur between conversants within a close proximity. Theoretically, a conversant at the head of the table could still speak to a conversant at the foot of the table, but the likelihood of this occurring would be very small, given the inconvenience involved. However, conversations could travel from one end of the table to the other, like a wave.

You could even toss in some genetic algorithms and have conversants become happier, and thus more talkative, when more people are listening to them, and sadder, and thus quieter, when nobody seems to be paying attention. Interests could fluctuate throughout the course of the conversations…perhaps a conversant wasn’t interested in a certain topic at first, but after listening to a conversation about that topic, the conversant develops more of an interest. Or, after talking about one thing for a long time, the conversant loses interest and wants to talk about something else.

I mentioned some of this at dinner, and it didn’t get much discussion aside from a general nod that it would be interesting but useless. Later, though, I hit upon the idea that, maybe, by programming in the interests of actual people and setting other values such as how talkative they are, you could even model real-life conversations. As a result, by running a conversation model, you could theoretically estimate how long a conversation would last. If the model tells you that the typical “walking out the door” conversation among a certain group of people lasts 17 minutes, you would know that you should start walking out the door about 20 minutes before you actually need to leave.

But then, maybe I’m taking this too far.

Todo: A cure for procrastination?

After trying in vain to keep track of a massive collection of “to do” items hastily scrawled in a notebook during meetings at work, I felt the need for a small, simple application for managing a task list. Thus, Todo was born.

Todo lets you organize a near-infinite number of tasks into a near-infinite number of categories. Each task can have a name and a description of any length, as well as a due date, completion status, and priority. The task list can be sorted by any of these fields, and tasks are color-coded based on their completion status. Unless you tell it otherwise, Todo will notify you whenever you have tasks due within the next hour or when a task is overdue. The task list and all application settings are stored in a simple XML file in the Todo directory, which can be copied to other machines to allow you to keep your task list with you wherever you go.

Oh yeah, and it’s free. Enjoy.