On Flickr

I really really like Flickr service, but I can’t find a good way to use it. Since I have my own server that hosts all my photographs, I don’t really need to upload anything anywhere else. My current photo albums don’t have all the functionality that I could get from Flickr – tags, search, feeds, comments – but I hope that I will migrate to some powerful album software soon enough.

Once in a while I still upload some pictures, go through galleries, and leave some comments here and there. That’s about all I do with it.

Does anyone of you uses Flickr? What’s your profile? Do you know of any way I could use Flickr together with this blog?

By the way, if you are interested, my Flickr gallery is here.

Perl Monks level bumped

It’s been a while since I hanged out at Perl Monks. Today I followed some link and ended up reading a couple of articles there. I decided to check my status and discovered that I only needed 9 points to achieve the next level – pontiff. 30 daily votes were available, so I voted here and there and gained the points.

Now I am a Pontiff and need 700 points to step up to the top of the ladder – Saint.

Working with named pipes in Perl

The collegue of mine came across a problem that developed into an interesting solution that I decided to share with the world. Actually, I think the world is pretty much aware of the solution, but just in case that I will ever be looking for this solution again, I’ll have it handy here.

The task at hand was to do some processing of the logs on the fly. The syslog was configured to filter the appropriate logs into a named pipe and a Perl script was written to read from the said pipe and do all the processing.

The original piece of code looked something like this:

open (SYSLOG, "<$named_pipe") 
  or die "Couldn't open $named_pipe: $!\n";

while () {
  do_processing($_);
}

close(SYSLOG);

The problem came with syslog daemon restarts. Every time the syslog was stopped, the EOF was sent to the pipe and the script stopped reading it.

Continue reading Working with named pipes in Perl

Irony in science or a bad example of Post Hoc

While reading through this excellent website I came across an article about Post Hoc logical fallacy. To freshen your memory, this article describes Post Hoc fallacy as follows:

A Post Hoc is a fallacy with the following form:

1. A occurs before B.
2. Therefore A is the cause of B.

There are also a few examples that help to understand this fallacy. Among these examples there is this one:

Bill purchases a new PowerMac and it works fine for months. He then buys and installs a new piece of software. The next time he starts up his Mac, it freezes. Bill concludes that the software must be the cause of the freeze.

I couldn’t help the smile. In the scope of logic as a science this example perfectly illustrates the point. But in the scope of computer science this quote would be a good example of the opposite. In other words, if you computer worked fine for months and than you installed a new piece of software on it, and it started to freeze – chances are that the software is the cause of problem.

Ironical, isn’t it?