Happy New Year!

I’d like to take this moment and wish everyone a Happy New Year.  Let the new year bring more good to your life and take away the pains and troubles.  Be happy, healthy, wealthy, and have tonnes of fun!

Maybe it’s also a good time to take a brief look back at the year 2008, as well as examine some expectations for the year 2009.

Continue reading “Happy New Year!”

Fedora 10 booting issues

If it so happens that your Fedora install suddenly fails to boot, giving some error messages or a simple “GRUB ” string, then I advise you to boot into rescue mode, install all updates, regenerate initrd image and reboot.  All should be nice and sweet now.

Those of you who need more info, scroll through Common Fedora 10 Bugs wiki page.

Alexander Sorokin, rest in peace

Yesterday I’ve heard the bad news – my uncle, Alexander Sorokin, passed away at an age of 44.  He was on a business trip, almost a 1000 kilometers away from home, when he had a stroke.  He was a really good man.

He was the person who got me into computers many years ago.  He was always involved with technology, and it was him who first arrange a PC for our house.  At first it wasn’t for me, it was for my mother.  But he encouraged my curiosity.  More so, it was him spending countless days and nights in our house, trying to fix the consequences of my curiosity, when important documents got missing or system would get stuck with no way to boot.  All he said after would be “Don’t do this again”.  And on the next occasion: “Oh, that’s OK, I see it’s different this time”.

Strong, kind, smart, and funny.  A very good friend, and an example of a Good Man.  That’s how I will remember him.

Rest in peace…

Perl vs. PHP : variable scoping

I’ve mentioned quite a few times that I am a big fan of Perl programming languge.  However, most of my programming time these days is spent in PHP.  The languages are often similar, with PHP having its roots in Perl, and Perl being such a influence in the world of programming languages.  This similarity is often very helpful.  However there are a few difference, some of which are obvious and others are not.

One such difference that I came up recently (in someone else’s code though), was about variable scoping.  Consider an example in Perl:

#!/usr/bin/perl -w
use strict;
my @values = qw(foo bar hello world);
foreach my $value (@values) {
    print "Inside loop value = $value\n";
}
print "Outside loop value = $value\n";

The above script will generate a compilation error due to undefined variable $value.  The one outside the loop.

A very similar code in PHP though:

#!/usr/bin/php
<?php
$values = array('foo','bar','hello','world');
foreach ($values as $value) {
    print "Inside loop value = $value\n";
}
print "Outside loop value = $value\n";
?>

Will output the following:

Inside loop value = foo
Inside loop value = bar
Inside loop value = hello
Inside loop value = world
Outside loop value = world

In Perl, variable $value is scoped inside the loop.  Once the execution is out of the loop, there is no such thing as $value anymore, hence the compilation error (due to the use of strict and warnings).  In PHP, $value is in global scope, so the last value “world” is carried further down the road.  In case you reuse variable names in different places of your program, counting on scope to be different, you might get some really interesting and totally unexpected results.  And they won’t be too easy to track down too.  Be warned.

Hosting downtime

None of the sites hosted on my sever were accessible for most of yesterday.  That was caused by some emergency maintenace done by the hosting company.  They didn’t warn me before, so I weren’t aware of it coming and for how long it would last.

This is the third downtime for this month.  Needless to say, I am not satisfied with the service no more.  Firstly, the downtimes are too frequent and too lengthy.  Secondly, total absense of notificatios – either before the downtime or after.  No explanations.  Nothing.

I’ve been with this hosting company for more than two years now and it was OK most of the time.  But now, once again, I am thinking about moving somewhere else.   Suggestions?

Gaming experience : PlayStation 3

A couple of days ago I got my hands on a PlayStation 3.  Boy, was that a wrong day of the week!  But let me tell it to you properly…

I am not much of a gamer.  I like games and all, but somehow I don’t spend all that much time playing.  Most of my gaming activities in the last few years were spent either in Quake III or OpenTTD (open source Transport Typhoon Deluxe clone).  There were also a whole bunch of simple games like mahjongg, Desktop Tower Defense, and the rest of the flash entertainment goodies.

I never had a gaming console.  A few of my friends had though.  And back then consoles were very different from PCs.  PCs were in the form of huge and heavy desktops, that were booting too long.  Gaming consoles were of a much smaller size factor, and they were booting faster.  All you had to do was put the game cartridge in, and you were in a game.  And that was fun.

Fast forward to a couple of days ago.  I get this huge laptop bag, which is pretty heavy.  I take it home.  PlayStation 3 is in there, with a bunch of cables, and a few games.  My first impression – PlayStation3 is not much different from a computer.  It’s large, it’s heavy, it’s noisy, and it’s blowing hot air to its side.  And, I guess, it costs pretty much as a PC too.

Then I connect this thing to my recently bought Sony Bravia 32-inch flat screen TV.  With HDMI cable.  When you hold an HDMI cable in your hands, you feel the solid quality.  You know that whatever comes through this must be really good.  It’s hard, it’s thick, and it’s long.  Like a coaxil cable or something.  And that was true – the moment I got the first picture from the game, I was stunned.  I was just looking at it speechless.  No television channel or DVD had the quality of the picture that I had in front of my eyes.  Absolute brilliant stuff.

So, I played “Need for Speed” just a bit.  I had to get used to joystick – form factor is weird for my hands that are used only to keyboards and mice; and it has so many buttons and controls that it takes some time to manage.  I like “Need for Speed”, it’s a nice car racing game, which I used to play on PC some years ago.  But since I got a Genius wheel and pedals for one of my birthdays, I don’t like playing car simulators without them anymore.  Joystick is OK, but not that much fun as having a real wheel and stuff.

I check the bag for more games, and among unfamiliar titles I noticed “Grand Theft Auth IV”.  Now that was something I wanted to try.  I’ve heard a lot about the game, but never had a chance to try it out.  It was Tuedays, 11:00pm when I started the game.  The next thing I know – Maxim woke up.  It was Wednesday, 7:30am.  Now if that is not a sign of a good game, I don’t what is then.

Coming back to that comment above about the wrong day of the week.  It’s a well known fact that no new games or gadgets should be opened or started on any day of the week except for Friday or Saturday.  Cause it’s too easy to get carried away and spend a night playing with the new stuff.  This time I forgot that, and a sleepy, half-focused Wednesday was a good reminder to me.  Gladly, the weekend is ahead of us…

Gmail gets Tasks/TODO

Many of us, Gmail users, have been waiting a really long time for this, but now the wait is over.  Gmail blog announced task manager / todo list in Gmail via Labs extension.

We put your tasks in the same kind of window as chats, so they’re visible while you’re scanning your inbox, reading mail, or searching (and in Settings, too!). Just pop your list out into a new window to use Tasks outside of Gmail.

To enable Tasks, go to Settings, click the Labs tab (or just click here if you’re signed in). Select “Enable” next to “Tasks” and then click “Save Changes” at the bottom. Then, after Gmail refreshes, on the left under the “Contacts” link, you’ll see a “Tasks” link. Just click it to get started.

Excellent news for this morning.

Body of Lies

The other day I went to see “Body of Lies“.  I know that some people just can’t take the same actor playing similar roles in two consequtive films – in this case Leonardo DiCaprio being an undercover agent – but if you can get past that, you are probably to enjoy the film.  At least I did.

Yes, it had enough cliches and stereotypes and all, but it was also somehow fresh.  It wasn’t all that predictable, and it carried a good mix global propaganda with personal drama and plain old action.  Good acting, good shooting and explosion, twisty story, nice character development, nice camera work – all make it into a worthy film.  If you have a chance to catch it on the big screen – use it.  You’ll get some extra.

Overall, a 7 out of 10.

Fixing RT3 on Fedora 10

We upgraded our development server to Fedora 10 over the weekend.  Among other things, it runs RT3 – excellent support, issue management, and bug tracking tool.  Once the upgrade was over, we ended up with a semi-working setup of RT3.  The emails were going through just fine, but the web interface was giving out a blank screen with no content or errors or warnings.

Googled a bit, but that didn’t help a lot.   Went through server logs and found an out of memory shout from Storable.pm:

2325:Callback called exit at 
../../lib/Storable.pm (autosplit into ../../lib/auto/Storable/thaw.al) 
line 415.

Googled for that, but it turned out that quite a few people have the problem with this module running out of memory.  And not only in RT3.

So I left it where it was and had some good night sleep.  And it helped.  In the morning, englightment came in, and I tried reloading the page with cookies and cache cleaned.  It worked.  And then it didn’t work again.  Cleaning cookies was helping for a couple of page views.  So I dived back into the RT_Config.pm file to see my options.  There it was.

=item C<$WebSessionClass>
C<$WebSessionClass> is the class you wish to use for managing Sessions.
It defaults to use your SQL database, but if you are using MySQL 3.x and
plans to use non-ascii Queue names, uncomment and add this line to
F<RT_SiteConfig.pm> will prevent session corruption.
=cut
# Set($WebSessionClass , 'Apache::Session::File');

Once I enabled Apache::Session::File, the problem went away.  We are now back to work, enjoying the new web 2.0 round corners interface, pastel colors, and more.

Google Reader updated interface

Google updated the design and interface of the RSS feed aggregator – Google Reader.  Here is a really small screenshot of how it used to look (stolen shamelessly from Google Reader front page – it seems like they forgot to update it):

And here is a really small screenshot of how it looks now (I made this one, you can make your own):

In my opinion, the old interface was much better. Colors and borders helped to visually separate the sidebar from the main content area, as well as news items from each other.  The new design is much “separated”.  Also, there are a few minor quirks and bugs here and there, which will hopefully get fixed in the next few days.  However, one thing is great about this new release – speed.  The new Google Reader is much faster than the old one.  Extra responsiveness can’t hurt, especialy thos of us who go through hundreds and thousands of posts in a fast paced manner.