Status update

It’s been a while since I last posted here and I don’t feel like posting something huge here this time, so here is just a short life update:

  • Wrote all college exams (4 of them):
    • Artificial Intelligence - this is the only exam I feel like I failed. The subject is really boring, the teaches does not seems to be confident in the topic, exams were prepared by other professor who is very good in subject and probably did not consider that (as I believe) we were taught not in the best way. In addition the class is kinda boring. As I have concluded - it is like maths for me, but while in maths I know that I am totally stupid, here you think for the whole semester that the class goes fine and at the end you find yourself unbelievable stupid.
    • Software Engineering - this one went fine. A class is very boring and implies a lot of bureaucracy related to IEEE standards, but I think I managed it quite good mostly because IEEE has a lot in common with ISO stuff which I know not that bad.
    • Computer Architecture and Organization - went very easy because the amount of information given was very limited and a lot of it came out of previously passed Digital Systems.
    • Object Oriented Programming (based on Java) - went pretty good as well due to some programming experience I have as well as familiarization with many programming languages. One more time proved to myself that Java is not what I like - Perl is the best.
  • Preparing for the next semester - need to pay quite an amount of money for the college but already have some options. Thanks to all people who help me in this matter.
  • Learning AJAX technology and have a post about it on configfun.com here.
  • Preparing for the visit to immigration :( Hate this part of being in Cyprus, but have no other ways yet.
  • Planning to go for skiing one day into Troodos where there is some snow already. Hopefully my skiing equipment will be delivered to Cyprus by a friend of mine who is now in Moscow.

Java Stuff

I think I have already mentioned before that due to the Object Oriented Programming college class I have to play around Java now. I was assigned to do a project in Java and I decided to check what I can do there. Being more a perl guy, I have a faced a numerous problems with Java which I try to overcome in all possible ways. Here is what problems I have:

1. Static method declaration in abstract class. This really drives me crazy :(. I have a case where I really need to have static methods in abstract class (with implementation code inside) and I can not do it which causes me a lot of headache.

2. I am really missing an analog of perl keyword __PACKAGE__ in Java. This, sometimes also have to do with the first issue. For example I want to create an abstract class which defines the structure of a database table model, and this class should have static methods such as retrieveAll or search to return an array of objects of this class. Lets assume that I am allowed to have static methods in abstract classes and that I have a __PACKAGE__ option, then I would write something like this:

abstract public class DBModel extends DB {

abstract static private String dbTableName;

static public __PACKAGE__ retrieveAll () {

DB myDB = new DB();
myDB.query("SELECT id FROM " + dbTableName + "");

if (myDB.getResultCount() > 0) {
int i = 0;

__PACKAGE__ itemList[];
while (myDB.getResultSet().next()) {

itemList[i++] = __PACKAGE__ new( myDB.getResultSet().getInt(”id”) );
}
return itemList;

}

return null;
}
}

public class MCategories extends DBModel {

static private String dbTableName = “customers”;
}

Like this, all classes which extend DBModel would have a static method retrieveAll() which would retrieve a list of all items from the DB.

3. Declaration and assignment to a variable inside of if/while/whatever. Sometimes I just need to do something like this (using the above example):

if ((Object[] objectsList= MCategories.retrieveAll()) != null) {

// do something with objectsList[].
}

If you know some workarounds, please let me know.

Sun JDK on Fedora Core 6

I am not a Java fan and I do prefer doing all my stuff in Perl (due to the perl being more flexible and comfortable to code in [my personal view] and probably due to the nature of the tasks I have), but due to the college class Object Oriented Programming which is totally taught in Java, I have to install Sun JDK on my laptop for some time.

It turned out that the task is not that easy (actually easy, but tricky), but I found a nice article which describes all steps needed to get Sun JDK configured on the system - works for me

Fedora Directory Server (part 2)

Ok, I have installed the Fedora Directory Server. Installation is quite strait-forward, configuration is done through simple wizard and is very easy.

Next step is Management Console. It is a java-based (I guess so) interface with lots and lots of things inside that I do not know :( :)

Anyway - I decided to study all of it so I am currently downloading tons of PDF files from redhat and I gonna read all of them in the NEAREST future since I really believe that this is something great and that I have (or no - MUST) no it :)