Tuesday, February 12, 2008

Commons Configuration

Useful book : Jakarta Commons Cookbook
For examples in this book is used an older version of jakarta commons configuration
I used this framework for one of my projects iBean Editor eclipse plugin - for reading hints uded for code autocompletion.
Indeed there are many other posibilities to persist object for example : serialize objects in a file using ObjectInputStream/ObjectOutputStream with methods readObject / writeObject , serialization in xml format is also posible using classis for example from dom4j or ever very nice solution with XStream.
But let's concentrate uppon CommonsConfiguration :
the Classes for example that Extend FileConfiguration have methods like save() ...load() to store modified configuration...
if you want to use .property file youread configuration like this with the this code if I want to parse an xml document like this useful code is this

Note: the 1.5 version of common configuration that I used is a little buggy setting the new delimiter will not work if you will provide the file name in the constructor
so you must first set some properties of delimiter and after load the file like this:
XMLConfiguration config = new XMLConfiguration();
config.setDelimiter('|');
config.setDelimiterParsingDisabled(true);
config.load("codecompletion.xml");


**The examples of code were written to be compatible with java 1.4 otherwise can be used more elegant solution using generics

Sunday, February 10, 2008

My cute kia



Today was a cloudy day ...but I just waiting to finish my projects and to go out with my pica (kia picanto). My driving license was suspended and now I have no time for reexamination, I try it once in January but I miss it with only one point missing, however I'm tired and disgusted of exams in Romanian style. I still regret the car crash that I have and most of all that the law is not applicable ... there are still many cars staying at corners and many taxi drivers who will crash you intentionally to get some holidays until they will repair their cars for free if they have a chance...

The life is unfair ...and people get mad when driving ...in this country like in no other

Thursday, February 7, 2008


Diplomacy

Yesterday I started to read a new book Diplomacy by Henry Kissinger a very interesting book that I think I will enjoy a lot.

The first chapter starts with the following remark: “Almost as if according to some natural low, in every century there seems to emerge a country with the power, the will and the intellectual and moral impetus to shape the entire international system in accordance with its own value.”

Many facts are presented in this book as they were in reality not covered by romance of history. But what will remain in our memories after all … a foggy memories covered by human nature …a nature that tend to remember only what it was agreeable for us …

But the past doesn’t matter in our days only the future …and the future will become the past… to act quick and dirty …to obtain spontaneous results no matter what will happen…that’s matter the most but tomorrow maybe the consequences hit us …nobody cares

In a country with emerging economy like Romania the only rule is there are no rules . People are kept in they financial problems … while others still consider us … cheap employees and threat us accordingly.

But I will continue to live in my world … to be ignorant to these trends… in fact what is most important is what you believe and in what you believe.

In our century what country will have the power to be dominant…the EU will converge in a single entity… maybe… I will live (I hope) and we will see .