sreda, 27. december 2006

EURO is coming !!!

On the 1st of January 2007 my country is going to use EURO as it's only valid currency. You can imagine that we have to update our software to be able to handle this new currency. It's crazy here. :))
Here you can see how our EURO coins are going to lok like. In my opinion there are true symbols of Slovenia. I just hope we will get used to them quickly, since the values (exchange rate is 1 EUR = 239,64 SIT) are more than 200 times smaller than we are used to now. This is not going to be my first currency change. In the former Yugoslavia we had huge inflation, so we changes the values on curreny a lot. Then we got our own money (after the independance we didn't used real money since it was not printed yet. We only used it for about a year) and now EURO.
I'm a bit sad too since we waited for couple of centuries to get our own money and after 15 years we'll be changeing it for EURO.

sreda, 20. december 2006

Dynamic working hours

Dynamic hours... Hmm...

Usually this means that you get to work at 7:00 in the morning and you leave at 16:00 and sometimes at 22:00 or even the next day. :)) 

četrtek, 07. december 2006

Crazy Weather

It's unbelievable! It's December and we still have temperatures of 15˚C or more. I don't remember anything like this happening while I'm alive. :(((
This is also a good time to get flue, so be sure to drink a lot of fluids and get a lot of vitamins :))

petek, 24. november 2006


It's been a long time since my last post. It has been a wild roller coaster at my job, as someone said.
During this time I also discovered something about DB2 IMPORT command. It doesn't work as the docs say. What does this mean? Sometimes you get "SQL0100W No row was found for FETCH, UPDATE or DELETE; or the result of a query is an empty table. SQLSTATE=02000" and the row is rejected.
Hmmm. How can this be since the docs say that UPDATE should be performed via primary key? So if there were no rows to UPDATE, why does IMPORT not perform an INSERT?
What I found out is that on my target table there was a UNIQUE key defined and removing the UNIQUE key solved the problem.
Does this mean there is a bug ? In the IMPORT command itself or in the docs ? Maybe this is right for a PMR.

ponedeljek, 06. november 2006


Oh well.. I guess it's just that time in the year. I think I've got cold, termperature and my throat is a bit sore.
I'll have to start drinking tea with honey and lemon. And more vitamins too. :))
I just hope I don't get too sick.

petek, 03. november 2006

DB2: Fast Delete Large Tables

Have you ever wanted to delete a table with millions of rows? Using
DELETE FROM TABLE1 SQL statement? Then you know this is very, very slow and it fills transaction logs. The fastest delete methond I've ever seen goes little like this:
1.) First you export 0 rows from the table:
2.) Then you do a LOAD with REPLACE:

I've been able to delete rows from tables with tens of millions of rows in a second.
I hope this little tip is usefull for a lot of DBA's out there.

ponedeljek, 30. oktober 2006

New NetBeans modules

I'm sorry I didn't post any updated/new modules for NetBeans. The thing is that I'm busy at work and I don't have much free time. I promise I will update every module that can be found on my homepage to version 5.5. I also have some idea for new modules and I hope to get them done till 2007 :)))

NetBeans 5.5 released

Together with a new page design, version 5.5 was released. It IS a great improvement over 5.0 since it supports Java EE5.
But myself will be more eager to use version 6.0 as it will contain many new improvements for the editor itself. Can't wait! :)) I've tried them with a build from the trunk and the editor is much better compared to now. Code completion is more context aware and a lot faster. I still have to test it with a large projects that I'm working on, but the infrastructure itself promises a lot. :))

ponedeljek, 23. oktober 2006

HDTV channels

Woopie!! :)
Yesterday my ISP company T-2 (provides Internet and IPTV for me) just started to broadcast 8 HDTV channels. They are the first ones to do it in my country. I know they are the first who do it over IPTV and I also didn't hear that there are any HDTV channels on cable, so they are probably the first all together. But if I'm wrong, I'm sorry. :)

Now I just have to get a good HDTV television. :)) Any recommendations ?

nedelja, 22. oktober 2006

Internet on flight

Last 14 days I've been in North Carolina working at the Triangle Research Park with IBM on a project, so I didn't have much time to post something interesting. Now this one is of some interest. At least to me. What happened? as I write this we are flying somewhere over Atlantic ocean. Isn't it great to use Internet on the plane, when you have sme time to do some work. :)))
And the best thing about it is that it is FREE. Well, at least on this flight. I home the companies will figure it out to offer free access on the flights. :)))
Best regards from 10000 m over sea. :))

EDIT: The provider of the FREE Internet was Lufthansa

nedelja, 15. oktober 2006

NC State Fair

I've (and some of my co-workers) have been in North Carolina for a week now. Since we have the weekend off, yesterday we made a trip to Wilmington, then to a battle ship from the WWII that is near by. At the end we went to a beach at the Atlantic Ocean and finally had a dinner at the nearby hotel.
I can say that the water in Atlantic Ocean is not at all salty. Our Adriatic see is more salty. :)
Well, today we are going to the NC State Fair. I've looked at the program for today and the best thing I can see there is the Tractor Pull. I'm not soo keen to pay 6$ for enty fee to go and see cattle, pigs, chicken, ... I can imagine for a typical American child that is living in a city this is interesting, but for me it is not, since we had those animals at home. Well, we still do. :)))
We'll see....

petek, 29. september 2006

DB2 Cultural Correct Collation

I think that we all know that DB2 does not support cultural correct collations in it's databases, even if they are created as a UTF-8 database.
I've been pointed to one article that does solve the issue (at least until DB2 implements this in it's engine).

DB2 "Virtual" tables

In DB2 you sometimes need a virtual table. I call table a virtual if you don't know in advance what the structure of it will be and you don't need the virtual table to be persistent.
Let's say that you have a table on you GUI form that has three columns (C1, C2, C3) and the data there are: (1, 2, 3) (4, 5, 6) (7, 8, 9) and you would like to do some SELECT statements over this table:
SELECT * FROM TABLE(VALUES((1, 2, 3), (4, 5, 6), (7, 8, 9))) T(C1, C2, C3)
With T(C1, C2, C3) you say that table T has columns named C1, C2 and C3. This table T acts like any other ordinary table. You can so SUMs, GROUP BYs, .... on it.

I've heard this is DB2 v2 stuff, but I still find it powerful. :)))

petek, 22. september 2006

Mandriva 2007.0 RC2

Yesterday I've tried Mandriva 2007.0 RC2. All I have to say is WOW. :)))
Especially for the XGL/AIXGL stuff. It's working out of the box. couple of months ago I've been trying it on various distributions (SuSe, Ubuntu, ...), but none of them was working good. Some had some painting issues and on some distributions my mouse froze after a while. i was planning on using XGL/AIXGL on my machine, but I had to give the idea up. Until now. :))) I'll see how the final release will be and then I might use it.
Maybe not on my machine at work since it has a SIS graphics card (integrated of course :(((( ) which has terrible performance. My machine at home has a nVidia 6600 GT card so everything should work on it. I llok forward to trying the final release.

petek, 15. september 2006

Strange C++ errors

If you have a code:
std::vector vec;
vec.push_bacnk(3); // push_bacnk is not a member of type vector

and you compile it you get an error: In function ‘int main(int, char**)’: error: ‘class std::vector, std::allocator >, std::allocator, std::allocator > > >’ has no member named ‘push_bacnk'

I have to say that this one was easy to track down. :)
What's all about std::shar_trails, std::basic_string, .... ?!?

Power of Java

I've been involved with C++ for about two weeks now and I'm beginning to understand the power of Java that I've always taken for granted. :)
Java and C++ are much the same except that Java's power lies in it's libraries and it's GUI. In Java there is java.util.* that has a lot of helper classes (like Properties for example) that I couldn't find in C++ so I had to write it myself. Another thing is the GUI. If I program in Java there is no question about what GUI I'll be using. Swing it is! There is no such thing in C++. There are tons of different GUIs there. Some are cross-platform and some are not.
I also have to say that I like C++ generics (called templates) more that ones found in Java. Maybe it's just me. :)) there is a lot of strange systax involved in this, but C++ generics are a lot more powerfull.

sobota, 09. september 2006

Learning C++

I've been learning C++ for last couple of days. I must say I briefly met with C++ during my university years (1995 - 2001), but I've always considered myself more of a Java programmer. In fact I've been doing 100% Java for the last 5 years developing server applications.
My newly aquired hobby in genetic algorithms will probably require me to program them in C++. I've tried Java, but I have to make it faster.
Of course I wanted to see how fast parts of the code are in Java and in C++. If you want to see that in Java you just write:
long beginTime = System.currentTimeMillis();
..... code you want to measure
long endTime = System.currentTimeMillis();
System.out.println("Code took " + (endTime - beginTime) + " ms to execute");

this way you get fairly good feeling what parts of your code are slow. Of course you could use Profilers, but usually I don't.
Well.. I tried the same thing in C++. Guess what. You cannot do that. There is no elegant way to do that. You cannot get time in milliseconds/nanoseconds in C++. You have to use a hack (IMHO).
there is a function clock() that returns how many CPU ticks have elapsed. Then your code looks something like:
int startTime = clock() / CLOCKS_PER_SEC;
..... code you want to measure
int endTime = (clock() / CLOCKS_PER_SEC) - startTime;
Ugly if you ask me!!!

If anyome has a better solution, please come forward. :)

petek, 01. september 2006

Jet Lag

Since the day I came back from the US, I feel sleepy and others say I look tired. Wonder why? I think it is the jet lag. But I thought it wears offf after couple of days. I never had a jet lag this powerfull. Hmm...
Finally I installed DB2 V9.1 and it got a feture we'll need a lot, because Slovenia will change it's currency on the 1st of January 2007. We'll have Euros. So no more exchanging Slovenian Tolars when I go to Germany, Austria, .... Woohoo!! It's kinda sad to see the Tolar go (especially because we waited for a long long time to get our own state and currency), but I like the fact I'll have Euros in my pocket. :)
Now. back to DB2. In the latest version you can do something like this:
So you can change data type on columns of the fly :))
This is what we've been waiting for for almost two years. :)) Sure one can do export, create, import, but this a lot faster and easier.

ponedeljek, 28. avgust 2006

Finally back :)

Finally I am back! :) It was very nice to see my girl again after a week. :)
We've done a lot of work in USA. Unfortunately I cannot discuss what we have been doing for now. Maybe when the official announcement will be out. Ant what I have been hearing it will be soon. And it will rock this region. :)))
I've been sleeping for 11 hours and I'm still sleepy. Maybe because my body still goes by an hour that is 5 hours behind my local one.

torek, 22. avgust 2006

Japanese restaurant

Yesterday was a good working day. We've done so much. I've also heard one of the guys that are helping us with our project that we are three days ahead of schedule.
We went to some Japanese restaurant to get dinner. They have multiple chefs that prepare your food right at the table. I've never seen or experienced it. It was great ! :)) Our chef talked like Latka. :)

nedelja, 20. avgust 2006

First day in Raleign - Durham

I'm writing this in my hotel room and the air-conditioning is turned on. Outside is very hot and humid. I hate it. :((
Of course I also had problems with my luggage, since they managed to tear my suitcase apart. Ahhhhh !!!!
I reported my damaged baggage and hope I get refunded for it. Now I have to buy myself a new suitcase. Since this is my second suitcase that got trashed on the trips to America I guess I won't spend much money on it. I hear you can get 4-5 suitcases for 30-40 USD in Target or Walmart. Next time I'll wear all my clothes. :))

torek, 15. avgust 2006

Raleigh, NC

It is confirmed. :) I'm going to Raleigh, NC on Saturday. Me and some of my colleagues are going to be working at IBM site there on a project I cannot discuss now (there is an NDA in place).
This is not the first trip to the USA (in fact it is my fifth or sixth) and I hope I'll go to some game there. Weather it is basketball, football, ... I don't care. I just want to see what the fuss is all about. :)

četrtek, 10. avgust 2006

Ubuntu 6.06

I'm using Ubuntu 6.06 from when it was released. I've never used Ubuntu before (I was a Mandriva guy), so when I got a new machine (with my HDD from previous machine) today it didn't start into gdm. Hmm... I knew that the graphics card is not the same anymore and I couldn't find the program to set X up. So I changed the graphics driver to vesa, boot it up and searched for a solution. I only found out that X does support SIS graphics cards (this one is integrated into motherboard). So I changed the graphics driver to sis, rebooted and it dows work now. At last! :)))
I'd really like to know what programs to use, to update the system and tell it what drivers to use, ....
Any help is welcome. :)

New development machine

Today I got a brand new development machine. It is a Lenovo 3000 J Series. Oh, well at least I have an DVD burner now. :)))
It took my company almost 5 years to get a burner into my machine. :))
And at the rate they sell machines I guess I'll have it for about a month :)

ponedeljek, 07. avgust 2006

My first day

Today is my first day after my vacation. I got up at 6:00 as usual, but it felt like 3:00. :))
I hope the day will be more productive and not so sleepy.

sobota, 05. avgust 2006

End of vacation

My vacation is going to end in a day. So on monday morning I have to get up eary and go to work :(
Why can't the company change it's policy and let me work at home? It would be good for me and several researches are saying more productive too. Hmm.. maybe this will change is the comming years. Maybe not. :)

ponedeljek, 31. julij 2006

Old NetBeans API

A while ago there was a post on mailing list someone wanting to know more about the history of NetBeans. Reading it and the FAQ about the Lookup made me think that there are a lot of old APIs that ware replaced by better, faster, .. ones. But the fact is that the older APIs are still used today.
I'd like to see them get deprecated and also removed from the sources. In this way we would get a clean codebase that would be smaller, faster and easier to learn.

NetBeans API Book

I'm enjoying my vacation :) so I have the time go over some of the NetBeans API and learn some things.
Well, there is a lot on this topic (javadoc, tutorials, blogs, ...), but I do feel we need a good book on this topic. The one that you can buy today is 4 years old and talks about 3.6 release. We have come such a long way from the 3.6 times.
PLEASE, give us a new book!

petek, 28. julij 2006

Hot summer

On the first week of my vacations I didn't do anything useful, since it is very hot here and I don't have air conditioner. If we (me and my girl) ever buy our own apartment, I want air conditioner in there. :))

ponedeljek, 24. julij 2006

Global war

I know I'm on vacation, but I had to come to the office to make a call and to check my e-mail. Well and guess what. Since everyone I usually communicate with know I'm on vacation, there were no interesting e-mails, only SPAM ! :((
I don't like, even hate spam. And since our mail server admin does not turn the spam filters on (don't ask me why, I get all those viagra, sofware, morgage loans, ... into my Inbox.

Someone should start a global war on spam. :)

sobota, 22. julij 2006

Speed of light = constant

Einstein's theory said that the speed of light is a constant (around 1000000000 km/h). Some weeks ago I've been reading an article at that scientists have been able to slow down light to 65 km/h.
Since I didn't read Einstein's theory I have a problem now. :)
If Einstein said that the speed of light is around 1000000000 km/h and the scientists have slowed it down to 65 km/h then Einstein was wrong about the constant speed, right? But if Einstein said that the speed of light is a constant, not mentioning the actual speed of it or mentioning that the speed of light in a vacuum is 1000000000 km/h, then the speed of light in some other medium can be still a constant, but at different speed, right? So both, Einstein and scientists, can be correct, right ?

petek, 21. julij 2006

Showing CVS version in NetBeans

The new CVS implementation does not show file versions in editor tabs and project nodes, but there is a way you can turn this feature on.
Edit $NETBEANS_HOME/etc/netbeans.conf and add this line
-J-Dnetbeans.experimental.cvs.ui.statusLabelFormat= {0} {1} {2} {3}
into netbeans_default_options variable.
{0} stays for revision
{1} stays for status
{2} stays for branch or sticky tag
{3} stays for binary flag

In my experience this is now working properly. When I commit a file into CSV then sometimes this labes are not refreshed. Oh well, the variable says that it is experimental. :))
I hope 6.0 will be way better in this regard.


Today is my last day at work before my vacation starts next week.
Sadly I'll have to come to work on monday. :)) At least I'll get paid for the vacation and a day at work. :)
Today is going to be a very relaxed day, since we don't want to do something that will break during the vacations. :))

String Theory

I've started reading The Elegant Universe. A book about the string theory. It promises to be a theory that links together all theories in one. Hmm... We'll see. They have been working on it for about 20 years now.
Reading a book about Einstein and this one I have a feeling that we live in a time where we are always on the edge of somekind or technological revolution, but the revolution is always couple of year ahead.
Id' like to fly with the speed of light. heck even faster. I'd like to go to space (and not paying 20000000 US), to Mars, to the next star. I'd like to live in Star Trek. :)))
Oh well, at least I can hope my grand-grand-grand-children will be able to go to space for about 100000 EUR. :))
Maybe they will find a way how to freeze a body for hunderds of years and I can witness the revolution itself.

četrtek, 20. julij 2006


I've just finished reading a book by David Bodanis E=mc².
It describes how the terms "mass" and "energy" were first used and by whom, how Einstein "designed" his theory, how the equation describes movement of the energy into mass and mass into energy and how this equation was important when developing the first A bomb. Germans came very close during the second world war to the A bomb. I hate to imagine how the world would look like if they had it first.
I like the book because of the way it introduces sientific terms and data to the public.
I recommend reading it. :)
Now my next project is reading a book about the String theory. It is said that this book is also written in a very way everyone can understand it. I'll see.

četrtek, 13. julij 2006

Integrating OpenOffice SDK into NetBeans

If you want to develop applications that use OpenOffice with NetBeans do the following:
- I have OpenOffice installed in /usr/lib/openoffice (OOO_HOME)
- create a project (OpenOffice for example)
- create a class library (OpenOfficeLib for example):
- in Classpath put:
  • OOO_HOME/program/classes/juh.jar
  • OOO_HOME/program/classes/jurt.jar
  • OOO_HOME/program/classes/ridl.jar
  • OOO_HOME/program/classes/unoil.jad
  • OOO_HOME/program/classes/officebean.jar
  • OOO_HOME/sdk/classes
- right click OpenOffice project and choose Properties:
- Libraries: add OpenOfficeLib library on Compile tab
- Run:
  • Main Class:
  • Arguments : YOUR_MAIN_CLASS
  • VM Options: -Djava.library.path="OOO_HOME/program""OOO_HOME/program"
- put the following code into your class:
XComponentContext xLocalContext = Bootstrap.bootstrap();
XMultiComponentFactory xLocalServiceManager = xLocalContext.getServiceManager();
Object desktop = xLocalServiceManager.createInstanceWithContext("", xLocalContext);
XComponentLoader xComponentLoader = (XComponentLoader) UnoRuntime.queryInterface(XComponentLoader.class, desktop);
PropertyValue[] pPropValues = new PropertyValue[0];
XComponent xWriterComponent = xComponentLoader.loadComponentFromURL("private:factory/swriter", "_blank", 0, pPropValues);

- run your project with F6 and voila. You get OpenOffice Writer opened. :)

Then use the OpenOffice Developer's Guide to create something useful. :)

Singleton vs. Static

Yesterday I was asked a question if it is better to use Singleton classes or classes with static variables and methods.
Here are couple of good answers:

Blade Runner

Couple of days ago I read a book titled Do Androids Dream of Electric Sheep by Philip K. Dick. This book was the basis for the Blade Runner movie. I have to say I like the movie better. Usually I find the book better but not in this case. I think that the book does not have "that something".
I've also played the Blade Runner game couple of years ago. My opinion is that the game is one of the best adventures I've played. In the same group belong Laisure Suir Larry, Master of Orion I and II, but not III.

sreda, 12. julij 2006

DB2 CLP error codes

Hmm.. Until yesterday I didn't know what DB2 CLP does not return only
0 = OK
1 = 0 rows
2 = warning
4 = SQL error
8 = system error
It also returns a combination of them, like 6 = 2 + 4, meaning that there was a warning and an error.
You can imagine how my eyes got bigger when I saw an errorCode of 6. :) I was quite embarrassed, since I've been working with DB2 for quite some time now.
I guess I should have read the manual :)))

Not working together

Have you ever had a problem with a co-worker ? A problem where he/she didn't stick to what was planned or agreed upon ?
What should I do with such a co-worker ?
I have enough of cleaning up after him!

Update Center


As said in my previous post,, I'll also talk about NetBeans.
So my update center can be found at Set it up in your NetBeans and start using modules I developed. I hope you'll find them useful.

First blog

This is my first post to a blog. Yep.. first ever...
I hope this will get more ofter and that I get to like posting. :)

This blog will deal with NetBeans (using, developing modules, ...), some work I do on DB2, ... and of course my life (not all of it of course).