When code is always written the way that it's written, it sometimes takes an outsider voice to question the rote.
Cutting straight to the point, here’s a quick way with PHP for removing empty values from an array and shifting the indices appropriately. Nothing too fancy but I found it useful at work and figure that I might as well share the tip.… Read the rest
Through the necessity to externalize GUI messages in an application that I have been working on, I have come up with a remarkably simple and clean approach for loading key:value pairs from an external XML file or stream. The Class also transparently allows for String interpolation, should it be required.… Read the rest
Taken from my reply to a post regarding the topic on Facebook, a few words introducing key guidelines I follow when commenting my code.
Regarding classes, I like to provide a class summary stating the intent and purpose. Accessors, Mutators, Constructors – I don’t feel the need to comment them as their roles are (and should be) rather self-explanatory.… Read the rest