CRUD Ain’t Hard

And now for a little exercise in armchair software architecture — the most despicable coder’s pastime. Dear non-coding readers: despite its name, this blog is still mostly not about programming. Just skip this post or something. Dear coders, many of you will probably disagree with me. I am not a very good or accomplished coder myself, and you probably should not be taking your advice from me. But then again, I could be right, so keep your mind open.

You might have been aware of the very popular, but uptime-challenged social networking tool called Twitter. They have one of the best problems to have: too many very active users. The site is so popular that it constantly goes down and displays and “over capacity” screen that the users have nicknamed The Fail Whale.

Rapidly writing and displaying short chunks of text with high concurrency on the web is not one of them unsolvable problems in programming. It’s not easy, but with right people and tools Twitter could be rewritten inside a month. Twitter founders should do some soul searching. Meanwhile the critical mass has already been reached, the niche for bloggers who want to SMS instead of blogging is big, and even horrible uptime can’t this service. I use it myself.

There is a lot of speculation in the blogocube about whether the reason behind the Fail Whale is the wrong choice of technology — the highly hyped and sexy Ruby on Rails and if it can “scale”. Or is it just simple incompetence?

To me Ruby on Rails falls into a class of technologies that are affected by what I call “the VRML syndrome.” Basically, if I wait long enough the hype will go away, the recruiters will stop posting job listings requiring 4 years of experience in a 4 month old technology, books as fat as my two fists will stop being published, and I will not have to learn it.

What’s the problem with Ruby on Rails? Well, it’s the same problem that slightly affects the content management system that I am currently working with (Drupal), and is the reason why I completely gave up using Microsoft web technologies which are saturated with this shit. See, software craptitechts all of a sudden decided that writing CRUD applications is too difficult for regular developers, and complicated GUI tools and frameworks need to be created to help the poor things. CRUD stands for “Create, Read, Update, Delete” and is just a funny way to say “a browser-based application chock-full’o forms”.

The default way to build these is to rather simple. You hand-code the html forms, then you write functions or classes to deal with the form input — validators and SQL queries for creating, updating and deleting. Then you write some code that will query the database and display the saved data in various ways: as pages, xml feeds, etc. None of this is difficult or non-trivial. Bad coders don’t do a good job of validation and input sanitizing resulting in the Little Bobby Tables-type situation, but these things are not very hard to learn and there are great libraries for this.

Ruby on Rails makes it very easy to create CRUD apps without hand-coding forms or writing SQL. RoR goes to great lengths to abstract out SQL, not trusting the developers to do it right. SQL is more functional than procedural, and thus a difficult thing for many programmers to grasp, but it’s not that hard. Really. SQL is located far enough levels from the machine that abstracting it out becomes a horrible thing due to the Law of Leaky Abstractions. Even when you have full control of SQL queries optimizing them is sometimes hard. When they are hidden by another layer it becomes next to impossible.

In short, RoR makes something that is easy (building CRUD apps) trivial, and something that’s hard – optimizing the database layer next to impossible.

In Drupal there are two modules, CCK and Views that allow you to create CRUD entirely through web interfaces. This is a feature that exist in just about every major CMS, it’s just that in Drupal it’s a little buggier and overcomplicated than necessary. These are fine for small websites and are really useful to amateurs. The problem arises when these are used for high traffic websites.

I think that a lot of people will agree with me that writing HTML and SQL queries using GUI tools is amateur hour. You just can’t make a good website with Microsoft Front Page. You can’t, you can’t, you can’t. But in Drupalland it’s all of a sudden fine to use Views to build queries for high traffic sites. Well, it’s not. Dealing with Views and Views Fast Search has been an ongoing nightmare for me. Hell is not even other people’s code in this case. It’s other people’s Views.

RoR, Views, CCK are one level of abstraction higher than you want to be when building a high performance application. The only way the can be an “Enterprise” tool if your enterprise is a) run by a morons that require 100 changes a day AND b) has very few users. In short, if it’s an app for the HR department of a company with 12 employees – knock yourself out. If you are building a public website for millions of people – forget about it.

Your, Deadprogrammer.

P.S. Yes, I know, you can abstract just about everything and reduce your software application to a single button labled “GENERATE MONEY”. You have to be a very smart LISP developer for that.

Note From the Past

For years now I’ve been writing down ideas on post-it notes, index cards, napkins and other various pieces of dead trees and storing them in a special folder. Over the last couple of weeks I’ve been organizing my notes into an absolutely gorgeous Circa 3×5 note taking system that I splurged on at Levenger. This little note seems to be from 2002-2003 judging by my handwriting style. It was definitely before Digg and Stumbleupon:

Silence is Golden

Somehow, the less I write, the more readers I get. Or seem to get. At least, according to Feedburner.

To be honest with you, I lost some blogging motivation when I could not break the 800 reader barrier for such a long time. Also, not one reader left me a comment after my customary self-made New Year’s card. The one lonely comment is from someone to whom I bitterly complained about this terrible injustice and thus does not count.

Just in case you cared, the seeds that I harvested from the pine cone given to me by a kind Rockefeller Center security guard, spent some time in a fridge and were planted. Well, in fact, I misplaced the packet with most of them somewhere on my desk, but the few that were planted resulted in one baby Rockefeller Center tree.

What Do I Know About What People Like?

As you might have noticed, for all my ranting about redesigns, I went ahead and redesigned my own site. It took me all of 3 hours. I changed the template a bit, fixed a nasty WordPress search bug that inserted unsightly escape characters into search strings, changed all the urls for more search engine friendly ones (while preserving all the original ones) and made navigation arrows a bit more consistent. Fascinating stuff, isn’t it? This is all a part of my effort to finally get over the thousand reader mark on the Feedburner counter. It stands at 915 today (and I used that counter graphic as one of my Optimus Mini’s applets).

I get a lot of Google and Google images traffic, as my humble blog is the second search result for “starbucks logo”. After reading my article about the Starbucks Melusine, most visitors just scamper away. I realized that I need some kind of a hook at the end of the page. I added the easy subscribe buttons, links to del.icio.us , Digg, Reddit and Netscape and a sampling of what I think are some of my better posts.

What I think are my better posts are, probably is not what you, the readers, think. So, if I may be so bold, please tell me what posts do you think should make “Best of Deadprogrammer” list, as well, as which particular post made you subscribe to my rss feed (or to bookmark my site). Also, in an effort to overcome the 1K reader barrier, I will even stoop so low, as to ask all of you for a link, if you can spare one. The thousand reader barrier must be broken.

Speaking of statistics, here’s a comparison of Feedburner’s breakdown. Since 2005 I went from 47 readers to 915. I am surprised to see a decrease in Livejournal readers since I quit it. Well, what can you do. I think I should give up my blog and move to Myspace. That’s where all the cool kids are and where most of my image traffic is coming from, even after I played a bit of a trick on them.



Take That, Rupert

The majority of deadprogrammer.com traffic these days consists of myspace.com users hotlinking images. I really don’t mind hotlinking, in fact, I encourage it, but the thing is myspacecadets never ever link back to me. It’s common courtesy – if you use somebody’s image as well as server resources, provide a link back.

Well, now I use this little snippet of code that in my .htaccess file to replace any hotlinked image from myspace.com with a tasteful ad for deadprogrammer.com:

RewriteEngine On
RewriteCond %{HTTP_REFERER} ^http://(.*\.)?myspace\.com/ [NC]
RewriteRule \.(jpe?g|gif|png)$ photos/hotlinked.jpg [L]

All of a sudden, hundreds of popular myspacers are promoting me:

Classy. If you have a better idea for a replacement image, let me know.

The Russian Tea Room Syndrome

 

“Man told me,” He said, “that these here elevators was Mayan architecture. I never knew that till today. An I says to him, ‘What’s that make me– mayonnaise?’ Yes, yes! And while he was thinking that over, I hit him with a question that straightened him up and made him think twice as hard! Yes, yes!”

“Could we please go down, Mr. Knowles?” begged Miss Faust.

“I said to him,” said Knowles, ” ‘This here’s a research laboratory. Re-search means look again, don’t it? Means they’re looking for something they found once and it got away somehow, and now they got to re-search for it? How come they got to build a building like this, with mayonnaise elevators and all, and fill it with all these crazy people? What is it they’re trying to find again? Who lost what?’ Yes, yes!”

“That’s very interesting,” sighed Miss Faust. “Now, could we go down?”

Kurt Vonnegut, “Cat’s Cradle

The Russian Tea Room, once a popular restaurant created by ballerinas and danseurs (aka male ballerinas) of the Russian Imperial Ballet for themselves and their friends. Later it became an expensive restaurant for the Manhattan high society. In 1996 the new owners closed it down for 4 year and $36 million renovations. In 2002 the restaurant closed, and the owners were bankrupt. In the aftermath, one of the chefs, M.D. Rahman, can be found on 6th avenue and 45th street selling some of the tastiest street food in Manhattan. I bet he’s making more than he did back at the Russian Tea Room now with his little cart.

In the parlance of the Internet this is known as a “redesign” or a “relaunch.” If you are making a living out of web development, like I do, chances are that you participated in a vicious cycle of web site redesigns. They usually happen like this: managers decide to do it and get funding, a lot of meetings follow, specifications are written (or not), arbitrary deadlines are set, designers create graphical mock-ups, then coders swarm and engage in what’s referred to as “death-march.” Managers change their minds about the look and feel a few times during the death-march for an extra morale boost. Finally, a redesigned website launches. Managers start planning the next redesign right away.

In the olden times the CEO’s nephew often got the web design job. Well, these days the nephew grew up, he has a consulting agency. “This is old and busted, let me redesign this mess and you’ll get new hotness” – he says. Pointy-haired bosses everywhere nod and say – “yes, yes, new hotness”, and the cycle keeps on going, redesign after a redesign.

There are a few different types of redesigns. Firs of all, there’s changing the look. In the simplest and best form, this is a very quick deal, especially if the site is properly architected for quick changes. It’s like taking your plain vanilla cellphone, buying a snazzy faceplate, one click – instant new hotness. I have nothing against this sort of redesigns.

The only thing you have to look out for here is what I call the “Felicity effect.” A television show Felicity had a famous redesign failure – the actress Keri Russell cut her trademark long hair. One might argue that she is hot no matter what, but the show suffered a huge drop in ratings. You have to keep in mind that a new look rarely attracts new customers, but often upsets the old ones. For instance, I like Keri’s new look, but I would not start watching that show.

The second type of a redesign involves changing the underlying technology of the site. One might change the content management engine, database engine, rewrite the site in a different language, make it run on a different web server, different operating system, etc. These usually turn out to be the most disastrous and costly of redesigns.

Joel Spolsky wrote about “… the single worst strategic mistake that any software company can make: … rewrit[ing] the code from scratch.” In the web publishing world these kinds of rewrites cause a lot of grief and devastation. A huge technology change always requires a lot of debugging and fixing afterwards, and as soon as most of the bugs are fixed, a new redesign comes around, because, see, ASP.NET 2.0 C# is “old and busted” and Vista Cruiser Mega Platform D## is “new hotness.”

I am not talking here about replacing a technology simply because it does not work or is dangerous. But redesigns are rarely aimed at fixing things – they are done in search of hot technologies and hot looks. By the way, amongst pointy-haired web execs fixing things is less glamorous than perusing new technologies, and that is less glamorous than changing the looks.

A building superintendent I know was in a middle of a huge project – repairing three old and unsafe elevators as well as fixing the crumbling facade of the building. Although the repairs were crucial, they did not earn him the love of the tenants that the old superintendent enjoyed. The old super, instead of fixing broken things, engaged in an almost constant painting projects, changing the color of the paint every time just a little bit. And when he wasn’t repainting, he would leave out the paint bucket and a brush on some rugs in the lobby.

The web execs often go for the best of both worlds – equivalent to changing the foundation of the building (and not the old one was sagging), as well as painting it a new color at the same time. The full Monty web redesign is what the pointy-haired want.

Let’s take a look at the sense that such redesigns make from a capitalist point of view in an area that I know well — web publishing. Web publishing businesses work just like any other. You take some money (aka capital), you spend that money to produce something and you hope that that something makes you even more money one way or another. In economics this is known as Marx’s general formula for capital: Money-Commodity-Money.

Another thing that I faintly remember from my economics class is a rather disturbing concept called “opportunity cost“. See, when you invest money in something you instantly incur this cost. Why? because you can’t invest your money twice, and there always seems to be something you could have invested in that would give you a better return. Let’s say it’s 1995 and you are an editor in, oh, Random House or HarperCollins. You have a budget to publish some children’s books and there’s a pile of proposals on your table. You pick a few. They make money, win awards, etc. Yet, the opportunity cost on every one of those books is about a kajillion dollars, as in that pile there was a certain book by a woman named Joanne Rowling.

In theory, any web executive’s first objective should be to make, and not lose money. Also they should look to minimize the opportunity cost whenever possible. This is of course not the case for many of them. They are thinking: hey I have this fat budget – I can do a big redesign, or …. hmm, what else can I do with that money so it will make me more money?

So how would one go about increasing profits? In the web publishing today content is once again king because of the maturing web advertising, vast improvements in hosting costs and google-inspired web indexing and searching. This was not the case in the earlier days of the web, but now you can directly convert “eyeballs” into profits. The process is rather simple: you create web pages, users visit them, you show users ads (for which you are paid). The relationship is linear – more users = more ad impressions = more money.

So, first of all, you might produce more pages. With search engines like Google, even pages that are hidden in archives of your website will still produce pageviews. The more pages you add, the more revenue you’ll get. In fact, pages with useful information, once placed online become something very dear to a capitalist’s heart – an income generating asset, the very thing that the author of Rich Dad, Poor Dad is so excited about. They are like the geese that lay golden eggs.

The cost of producing more pages comes from three sources: the cost of content – you need to pay someone to write, take pictures, etc; the cost of placing it online – “web producers”, the people who write html, create hyperlinks and optimize images draw a salary; and the cost of hosting/bandwidth – if you are hosting huge videos you costs might be more than what you can get from advertising, but if it’s just text and pictures you are golden. As you surely don’t expect the Spanish Inquisition, there’s the fourth cost: the opportunity cost of showing this content for free, instead of asking for subscription money. The main thing to remember, once the content/feature is created, the costs to keep it online and generating money is trivial.

Besides producing more content, there are other ways of making more money. One might improve the relevance of ads on your pages. If you have a third party ad system, you are pretty much can’t do that. But if you have your own, you might create mechanisms for serving super-relevant ads. Sometimes you might add e-commerce capability to your content website. For instance, if you have a gadget review site, injecting opportunities to easily and cheaply buy the gadgets that you are writing about will likely bring in more more money than machine generated dumb ads.

One might create content that is more valuable to advertisers. For instance, keywords such as “mesothelioma lawyers”, “what is mesothelioma” and “peritoneal mesothelioma” generate ridiculous costs per click on Google’s AdSense. If creating content about “form of cancer that is almost always caused by previous exposure to asbestos” that is so popular with lawyers is not your piece of cake, you can create content about loans, mortgages, registering domain names, etc.

Then we enter the murky waters of web marketing, and especially “SEO” – search engine optimization. In short, if you get other websites to link to your pages, you will get more vistits, partially from those links, and even more importantly, because search engines will place your pages higher in their results. The hard, but honest way to do this is to produce unique, interesting and timely content. No body’s interested in that. Encouraging the readers to link by providing urls that never change and even “link to us” buttons is not in vogue: most web execs prefer non-linkable flash pages. Another way is to pay for links – in the best case for straight up advertising, in the worst case – to unscrupulous “link farm” owners that sell PageRank. Then comes the deep SEO voodoo – changing the file names, adding meta tags, creating your own link farms and hidden keyword pages. At the worst, there’s straight up link and comment spamming. Unethical methods of promoting your business work: Vardan Kushnir who spammed the entire world to promote his “Center for American English” had enough money for booze and hookers, but not many people shed a tear for him when he was brutally murdered (maybe even for spamming). In corporate world the equivalent is the PageRank ban from Google.

So, you could spend your money on all of these things that I described, and hopefully make more money. On the other hand, redesigning a website from top to bottom to make it “look good” or “more usable” will not bring in more “eyeballs”. A redesign of a large site takes several months for the entire web staff. The possible positive aspects of the redesign are these:

1) Faster loading pages
2) Easier to read text
3) More straightforward navigation
4) Cleaner look
6) Bug fixes
7) Switching from a more expensive software and hardware to cheaper

Existing users will probably like you better, but will new ones all of a sudden descend onto the redesigned site? Not likely. In fact, some think that the ugliness of MySpace design is an asset rather than a drawback. People want something from websites. Be it news, funny links, videos, naked pictures, savings coupons or product reviews, design does not matter too much to them. If they can click it, read it and (for the valuable geeks with blogs and websites) link to it – users are generally satisfied.

Here’s an example of a well executed major redesign of a high profile website, the New York Times. NYT always had a well designed website, and the new one is pretty nice too. But is there a lot of new traffic? Here’s an Alexa graph.

At the worst redesigns bring:

1) Broken links (sometimes every single url changes and all links from outside break)
2) Heavier graphics, proliferation of Macromedia Flash
3) Slower loading pages
4) Loss of features and content
5) New bugs
6) New software and licensing costs, more expensive servers

Often this is all that they bring. Broken links hurt the search engine positioning. New software costs money. It takes a long while to work out the bugs.

Here’s an Alexa graph of another major redesign on a website, which name I’d like to omit. Just as the traffic recovered after a big redesign in 2000, a new one hit in 2003. It seems to be recovering again.

The thing is, many businesses are very robust and the disastrous effects of web redesigns do not kill them. Pointy-haired bosses make their buddies rich, while getting kudos for the redesigns. Everyone stays busy, and software companies get to sell a lot of server software.

Poll

I know, I know. My blogging frequency isn’t what it should be. I am trying to improve though. And you can help me by voting on what the next post should be about right over here.

Update: I am supposed to have about 900 rss subscribers if I am to believe Feedburner statistics – and guess what, only about forty people voted. Turnouts like this make me want to quit blogging sometimes.

I am still working on a post about web redesigns, probably will post it today.

See No Evil

I don’t care what Sergey says; I think that google.cn is evil. Writing about this in a blog that runs Adsense advertising would be more hypocritical than I usually am, so I removed all Adsense advertising and replaced it with my own ad.

There. Look at me. I am claiming a slightly higher moral ground.

I guess I’ll continue using google.com and gmail.com since I am nothing but a drain on their resources anyway. I can’t recall when I clicked on an ad there last time when and it wasn’t a “pity click.” My guess is that they are making their bajillions of dollars from clickbots .

New Billboard Day Effect : How to Advertise More Effectively on Your Blog

Advertising. “The Engine of Commerce”. Ideally, it should work like it does in the Simpsons episode 2F12 “Homer the Clown”:

“In the middle of driving down the highway, Homer skids to a halt in front of a billboard.

Homer: [gasps] It must be the first of the month: new billboard day!

Homer: [reading] “This year, give her English muffins.” Whatever you say, Mr. Billboard! [skids off]
[stops suddenly at another billboard for barbeque sauce]
[cars collide behind him and explode]

Homer: [reading] “Best in the West.” Heh heh heh, that rhymes!
[looking at the next one] “Clown college”? You can’t eat that.

At the power plant, Homer piles his purchases (including MSG, “Best in the West”, and English muffins) at his work station. “Well, I got everything I was supposed to get. I’m not going to enroll in that clown college, though…that advertisement had absolutely no effect on me whatsoever. In his daydream, he imagines himself sleeping and dreaming of himself eating a sandwich. The billboard for the clown college batters its way into his thoughts. The Krustys on the billboard start dancing to circus music.”

Of course, Homer enrolls in the clown college. Having never enrolled in a clown college because an ad told us to, we all go on thinking: “advertisement had absolutely no effect on me whatsoever.” It can’t possibly be true: bajillion dollar industries, such as advertising don’t simply exist if they are not effective.

During the dot com bubble even large companies mostly failed to earn much from banner ads. Even the heaviest online ad campaigns did not seem very effective and suffered horrible clickthrogh rates. Online ad companies escalated the war for clickthroughs by inventing obnoxious popunder, popover and floater ads. The more the ad was like a flash-bang grenade mistakenly used by NYPD on an elderly woman, the better. For instance, many sites started using larger sizes of vertical banners known as “Skyscraper.” That was not enough though – extreme, flash-driven skyscraper ads with movies and sound, capable of crashing browsers and known as “Godzilla” and “Pagekiller” started to appear.

The founders of Google decided to address this issue, and as a result, made bazillions of dollars. As a former googler remembered:

” Besides, Larry and Sergey hated these kinds of advertising. In fact they hated most kinds of advertising as inefficient, dishonest and a total waste of people’s (meaning their) precious time.”

We all know that AdWords and AdSense, Google’s advertising programs managed to earn so much money through unobtrusive, mostly text ads. The winning strategy was “relevancy”. Google’s server would read in the page where the ad were to appear, and serve up a relevant ad.

For instance, after parsing pages on chupaqueso.com, a site dedicated to a cheese snack invented by web cartoonist Howard Tayler, in theory shows ads about cheese. And after reading about chupaqueso’s cheesy goodness, I might indeed be in the mood to buy some cheese online.

On the other hand, the AdSense algorithm is not too efficient. On some pages in the abovementioned site it serves ads like this:

Yes, indeed, amongst Howard Tayler’s readers there are a lot of computer geeks. I know I am not a typical web user, but I am a pretty typical web developer. And I have zero desire to “Boost XML app performance.” I also have all the “ODBC drivers” that I need.

Many of you, my readers, are bloggers or have regular web sites with AdSense ads. Look at them. How many you’d say are “inefficient, dishonest and a total waste of people’s … precious time”?

I say – about 99.5%. And clickthrough ratios are pretty horrible. People try to tweak them by playing around with ad types, look and feel, positioning and excluding advertisers, but it’s all rather ineffective.

Google’s ads only pay if people click on them. In the TV, billboard, magazine and the type of advertising that people tattoo on their bodies there’s no such things as clicks. You get paid depending on how many people see the ad. It works really well if you need to make people remember your company’s name or logo.

Side Note:
When I was little, in Odessa ( Ukraine, Not Texas) somebody scribbled in almost every public phone booth “[Some girl’s full name] is a whore.” In a city of about a million people this worked like a charm. The mindshare that that advertisement delivered must have been off the charts.

These 99.5% of unclickable ads can be divided into two categories: a) ad campaigns that build brand’s awareness almost for free and b) those that indeed waste everyone’s time and money.

I don’t think I ever clicked on any Vonage ads, even though I’ve seen thousands of them. They worked without any clicks — if I did not also know that their customer service sucks and reliability is horrible, I’d have their VOIP service now.

The ads that nobody ever cares about still do get some clicks. When people come by a useful and interesting site, they tend to click on random ads so that the site owner would get some revenue. This is the untraceable portion of a much scarier phenomenon called click fraud. I am not even going to address this here.

In short, I feel that even though Google’s ads are a step in the right direction, AdSense sucks, especially for a blog with a smallish audience, such as mine. The useless, stupid ads that clog AdSense are a waste, even though they might generate a few “pity clicks.” Only half of my ad revenue for the site came from AdSense last year. The rest came from my experiment that I think will be of great interest to everyone.

My thinking went like this: I want to serve ads that are extremely relevant to my blog posts and interesting to my audience. Even more importantly, they must be selling something that I would be interested in. Ads I’d click on.

When you have limited advertising space, the problem with AdSense is that it often tries to sell things that your readers don’t want. What you want to do is advertise things that people aready want. As an example of such salesmanship, let me direct you to a post on the very popular waiterrant.net, where The Waiter describes selling dessert to calorie-conscious women:

“”Ladies,” I say sweetly, “We have some excellent desserts tonight.”

“Oh, nothing for me,” Bubbly Blonde replies.
“No dessert,” Severe Brunette says, holding up her hand.
“Me neither,” Lawyer Babe says firmly.

The fourth woman, a Soccer Mom type, looks at her companions and sighs. She wants dessert.

I see the longing for chocolate in Soccer Mom’s eyes. She’s my weak link. My in.

“Would anyone like some coffee?” I ask. Suggesting coffee is the first stage in selling dessert to calorie resistant ladies.”

“The ladies pay the bill, tip well, and leave. As I watch them go I think about how I got them to order dessert. To be a good salesman you have to have a seductive quality about you. Don’t believe me? Look at pharmaceutical reps.”

That’s what I want to do! This means that I need to find something that will be the equivalent of selling chocolate dessert to Soccer Mom types.

I believe that my 1000 readers are a lot like myself. And what do I spend a huge amount of money on every year? Books, movies, cds and gadgets. Also I purchase some rather esoteric items on eBay too, but the majority of my spending happens squarely at Amazon.com. My wishlist there is humongous, and in fact, I spent my advertising revenue there.

Luckily, Amazon has a pretty generous associate program. You can link to any of the products they sell and get a cut of the sale price, if the sale happens as a result of your clickthrough. In fact, you get a cut of the entire shopping cart amount (I am not sure, this could be only the items that were added after the click). In any case, it’s decent money, and most importantly, a great selection of new and even used items to sell.

What to sell, of course depends on your audience. I found some success selling items that tempt me. In fact, many times it’s the items that I am planning to buy or already bought.

In some cases, relevancy is important. My article with pictures from Fog Creek’s party sold 4 or 5 of Joel’s books. It was a combination of a very desirable in this particular audience product with a closely related article. Interestingly enough, I tried to sell the toy that you can see in the picture as well, but none sold. As I own both books and don’t own the toy, this seems logical.

I might have tried selling flat panel monitors and Aeron chars (WOW, Amazon sells them too! ) ,that make Joel’s office so nice (in fact, at home I have the same exact dual monitor setup, an Aeron chair and a window with a view, and I had id before Joel wrote about his bionic office). These are big ticket items though, and the likelihood of someone buying them on a whim is lower. But then again, so are rewards.

The relevancy does not matter as much as I thought, though. For instance, I advertised “Make” magazine subscriptions and Shure E2c headphones, and sold a few.

In fact, I think that the approach to selecting products should be somewhat similar to the one that Kevin Kelly uses for selecting items on his website Cool Tools:

“Cool tools really work. A cool tool can be any book, gadget, software, video, map, hardware, material, or website that is tried and true. I am chiefly interested in stuff that is extraordinary, better than similar products, little-known, and reliably useful for an individual or small group.”

In short, advertising video iPods is good, advertising “The world’s greatest 3D IM” is not!

Side Note:
My former co-worker won a $300 gift certificate for a certain gadget catalog in a contest. Now, he’s a guy who spends a lot of money on gadgets, like the uber geek that he is. I mean, he owns planetofthegeeks.com domain. But despite that, he had a lot of trouble picking something to spend $300 of free money on in that catalog! Not only was everything overpriced, but there were very few things he’d be interested in owning!

The great thing about selling items from Amazon is that you know that the prices there are very Wal-Mart-like, and most of your readers already shop there. Some people prefer not to patronize Amazon because of software patents or other issues, but there are “organic” alternatives, like for example Think Geek (in fact they sell through Amazon too).

The one gripe that I have with Amazon is the difficulty in creating the links. The tools that they provide want you to use iFrames to create image wrapped links, which of course do not work well in RSS Readers. This brings me to my final point, the specifics of blog advertisement.

A blog is a two-sided entity: it generates page views from people who don’t use RSS aggregators and those who come in from search engine referrals. And then there are the views from within RSS aggregators, in case you are serving up the entire text of the article in the feed. Some blogs don’t do this, serving up only the title or a title and a teaser. The thinking is, readers will click through to the page where they will see ads and thusly generate revenue. Some do this because they don’t serve ads and want to limit their traffic, and yet some do it because they use a default setting in their blogging software and don’t know better.

The great thing about my advertising scheme is that you can serve ads in-feed. A New York blog Gothamist, for example serves atrociously uninteresting ads that repeat. At some point they had a long run of a flashing ad for something that made me unsubscribe from the feed. If they started selling interesting items, they could greatly increase their advertising revenue.

Advertising my way does not detract from regular content and isn’t cheesy. It is clearly marked, unlike those fake editorials in magazines and newspapers. Advertisement can be entertaining in itself! Since the early years of Sears, Roebuck and Co. catalog, people look through catalogs like Levenger, Victoria’s Secret Penzeys Spices and Think Geek for fun! My wife has a lot of gardening catalogs that she looks through now and then. After finishing an interesting post, readers would not mind learning about an interesting gadget or book they might want. In fact, they might already be in the mood to buy it! There is no reason to serve partial RSS feeds with this type or advertising.

P.S. I turned off comments to this article because for some reason it attracts a ridiculous number of spam comments. If you would like to contact me, see about the author section. I also changed to a different way of displaying Amazon’s related items.