Just Take The Money!

June 30th, 2008

It’s really amazing how many web sites have broken shopping carts in one form or another. It’s the ultimate form of stealing defeat from the jaws of victory. The favorite is always shopping carts that time out. Nothing like throwing your customers out of the store after they’ve decided to purchase from you.

British Airways seem to have perfected the art of displaying an error page just when you were pulling out your credit card. Bonus points for reporting that their systems aren’t responding as if that actually means something to the user who just got a response from their systems - the error page.

Recently though I’ve come across a few more creative ways to not make money. It turns out that Google Checkout, at least as implemented for Google Site Search is just a tad bit buggy - instead of taking you to a page to fill in your details it refreshes the current page. So you select your product, click checkout and are asked to select your product again. Pure genius!

Oh and reporting it to Google won’t help - they don’t answer emails, even when you can find the contact us form.

Open Questions For The App Store

June 28th, 2008

Paul Kafasis has some good questions around how the iPhone App Store will work. I found the last one interesting though:

What about other pricing concerns?
Currently, we have a coupon system in our store, we can offer upgrade pricing for users who've purchased old versions, we can offer volume discounts for large purchases, and much, much more. All of these things, and more, help our bottom line. We'll want to do them with iPhone Apps, but will we be able to?

and the final comment:

The initial App Store launch is certain to have rough edges, as Apple just doesn't have any experience in being a software publisher for other developers.

Apple may not have experience being a publisher for developers, but it has a lot of experience being a publisher and it’s heard these kinds of questions, very loudly and very forcefully before.

I believe the answer was 99 cents.

Aim Higher

June 24th, 2008

Someone came up with a cool idea to add a universal edit button to make editing wikis easier. It adds a button like for RSS feeds that redirects the browser to the edit page. It’s clever but it aims way too low. If you can get browsers to add an editing button you have an opportunity to either point to an online form or a standalone application that could also edit the page. In other words, Atom Publishing Protocol auto-detection.

It would be a great shame if such a spec were limited to just redirecting to a HTML page or if it were thought of as a useful feature for wikis instead of a useful feature for the internet everywhere. Let’s face it, nearly every page on the internet can be edited by someone and I’m sure they’d appreciate it being easier to get there. Just look at the number of content management systems that provide some form of inline editing (heck RedDot renamed their company after the red dots that you clicked on inline to edit a section).

More On NewsGator Syncing

June 22nd, 2008

Got a couple of good comments on my last post about NewsGator Syncing that I thought were worth following up on. Firstly, Greg Reinacker points to the article I had in mind about how NewsGator polls the feeds, and Andy pointed me to this forum posting about it which shows how to see why feeds aren’t updating.

When I go and look at my feeds I find a whole bunch reported as having errors from the source of the feed - obviously why they’re not updating. There’s just one problem, even Andy’s comments are marked as broken:

Comments for Andy's blog All Error from the source of the feed 6/22/2008 12:37

So Andy, when did you break your comments feed, how do you plan to fix it given that it’s hosted by WordPress.com and what do you think the chances are that it was a temporary error that’s now caused NewsGator to barf and stop pulling down your comment feed?

It gets worse:

Google Blog Search: EditLive All Authentication failed 5/16/2008 1:17:27 AM

So did Google screw up or did NewsGator? I think you can toss a coin on that one. After going through and pinging all my feeds there’s suddenly 41 new items from those dead feeds dating as far back as February that NewsGator was hiding from me.

I think Greg’s posted summed up the problem with the current approach nicely:

Something I’ve been thinking about is some kind of status page or something where someone can type in the name of a feed, and we’ll display status for that feed (including why it’s in the penalty box if it is)…we’ve resisted doing this because it’s just one of those things our users shouldn’t have to worry about.

User’s shouldn’t have to worry about this! NewsGator needs to do a much better job at pulling feeds back out of the penalty box or better yet, get rid of the penalty box altogether. There are just way too many feeds out there that are broken in some way and way too many ways that a site might time out because of connection problems between NewsGator and them or a maintenance window or whatever. I just want to read the news when it comes through and I want NewsGator to stop getting in the way and make that happen.

PS: Apologies for the number of comments that have been incorrectly marked as spam, the anti-spam system isn’t working out too well and the feed that notifies me of marginal comments to review was being eaten by NewsGator (they had some down time a while back so it obviously got permanently moved to the penalty box).

Variable Declarations

June 20th, 2008

Jef Atwood has discovered the implicit variable type declaration in C#:

BufferedReader br = new BufferedReader (new FileReader(name));

Who came up with this stuff?

Is there really any doubt what type of the variable br is? Does it help anyone, ever, to have another BufferedReader on the front of that line? This has bothered me for years, but it was an itch I just couldn't scratch. Until now.

Actually, there is a question about the type of br - it could be a BufferedReader or it could be any superclass of BufferedReader and sometimes that distinction is important.  The most common example of this is in the collections API:

Map data = new HashMap();

Why not just call it a Map? Well let’s say you later want the map to be sorted, then it simply becomes:

Map data = new TreeMap();

And none of your other code needs to change. You’re guaranteed to not be using any HashMap specific methods because the compiler won’t let you and it’s quite clear that the intent is to work with a Map instead of specifically a HashMap. Saving a few extra characters really doesn’t give any benefit for either reading or writing.

What I find most fascinating about this, is that the example touches on the most verbose, confusing and frustrating (yet powerful) part of writing in Java - the IO library, and then complains about the type system. Here’s the real problem in that line of code:

new BufferedReader(new FileReader(name));

Do you have any idea how many people forget to wrap the FileReader in a BufferedReader and destroy the performance of IO (and then blame Java)? Why isn’t that something simple like:

Reader reader = new File(name).read();

Call the method name wantever you want and there’s a bunch of variants on this, but just provide a single method that does what the programmer almost always wants to do. If unbuffered, serial access to a file is ever desirable (when???) then provide an additional method that takes a boolean to let you turn off buffering but just make it simple.

Why people are obsessed with type systems as the harbinger of productivity is just beyond me - it’s the design of the libraries stupid! That’s why PHP feels so messy to write. That’s why Java feels so verbose to write. That’s why ruby feels so easy to write - it provides so many of these really handy shortcuts. No amount of syntactic sugar or changes to the type system is going to change that, because most of your code is dealing with the libraries, not the syntax of the language.