In order to achieve productivity and robustness of our applications, we are constantly introducing new coding practices, new tools, new frameworks. Consequently, with every new introduction of additional complexity we are permanently raising a bar for newcomers in programming business.

Trough time, process of learning is getting longer, required effort amount increases and we are failing to provide beginners with tools and/or methods for getting from point of not knowing anything to knowing something.

In that learning process – they are often left alone to choose any method to go trough that path by them selves. Very often, they choose wrong.

Read the rest of this entry »


Vast majority (if not every) good development practice is established based on empirical studies and personal experience. One of those is “YAGNI“, as we do tend to develop more functionality and over-engineer a solution for a problem that does not exist. However, it seams that “You aren’t gonna need it” does not apply to localization.

Read the rest of this entry »

PHP: Void and Null are (not) same thing

Posted: December 13, 2016 in Programming
Tags: ,

Sloppy code is not always a result of bad and lazy developers, sometimes, language runtime can be the one who to blame. One of the examples is PHP and how it treats “void” and “null” in non-strict mode.

Read the rest of this entry »

There are several ways to construct object instance. Most common way is to use, of course, a ‘new’ keyword, however, as anything else, both theory and practice have decide to make this more complicated, and invent new fancy terms for it.

Read the rest of this entry »

I remember that when I started to work as programmer/developer, I hated exceptions and errors. I thought that, in that point of time, everything is better than having your application run into exception message with some nasty error screen.

Today, development goal is the same, application should work flawlessly, as per design, without appearance of any error screen.

However, difference is technology advancement nowadays as well as in my maturity as a developer and acceptance of the fact that exceptions and errors have key role in achievement of application quality and development productivity. Today I appreciate exceptions and errors, I almost get excited when I see one. Read the rest of this entry »

Private class callbacks

Posted: January 10, 2016 in Programming

PHP can be considered as hybrid language, mostly OOP language with support for some of the functional programming features. Most praised functionality is possibility to work with closures.

There are unlimited possibilities how to exploit closures, here, I will show you how to use them to encapsulate class methods when you are implementing  method callbacks for any reason.

(*UPDATE: Idea from this article resulted with library:

Read the rest of this entry »

Stay away from CodeIgniter!

Posted: January 21, 2014 in Miscellaneous

Last few weeks I have worked on some project that was written in CodeIgniter. CodeIgniter is very popular PHP framework praised by all, and it is little less popular then Yii, but since I am few years now in Symfony both 1 and 2, this was the opportunity to check out and to learn something new.

I have expected a challenge, but after 10 days, thats it, I learned and used everything that CI has to offer. CI is so ridiculously lame excuse for framework that I do not know why is it called a framework at all?

And here is why – it is better to state what CI does have and support rather than what CI does not support or have but it should.

Read the rest of this entry »