Building a Search Engine

Today I’d like to mention about search engines and their design criterias. Yes we have Google, Bing, Yahoo, Duckduckgo, yandex and many more. But is it easy to build a search engine? The answer is clearly NO. If you think that you can easily build a search engine you’re more like you’re comparing  a Ferrari and 1769 Cugnot Steam Trolley (Jonathan Holguinisburg). Yes, it is that much different.

I’ll elaborate what I mean. Let’s start with first phase, crawling.

Continue reading

“rsync” a Versatile Tool

I should mention about a tool that deserves to be described specifically – rsync.

This tool is well known by system administrators but not as much by home users. But this tool has promising capabilities for them as well. If you’re a backup lover like me (your photos, documents and etc.) and if you’re doing a copy&paste for that, rsync is a life saver.

rsync simply synchronizes your destination directory to be same as your source directory. It does this process with very effective way. It calculates differences and only copies/synchronizes the differences of files and related directories. The destination can be a remote machine (i.e. remote_user@remote_ip:/destination/directory/path). So I backup my home folders contents with my external HDD with:

rsync -avz source-dir destination-dir

command.

Do not use copy&paste (including console cp commands) for backup purposes. Use rsync.

Price List Application (Flask, SQLAlchemy, pyQT4)

My elder brother needed an application to manage price lists of his wholesalers and dealers. Products’ prices that he is following are subject to change daily because exchange rates may change daily and it may be very hard to find optimal price for a product if it can be obtained from multiple dealers. So I decided to help him with an software solution. Price lists and displays support utf-8 (as they can be seen in screenshots – Russian language price lists are used for tests).

Continue reading

Greatest Common Divisor (GCD) of Big Numbers – A Recursive Approach (C++)

In this post I will provide mathematical background and C++ implementation of greatest common divisor (GCD) calculation of big numbers problem. Problem can be described as:

You have two numbers to calculate their GCD. First number is very big, let say 250 digits long. Other number is not so long, maybe less than 6 digits. How  do you calculate GCD of these two numbers. Continue reading

Merge Sort

Merge sort is a divide and conquer based algorithm. Its merge behavior names the algorithm. Algorithm details can be found elsewhere but I’ll give my basic merge-sort implementation here. It starts with dividing the array into two equal sized arrays. Division done until each array only holds an element. But merging procedure is the interesting part of the merge array. It merges 2 arrays into one sorted array. Continue reading