Prolog pays

I spent the last two hours of the working day doing something constructive, learning prolog. I’m behind where I want to be in the excellent 7 languages in 7 weeks. Mainly due to procrastination and listening in wonder to Homer blurt out quotes that the history books will never record and should never record.

Back on topic with the prolog, its a very different beast to any other language I’ve encountered. Ruby and Io were easy, even with Io’s unhelpful name for googling help. Prolog is the first that needs a bit more consideration. I’ve spent 15 minutes today mapping out a solution to the Tower of Hanoi problem. The code looks so compact yet is so powerful. It didn’t help that I misread the X,Y,Z placeholders for one of the statements. As the real Homer would say, Doh!

Its both frustrating and enjoyable trying to figure out what its doing, I think its a 80/20 split though with frustrating being the 80. I can’t see me ending the section on Prolog and thinking “I’d quite enjoy using that to earn money”. I always though I was a logical person but after using a logic language, maybe I’ll have to reassess that. As Bruce says, you’ll either change the way you think or fail, I’m nearer failing than a fundamental shift in the way I think about solutions. Insert mild expletive here!