Good programming practices

Archive for July, 2011

How to compile kernel 2.6.39.3 in Slackware 13.1

July 13th, 2011

Just few days ago new stable linux kernel was released. In Slackware you can use it without patching. Here I describe how to compile and install kernel in easy way. Download the kernel source from kernel.org or use the direct link to linux-2.6.39.3.tar.bz2. More…

Permalinks with dot cause 404 in WP

July 8th, 2011

After updating WordPress to version 3.1, Google Webmaster Tools found the 404 error in some of this blog posts. I discovered that problem was a dot in a permalinks. While seeking solution I found other problems with permalinks in WP 3 but none of them concerned my problem.
More…

First call of a method

July 7th, 2011

Sometimes there is need to do another action at first call of a method. Suppose client shouldn’t know about that. It can be done in a standard way, using if/else statement and boolean variable indicating first call of a method.

However, another solution exists. Make a class inheriting a standard command class. In inherits class a chosen method is overwritten and has a code that should be executed at first time. At the end of this method a command object is replaced by standard one.
More…