Archive for October, 2006

The first draft of Project Posner was written in Common Lisp. I thought it would be fun to see how Common Lisp fared as a language for doing heavy text processing with a web front end. It worked well, and I’m convinced it made the process easier than it would have been with any other language. But everything I’ve done with it up till now is off-line. I used Lisp to statically generate the site on my desk, then uploaded the HTML pages to the server. Search is handled by ht://Dig, an old-school CGI app written in C.

I’d love to continue to develop Project Posner in Lisp, especially since I’m currently the only programmer working on it. But to add any more features I need server-side programming. I find myself wondering … do I dare try to use Lisp? First off, I’d have to get a new web host, probably a virtual server, since no shared-host server offers Lisp pre-installed. That would cost more. Then I’d have to set up and maintain the OS on the server, which I’d frankly rather not be bothered to do. Then there’s the multiple headache of getting Apache, mod_Lisp, PostgreSQL, and a CL implementation all running and talking to one another. Then, and only then, can I start work on the application itself. And then I don’t have much pre-written code to draw on. Sure, HTML and JavaScript generation is in the bag, but there aren’t any drop-in libraries for forums, guestbooks, user authentication, or any of that good stuff.

I could probably write that stuff myself in Lisp. But could I do it faster and better than the hundreds of other people who have already done it in Perl/PHP/Python/Ruby? I don’t think so. I’m not that good.

So there it is. Web application development is an evolving problem, but by and large a solved one. And it wasn’t solved in Lisp. When Paul Graham was creating Viaweb, no one else was even thinking of web applications, so he had to create his own tools. But the biggest recent poster child for Lisp on the Web, Reddit, gave up and switched to Python (to much gnashing of teeth in the Lisp world). It has nothing to do with the language itself. Lisp is still great. It’s all about the tools, the libraries, the “borrowablility” of other people’s code.

So I’ll continue using Lisp for off-line stuff, private projects and such. But for building Project Posner version 2.0, I’ll probably look elsewhere.

Comments 3 Comments »

“Premature optimization is the root of all evil,” say Hoare and Knuth. I have determined that I suffer from a slightly different but related malady: premature cleverization. At the start of a programming task, before I’ve written any real code, I get some wacky idea like “I could do this all with binary XORs” or “this would be cool in Lisp” or “I could write a library that would solve this and a whole bunch of other problems and make me rich and famous.” I sit up late at night, doodling diagrams that prove just how brilliant my idea is. Three days later I have a stack of diagrams and I’m ready to write some real code. I try to implement the idea. It doesn’t work. In the excitement of inspiration I glossed over — or just forgot — some flaw that makes the whole thing impossible. In effect, I wasted three days doodling and trying to be clever instead of doing real work on a boring piece of code that actually solves my problem. It’s a high-energy kind of procrastination, the sober equivalent of a drug addict’s rambling theories.

Comments 5 Comments »