You are hereDevelopment
Development
Articles related to programming and software development
Gyro-PHP application framework release
It has been more than two years since my last post. Two very exiting years for me, though. Not only my daughter was born, but also my PHP application framework is now ready to be open-sourced: Gyro-PHP, a PHP application framework.
PHP and UTF-8: A Guide - Announcement
I started to write a guide on using PHP with UTF-8. It's on German, but I plan to translate it within the next couple of days.
Yet another browser! Safari On Windows
As you might have heard, Apple's Safari browser now is available for Windows, too. So there is yet another browser to support for us web developers. Hallelujah!
Unfortunately, the current build seems terribly broken, as the following screenshot shows (Click to enlarge):
Apache Xerces' weird error message
For one of my projects I'm using Apache's Xerces C++ XML Parser and run into this strange error:
The primary document entity could not be opened.
Took me a while to figure out that Xerces simply wants to say "File not found" here, because I was was calling parse() with the data to be parsed, while Xerces expects a file name here. Silly me.
However: Here's how to parse an XML string using Xerces SAX parser. you need to use a MemBufInputSource:
When Internet Explorer displays a white page...
.. this may be because of a wrong script tag. Actually, both Internet Explorer 6 and 7 will fail, if you use the script tag like this:
<script type="text/javascript" src="blabla.js" />IE instead requires an explicit closing tag, like this:
<script type="text/javascript" src="blabla.js"></script>PS: This is primary a note to myself, since I get trapped by this over and over again...
PHP: Beware of Variables Inside Strings
One of the rather useless discussion among software developers is if to use PHP variable parsing when building string or not. That is if you should write your code like this:
<?php
$value = 15;
$text = "Value is $value, isn't it?";
?>Or better like this?
<?php
$value = 15;
$text = 'Value is ' . $value . ', isn\'t it?';
?>Well, some claim that the first version, using variables inside strings, is slower, while the others point out the second code is less readable.
A matter of taste, I think, since both readable code and performance are important some way or another.
However, this PHP memory bug gives me the creeps: The first code will not free the memory used until the end of script execution. So you better don't use code like this within loops.
The Holy Grail CSS Layout Fix for IE7
In Search of The Holy Grail describes an easy way to create a three-column, source-ordered, table-less layout with a fluid column in the middle. It is used by the Comic Marktplatz, for example. However, there is an annoying bug with the shiny new Internet Explorer 7. IE7 has a problem in understanding the left column rule of
margin-left: -100%;
Instead of considering the width of the surrounding div container, IE7 inserts the width of the body, which leads to the left column being moved out of sight to the far left. Here's how to fix it.
And again: Is C++ really faster?
I was pointing to articles about if low level optimization really makes sense and if C++ is really faster than higher level languages several times. But of course this will be a never ending debate, and it still continues. This time C and C++ should be the best languages for higher level mathematics problems. Unfortunately this is not the case.
Focus first Form field with jQuery
I somehow like the jQuery JavaScript library. Have a look at the jQuery code for the Zebra-Table-Showdown: Ain't this a beauty?
However, when it comes to focusing the first (visible) field on a form, things are not that elegant. I got it working, though. Here's my current attempt:
Visual C++.NET 2003 and Broken Managed Assemblies
This is some really annoying bug in Visual Studio .NET 2003 (SP 1), took me two hours of my life: If the intermediate directory is set to something like ".obj/$(ConfigurationName)", the Assembly created will be broken, since it "does not contain a CLI header" - so the error message. It seems something is going completly wrong during compilation, since the dll is only 3 to 4 kB in size. If you omit the leading dot and set the intermediate directory to "obj/$(ConfigurationName)", it works.


