Friday, November 30, 2007

Wishlist

When I'm gonna have some spare hundred thousands euros or somebody would like to donate some hundred thousands euros to me I'm definitely gonna buy all these or the up-to-date versions if these become old. I hope it won't take me too long to become a billionaire. :)

i-Mate Ultimate 7150

i-Mate Ultimate 7150

Quite an advanced communicator with 520MHz processor inside, VGA screen, QWERTY keyboard, two cameras, FM radio, TV out and WiMAX and HSDPA support. For all these features I can even stand Windows Mobile 6 it is running.

MacBook Pro

MacBook Pro

Thin and stylish with 2.6Ghz dual-core processor and 2GB of memory on board running Unix-based operating system which heavily borrows from BSD with all the standard Unix facilities available from the command line interface. Isn't it every geeks's dream?

Canon EOS 40D

Canon EOS 40D

Photography is something I've always wanted to pursue but I've never had a proper camera for that. I used to have Canon PowerShot S30 which wasn't that bad and had manual and several semi-automatic modes and even could take RAW pictures but this one is a way better anyway.

Sony PlayStation 3

Sony PlayStation 3

I'm not that much into gaming and I've never been but I wouldn't mind having such to kill time sometimes or play some media. I can also install Linux which is officially supported.

BMW M6 Convertible

BMW M6 Convertible

The quickest BMW ever produced with more than 500 horse powers under the hood with programmable engine power, gear transmission speed as well as Dynamic Stability Control and Electronic Damping Control. Who wouldn't want such?

Permanently here. Will be updated when I figure out something else.

Wednesday, November 28, 2007

Yoghurt And Spoons

Lack of clean spoons almost saved me from eating 400 grams of delicious gooseberry yoghurt this late. It didn't work mainly because I decided that I can actually wash one for such an occasion and I did. If I hadn't had any spoons at all or if I hadn't bought any yoghurt today this problem wouldn't have existed. But it does exist and I have something to do with it. One option is to throw away all my dishes but eating out might eventually become a problem. Another option is to throw away all the yoghurt I have but this is definitely something impossible. So I just shouldn't have bought it but I did buy. I even ate it already. No regrets. They don't work. I'll just have to deal with 360 extra calories in my body.

Tuesday, November 27, 2007

Farewell, Auto-Helander

I was officially told that there's no job for me in Auto-Helander anymore and I was told not to bother anyone asking for it. If there's anything I should contact Seppo who is kind of my new boss. I've been working for NTR-Finland for awhile already and nothing actually is gonna change for now. I just can't be sure that there will be a job for me after my schedule will change the next period. Part-time is not an option in NTR but this semester I had Monday and Friday completely free so I had a chance to work at least twice a week. But I'm afraid it's not gonna last for long. I really hope there will be some project for me in lab next February as I was promised. I don't wanna go back to sponger state.

Monday, November 19, 2007

Being Minority Again

I haven't felt this way since my first year in Finland. Those days I've been hanging out mainly with Finns and I didn't speak Finnish at all. And as soon as there was more than one Finn around I was completely left out of conversation cause they were speaking Finnish and only Finnish.

Russians do the same. Germans do the same. Everybody does. But I know how bad it feels. I remember those days I spent on Malta. 99% Germans, 1% Polish and me. That's why nowadays when I notice Ruxi being left out I just start "dubbing" Russian speech, translating what people are saying right after them, or just start having a conversation in English with her.

Today we picked Andrei from Haparanda who came to visit Ruxi. It was him, Ruxi, Ovidiu and me. We bought some beers and huge family kebab pizza from Sweden and went to Ruxi's place. I was bored the whole evening and there was nobody willing to translate Romanian to me. I hope it won't be this way the whole week he's here.

P.S. I'm neither pissed at you guys nor upset. Don't worry.

Another Boring Sunday

It turned out the only thing I left my apartment for today was to eat out. I was hoping to take a walk in the forest or at least somewhere around but after eating nobody shared my wish anymore so I just had to walk back home as I don’t find it very exciting to have a walk alone. I need somebody to share the excitement about the snowflakes falling from the sky and sparkling on the ground, about the crackle fresh snow makes when you walk on it, about the wind and the frosty feeling on your face. I hate vegetating at home.

Saturday, November 17, 2007

Smarty Template Engine

Instead of reinventing the wheel I decided to check the existing solutions and came across Smarty, a free web template engine written in PHP. It is exactly the framework I had in mind and already started to develop myself so I just switched to it.

Basically web-development can be divided into two parts: actual programming (database access, data processing etc.) and web-design (interface, data presentation, page make up etc.). Program code generates the content and template engine is responsible for its presentation. This way separation of concerns can be easily achieved.

Features available are quite impressive:
  • Caching
  • Compiling
  • Variable modifiers
  • Template functions
  • Control structures
  • Loops
  • Filters
  • Resources
  • Plug-ins
  • Add-ons
  • Debugging
Everything you might need developing templates. This is how it works. This chunk of code I wrote is outputting the parsed feed posts:

{foreach from=$posts key=id item=post}
 <h1>
 {$post.title}<br />
 {if $lang == 'en'}
  {atom_convert_date date=$post.published}
 {else}
  {rss_convert_date date=$post.pubdate}
 {/if}
 </h1>
 <div class="post">
  {if $lang == "en"}
   {$post.atom_content}
  {else}
   {$post.description}
  {/if}
  <div class="comments">
   {if $lang == "en"}
    <a href="{$post.link}" target="_blank">
    {blogger_comments_number comments=$post.replies_title}
    </a>
   {else}
    <a href="{$post.link}" target="_blank">
    Комментарии
    </a>
   {/if}
  </div>
 </div>
{/foreach}


Variable $posts is assigned with parsed feed object which can be either parsed RSS feed of my Russian blog or parsed Atom feed of my English blog. I defined three custom template functions: atom_convert_date, rss_convert_date and blogger_comments_number to parse the dates and number of comments supplied in the feeds. The code is included to the page skeleton using {include file=$include} statement where $include variable indicates whether parsed feed or just text should be included. The whole page is generated the following way:

$template = new DmitryFi();

$template->assign('lang', $lang);
$template->assign('title', $title);
$template->assign('feed', $feed);
$template->assign('balloon', 'Have a job to offer?<br/>Check my <a href="/cv.xhtml">CV</a>!');
$template->assign('label', $label);

if($posts = @fetch_rss($feed['url']))
{
 $template->assign('include', 'feed.tpl');
 $template->assign('posts', $posts->items);
}
else
{
 $template->assign('include', 'text.tpl');
 $template->assign('text', 'Unable to parse the feed. Please try again later.');
}

$template->display(TEMPLATE.'.tpl');


The result is compiled and stored increasing the performance significantly next time the page is requested.

Thursday, November 15, 2007

Alko Strike

The only source of alcohol in Finland is on strike. I guess we have three options left. Here they are:
  • Go to Sweeden to Systembolaget
  • Be contenet with beer and cider
  • Quit drinking and partying
The cheapest one is the last one but are we gonna be able to cope with this depressing environment with the main antidote being taken away?

Wednesday, November 14, 2007

New Layout

Here it is! Welcome the new layout! I've rewritten the style sheet from scratch taking a different approach this time and improved the layout fixing some minor bugs and making some stuff simpler. I got tired of Family Guy and switched to South Park. And I like blue color much more than red. PHP source code and template engine are next to be improved and enhanced.

Thursday, November 08, 2007

Snowing

Snow

I had to dig it out twice today.

Wednesday, November 07, 2007

Jokela Massacre

 (182x184, 34Kb)I thought this happens just in States. Obviously not. This text was in guy's YouTube profile:

Sturmgeist89
Name: Pekka-Eric Auvinen
Age: 18
Male from Finland.

I am a cynical existentialist, antihuman humanist, antisocial socialdarwinist, realistic idealist and godlike atheist.

SI VIS PACEM, PARA BELLUM! JUSTITIA SUUM CUIQUE DISTRIBUIT! SIC SEMPER TYRANNIS!

I am prepared to fight and die for my cause. I, as a natural selector, will eliminate all who I see unfit, disgraces of human race and failures of natural selection.

You might ask yourselves, why did I do this and what do I want. Well, most of you are too arrogant and closed-minded to understand... You will proprably say me that I am"insane", "crazy", "psychopath", "criminal" or crap like that. No, the truth is that I am just an animl, a human, an individual, a dissident.

I have had enough. I don't want to be part of this fucked up society. Like some other wise people have said in the past, human race is not worth fighting for or saving... only worth killing. But... When my enemies will run and hide in fear when mentioning my name... When the gangsters of the corrupted governments have been shot in the streets... When the rule of idioracy and the democratic system has been replaced with justice... When intelligent people are finally free and rule the society instead of the idiocratic rule of majority... In that great day of deliverance, you will know what I want.

Long live the revolution... revolution against the system, which enslaves not only the majority of weak-minded masses but also the small minority of strong-minded and intelligent individuals! If we want to live in a different world, we must act. We must rise against the enslaving, corrupted and totalitarian regimes and overthrow the tyrants, gangsters and the rule of idiocracy. I can't alone change much but hopefully my actions will inspire all the intelligent people of the world and start some sort of revolution against the current systems. The system discriminating naturality and justice, is my enemy. The people living in the world of delusion and supporting this system are my enemies.

I am ready to die for a cause I know is right, just and true... even if I would lose or the battle would be only remembered as evil... I will rather fight and die than live a long and unhappy life.

And remember that this is my war, my ideas and my plans. Don't blame anyone else for my actions than myself. Don't blame my parents or my friends. I told nobody about my plans and I always kept them inside my mind only. Don't blame the movies I see, the music I hear, the games I play or the books I read. No, they had nothing to do with this. This is my war: one man war against humanity, governments and weak-minded masses of the world! No mercy for the scum of the earth! HUMANITY IS OVERRATED! It's time to put NATURAL SELECTION & SURVIVAL OF THE FITTEST back on tracks!

Mum, WiFi, Insomnia

Mum has non-malignant growth and went through some surgery already and receives some treatment now. Nothing good about that but at least it's much better than malignant growth which was suspected which tends to relapse and is the way more dangerous and quite fatal.

And I finally got that Lappia certificate from IT support and installed to my Windows Mobile based PDA. I had some difficulties installing it as Windows Mobile didn't want to open files with .crt extension. Changing it to .cer helped. I configured PEAP and now I have wireless network all around the school.

Once again I cannot sleep. I shouldn't have taken that nap after school. I slept for about two hours and now don't feel sleepy at all. I should stop taking naps. They make no good to my day regimen.

Tuesday, November 06, 2007

Mio DigiWalker C220

 (250x200, 75Kb)

I've been driving around with this gadget for awhile and my verdict is that it sucks. The device itself is not that bad but without proper maps it's just a useless piece of crap. The maps seem to be quite out of date. It doesn't have a roundabout built couple of years ago and it takes me to roads which don't exist for something like 5 years already. There's no update available and it won't be in the nearest future as the producer claims that the maps are from the January of this year. Definitely not.

Pedestrian Crossing

Pedestrian Crossing

Just a regular pedestrian crossing on one of the streets of Kemi ending with a ditch and a light pole. Very practical. We also have a roundabout with missing roads which they didn't have money to build. I should take a picture of that one also.

Saturday, November 03, 2007

Huttunen

Huttunen

This is Huttunen and me next to him with weird hair and face expression. I used to rent him and now he's for sale. The more I look at this picture the more I want to buy him. This horse-buying fever is contagious! Damn it.

Saturday

Thursday high, Friday drunk. What's gonna be tonight? Luckily, Alko, the only source of alcohol in Finland thanks to the state monopoly, is closed today due to some very special day for Finns during which they should visit the graves of the dead. What is that to do with shops? I have no idea myself. But we're in Finland where everything being closed doesn't surprise me anymore.

Thursday, November 01, 2007

RFID Timer

 (454x253, 15Kb)

Competitor passes the first reader, ID is read, first board tells the second one to start counting time. Competitor passes the second reader, ID is read, second boards tells the PC the time and ID which are stored in database. Pretty simple.