Blogging with Pelican

Posted on Tue 25 April 2017 in Articles • Tagged with blogging, python, pelican

Pelican is a perfect blogging platform for programmers and computer geeks. My blog has been powered by Pelican for three years and it has been a pleasant experience. If you are looking forward to start a blog, or just thinking of changing a platform, why not give it a try?

Continue reading

The ultimate guide to Python decorators

Posted on Sun 22 January 2017 in articles • Tagged with Python, programming

Decorators are one of the most beautiful feature of Python programming language. They can make code easy-readable and maintainable. Nevertheless, their usage may seem tricky and mysterious in the beginning. This is a guide to the world of decorators. I hope that you will feel like a pro and have no questions left about them after exploring this article.

Continue reading

Python nightmares: Implicit this

Posted on Mon 11 May 2015 in articles • Tagged with Python, programming

I met a lot of Python beginners who complained about this keyword not implicitly available in class methods. After all, why pass self explicitly?

Continue reading

A micro Lisp interpreter experiment

Posted on Sat 21 June 2014 in articles • Tagged with Python, Lisp, programming

While reading the Binary trees chapter from Programming Interviews Exposed by John Mongan et al. I started thinking of alternative recursion examples which do not involve sorting, generating Fibonacci sequence, binary tree traversal and similar tasks. Lisp! Lisp is inseparable from recursion and Lisp interpreter would be a good case to demonstrate what recursion is and how it can be used efficiently. What would be a minimal simplified Lisp interpreter written in Python? Surprisingly, I managed to do it just in 6 lines of Python code! And this is not just because of Python being a wonderful language, but because of Lisp being such a beautiful and simple concept.

Continue reading

Kaylee v0.3

Posted on Thu 20 June 2013 in articles • Tagged with Kaylee, Python, programming

Ladies and Gentlemen! I am proud to announce that Kaylee v0.3 has been finally released!

Continue reading

PyRegs: The Python Regex Debugger

Posted on Wed 22 May 2013 in articles • Tagged with programming, Python

Long ago, I learned the regular expressions in order to write a simple syntax highlighting engine. Regular expressions are not hard to master, but take time to practice. Kodos was the regex debugger of my choice, as it was written in Python. All these years Kodos was a "must have" tool on my development machines. Suddenly with the new version of Debian operating system, Kodos was not in the repositories anymore! Why? Kodos is based on QT3 widgets toolkit, which is a bit outdated nowadays (QT5 has been released recently) and was removed from Debian 7.0 ("Wheezy"). That is how I decided to write a small Python regex debugger in Python 3 and its de-facto standard Tkinter bindings to the Tk GUI toolkit.

Continue reading


Posted on Tue 28 August 2012 in articles • Tagged with programming, projects, Python, CoffeeScript, Kaylee

I just returned from my summer vacation and can finally state: another summer is over. But wonderful summer it was! I finally graduated and got a Master's degree in computer science. I cycled a lot and upgraded my MTB skills. I read lot of fiction. And somewhere between work, sports reading and sleeping was Kaylee, a distributed and volunteer in-browser computing framework.

Continue reading

Python: comparing to None

Posted on Mon 01 August 2011 in articles • Tagged with programming, Python

Python's documentation states that one has to use the is operator to compare a variable to None. What happens when you avoid that advice?

Continue reading

Inside Python: understanding os.listdir()

Posted on Sun 08 May 2011 in articles • Tagged with programming, Linux, Python, C

If you've been using python for a long time, then you surely know that os.listdir() function returns an unsorted list of file names. I didn't care much until facing a situation, in which the sorted-sequential processing of files was crucial, and I could not remember whether the previous file processing were done in sorted order. Well, luckily they were. But hey, this is a little bit annoying, isn't it? Why os.listdir() returns an unsorted list of files? Would you like to find out?

Continue reading

Inside Python subprocess communication

Posted on Sat 24 April 2010 in articles • Tagged with programming, Python

Sometimes, it's really hard to understand what happens inside a function or even a whole module of Python's Standard library. For example, the subprocess module contains a very tricky Popep class. I tried to use the the module to communicate with a MATLAB subprocess shell (e.g. send MATLAB commands to subprocess and read the output). Unfortunately I failed and was just able to pass a MATLAB script via command-line arguments. Yet, I learnt much about the Popen.communicate() method and I'd like to share this knowledge with you.

Continue reading