Thursday, September 28, 2006
Microsoft Censors MSN Messenger
This week I found out that Microsoft silently drops MSN Messenger messages that contain the string "download.php" (Reportedly other strings as well: see the wikipedia article)
Apparently, this is supposed to protect users from scams. That's okay, but the implementation is brain-damaged. You can't turn it off. It doesn't warn the user. It doesn't give any notification. The server just drops your message on the floor. And it's not some specific, known-bad URLs. It's anything with "download.php" in it. Anything. Or "gallery.php", "profile.php?", ".pif" or ".scr" according to the linked Wikipedia article.
So not only is it a blanket filter, it's keyed to some fairly common strings. There must be millions of sites out there with a page called "download.php". Alas, they are not MSN Messenger Compatible. Just another day at Redmond.
Sunday, September 24, 2006
The Graphing Calculator Story
I used to be a contractor for Apple, working on a secret project. Unfortunately, the computer we were building never saw the light of day. The project was so plagued by politics and ego that when the engineers requested technical oversight, our manager hired a psychologist instead. In August 1993, the project was canceled. A year of my work evaporated, my contract ended, and I was unemployed.
I was frustrated by all the wasted effort, so I decided to uncancel my small part of the project. I had been paid to do a job, and I wanted to finish it. My electronic badge still opened Apple's doors, so I just kept showing up.
-- The Graphing Calculator Story (Thanks to A Neighborhood Of Infinity for the link.)
Saturday, September 23, 2006
Ruby FUD: Abstraction is bad
Before I get started, let's get some things out in the open:
- I like Ruby.
- I've never used Java.
So my perspective on Ruby vs. Java is probably limited, and quite possibly wrong. I probably shouldn't say anything at all.
But when someone posts something like this, I have to rant about it. He makes some valid points. Basically, he says:
- Ruby is slow
- Ruby doesn't have good unicode support
- It's harder to find Ruby programmers than Java programmers
- Java has more libraries, better IDEs, etc.
All of these are true. Ruby might be Fast Enough for your application, and it might not be. All of those things will probably change to some extent in the future, but right now they're true.
That said, I'll now throw off my guise of even-handedness and rip into everything else he said. Well, not everything. Specifically, two things:
Ruby proponents seem to measure maintainability in lines of code: the smaller the program, the “cleaner” and more maintainable it is. Check this example on Martin Fowler’s “bliki”:
C# example:
public static IList Managers(IList emps) { IList result = new ArrayList(); foreach(Employee e in emps) if (e.IsManager) result.Add(e); return result; }... as compared with the equivalent in Ruby:
def managers(emps) return emps.select {|e| e.isManager} endI actually prefer the C# version, as the processing isn’t hidden away behind some clever syntax. The Ruby version is creating a list and populating it; you just have to know in advance that that’s what it’s doing. It’s neat and clever in an academic kind of way, and also kind of fun, but multiply this example by several thousand, and you end up with a project full of cryptic code and “implied” things going on behind the clever parser.
If I find myself repeated using some pattern in my code, I like to give the pattern a name and disconnect what I'm doing from how I'm doing it. I call this named pattern a "function". I find this allows me to reason about the program on a higher level and be more productive. Kind of a crazy, academic, not-enterprise-ready idea, but I think it might catch on.
<sarcasm>But for Real Programming in Java, it's just not readable to have "implied" things going on. In fact, the ability to define functions and classes should be removed from Java, since abstraction is such an obstacle to readablity.</sarcasm>
As for the closure example, it's nice, but so what? Why not just add closures to Java (which is being looked into for the Java 7 release)? Better that than to throw away all of Java. In the meantime, I'm happy to wait. It's not as if I've ever felt the lack, but I'm sure closures will be cool when Java gets them.
First of all, I cannot imagine not missing closures. At my day job, I am constantly thinking "this would be so easy with first class functions and closures." The only reason I can see for not "ever [feeling] the lack" would be never really having used them.
Secondly, it's too late to add closures to Java. Sure, you hack them into the language. But every single Java library in the world (Remember? The ones that make Java such a great language to work with?) is writen in a style idiomatic of a language without closures. The cool thing about closures in Ruby is that they've been there from very early on and are used everywhere.
Okay, I'm done. I've almost certainly not been totally fair, so be sure to read the linked post to get the whole story.
Making experts-exchange.com usable
I've always wondered how Experts Exchange got their PageRank. It seems like every time I search for some problem, their (apparently) useless site is in the results.
For example, look at this question. Notice the large "view solution" buttons. Which, of course, asks you to pay to see the "solution". (Which may or may not be the solution, just the rest of the posts in the thread).
However, if you scroll down to the bottom of the page, past all the ads, the rest of the posts in the thread are visible. What's that? Don't see them? Okay, try this: Delete cookies from experts-exchange.com, and then block cookies from them. Refresh. That's right: It appears that they're using cookies to ensure that you only see the answers once without paying. This is probably so search engines can find them for better SEO, but normal users have to pay. Whatever the reason, you can get around it by blocking cookies from experts-exchange.com
As an added bonus, if you have the Greasemonkey Firefox extension installed, you can install this user script to remove the large block of ads in the middle of the page.