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 slashdot.org 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: com.sun.star.lib.loader.Loader
  • Arguments : YOUR_MAIN_CLASS
  • VM Options: -Djava.library.path="OOO_HOME/program" -Dcom.sun.star.lib.loader.unopath="OOO_HOME/program"
- put the following code into your class:
XComponentContext xLocalContext = Bootstrap.bootstrap();
XMultiComponentFactory xLocalServiceManager = xLocalContext.getServiceManager();
Object desktop = xLocalServiceManager.createInstanceWithContext("com.sun.star.frame.Desktop", 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 http://kovica.googlepages.com/Kovi_AC.xml. 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).