Monday, May 05, 2014

5 Personality Types That Get Promotions at Work (Bitter Edition)

This is a point-by-point response to 5 Personality Types That Get Promotions at Work

1. Chatterbox. Because nobody likes people with opinions.
2. Ignoramus. Because if you're smart, they risk to lose their own job.
3. Opportunist. Well... Because nobody likes losers.
4. Despot. Because bosses are smarter than their subordinates by definition. (See also 2.)
5. Hypocrite. Because one would have to be one to comply with previous requirements and still seem to be a nice guy.

I'm not saying, that principles stated in the original article are wrong. But they should not be misinterpreted. And that unfortunately happens quite often.

Monday, June 17, 2013

Snake classic arcade game on Arduino

Tuesday, April 30, 2013

Weird lacuna in Perl

While you can

$ perl -Mstrict -wle 'foreach our $var (0, 1) { print $var }'

and of course

$ perl -Mstrict -wle 'foreach my $var (0, 1) { print $var }'

foreach local raises an error:

$ perl -Mstrict -wle 'our $var; foreach local $var (0, 1) { print $var }'
syntax error at -e line 1, near "foreach local"
Execution of -e aborted due to compilation errors.

P. S. And in case you wonder what lacuna is.

Saturday, October 16, 2010

Time::Piece's Missing Part

Time::Piece is a great module. The only thing I really miss in it is a truncate method, similar to the one that DateTime has. Fortunately it is quite easy to add it to the original distribution.

I've written a monkey patch, but I look forward for this method in the future versions of Time::Piece.

use strict;
use warnings;

use Time::Piece;

local *Time::Piece::truncate;
*Time::Piece::truncate = sub {
    package Time::Piece;
    my ($time, $to) = @_;
    my @t = (0, 0, 0, 1, 0);
    return $time->_mktime([@t[0..$to-1], @$time[$to..c_isdst]], $time->[c_islocal]);

my $now = Time::Piece->gmtime;
my $midnight = $now->truncate(Time::Piece::c_mday);
print $midnight, "\n";

Wednesday, May 05, 2010

Online image resizing service

Check out my application powered by Google App Engine. It is a truly online image resizing service. I'm planning to open its source code if there's interest for it.

Friday, February 12, 2010

PHP Creole 1.0 Wiki Markup Parser

I translated my JavaScript Creole 1.0 wiki markup parser in PHP.

I did it specially for making a wiki suitable for free web hosting. Just because alike most Russians, I experience irrational affinity to costless products and services.

You can see the wiki in action at or download its source code at Gitorious, the best source hosting service. The source code is distributed under the MIT/X11 License.

UPDATE: There is also a mirror at GitHub now.