Benchmarking Compression Programs

My main question is: which program should I use for compression?

The answer is not very simple.

It’s rather obvious that it will take longer to compress a bigger file than a smaller one. But will that be twice longer for a twice bigger file?

Are you able to sacrifice compressing a file for another hour just to make it a little bit smaller?

What about decompressing time?

Is it true that decompressing time depends on the compression level?

Generating Random Data in PostgreSQL

Dealing with randomness in PostgreSQL can be tricky. Sometimes we get a little bit unpredictable results. Sometimes the distribution of the random numbers is not what we wanted. Sometimes things are slow.

Here I’m trying to describe common problems I met when using PostgreSQL and how they can be solved.

Bitboards Are Not Magical

I started writing a chess engine. The longer I keep on writing it, the longer I see that it’s a never-ending story. There is always something, which should be improved. There is always something to make in a different way, but I’m not sure if it would be better or worse. And most of the good design decisions made at the beginning, don’t look so good later.

During the journey, I learned a lot and I hope to learn much more. This time I’m going to describe what I learned about bitboards.

I have also written a java implementation of the NQueens problem. I used bitboards there and they made the program quite fast.

Hacker News Links Analysis

I made an analysis of the Hacker News data. My main interest was about the URLs, which appeared on the website.

Here is a short explanation of the process. Links for the analysis are at the end.

How Not to Send PDF Files

I’ve Got a PDF

An insurance company used to send me a paper letter (you know, the ancient way of communication) every year, right before the anniversary. Usually they offer some kind of change, like this:

Hey, we offer that you will pay x% more money from the next month,

in return we offer you x% more for the insurance amount.

And that’s perfectly fine. Really.

This year they sent me an email, with an attached PDF file. In the email they wrote:

We attached you the anniversary documents.

The files is protected with a password, which is the birth date of the insured personed, in the format of DDMMYYY.

Yea… my first thought was…

why do they even bother to add the password.

My next thought was:

what if…