Moths & Maggots

Sunday evening we started a big clean-up after having had moths (German: Lebensmittelmotten ) in the kitchen for some time. We had to throw a lot of things out:
– flour
– rooibush tea (was crawling … yak!)
– noodles
– old cookies
– even some spices
– cocoa
– rice

Here is a list of typical foods plagued by pests like moths etc.

Here is another list (that also contains some fact about moths or so google tells me): Liste der beliebte Irrtümer

Jumpin’ Javac

A colleague suggested not using jikes when he heard about my problem, but I wasn’t using jikes ….

I have a simple class hierarchy of three classes:

Normalizer
USNormalizer extends Normalizer
USValueFactory extends USNormalizer

I have a method normalize in the class Normalizer which is not overwritten by any of the other classes and it is public.

public String normalize(String input);

So one of my methods in USValueFactory calls the normalize method. But the execution never gets there. I put in a log statement before the call of ‘normalize’ and it was written to the logfile and the log statement which I put before the first line of the ‘normalize’ method was never never written to the logfile. This really puzzled me. (And still does).

My colleague suggested using the debugger to find out what was going on. Now that I know what is going on I am more confused than before. What happens is: the stupid programm jumps to an entirely different method in the Normalizer class one that is called ‘normalizeField(…)’. Now please someone help me and explain.

I am really curious what kind of bug this is. I am pretty sure it was going on all the time and I just did not notice because before I was implementing this branch of my class tree it did not matter. But for the US version I overwrote one of the methods the ‘normalize’ method calls.

Did I mention that I am not getting anywhere with this project currently?

ADDENDUM (12:32) the source of my error has been found. A simple dependency in my ant-file was missing therefore the jar for the core-project wasn’t being re-compiled after I made some changes et voilà, disaster ensued. Just cost me about 3 hours or so of work. And I have encountered this problem several times before …..

Violation

So since my last entry some time has passed. I was on vacation and despite having a lot of time I did not write a lot and I did not do a lot of the other things I wanted to – it’s just simply to damn hot this summer. Since Rolland was studying for yet another exam we stayed home. I spent my time mostly playing Warcraft III and designing a character for a new DSA4 campaign. I even started writing a short story about her.

Tonight I dreamt about writing short stories btw and how it is the perfect format for an author to experiment with. I remember some things about it very clearly but I have never before thought such things about short stories. Funny thing that.

Anyhow another thing happened as well, and now I am referring to the title of this entry. For whatever reason our server crashed. The ‘named’ would not start up anymore after Rolland rebooted the server. So I asked my local guru for help, I changed the password so he could log in. Never do that! Have him send you his ssh-key or so. He loaded the iptables configuration and we thought everything was working. But it did not. So I decided to call him again after work. In the meantime I changed the password back to the original one. Then at about 6p.m. I decided to call him and put the password back to ‘fnord’ … but then the roleplayers came early that day and I never called him, instead to of them started ‘fixing’ the server unsuccessfully I might add because the named was simply broken probably after some update. I forgot about the password. Around 9p.m. I went to get something from my computer and voilà there was a message in that xterm for me: “Your server is insecure NOOB!” I only realized what happened minutes later. Well so someone had made a script iterating of the address-space of our provider attempting root logins on any computers found probably with the top20 of favorite passwords he then copied a script on to the root account that deleted all data: all logfiles and all user home directories as well as the root directory. What else it did was indeterminable since the logfiles were gone. I could write that perl script. But of course the person who hacked the server did not know just another ‘script-kiddy’. At first I was mad, then I was raging and later I wanted to hurt whoever did it – a lot.

Well currently we are back on the net with a fresh installation and secure passwords and of course a ‘hardening’ session for the server is planned. In the future logging in onto the root account from outside will be simply impossible.

Note to self: if you have several network cards in your server make sure all configurations point to the one you are using!!! Fix the dsl-startup script for example! And forwarding is set in the /etc/network/options. Plus all the rest I forgot already.

What else happened? It’s hot, it’s hot and it’s hot. Did I mention …. we went to M’ERA LUNA 2003 festival near Hannover. I only went to see Within Temptation again … and the concert was great. Only I missed the first half of my favorite song ‘Deceiver of Fools’ 🙁 The Nightwish concert was ok, though the others thought it was far below their standard (actually they said it was bad). Project Pitchfork is not quite my style but the songs aren’t easy listening, I might like them after hearing them several times. I liked ‘Deine Lakaien’ and again the others said the performance was lacking …. whatever. We all like Apocalyptica, this time I even saw the stage.

So and now back to work … I have some bugs to fix.

Don’t try this at home

and why would you. I should open a new category that includes the intersection of Java and Rants and the name would be “Errors I will not repeat” …. today I did the unbelievable: the one and only object in my webservice that cannot be static is the one that opens and closes database connections. Oh well of course the data objects cannot be static either but that is obvious. And I was wondering – when testing my service with multiple clients – where all the exceptions came from “Asche auf mein Haupt”, stupid error. Stupid. Stupid. Don’t try this. And repeat after me: “You do not make the data-base connection static, you do not make the data-base connection static, you do not ….” Oh come on laugh some, I did too (because: oh big surprise it didn’t take me long to localize this error).

Not my day

I started the day playing some basketball, well wasn’t even so bad I even scored a couple of points. But then I got to work, and I am sure this list will grow:


  • at work I started of with cleaning up my cvs which got broken during a large refactoring session on friday, well what happened was that CVS luckily is foolproof. I was already crying and screaming that I deleted my own sourcecode and nobody to blame for but me.

  • my code still there, I go to work. First funky error turned out to be my effort at reducing NullpointerExceptions so in the middle of a while loop I wrote if(field==null) break; which was only supposed to stop this iteration, but that is not the way it works, I KNOW 🙂

  • next I am redesigning some more stuff, trying to be cool I use an ‘instance’ of if-else to test which kind of object is given to the constructor as parameter, only minutes later I notice that overloading would have done the trick

‘Temp’-t(h)ing

Same project different class, without further commentary.

Vector results = new Vector();
while(set.next()){
    results.add(set.getNext());
}
Vector temp = new Vector();
for(int i=0;i++;results.size()){
     Object item = results.get(i);
     if(item fulfills something){
          temp.add(item);
     }
}
results.clear();
for(int i=0;i++;temp.size()){
    results.add(temp.get(i);
}

No I cannot resist.

while(true)

My project is doing fine currently, after my decision to throw away all code not written by me. I inherited the project I must add. Today I was taking the last bits of ‘foreign’ code to go through and see what functionality I am still missing. I encountered this here construct:

while(true){
    ....
    if(something){
        .... 
        break;
    }
    else {
        ....
        break;
    }
}

When I realized what was happening I wanted to cry and then laugh some. I am still not sure wether I should go kick the author somewhere it hurts. (The complete project was filled with such ‘jokes’ btw)

Brainbug Whatshisname?

So there we were talking about TV shows, I tried to tell Rolland that that guy on friends who had a date with Tiffy

Me: “I can never remember her name, you know the one with the same name as one of the sisters in charmed, no you don’t? Oh the one who has a twin sister, now please there’s half the joke gone, whatshername? Oh well uhm yeah Tiffy had a date with this guy who looked like whatshisname?”
So Rolland goes: “That was Sean Penn, he only had a minor role anyway.”
Me: “Well yeah he looks like the guy in Once upon a time in the west, whatshisname?”
Rolland: “Henry Fonda?”
Me: “No, Henry Fonda has Blue eyes.”
Rolland: “Which one?”
Me: “Harmonica, he looks like Harmonica.”
Rolland: “He does not”
Me: “So whatshisname?”
Rolland: “Don’t know.”
Me: “Anyhow the guy who had a date with Tiffy …”
Rolland: “Her name’s not Tiffy!”
Me: “Let’s call him Samson.”
Rolland: “Yeah but whathisname?”
Me: “I even know the name of the female actress in that movie.”
Rolland: “Claudia Cardinale.”
Me: “Yeah but whatshisname?”

It was kind of hard to go to sleep after this truly in-depth discussion of ‘Friends’. I must add that I watch TV series only as a by-product to surfing and writing on the couch in the living room, which might be an explanation for my poor grasp on the story. But what’s the name of the actor who played Harmonica? This really bugged me ….. because I can never remember his name, I can remember at least two more times that I was trying really hard to remember his name one was while actually watching the movie in the Karlsruhe Open Air cinema last year.

Imdb was a huge help again finding out it was Charles Bronson. But something is wrong with this guy, I mean why should I forget the name all the time, it’s neither complicated nor tooo commonplace. I tell you something’s fishy.