Encoding Follow-Up

The other day I had some trouble with weirdo encodings. No more though. This Re: iconv and UTF-8 encoding posting on a mailing-list brought me to the correct solution:

iconv -f IBM850 -t ISO-8859-1 -o fnord.txt stupid-input.txt

Now file fnord.txt outputs fnord.txt: ISO-8859 text, with very long lines, which is the desired result! And voilà I have all the nice German ‘Umlaute’.

Happy me for a Friday afternoon, and now I am gone from here 🙂

Cookie time

The last few evenings I spent baking different kinds of cookies for december and christmas. I didn’t make any last year and I am not sure about the year before. But this year I even made the famous ‘Zimtsterne’ (cinnamon almond star shaped cookies). My back is hurting like hell from about 5 evenings spent standing in the kitchen: kneading dough, cutting and forming cookies, waiting crouched in front of the oven till they are done and decorating them afterwards.

Of course I ‘tested’ all the cookies, probably a bit too much.

I’ll give some to my parents, as my mother does not feel like making any herself this year, and most of the rest I’ll feed to friends. If I tried to eat them all myself – much as I would like that – I’d be sick, very sick and all my dieting and discipline of the last 6 weeks would have been for naught.

I just love decorating the apartment for christmas, I even took some ‘seasonal’ stuff down to my office and I’ll be bringing some cookies for my colleagues the week before my vacation starts.

Tonight will be hard, I am home alone and those evenings are very hard on my diet. I seem to want to eat all the time when nobody is around. It’s awful. So far I was not successfull. Tonight is another test. I’ll just find something to keep me busy. I have some ideas already ….

encodings

So the data I receive to put into the database is in some weird encoding. a colleague said recode was the right tool to try to convert those nasty files.

apt-get install recode

First shock: recode is really complex to handle.

First nice hint from the manual:

recode -lf l1

gives you the latin-1 tables.

Here’s the the recode manual

Addendum: the “file” tool can tell which encoding a file has. This is VERY helpful. My files have Non-ISO extended-ASCII text instead of the ISO-8859 that I need for the ä/ö/ü contained in German language files.

java and ssh

I need to access some remote files with a java program. The idea was not to use system calls. Now I am trying out java ssh implementations.

So j2ssh was the first I tested. I quit testing more. Because
-it’s nearly undocumented, the few examples are rather complex and since none matches my needs I would have to derive functionality from there
-there is a tutorial online but this covers only the same stuff as the examples
-the forum they have helped me find that the problem I had was not mine but theirs, thx
-I had to write my own javadoc task into their build-file only to find out that just most classes were still undocumented, so the javadoc was of little use
-the current distribution 0.2.6 has an error, it is missing some private key extensions that can be obtained separately via sourceforge
-the only source available is 0.2.5 to which I had to add the task generating the jar-file
-the next that happened was that there was no default public key, it seemed I needed to add some configuration files, since that’s also an undocumented feature I quit testing j2ssh

Next I moved to jsch by jcraft. So far here’s what I found:
-there is a javadoc task, but there are no comments in the code it seems
-there are some more examples, but they are way to complex to understand things, because they are using java.swing stuff in there.
-I experimented with setting some properties like the known_hosts file
-again it is not documented which values have to be set in order to connect and what the values must be, I even started looking into the code, but there is a lot of really basic stuff there I didn’t want to take the time to understand and again: no comments in the code.
– I kept getting an “Unknown Host” or “Hostkey rejected” type of exception but they have only one type of exception with different messages and that class is not documented like most.
– I quit.

Before I started with the other tools I already rejected the Mindterm ssh implementation because of the weird license they have. I just cannot use anything that is not free.

Now after testing the jcraft implementation I tried this:

Runtime runtime = Runtime.getRuntime();
runtime.exec("scp login@host:file.txt /home/me");

Oh and it just worked. So for now that is my solution, it takes 2 seconds to implement instead of one and a half days to arrive at undocumented errors!!!

Why Goto is Evil

Today I didn’t read mail before going to work. I felt naked and vulnerable when I turned on the monitor to take a look at my email. Usually I read mail from home to be prepared for all the things that could have happened since I left work the day before. Lucky me the only ‘stress’-inducing mail I had was from yesterday and I’d read it sometime last night.

Now I am not quite as mad anymore but what is it that makes people not think?

Step 1: Meeting, evrything is discussed full length and after a while an interface is designed that satisfies the needs of all those involved in the project.

Step 2: Implementing. So this was a small project and I was done implementing after two weeks.

Step 3: Some time after Step 2 is finished, there’s an email or call from someone else involved saying about this: “Hi, we tested everything and it works fine, but we would much rather have it that way ….”

Step 4: Goto “Step 2”

Remember? Goto is evil!!!!!

The Way is the Thought

I am taking my bike to get to work 99% of the time. The only time I’d leave it at home would be if it was snowing or if there was fresh snow on the streets. That rarely happens here and then I would walk and enjoy the snow. I don’t care wether there is wind or rain, wether it is cold or even dark outside when I leave the house, I just love biking to work. In the beginning I tried to get to work as fast as I could. Now I am always going rather slow because it’s the best time of the day. My thoughts are fresh from just having woken up. Nothing and no one could have disturbed me. I am at rest and I can think. That’s what I do and that’s what I am trying to write down now.

Writing – and currently mostly this blog – is me. I need it. I always have something to write. A blog or a diary, sometimes poems and sometimes rpg campaigns. I am not a professinal writer by any means – though I often wish I was – but writing is very important for my personal well-being. My job is fun but I cannot imagine doing it for the next 40, 30 or even 20 years, it is just not as fulfilling as I believe that, which you do for at least one third of your time each day, should be.

Writing is different. It means a lot to me to express myself in writing, to make my thoughts clear – to myself mostly. To write them down I need to think things through.

The other day someone asked me how I wrote. It’s just always there. Since I am writing in English a lot of my thoughts are in English too, because more often than not I am thinking stuff that I want to write down. More often than not, I don’t write them down in the end. But each morning as I go to work English sentences are going around in my head, how I could write stuff down, ideas.

Writing is a bit like being a photographer. When I have a camera with me I always view the world around me as a possible photograph, everything is evaluated for the purposes of the next picture to be taken. Essentially it is the same with writing, everything I see is constantly being evaluated: The weather, the people around me, the discussions I have with other, the way I experience anything. Sometimes it goes so far I think of myself in third-person because that is my favorite writing perspective. The thoughts, the quiet thinking on my way to work relaxes me and when I am that relaxed I can just sit down and start writing about my ideas and once there are the first few sentences down, the flow rarely stops quickly.

What I cannot do – yet. is focussing my thoughts on specific topics or stories to create. I always write about very personal things that just came to my mind (with the exception of my UA campaign next door), that is the reason why I am not becoming a professinal any time soon. And never mind the tons of rather irrelevant postings I write here because I would love to write at that moment and I feel the semblance of the necessary peaceful state inside me but I am not quite there. What is not necessary for me to write is happiness or rather contentedness, I write a lot more when I am unhappy.

Current playlist

Just for keeps. I might want to look back in a couple of years wondering why I ever listened to all this. No actually I am pretty sure I’ll like all of this even 10+ years from now.

Alphaville – Forever Young, America – A Horse With No Name, Animals – House of the Rising Sun, Beto Vazquez – Sadness In The Night, Bjoerk – Hunter, Blind Melon – No Rain, Bob Geldof – The Great Song of Indifference, Bob Marley – No Woman No Cry, Camouflage – Love is a
shield, Chris Isaak – Baby Did A Bad Bad Thing, Christy Moore – The Deportees Club, City – Am Fenster, Cosmic Baby’s Hands on Yello – Dr. van Steiner, crosby, stills, nash, and young – cathedral, david bowie – dead man walking, death in june – black angel, death in june – fall apart, Die Aerzte – Grace Kelly, Die Aerzte – Gwendoline, Die Aerzte – Ich weiss nicht ob es Liebe…, Duran Duran – Ordinary World, Edenbridge – Arcana, Edenbridge – Winter_Winds, Electric Hellfire Club – Bela Lugosi’s Dead, Faith No More – I’m Easy, Faithless – Insomnia, falco – jeanny, Falco – Out of the dark, Frank Zappa – Bobby Brown, Fugees – Killing me softly, Fury in the Slaugtherhouse – Time to wonder, Gone In 60 Seconds – The Cult – Painted On My Heart, Heroes del silencio – la sirena varada, Him – Join Me, Hooters – All you Zombies, Hooverphonic – Mad About You, JBO – Ein Guter Tag Zum Sterben, Lenny Kravitz – Are you gonna go my way, Lenny Kravitz – Believe, Lenny Kravitz – Circus, leonard cohen – everybody knows, Lou Reed – Perfect Day, Lustmord – Pyre (Necro Cristi), Madonna – Frozen, Manowar – House Of Death, Manowar – Swords In The Wind, Marla Glen – Believer, Massive Attack – karmacoma, Massive Attack – Man Next Door, Mayday – Sonic Empire, Metallica – Nothing Else Matters, morcheeba – trigger hippie, Morcheeba – world looking in, New Model Army – 51st State, Nick Cave & Kylie Minogue – Where The Wild Roses Grow, Nightwish – Angels fall first, Nightwish – She Is My Sin, Nightwish – Walking In The Air, Nirvana – Lake of fire, Nirvana – Something in the way, Oasis – don’t look back in anger, Ookla The Mok – Tiberius Rising, opeth – the night and the silent water, Penitent – A Mournful Bridge Over A River of Tears, portishead – only you, portishead – sour times, Pretenders – I’ll Stand By You, Queen – Bohemian Rhapsody, Queen – Innuendo, Queen – Who wants to live forever, Rage against the machine – wake up, Rammstein – du hast, Red Hot Chili Peppers – Under the bridge, Robbie Williams – Come undone, Robbie Williams – Feel, Robbie Williams – Handsome man, Robbie Williams – Monsoon, Robbie Williams – No Regrets, Robbie Williams – Sexed up, Robbie Williams – She’s The One, Robert Miles – Children, Savage Garden – To the moon and back, Seal – Kiss From A Rose, Sirenia – Meridian, Sisters of Mercy – More, Smashing Pumpkins – Disarm, Smashmouth – Walking on the Sun, Soul Asylum – runaway train, Soundgarden – Black Hole Sun, the Verve – bittersweet symphony, Theater of Tragedy – Cassandra, thievery corporation – the mirror conspiracy, Tori Amos – Crucify, Tricky – Overcome, tuatara – dark state of mind, U2 – mysterious ways, U2 – Staring At The Sun, Ugly Kid Joe – Cats in the cradle, Vintersorg – Astral and Arcane, Vintersorg – Rainbow Demon, Vintersorg – The Enigmatic Spirit, Whithin Temptation – Caged, Whithin Temptation – Deceiver Of Fools, Whithin Temptation – Ice Queen, Whithin Temptation – Never-Ending Story, Whithin Temptation – Whithin Temptation / Mother Earth, Within Temptation – Blooded, Within Temptation – Enter

Good Books Never Die

Some Quotations from Wuthering Heights one of my all-time favorite books. Just read the quotes and if you don’t want to read the novel afterwards, shame on you.

Heathcliff about Catherine:
W.H., pg.117: “Why did you betray your own heart Cathy? I have not one word of comfort. You deserve this. You have killed yourself. … You loved me – then what right had you to leave me? Because … nothing God or satan could inflict would have parted us, you, of you own will, did it. I have not broken your heart – you have broken it; and in breaking it, you have broken mine. So much the worse for me that I am strong. Do I want to live? What kind of living will it be when you – oh God! would you like to live with your soul in the grave? […] I forgive what you have done to me. I love my murderer – but yours! How can I?”

MT Templates

Today I decided to re-organize my different blogs like the Dsa Log, this one and a bunch of others which I all run on one movable type installation on my homepage.

I kept copying templates from one blog to another and I wanted the different css stylesheets to be compatible so I could use them as alternatives on each page.

So I made a central directory that all blogs access to get certain templates. Currently all the archives, the Main Index, rss feeds and some modules are stored there. I usually do not edit the templates in the MT Menu, instead I copy them as files to my local computer, edit and publish again. So I simply linked all the relevant templates to the same files. The work wasn’t to complicated because nearly all the blogs were using the same templates anyway.

Since all that would have involved a lot of clicking around in the MT Menu I did the whole thing directly in the mysql database.

I also created a central stylesheet repository. Now each blog gets one stylesheet and gets all the stylesheets in the repository as alternates. Using the same layout templates all the stylesheets are compatible to that layout.

The only other special module for each blog is the ‘sidebar’ which contains the ‘recent entries’ stuff and the like.

Since I have quite a few blogs running on that installation and keep changing the styles all the time, this makes the work much easier because now I guarantee myself the always same ‘tagging’ which makes layouting a lot easier.