Archive for May, 2009

Over Configuration

Most times, I don’t start out with configuration file(s)…..what I do is simple, I create a class with static variables and I assign them values. After I finished the project, I will then create a configuration file and then my class will have a constructor which I will call from my Bootstrap class or main class. What the constructor does is simple…assign values to the static variables from the configuration file. This is something I have been doing for a while and today I felt its just awkward to do things like this….I think there should be a better way to do this bearing in mind that I still don’t want to start developing with a predefined configuration file….I want to be able to determine either or not I want to use a configuration file only at the end of the project… I devised a new method. instead of static variables and then a constructor, I used static methods. The methods could just return a value(especially during tests) or read from the configuration file and return the value read.

For example,
public static String getHost() {
return “localhost.localdomain”;
//read this value from the configuration file.

I have a Configuration File helper that I use to read from configuration files.
This works for me now, and I think I am gonna be using it for another x years. 🙂


Leave a Comment

Windows Experience After 4 years

I stopped using windows in 2005/2006 can’t really remember the year now. I have this sony viao i have been using since last year….I installed Ubuntu on it and after some time I grew tired of it and installed fedora(I have always prefered rpm :)) The beautiful thing is I dont even have to format although I installed the fedora on the same partition as the Ubuntu…anyway, I got another system last month, and I deceided to install windows on the sony so I can at least play around with vista, I installed the windows yesterday(Sunday) and by 3pm today(Monday) my system crashed. I inserted a sony SD card and it hanged the system. I have to power off the system as the ubiquitous ctrl+alt+del was not working. After the restart. it starts complainint that it can not boot because a file was missing….it recommends that I repair with the installation cd, I did and yet the file was still missing….I tried everything I could and after 3 hours…I have to format and re-install…..Welcome to the world of Microsoft Windows.

Leave a Comment