Archive for September, 2010

Measuring PHP code complexity

What makes good code and why is some code better than others? One quantitative approach to answer this is the use of software metrics. These metrics try to capture the size and complexity of code in numbers (e.g. ‘lines of code‘, ‘cyclomatic complexity‘) and can be useful indicators for maintainability and simplicity (or more often the lack thereof).

I found three ways to get complexity measures for PHP code.
Read the rest of this entry »

A virus in plain ASCII

This is a nice idea and proof of concept: spreading malware in BibTeX files.

Probably every TeX-User knows the advocacy about how powerful the language is… but do (or can) you proofread everything before you compile it?

PHP/CGI und die Internal Server Errors

Falls er per (F)CGI eingebundene PHP-Interpreter viele “Internal Server Errors” verursacht, sich aber im Apache-Log keine Fehlermeldung findet… dann sollte man nachsehen ob die PHP-Prozesse überhaupt durchlaufen oder aber abstürzen.
Falls nämlich das Kernel-Log von SIGABRTs berichtet und überall Core-Dumps rumliegen, dann kann man sich langes rumschrauben am Logging sparen und stattdessen gleich die fehlerhafte PHP-Extension suchen und neuinstallieren.