Thursday, December 27, 2007
Polish?
- 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
Tuesday, December 25, 2007
Merry Christmas
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
Sunday, December 16, 2007
Deluge
Thursday, December 13, 2007
Courses
FreeBSD
Tuesday, December 11, 2007
Teamwork Sucks. Sometimes.
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
Saturday, December 08, 2007
Liver, I'm Sorry
Tuesday, December 04, 2007
Monday, December 03, 2007
Saturday, December 01, 2007
Ounasvaara
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
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
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
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
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
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
Tuesday, November 27, 2007
Farewell, Auto-Helander
Monday, November 19, 2007
Being Minority Again
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
Saturday, November 17, 2007
Smarty Template Engine
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
{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.