Books of Note

Practical Common
LispThe best intro to start your journey. Excellent coverage of CLOS.

ANSI Common
LispAnother great starting point with a different focus.

Paradigms of Artificial Intelligence
ProgrammingA superb set of Lisp examples. Not just for the AI crowd.

Monday, January 23, 2006

Commentary on "Lisp is Sin" 

I had great fun reading Sriram Krishnan's essay "Lisp is Sin" last week. Sriram works at Microsoft, so it was interesting to see some of his comments, particularly with regards to C# and how it compares with some Lisp features.

A couple things struck me. First, Sriram writes:

After looking at Norvig's implementation of memoization in his book, I set out today to do the same in C# 2.0. Here's what I wound up with after 10 minutes.

public delegate TReturn Function<TParam, TReturn>(TParam param);

static Function<TParam, TReturn> Memoize<TParam, TReturn> (Function<TParam, TReturn> func)

Dictionary<TParam,TReturn> memoDict = new Dictionary<TParam,TReturn>();
return delegate(TParam arg)

    TReturn result = default(TReturn);

        result = memoDict[arg];
        result = func(arg);
        memoDict[arg] = result;
    return result;



Is it as pretty as the Lisp counterpart? Probably not. But I'm willing to bet that a lot more developers will be able to understand this since this is in a programming language they understand well. And it gets the job done in most cases.

The final paragraph sums up a lot of Lisp vs. something-else dynamic. Smug Lisp Weenies read that paragraph and think, "So what. Learn to use the best tool." And they're partially right. If I built houses for a living, it would be so much better to learn about screwdrivers than to keep pounding in screws with a hammer, just because that's all I know and I want everything to look like a nail.

Where Smug Lisp Weenies fail is that they often don't provide much information for a newbie trying to learn. Fortunately, that seems to be changing.

The second point that struck me about the essay were the comments that followed it. It is amazing that with all the growth in Lisp awareness fueled by Paul Graham and Joel Spolsky recently, people still fail to see the advantages of Lisp. They take one look at the parentheses and head for the door.

Now, Smug Lisp Weenies often just roll their eyes and fail to educate as to why Lisp is better. Being new to the Smug Lisp Weenie order, let me break with tradition and try to share my experience.

  1. Lisp is actually the most simple programming language I have ever learned. Bar none. And I have learned more than a few. The core of the language itself could be specified in just a page or two. Yes, really. If you don't believe me, go read my comments on John McCarthy's original paper describing, Lisp, Recursive Functions of Symbolic Expressions and Their Computation by Machine (Part I).
  2. Everything else in Lisp is a library. Learning a library in one language is basically the same as learning a library in another language. The core of common Lisp could be nearly as small as the core of Scheme (identically small?), but Common Lisp packs a larger standardized library (essentially the functionality of many of the Scheme SRFIs). The main difference between Common Lisp and Scheme is one of heritage: Common Lisp was evolved and Scheme was designed. Common Lisp carries 40 years of baggage. Scheme was able to buff-off some rough spots. If I was designing Lisp again from scratch, I'd probably take Scheme as a core and then add back in a bunch of good ideas from Common Lisp, resulting in something that looks a lot like Common Lisp, but with Scheme's cleaner lines. (Honestly, I love Scheme, too. I think a 50-page spec is pretty cool.)
  3. Everybody balks at the parentheses. Don't. Honestly, they're weird for about a week and then you start to see them as a virtue, not a vice. In fact, I love the parentheses now. Yep, read that again slowly. I love the parentheses. It isn't just that they fade into the background such that you don't see them. The parentheses help drive Lisp's ultra-powerful code = data dynamic, enabling a macro system far superior to any of the simplistic template languages in C++. They allow smart editors to easily move around s-expressions. In short, they're great.

In any case, Sriram's essay made me chuckle. It was a good piece of writing from the point of view of somebody struggling with whether to commit or not. Some of the comments also made clear that Lisp's status as a Secret Weapon™ is safe for some time to come.

Friday, January 20, 2006

Figured it out? 

Okay, I may have figured out what Google reacted to. Now that my Adsense account is restored, I can log back in and look at the reports. Basically, on one day last week I got a very abnormal click spike. My click-through rate is less than 1% normally (which is fairly typical, I think). This one day it spiked to 19%. Heck, I'd have flagged that as a human.

I have no idea what caused it, but it certainly was fishy.

"And just like that it was gone..." 

This email arrived yesterday evening:

Hello Dave,

Thank you for your response.

We have reviewed your circumstances and have reinstated your account, effective immediately. However, there will be a delay before ads start running on your website. It may take up to 48 hours before all of our servers are informed of the change.

Thank you for clarifying your situation. We appreciate your patience, and apologize for any inconvenience. If you have any questions, please feel free to respond to this email.


The Google AdSense Team

Well, that's nice. It restores my faith in Google that at least there is somebody there metting out justice in some sort of way, albeit pretty anonymously. I still have no idea what triggered this event or whether it was really the clicks on my own Adwords which pulled the trigger somewhere. I guess I'll never know. But I'll never be clicking on my own Adwords again...

Do I fault the people at Google? The people, no. The system, yea, probably. Clearly, the fraud detection sensor needs some tuning. The humans handling the appeals seem to have at least a heart, if not names and faces.

That said, it's a hard problem. Google must deal with hundreds of thousands, if not millions, of publishers and doing right by their advertisers requires that they aggressively jump on anything that appears fraudulent. I sometimes have the credit card companies give me a call asking me dumb questions about my buying habits, too.

What I would recommend to Google is that the process be tweaked such that you allow the appeal to progress forward while you're still serving ads for a publisher. While something is in dispute, it's fine to defer paying out the disputed earnings, but I could see it being painful for a publisher with a lot of traffic. This process took about 3 - 4 days to resolve. For me, that's about half a cup of coffee from Starbuck's in earnings. If I had a top blog, that could be several hundred, if not thousands of dollars of lost revenue.

Well, file this whole incident under experience...

Thursday, January 19, 2006

Google's response 

I replied to the email that I got from Google the other day and received this in (automated) reply:


As you know, Google treats instances of invalid clicks very seriously. By
disabling your account, we feel that we have taken the necessary measures
to ensure that invalid clicks will not continue to occur on your site. Due
to the proprietary nature of our monitoring system, we're not able to
disclose any specific details of these clicks.

Publishers disabled for invalid click activity are not allowed further
participation in Google AdSense. However, if you can maintain in good
faith that the invalid clicks we detected on your ads were not due to your
actions or negligence, or the actions or negligence of others working for
you, you may appeal the closing of your account.

Google reserves sole discretion in considering whether to take any action
on an appeal.

In order to appeal the disabling of your account, please email us at with the details requested below.
Please compose a new email and do not reply to this message. We're unable
to consider appeals that do not contain all of this information:

- Your name

- Your company's name (if applicable)

- Your publisher ID number (located in the AdSense code on your website
with the format, pub-################)

- Your website's URL

- Date your account was disabled

- Your website's audience

- The source of your website's content

- Frequency of content updates

- The primary sources of your website's traffic

- The number of people involved with the administration of the site

- Any relevant information that you believe would explain the invalid
click activity we detected

If Google decides to evaluate your appeal, we will do our best to inform
you quickly and will proceed with appropriate action as necessary. If we
have reached a decision on your appeal, subsequent or duplicate appeals
may not be considered.

I'll be sending off an appeal and let you know what I find out when I hear more.

Update: It turns out that I had enough information to do this now (I didn't think I had my publisher ID number), so I banged out a quick note. Here's what I just sent to Google:

Hello, I was recently informed of my termination in the Adsense program. I would like to appeal that ruling. In an (I think automated) email sent from Google, it said to contact you at this address and provide the following information.

- Your name: Dave Roberts

- Your company's name (if applicable): NA

- Your publisher ID number (located in the AdSense code on your website with the format, pub-################): pub-***********

- Your website's URL:

- Date your account was disabled: I received the initial note from Google on Jan 16. I assume this was the date it was disabled.

- Your website's audience: Lisp programmers, of which there are actually a reasonable number at Google itself.

- The source of your website's content: Me, I guess. The site is full of Lisp-related information for programmers. I have written all the content other than blog comments and quotes. Probably the main attraction for the site is a blog I write (using Blogger, in fact) titled Finding Lisp. Interestingly, Blogger just highlighted it last month as a "Blogs of Note" on the main Blogger page.

- Frequency of content updates: Every few days, depending on my schedule. Typically at least once a month.

- The primary sources of your website's traffic: Good question. Most seems to come through RSS readers grabbing my Atom feed. The actual browsers of the site often come through, which is a Lisp blog aggregator. The high runners beyond that are from Google searches by people wanting more information on Lisp.

- The number of people involved with the administration of the site: just 1, myself.

- Any relevant information that you believe would explain the invalid click activity we detected: I don't know what the invalid activity was, so I find it difficult to respond to this. That said, I do admit to clicking on at least a few links myself. I would bet that the first click ever was probably myself testing whether I had gotten the HTML code from Google pasted into my sight correctly. Beyond that, I probably had < 10 clicks on adverts that caught my eye. In those cases, I was actually interested in the advert itself and was certainly not clicking with the intent to defraud Google or the advertiser. I blogged about one such encounter here:

If Google has detected fraud beyond this, I don't have a clue as to what it could be. I'm certainly not operating a click-fraud scheme or trying to juice-up my revenues with bogus clicks.

In conclusion, if Google detected me clicking on a few ads, then I'm probably guilty of violating the *letter* of the Adsense Terms and Conditions. I'm certainly not guilt of violating the *spirit* of those T's and C's, however, and would ask that you weigh this when making your decision. If it helps, this experience has certainly heightened my sensitivity toward clicking on my own adverts and you hereby have my promise to never do so again.

Thanks for your time and consideration,

Dave Roberts
Author of Finding Lisp

I guess now I wait for word from on high...

Tuesday, January 17, 2006

Click fraud comes to my shore... 

Okay, so this lands in my inbox yesterday:

Hello David Roberts,

It has come to our attention that invalid clicks have been generated on
the Google ads on your site(s). We have therefore disabled your Google
AdSense account. Please understand that this step was taken in an
effort to protect the interest of the AdWords advertisers.

A publisher's site may not have invalid clicks on any ad(s), including
but not limited to clicks generated by:

- a publisher on his own web pages
- a publisher encouraging others to click on his ads
- automated clicking programs or any other deceptive software
- a publisher altering any portion of the ad code or changing the
layout, behavior, targeting, or delivery of ads for any reason

Practices such as these are in violation of the Google AdSense Terms
and Conditions and program polices, which can be viewed at:

Publishers disabled for invalid click activity are not allowed further
participation in AdSense and do not receive any further payment. The
earnings on your account will be properly returned to the affected


The Google AdSense Team

That's it. I tried logging into my Adsense account and found:

Account Not Active

An AdSense account does not exist for this login, as it is associated with an unapproved application. For more information about your application, please review the message we sent to the email address you provided with your application.

I was a bit befuddled. I certainly haven't been operating a click-fraud ring. The ad volume hasn't yet paid for my hosting account charges, let alone allowed me to quit my day job. I admit to having clicked on a link or two myself, but only when I was truly interested in the actual advert (such as the Das Keyboard keyboard I talked about previously). Certainly, my clicks were limited events, not designed to fill my bank account. I just figured they would filter them out anyway using a cookie or some such.

So what is one's recourse when one is terminated with extreme prejudice by Google? Certainly, it's their service and they have a right to allow anybody to participate or not, but this feels a bit like a drive-by shooting where something just hits you out of the blue. If anybody reads this and works for Google and can get me to the right people over there to talk this though, I'd love to have a chat. Honestly, in the past I have found the folks at Google pretty fun and this note was certainly a surprise.

I'll be sure to keep readers updated as to how this progresses, even if I have to switch my blog to Typepad or something (using Blogger, I now find myself suddenly exposed...). I know little about click-fraud right now, but I have a feeling I'm going to find out plenty.

This page is powered by Blogger. Isn't yours?