Archive for the Tag 'Java'

Oct 29 2008

Posted by coen under General,Java

learning by cheating

A long time ago, when I still was in high school, I sometimes tried to cheat my way out of some classes (like French, for instance). Of course, after a while, I got reasonably good at it, and that’s basically how I finished the course. I became more and more bold in other courses too, and after a while I got caught ( that was inevitable, of course).

Some time after I finished the part of high school we call ‘brugklas’, I came across a teacher who, to my surprise, encouraged using cheating notes. As I soon would realise, the man ment for us to create cheating notes before the exam, and not use them during one. That way, he said, you learn to summarize the things you need to study for that exam, and you’ll remember it, too.

The man was right. So, now that’s all behind me, I can use this story to do some cheating, while pretending to learn from it as well :) The cheating is about a trivia channel on irc. I’m writing a bot in Java that can parse irssi logfiles, and is also able to learn from the questions the trivia bot asks. The things I’m hoping to learn from this: How to simulate a human being that answers the questions (that means, among other things: do not answer every question correctly, but also that is makes some sense), and what is the nicest, most efficient way to learn questions; how do I determine the correct way to answer, etc.

So: $learning_by_cheating++

2 Comments »

Dec 18 2007

Posted by coen under PHP

Great plans

In the 2nd year of my study at the HU we learned about J2EE, in particular EJB. Happy with the general idea of never writing another line of SQL, we started doing our school projects with EJB. However it’s true that you don’t write SQL, there is EJB-QL, which looks a darn lot like SQL.
While I like the concept, I wonder if Java is the right language to use. I can’t help thinking about all the layers my poor code has to go through, and how can that ever be fast? Anyway, according to this test, Java is way faster than PHP, which was originally intended for the web (Wikipedia also has a nice comparison about this).

Strangely enough, at that time there was no framework or abstraction layer available for PHP, so I started building one myself. The idea was for it to work like EJB, and the result was satisfactory. Then doom hit me, because I lost all that code :( So now I’m going to start all over again, with a slightly different angle: I am going to write a framework that communicates with the Zend Framework, but with a little extra: the Zend Framework does not provide creation and automatic querying for your objects in the database, and that’s what will be the extra in my framework.

1 Comment »