Archive for the 'Code' Category

OpenID Is For the User, Not the Developer

I’m in the primordial stage of building a site which requires authentication, and I decided it was high time I dug into OpenID. At first I was thinking that this would be a way to avoid creating a native user authentication system — yay, less work, right?

Not necessarily. Not everyone will want to use OpenID; you don’t want to be turning away potential users who are confused or put off by an OpenID login. Conventional wisdom, therefore, is that you still have your own authentication system which people can sign up for, and not force people to understand/use OpenID.

As a developer then, you are suddenly faced with the prospect of implementing both your own user/password table and authentication, and allowing interested users to use their OpenID, if they elect to do so. Wait — we just went from less work to more work — why in the world would anyone want to do that?

The answer is simple, and, if you step out of your developer shoes, is obvious: the convenience of OpenID isn’t for you (the website developer) — it’s for your users.

No, using OpenID doesn’t make your web application simpler to design and code. But, for those users who are or will be using OpenID, it makes authentication a lot easier for them. That’s the idea.

And it’s a good idea (though Tim Bray had some interesting objections to OpenID… I’m not sure if these have been resolved since he wrote this).

For those who are using OpenID, allowing it on your site is basically a way of saying that you care about making their user experience more convenient. I find it hard to argue against that logic.

Displaying a Gmail ATOM Feed In Google Reader

So, not too long back, I thought I’d solve the “bacn” issue by having my notification emails automatically labelled “bacn” in Gmail, and then automatically archived. Trouble is, I’d then need to remember to check that label from time to time, so that I wouldn’t miss something I might actually want to know (ie, a Basecamp project has a new note, etc).

The obvious solution seemed to be an RSS feed; GMail does automatically supply feeds of all your mail, or of just one label; perfect!

It turns out, not so perfect. Because your email is, for obvious reasons, secure, getting at the feed requires authentication. Well, I’ve been using Google Reader (for so long that I really don’t want to bother switching), and Google Reader does not support authentication for feeds.

That’s right: Google’s RSS reader can’t read Gmail’s own feeds.

So, I finally got sick of reading my bacn label from time to time, and set up Magpie RSS in a directory on another server.
Continue reading ‘Displaying a Gmail ATOM Feed In Google Reader’

@Groovy: Gratuitously Verbose Hello World’s? Really?

Okay, I just linked to Groovy in my last post, so I started reading down the page… there I found this example of a “simple hello world script”:

def name='World'; println "Hello $name!"

Um, yes, that is simple but… if the point of a “Hello World” is to produce what may just be the simplest possible script that actually does something (so you know it worked), why would you include a variable? Really, I really want to know. Wouldn’t

println "Hello World!"

be more in the spirit of the exercise?

Don’t even get me started on Object Oriented versions of “Hello World.” That strikes me like saying, Just to show you how this might work, lets make a nuclear-powered tricycle….

Ruvi — Vi(m), implemented in Ruby

I’m not even going to broach the question of whether or not this is A Good Idea: it allows me to put “ruby” and “vi” in the same sentence, and that sentence is not simply “I edit ruby in vi.” That alone qualifies it as relatively awesome.

Ruvi is billed as a “100% Pure Ruby Vi(m) Clone”.

Gruvi.

(sorry)

Rails vs. Django

There looks to be the beginnings of an interesting flamewar discussion of the relative merits of Rails vs. Django over at news.ycombinator.com.

Shoes

_why, everyone’s favorite off-the-wall Ruby enthusiast, has created a “Tiny Toolkit for Making Web-like Desktop Apps,” and it is called Shoes.

If you are keeping score, this is also the creator of hoodwinkd, author of the Poignant Guide to Ruby, writer of various blogs, and creator of Hackety-Hack, a programming platform aimed at “Starter Coders”. That is to say, in the Great Battle Of Contributing Cool Things to the Web, he is ahead of most of us. Many kudos in his direction.

Adding A Search Plugin

In the unlikely event that you want or need to search this weblog from the search bar in Firefox… I went ahead and created a Firefox search plugin for it. You can find it in the sidebar.

I should probably describe in meticulous detail how this was done, but all I would be doing is regurgitating this fine document and it’s related links, so I’ll just leave it alone.

The Case Against Rails

Man… In an article whose headline begins with the word “Blasphemy,” AlterThought’s Un.Rust blog dares to state the case against Ruby on Rails… and makes some excellent (though painful to read) observations.

The author states it several ways, but the main thread of the observations seems to be that since Rails is capable of doing so much construction automatically, it enables amateur coders to pass themselves off as developers, and wind up costing their clients extra money because the application they wind up with needs to be rewritten, revised, doesn’t scale, etc, etc. I’d hate to think that’s happening, but at the same time, I’m sure it is.

That’s actually one reason I’m unwilling to answer ads for Rails developers or to pass myself off as a Rails consultant — I’m painfully aware that I don’t (yet) know enough about either Rails, or full-scale web application development, to do that in good conscience. That’s actually one reason that I’m working on my Microlinks application in my spare time; yes, if it is actually successful (or even semi-successful), I’ll be very pleased. More than that, it provides an opportunity to really learn the framework, “gotchas” and all.

In the back of my mind, I’m hoping I can also write a small application in Django at some point… just because the experience of comparing Rails to Django would be valuable. Also, Python is as excellent a language as Ruby, and I’d just like to try it.

Microlinks, Rails, TextMate, subversion

I began building a new project tonight, which I’m calling “microlinks,” at least for the time being. It will be a live experiment in building a simple web application for myself, and also an experiment in online advertising and internet marketing. Microlinks will be an online advertising solution; it will start out as simple as can be, and I suppose I’ll see what happens from there.

Does the world really need yet another form of web marketing? Well, seeing as how I’m not even ready for an alpha test, let alone a beta test, I don’t think I can answer that. The prudent, market-oriented, answer would be, if no one is interested, it will quietly and sadly fall by the wayside. Enough said.

Regardless of the actual success or failure of the venture, I look forward to the experience of building a usable web application from start to finish. Since I’ve already done a little development with Rails, I opted to use that as a platform.

I’ve been using vim as my editor, and I may yet return, but I decided to give TextMate a try with its 30-day trial, and see how I like it. It is a commercial product, not extremely expensive, but it will have to be pretty impressive in order to keep me using it after the 30-day trial expires; I suppose I’ll have to write a review of the editor sometime in the next 30 days. We shall see.

Lastly, I’ll be using subversion for the first time. Well, not the first time ever “using” it, but the first time using it for a project of my own. That in itself should be a valuable experience, as any future project of sufficient size or complexity will certainly also warrant some form of version control; subversion is by no means the only solution, but it seems to be a prevalent one, especially in Open Source circles.

If you’re interested in partaking in the initial beta test, when it’s ready, just keep an eye on this site or its RSS feed.

Douglas Crockford on Javascript

Above from the Yahoo User Interface Blog; a presentation about Javascript at a Konfabulator developers meeting/conference. I haven’t watched it in its entirety yet (40 minutes long), but Crockford is among the best sources I’ve found on Javascript.