comments edit

Colin has a nice little quiz about enumeration on his blog. Basically he asks, how would you implement a class to enumerate through all the letters of the alphabet. Below is my “cute” response.

using System;
using System.Collections;
public class Alphabet : IEnumerable
  public IEnumerator GetEnumerator()
    return "abcdefghijklmnopqrstuvwxyz".GetEnumerator();

Now if you compile my answer and run it, it seems to answer the question correctly (for an academic quiz), but it’s completely wrong for a real world developer. The right answer is “Well, which alphabet or alphabets must I support? Does it need to be localizable based on the current locale?”.

Yes my friends, the answer is to gather more requirements. Make sure you really understand the problem domain. This is why software isn’t as easy as “well I want it to do this so just do it.” This quiz asks what seems to be a very straightforward question. If you as a developer gave me the solution I wrote above, I’d be pretty pissed as a client if I was ready to deploy this to Korea.

sql comments edit

Found this interesting article via Hassan Voyeau that details the performance penalty when naming your stored procedure with an sp_ prefix in a database other than the master database.

Personally, I hate adding extraneous and unecessary prefixes and suffixes to names. Sometimes they’re useful and necessary, like when programming in Fortran 77. But I hate naming tables with a tbl prefix and stored procs with an sp prefix (I’m forced to at my current position). Sql Enterprise Manager does a nice job of separating tables from stored procedures when they are being displayed. I’m never going to get the fact confused that that square looking thing on my database diagram is a table and not a user defined function.

Anyways, Hassan, how’s the weather in Trinidad?

comments edit

If you’re a fan of good music (I mean objectively, not subjectively) I plan to recommend a few songs here and there in this blog. Never mind the fact that if you end up purchasing the songs via my site, I get paid. I give you my word, a vow, that I will never lead you musically astray. I may lead you astray in other ways, but not in music.

Having said that, let me introduce you to this new single by The Chemical Brothers.

I’m a big fan of Metropolis on KCRW. If you live in the Los Angeles area and are a fan of good music then you’re probably familiar with this radio show hosted by Jason Bentley. It’s a great place for discovering new music as Jason really does have his finger on the pulse of electronica and world music.

It’s on this show that I first heard the song Galvanize, which contains the catchy hook that is the subject of this post, “My finger is on the button”. I purchased it on Galvanize today and am totally digging the violin action mixed in with the funky beats. The image on the left is a deep link into the iTunes music store. If you’re not an iTunes user, you can click on the link.

[Listening to: Galvanize - The Chemical Brothers - Push the Button (6:33)]

comments edit

Given that I’ve written much of the documentation for RSS Bandit on the documentation site and have spent a lot of time in the code making a few contributions here and there, I feel a bit sheepish that I didn’t know about this particular feature.

After reading this post (which is one of many discussing how to create one click subscription links) from Phil Ringnalda I discovered that a common way to subscribe to an RSS (or ATOM) feed is to merely drag the link into your aggregator.

I hadn’t seen that described before so I thought I’d try it out with RSS Bandit and sure enough it works. Sweet! I’ll have to add that to the docs.

comments edit

Being married to a Japanese woman, I’ve cultivated a love of tea. Although Koreans have great tea as well, it doesn’t figure as highly in the culture as it does for the Japanese.

My favorite tea is a type of Green Tea called Gyokuro. It’s hard to describe the taste as it has a lot of character and almost a silky texture that just spreads across the tongue when you drink it.

So to make a long story, the point of this post is to try to earn some green tea from Adagio teas as part of their link rewards program. Yes I can be bought with a cup of tea.

[via Opiniated Geek via Scobleizer].

comments edit

Today marks the completion of my thirtieth trip around the sun. And it’s been a scenic ride. Much love and thanks to my lovely wife for putting together a little shindig for me and a few of our closest friends. Great food and drink were consumed and a good time was had by all.

sql comments edit

What will the last two lines print. Will they be the same?


SELECT @first = ISNULL(@test, 'test')
SELECT @second = COALESCE(@test, 'test')

PRINT @first
PRINT @second

What do you think?

comments edit

One complaint about rel=”nofollow” is that you just might want to reward people who post related and constructive links in the comments section of your blog.

My answer to that is to implement reverse comment moderation. As far as I’m concerned, I’d like comments to appear immediately on my site. However, I don’t want them getting Google juice. Call me vindictive if you will. I know it won’t stop comment spam. But I do think it’s a fine complement to other methods that do attempt to stop Spam

Instead, I’d be happy to go in and remove rel=”nofollow” for all links within a post. Ideally there’d be a really nice interface for it. A simple checklist of the day or week’s comments and I could check them off and post it.

Then again, I don’t really care that much. If you really post a comment with something worthwhile, I’ll just mention it in my next blog entry sprinkling a tiny bit of Google juice on your link. (And I do mean tiny. I’m part of that long tail Chris Anderson talks about).

comments edit

I’m proposing a new attribute. Place rel=”willfollowforfood” in your link and I will index it in exchange for food.

code comments edit

There’s a debate going on about how effective the rel=”nofollow” solution really is. Some believe that Google is flattering itself by thinking that the primary motivation for comment spam is Google juice.

I do not believe that rel=”nofollow” will stop comment spam as I’ve stated before (though I’ve applied it myself). Getting their links out there may be motivation enough. However I think it will have a bigger impact than some people think.

In terms of sheer economies of scale, I don’t think comment spam is like regular email spam. Sending an email to millions of users is very easy both technically and costwise. Buy a list and start sending. Comment spamming millions of websites takes a lot more work.

The primary benefit to comment spam was that a sites page rank increased. Think of it this way, if I spam 100 sites, that might increase my exposure a little, say 10,000 people come via those sites. But suppose those 100 sites increases my page rank and now scores of users are finding my site via Google. That’s where the big financial impact comes in. Those 100 sites might now bring in 1,000,000 users. (I’m pulling these numbers out of my ass but I’m probably not too far out there).

Removing the Google juice increases the comment spammer’s work by a factor of 10 or even 100 to get the same financial impact. This might not stop the comment spammer, but it will hopefully put a damper on their activities in the long run.

comments edit

From now on, no person, whether an individual or a body corporate, shall look directly upon my person nor speak of me without my written permission. I was inspired to enact this notice by this tidbit from Raymen Chen.

Maybe they don’t want people to find them.

The copyright notice for the web site of Hutchison Whampoa Limited states,

Copyright Hutchison Whampoa Limited. 2003. All rights reserved.

No person, whether an individual or a body corporate, shall create or establish a hyperlink to the HWL Corporate Website by hypertext reference or imaging without the written permission of Hutchison.

I can’t create a hyperlink so you’ll have to find it yourself.

This isn’t an issue of deep linking; they are banning even links to their home page.

[Via The Old New Thing]

comments edit

A Dr. at Cardiff University has created a scientific formula to prove that January 24th will be the worst day of the year.

The formula for the day of misery reads 1/8W+(D-d) 3/8xTQ MxNA. Where W is weather, D is debt - minus the money (d) due on January’s pay day

  • and T is the time since Christmas. Q is the period since the failure to quit a bad habit, M stands for general motivational levels and NA is the need to take action and do something about it.

Well I could have told him that without this fancy formula. January 24 is the day after my 30th birthday. It’s all downhill from there. ;)

comments edit

MonkeyHello y’all. In case you haven’t noticed, links in my comments now have a rel=”nofollow” attribute attached. That means no more Google juice when you post a list of links in the comments section of my site. So you can stop now. No really. Move along. No point in comment spamming here.

Ok, since you’re still here, you’ve apparently noticed, this hasn’t placed a magical barrier around comment spamming. You’ve forced me to unveil my next weapon against comment spam. When posting a comment, my server will obtain your IP address and location and unleash a legion of angry lonely Ninjas to dispatch anyone found at the address. Not to mention that my server will start streaming Yanni’s greatest hits to your browser. If you make me really angry, I’ll send Yanni himself. But only in rare occasions as his hourly rate burns a hole in my wallet.

Besides, your comments will be removed from my site expediently. I have a crack team of monkeys in Nigeria who are highly trained to identify and remove comment spam from my site. For one banana a month, comment spam is cleansed from my site. (Sorry to American monkeys for offshoring, but I really couldn’t afford the standard five banana rate).

captcha comments edit

I read an article recently that talked about how ticket scalpers have a 10% success rate against TicketMaster’s CAPTCHA controls. That might not seem like a very good rate, but when you have an automated process attacking it, 10% is plenty good.


CAPTCHA for the uninitiated stands for Computer Aided Program to Tell Humans and Computers Apart. It’s a method or program used to distinguish between a computer and a human.. The most popular type out there is the letter or word warping kind you often see when signing up for a web based email account.

It turns out that character recognition programs are getting better by the second. As cool as these type of controls are, I think a simple text based semantic approach might prove stronger. For example, asking a simple question such as “RGB Stands for Red Green and what color?”. If you can’t answer that question, I probably don’t mind the fact that you’re not commenting on my blog. ;)

The one problem with this question approach is that you can’t generate these questions automatically. You’d have to create a decently sized database of questions. However, the benefit is that language recognition is still very difficult for a computer. Especially when dealing with mispellings.

What is the nomber after foure?\ Waht is the nmuber aeftr fuor?”

You can probably answer that easily. A computer is going to have a much more difficult time.


In any case, rel=”nofollow” and CAPTCHA aren’t going to be the final solution. At some point, our blog engines will have to learn to tell the difference like a human would. One approach is to enlist the concept of trust. If you’ve been subscribed to my blog a while or I’m subscribed to yours, I’ll let your comments in no problem. Otherwise your comment will have to pass a series of heuristics to get in the door.

Humans, feel free to comment…

UPDATE: It’s worth noting that Bayesian Spam Filtering is not a silver bullet. Spammers have gotten smart and are now employing a tactic called Bayesian Filter Poisoning. By including random legitimate words along with their message, they either get their message through, or cause you to teach your filter to regard legitimate words as suspect.

I’ve seen a particularly tricky approach via email where they used a font in the same color as the background. Check out the following quote. Highlight it with your mouse and see what it says.

This looks does like Spam to the human naked eye. BuyecheapodrugssandtimprovesyourasexOlife. But it doesn’t to the computer

comments edit

My neighbor Chris is working for the Army Corps of Engineers on several construction projects in Iraq to help rebuild their infrastructure. While they’ve enjoyed some success, they also have their fair share of setbacks.

Infrastructure also provides the insurgents with an attractive target. Around Basra, they regularly blow the oil pipelines that run to the port of Umm Qasr. If you stand out at the army base for awhile in the evening, you can usually spot a billowing cloud of smoke in the distance marking the most recent hit.

Read the whole post here.

comments edit

I applied a patch to my .Text installation as recommended by Scott Watermasysk in this entry of his blog.

New comments will now have the rel=”nofollow” attribute applied, thus preventing Google (and others) from indexing the link and giving the comment spammers a higher page rank.

I found a slight problem with the patch. It works for URLs within the body of the comment but if the user specifies a URL in the URL field, it doesn’t modify that URL. Thus you can still comment spam me, but only one URL at a time. I posted a comment in Scott’s blog about this.

In any case, I doubt this will stop the comment spam anyways. It may well be good enough for the spammers to continue. Despite the fact that their Google page rankings won’t increase as a result, by spamming enough sites, they’ll get enough exposure on enough blogs (et all) that enough users will click through. It’s the same way with email spam. All it takes is a very small percentage of suckers to bite.

This does take away one of the key motivators to comment spam. I will probably add a CAPTHA tool later after some investigation.

comments edit

Schwimmer makes some good points in his clarification to his decision to ask Bloglines to remove his feed. A few points in particular warrant further discussion.

Creating the free content for advertisements that Bloglines will sell to other trademark law firms. This isn’t baseless conjecture - read this discusssion of Bloglines’ plans for advertising keyed to the content of blogs. At least with Google’s contextual ad program, the blog creator gets some money.

The question I have is how is this different than if say FeedDemon or Newsgator decided to release a free version of their aggregator that included targeted ads. Tyme White claims…

there is a big difference between Bloglines search/preview feature where anyone can view a blogs content and someone adding the feed for private viewing. The argument of desktop readers having ads is completely different - that would be for private viewing only by the user and the ad would NOT be on the feed, it would in the software.

Seems to me it’s only a difference in mechanics. Most aggregators contain search features as well. Wouldn’t be hard for them to include targeted ads. Not only that, it’s still making money off your content. Even a desktop aggregation company could print the following ad…

Find out how our sales team can help you reach you reach new customers with targeted advertisements on ACME Aggregator. Contact for more information.

In my view, there’s a big difference in what Bloglines is doing and some website blatantly ripping your content. I can see the problem if Bloglines was a profit motivated legal website and the main content of the site was taken from legal blogs that provide feeds. With Bloglines, the primary usage is for private users to subscribe to feeds. Yes, your content is available via search, but it’s the same as with Google. Likewise, don’t you want people to find your content, regardless?

Tyme goes on to say…

The bottom line, if money is being made off of a feed it could be deemed commercial use and you should receive permission from the author before redistributing unless the content is considered public domain.

Does that mean Google must ask permission to display your site in search results which might contain ads for your competitors (which was recently ruled completely legal).

Suppose you send copyrighted email to a gmail user? Does it infringe on your copyright that Google can target ads to be displayed alongside your email?

I don’t ask these questions to be contrarian, but to really understand the issue. As I see it, yes martin is right. He does have the right to control his content. But true wisdom is knowing when one should excercise a right. As Scoble points out,

…(by the way, how come you guys aren’t yelling about Google’s caching? Did you see that all your pages are cached over on Google? That breaks with traditional copyright law too, but so far we’ve been cool with that too. Why? It helps everyone.

My advice to Martin is that yeah, you’re right. You have a copyright over your content, but think about the big picture. You’ve definitely got yourself noticed. Now let Bloglines use your content for fun and profit, become a blogging hero, and watch your own clientele list and profit grow as a result. Everyone can win in this situation. Don’t try to force a new technology to fit within the confines of an outdated copyright system that’s winded and unable to keep up.

Probably the best thing to come out of all this is a discussion of copyright as it pertains to an entirely new medium. Let’s hope the right decisions are made that reflect the cooperative nature of RSS.

comments edit

I never fill out these silly surveys and usually make fun of those who do. But I succumbed to peer pressure this time. Apparently I’m a Nerd King God, I don’t know whether to be proud or insulted.

I am nerdier than 97% of all people. Are you nerdier? Click here to

All bow down!

comments edit

Saw this on Scoble’s link blog.  |  Comments

THE ACCIDENTAL BLOGGER is what I’m going to call what happens when a blogger writes a post that accidentally becomes far more important to their site than ever intended. I certainly never intended that racing frogs and the death test would be among my more popular threads, but there you …

[Via Scoble]

A while back I blogged about a hilarious Dave Chappelle skit called (and if you tend to read aloud, I recommend reading the next words silently) “The Niggar Family” (and please note that the derogatory N-word is spelled differently lest you flame me miserably).

Unfortunately, the search word that brings the most visitors to my site via Google is “Niggar”. Egads! A mispelling of a most offensive epithet is NOT what I want to be associated with. I can only hope that these users are indeed searching for the skit video and aren’t a bunch of bad spelling ignorant racists.

As you might guess, the search phrase that brings the most visitors is “Niggar Family”. That post has seen 7881 web views according to .Text’s reporting. In second place is the phrase “German Car Video” (25,981 web views). You’ll just have to watch it to see why.

My most popular post of all time is “Nerds Protest The RNC” (41,635 web views). It’s the photo of the sign with the html tag “</bush>.

So like Molly, I’ve had my share of being an Accidental Blogger. The day I write a technical post (the intent of my blog) that matches those numbers is the day I say to myself that has done good (thus exposing my poor grammar skills).

comments edit

I love me some electronic gadgets.

Take today for example, I was in the middle of a fantastic pick-up soccer game under clear blue skies when I received a page on the company Treo (I had it by the goal). A socket server service was down and needed to be restarted (long story, it will get replaced by something yours truly wrote).

A few years ago that probably would have required me muttering a litany of swear words under my breath while driving in to restart the malcontent service. But not this time baby! We live in the digitial wireless mini-this and mini-that age.

I took over as goalie for a bit, busted out the Treo, navigated to our secure administration tool on the web, and restarted that sucker (all while blocking a few deadly shots on goal). Life is good.