Hacker Newsnew | comments | show | ask | jobs | submit login

"Writing exploratory prototype-level AI code with a 60-pound weight tied to your legs is hardly pleasant."

heh! I started the aima java project and was the only contributor for for a long time.I've since handed it over to Ciaran O'Reilly of SRI who is is doing a great job running the project, (and rewriting a lot of my code!) and I no longer code in java. I am still listed as one of the "owners" of the project, though I don't contribute anything these days except the occasional bugfix.

That said, I started writing the code because I was bored out of my skull writing enterprise sw at ThoughtWorks and Eclipse was open anyway. I had no intention to open source it. Then I saw a post by Peter Norvig on a mailing list somewhere saying something to the effect that the authors had tried a few times to get their students to write a Java version but it never worked out. So I thought to myself "hey i have a lot of Java code sitting on my hard disk so why don't I send it to Peter?" And so I did. And that is how the project started. [2]

"I think most people will find the Python and Lisp versions of the code more useful."

That depends on your definition of "useful".

I agree there is a unnecessary cruft thanks to the use of Java [1] and my overly enterprisey coding style, but otoh of all the aima code bases, the java code (a)is the most complete (in terms of number of algorithms implemented)(b) has features like gui demos which don't exist in the other language versions, (c) has the most contributors, (d)moves the fastest in terms of frequent updates and releases, and (e) is relatively bug free (600 ish unit tests iirc).

Most importantly more people are downloading and using the java code more than any other version.

In short, running code that is written in a terrible language beats hypothetical code written in an elegant one ;-).

And I say this as a lover of elegant languages and terse code. My last project was in Haskell, C and Lua for e.g. So yes I feel your pain when you compare Java and python(or lisp). But I don't believe code is worthless just because it is written in Java. The worth of sw is in its utility, not so much its elegance.

And really, I don't want to defend or justify it too much. Aima Java was a "scratch an itch" (and maintain my sanity into the bargain) project for me and it is what it is with all its charms and flaws. It is (MIT licensed) free software . Use it or not as you like.

Interestingly enough the aima code base makes a good testbed for learning a language. I wrote a Clojure version once when I was learning Clojure, but I never released it. Since the algorithms cover a lot of ground, search,logic, probability etc, implementing them in a new language is almost guaranteed to teach you something. (so if anyone here wants to do aima-erlang or aima-haskell ... :-) )

And since we are on HN, I close with an request to any Java devs looking for a good project to work on to consider aima-java. Ciaran and co are most welcoming.

[1] One of my friends wrote a Scala version to learn Scala and you can see the difference between Java and Scala(even when the latter is written by a beginner) by comparing them http://code.google.com/p/aima-scala/ . This project should get more attention and if any one wants a good project to hack on I reccomend this.

[2] Peter ripped my code to shreds and sent back a 36 point(iirc) review on the lines of "Why are you doing X? You should be doing Y instead". I learned more from that email than I had in many years as an "industry" dev. Hey how many people here got their code reviewed by Peter Norvig? :-P

+1 for your interesting perspective.

Wish I could delete my own comment - I was in a grumpy mood :-/


"Wish I could delete my own comment - I was in a grumpy mood :-/"

don't worry about it! ( I am a devoted reader of your blog btw. Great writing)


Any chance you'd be willing to share that 36 point review email? That sounds fascinating.


lost when I moved on from TW . Sorry. :-)


Applications are open for YC Winter 2016

Guidelines | FAQ | Support | API | Security | Lists | Bookmarklet | DMCA | Apply to YC | Contact