Thursday, December 27, 2007

Polish?

I was talking to some chick in bar last night. She left and came with a friend.
- My friend doesn't believe that you're English.
- Well, I'm not.
Friend:
- Where are you from?
- Russia.
- Oh, nice, I don't know that many Polish people!
- WTF?

Wednesday, December 26, 2007

Boxing Day

I should move away from here. I should. I am sick and tired of this. The country itself is forcing me to eat out. Shops are closed once again and I didn't get prepared at all. It's humiliation of human right to get food! It's a conspiracy between the government and public catering! And most likely they share the profit! It's not enough for them to close the shops at six or nine. It's not enough to force them to stay closed on Sundays. The shops are closed today after four just because it's some religious holiday. I'm atheist and I want to go shopping but I can't. It's not fair. I have no food and I an hungry. Seems like I'll have to go get some burger or pizza once again. I miss shops being open 24/7 where you can buy strong booze at 3 am being just 18. This will never happen in Finland. Stupid Finnish laws.

Tuesday, December 25, 2007

Merry Christmas

Being Orthodox makes this Christmas nothing significant for me and being brought up in Russia with its Soviet past makes even Orthodox Christmas nothing significant either. Communists didn't like the fact that people believed in god and celebrated Christmas but they couldn't eliminate the holiday completely so they just replaced it. Basically, it's the same thing just on a different day and without any religion being behind it. Christmas tree is called New Year tree, Russian version of Santa Claus comes on the New Year night instead of Christmas eve. People give presents, eat a lot and celebrate pretty much the same way.

But living in a country where Christmas is one of the most important holidays makes me follow the local traditions and celebrate with everybody the way they do it. So we went to Ylläs last Saturday and came back today. I'm back with a bottle of Glen Parker Single Malt Scotch Whisky, a bottle of Absolut Disco Limited Edition Vodka, Leatherman Multi-Tool and 800 grams of Fazer chocolate sweets. Nice. I'll have something to do before the school starts in the middle of January. :)

On Sunday I went to slopes to snowboard and it was no good. Lack of snow felt even in Ylläs. Slopes were icy and hard. I hope this spring it will be better.

Wednesday, December 19, 2007

Esa & Ovidiu


Wednesday. Around 4 am. Ruxi's place.

Sunday, December 16, 2007

Deluge

I changed my BitTorrent client from Azureus to Deluge and I am quite happy about that. Python with GTK works way faster than Java with SWT and loads my poor little CPU way less. The features are sufficient, it has everything you might need from a BitTorrent client. I was surprised that Deluge installed by yum from Fedora repository didn't work. It started few times successfully but most of the time it didn't start at all or was just showing empty windows and not responding. Removing the package and building it from the source helped.

Thursday, December 13, 2007

Courses

I'm done with Embedded Systems Project and Advanced Java Programming. Java was piece of cake to make and Embedded Systems Project's product didn't quite work but at least we tried. Digital Filtering and Advanced Finnish are left and I'm on a holiday till next year.

FreeBSD

I tried it few years ago and I didn't like it that much then. It was a bit different from Linux I am used to and quite unfriendly. I gave it another try and seems like it's staying. It's up and running and running quite well. I can even feel the vibes of real Unix heritage and reliability. Just took some time and patience to read the handbook and everything became pretty clear. I was surprised how easy it was to rebuild the whole base system including kernel from cvs just by few commands. Gentoo Linux is built from sources also but it's not as easy and I didn't like it that much. I'm more into rpm-based. Maybe because of my lazy nature though having little troubles might be too boring sometimes. Deploying a mail server will make me busy for awhile as I tried once on my Linux box and I didn't succeed. Everything seemed right but I still couldn't receive mail. I guess I screwed up MX record in DynDNS making the entry pointing to an IP address. This time I'll take my previous mistakes into consideration.

Tuesday, December 11, 2007

Teamwork Sucks. Sometimes.

I couldn't believe my eyes when teacher showed us presentations timetable in which each person was assigned with a separate time to hold a project presentation. "Do we have to make separate presentations?" I asked the teacher. "Yes, you do" he answered. Then I couldn't believe my ears but it was true. What about the team work? Team spirit? This is something they praise so much in this school. "Lerning by doing" is considered the most efficient method and the "doing" part is supposed to be done in teams and everybody's graded on everybody's performance and everybody is learning and everybody is happy.

But not this time. And I'm quite happy about it. I'd prefer to be graded for my skills and my own contribution as there are freeriders and they will always be. I know it will be different in real working life when work is carried out in teams but the level of teammates' skills will be surely way higher than here in school. Sometimes it seems that most of the students aren't that interested but I doubt that non-interested person will pursue a career in the field he's not interested or not good in. I'm really wondering sometimes why did they even start studying here. But it's their business. Not mine. But why should I suffer?

Sunday, December 09, 2007

Loafing Again

Another Sunday and once again I'm sitting at home alone and loafing. Though watching Mythbusters can be considered self-development but it's more entertaining than educating. I remember school course of physics quite well anyway and physics is what all those myths are about. I'd better read something. Or eat. Or eat and then read.

Saturday, December 08, 2007

Liver, I'm Sorry

Forgive me, liver, for Tuesday, Wednesday and Friday. I hope I didn't hurt you that badly. I promise it won't happen tonight. I'm not going to drink and I'm not going out.

Tuesday, December 04, 2007

Monday, December 03, 2007

Saturday

Ounasvaara

Me, Masha and some Asian dude.

Saturday, December 01, 2007

Ounasvaara

Winter came and we went to Rovaniemi to snowboard in Ounasvaara. It wasn't that impressive but it's the most available one. Pullinki is closed and I'm not sure whether it will be opened this season at all. Ylläs is too far and Kalli is shit. It would be way better if I wouldn't have to drive almost two hours there and almost two hours back on the road full of police cameras but without any light on most part of it but it's the bast I can have right now. This Christmas I'll spend in Ylläs.

Password Generator

Password Generator

Instead of finding ready solution I made one myself. Just for fun because I was bored. Yes, I have life and I did have it today. Just took a little break for awhile. It's pretty simple but platform-independent. Written in Java. Grab the jar if you need. If double clicking it doesn't work try java -jar PassGen.jar in console.

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.