The Zyxist Diaries A programmer's voice from Poland

30May/100

Alternative PHP autoloader

Not so long ago the PHP Standards Working Group introduced a document that defines the new class naming standard for PHP project that would increase the interoperability and code reuse. As an addition, an autoloader was written that could handle the new standard. However, I found it quite slow for certain types of use and decided to speed it up. The results are briefly described in this post.

Continue reading

10Apr/100

Polish tragedy in Smolensk

Have you ever heard of a country that lost a president, most of secretaries of state, all the army marshall officers, some parliament members, head of a central bank, the primary opposition party establishment and representatives of churches and families of people murdered in a genocide, all of them in one disaster? Until today, the only comparable example I saw was Battlestar Galactica series, but today it happened to my home country, Poland.

Continue reading

21Feb/100

InDefero – PHP alternative to Trac

Trac is one of the most popular open-source project management tools. It provides an integrated Subversion viewer, bug tracker and wiki system. In other words everything we need. However, Trac is not perfect. It does not support any other version control system without an external plugin, the wiki syntax is considered as a nightmare for some people, and there may be a problem with hosting – it is written in Python.

Continue reading

25Jan/101

Silesian Interurbans

Upper Silesia is the biggest industrial area in Poland. The primary activity is coal mining and metallurgy located around an urban complex of several densely populated cities with the total population 2.6 mln inhabitants. The cities are connected with one of the biggest and the most unique European tram networks which I’m going to describe briefly in this post.

Continue reading

16Jan/100

Zyxist.com blocked for a week

For the last week, the website was unavailable due to an unintended DoS attack which forced me to close it. The traffic was so high the admin threatened me deleting my website immediately. Unfortunately, I had to block permanently the access to photo galleries which were in the last days improved and translated into English. [...]

Continue reading

Tagged as: No Comments
27Dec/093

Speak in Unicode with PHP and MySQL

The English language has a very simple alphabet that contains the basic lattin letters only. In the current information technology world, it can be considered as an advantage, because we can be pretty sure that every computer will be able to display and process it correctly. However, there are much more people who use different languages with more complex alphabets and writing systems. For a long time they have to deal with proper character encoding and incompatibilites between different formats. The solution for them is Unicode, the character encoding standard that aims to cover all the languages and symbols. In this post, I’m going to show, how to use Unicode with PHP and MySQL applications.

Continue reading

6Dec/094

Smarty 3 review

In the second part of November, the new beta releases of Smarty 3, the successor of Smarty template engine were flooding in surprisingly fast. As I have had some spare time, I have decided to take a closer look and review it to see, if the authors learned something during the last few years, because one has to be said: Smarty 2 was one of worse template engines available.

Continue reading

4Dec/090

Practical Open Power Template

In this post I would like to show some useful tricks for the programmers using Open Power Template library, a template engine for PHP5. The library provides many powerful generic tools that make writing templates much easier than in pure PHP, but it may be not so obvious, how to use them i.e. to create a nice pagination.

Continue reading

15Nov/090

Building a unit testing environment with PHPUnit

As the software grows up, the need for proper testing becomes more and more important. Huge number of dependencies between the components requires something more than manual checking if everything works after implementing a new feature. The solution is automated testing. In case of PHP, the best tool for testing the scripts is PHPUnit by Sebastian Bergmann. The package is based on JUnit in Java, so everyone who programmed in that language, should get into it very quickly. In this post, I would like to describe, how to build a testing environment for our application with PHPUnit.

Continue reading

Tagged as: , No Comments
4Nov/090

Useful template engines

Have you ever wondered why the web application scripts are written in such languages as PHP instead of C and C++? Or why we are not programming in Pascal? The popularity of “web” languages comes from satisfying the programmers’ needs and innovations, thus letting to create the websites faster and cheaper. However, in this post I will not discuss the officially recognized languages. Instead, I am going to analyze the template engines, a part of web applications concerning on producing the HTML output which has a lot in common with programming language issue.

Continue reading