Cloning a rat

September 26th, 2007

Remember, if you want to clone an object in Java, you should not follow HOWTOs on Google that try to answer your question with this piece of code:

public class Rat implements Cloneable {

public Object clone() {

Cloneable c = new Rat();
return c;
}

}

But instead, you should do that with the following snippet:

public class Rat implements Cloneable {

public Object clone() {

Object clone = null;
try {
clone = super.clone();
} catch (CloneNotSupportedException e) {
e.printStackTrace();
}

return clone;

}

}

, because the first one does only create a new instance of Rat without the same internal state.

Back from Greece - Finally

September 7th, 2007

Maybe you read about me going on holiday on Kos, Greece. I’m writing a “short” report even if we were there at the beginning of July.
We landed at Kos airport at around 23.10 (an hour of delay because of the dense air traffic around the island). When i took the first breath of the island air i shocked. There was so much humidity that breathing was really difficult. When i was on Ios, some years ago, there wasn’t air like that and the first impression was “Ouch, I don’t like it.”. Fortunately that kind of air is specific just for the airport area on the middle of the island. After taking our baggage we boarded a bus that took us to our hotel.

The hotel was like built some months ago with a lot of marble. All the rooms had air-conditioning, balcony, just the bathroom was a “Greek” one and by “Greek” I mean small, somehow stinky, with a small shower tub without a curtain. There was a small empty fridge in the room too, so we could put some bottles of water in it, unfortunately we had to turn it off, because it was rising the temperature in the room. The next morning we had breakfast, a “Greek” breakfast. Yes they have their own definition of breakfast and in most cases it is something like: bread, butter, jam, juice and something they call coffee and tea - it was more like warm water with two weeks old socks.

The island`s main city is called Kos and we were located in it. So the first day we took a walk around the city. We were just looking around and trying to survive the heat. Taja wanted to swim so we went to the nearest beach. And you know how it looks like when you go to the most popular piece of coast, a lot of people and restaurants and loud music too. An Irish guy jumped on the road and took us on the beach in custody of his restaurant. Free sun beds and and umbrellas. Seems that their best profit is from “sun bed” service. There a guy full of energy jumping around bringing you food and drink. We were there relaxing on the beach, reading our books and swimming until evening.

The next day we rented a pair of bikes (as Lonely Planet defines them as “boneshakers”) and went to the south eastern coast where we found our best beach. Our goal was Thermos, a warm water source coming from the near island of Nisyros. The water smells like an egg that went bad. Anyway, this source is just a small hole from which the water comes. Nothing to see, maybe just some Germans having a bath in that smelly crap :) . Anyway the road back to our beach was easier with the wind in our backs we didn’t have to make a big effort with the pedals like the other way. We had another two swims and then we went out in the city by night. There are some turistic streets which we didn’t like too much so after a takeaway Gyros we went night-sight-seeing (actually we got lost and found an archaeological sight - The Ancient Gymnasium).

On Saturday we rented a scouter and went for a ride of a 100 km. First we went to see the Asklepieion the centre of the ancient medicine where Hippocrates worked. After that we went to Zia, a small village in the “mountains” where you can watch the best sunset on the island, unfortunately we were there at 14.00 so we didn’t see it. The next stop was a village not far away from Zia, but as Greek maps are more like:
Map of Kos

where the largest distance is 46km. So we didn’t manage to find that village, or we did but just didn’t know that, but we found something else, an ancient tomb. Here Taja found an old man, that was talking something about the Pope, but we actually didn’t understand a word. I think he would be happy to get some visits and tips. :) We then drove for some kilometers to the most beautiful beach I have seen on this island. Where we jumped in the water and enjoyed the cool breeze. I’m disappointed only because we didn’t know that Kefalos was so near and we didn’t go there. :( The way back was more relaxing and the sun was not burning so much anymore.

On Sunday we were supposed to take a tour of three island near Kos with a boat, but there was a strong wind so boats didn’t leave the port. We were really disappointed, so we took a pair of bikes and went to the beach of ours.

On Monday we went to the bank because of money problems. The bancomats didn’t want to give us money, so we had to do some bureaucracy. The first bank could not do anything, so we went to the National Bank Of Greece, where waiting in the queue Taja called a number on the back of the credit card and a man told her that our cards are blocked for transactions abroad, so he unlocked them and you wouldn’t believe, we got money. :) After that we went sightseeing, ancient Agora, the Gym and some others. In the afternoon we went to a beach not far away from the hotel and stayed there until sunset. In the evening we went for a walk around the town and Taja booked a tour of the three islands for Tuesday.

The boat was full of Scandinavian tourists. We went to “the blue lagoon” (the just call it like that) where we ate some really good souvlaky, the next stop was a small town with a fantastic beach where live around 10 people and run 3 restaurants. The second island was Kalimnos, a nice city with a lot of work and stuff. We just had a beer to freshen up and then left the port. Actually, there was no third island :) only a small rock where we took a bath from the boat. Anyway, at the end of the day we were exhausted.

And there remains the last day. A morning walk trough the rest of the sites we didn’t manage to see yet like the fortress, a bath on a beach near the center. After some hours of reading my second book of “The hichhiker’s guide to the galaxy” we ran to the hotel, took the baggages and jumped on the plane for home.

I must say just that Kos is a beautiful island and that the vacation was relaxing as ever but I noticed that people there don’t care where all the trash goes. They should really think about bins on every 10m rather than motorbike renting offices.

junkjard
When I was there I thought about everything that I will blog when I’ll be back, but unfortunately the tooth of time ate my memory. :P

This one is really fun!

September 2nd, 2007

radko fan

Autotools note

July 21st, 2007

Doing:

AC_CHECK_LIB([gstreamer-0.10],
[gst_init],
[GST_LIBS=`pkg-config –libs gstreamer-0.10`],
AC_MSG_ERROR([Gstreamer-0.10 not found], [2]))

AC_SUBST([GST_LIBS])

is no good.

In this case AC_SUBST overwrites GST_LIBS and makes it “empty”.

This:

AC_CHECK_LIB([gstreamer-0.10],
[gst_init],
AC_SUBST([GST_LIBS], [`pkg-config –libs gstreamer-0.10`]),
AC_MSG_ERROR([Gstreamer-0.10 not found], [2]))

is much better.

Category added

July 21st, 2007

I’ve added a new category “Notes” to my blog.

The posts under this category will be notes for myself that (I hope) will come useful to you too.

Bad Vista

July 20th, 2007
Bad vista

I’m going to Greece

July 11th, 2007

My girlfriend and I decided to take a week just for ourselves and go for a holiday on the Kos island.

We are leaving today so I’m in a bit of hurry writing this post and I will make a better report when we are back with some photos and stuff.

For now just some images of the place:

Pool Sea Island
Kefalos Ancient

I think the next 7 days we will do a little of sight seeing and a lot of lazy laying on the beach, without bits and bytes rolling over my mind, without bosses and without computers. Just me, my girlfriend, the sun and the Hitchhikers’s Guide To The Galaxy books. :)

Wish us luck.

Hitchhiker’s guide to the galaxy - SOLD OUT!

July 3rd, 2007

I’m going on holiday next week, so i will have time to read a book without mathematical equations in it.

I thought cool, I can read the Slovenian version of the almighty guide again. So I went web-shopping for the whole package of books. After an hour of searching I found out this there’s no first part available. Every site I found, had only parts II,III,IV and V.

I just want all of them! :(

Seems that I will have to search smaller shops in the town.

Wish me luck.

You, J2ME developer, help Jimmy to evolve!

July 3rd, 2007

We, the JimmyIM crew, are in need of help for further development of this open source application.

The main problem is to port the application to “all” devices, the second the debugging of the protocol implementations and the third is advanced feature and GUI implementation.

So, if you ever used J2ME, you would like to, or you maybe just want to contribute to this project, you are welcome to leave a comment, I will contact you.

Zdej mi gre pa že počasi na k****

July 2nd, 2007

Mislim,

ni dovolj, da moramo uporabljat vse tiste pizdarije, ki sem jih naštel tukaj

ne poleg fmfjevske učilnice moramo sledit še logičnim logičnimi povezavam kot je npr.:

http://www.fmf.uni-lj.si/~prezelj/la%20vaje/FRI_2_izp-objava.htm

zato, da izvemo k****** rezultate od k******** izpita.

Res bom en dan popizdu in koga po gobcu od zivcev.