You are hereDevelopment
Development
Articles related to programming and software development
A Firefox Javascript bug?
I just came over a strange behaviour in Mozilla Firefox. It seems Firefox ignores return values for dynamically added event handlers. I stumbled upon this, when I tried to implement some quick mechanism to cancel a form submission.
A Javascript Progress Bar (And Password Quality Indicator)
I'm quite busy at the moment, since the marketplace application I'm doing in PHP started beta testing this weekend. However, I'd like to present some side product from this project: A javascript progress bar and password quality indicator. You can see it in action here.
Some Nice JavaScript
Richard Livsey offers some nice JavaScript on his side, including turning any select box into a two panel multiselect box by just giving it a class and a resizable textarea. I really like the second.
PHP Passing By Value Killed The Singleton
It is a common misunderstanding of a singleton beeing the a global variable expressed in OO style. This is not quite correct. Well, of course a singleton is global but there's more: A singleton implements access control to the one and only instance of a class. That's why it's called singleton. But due to PHP's passing by value policy, this can easily be underminded.
Replacing Inheritance With Composition
Ivan Moore briefly discusses replacing inheritance with composition regarding the amout of testing code required. He concludes that with composition, "instead of having the tests duplicated (or using inheritance in the tests to remove the duplication) the tests can now be split into two parts. One test for the class with the code that is common, and separate tests for the code that is different."
Less PHP Database Code Using The Factory Design Pattern
It's PHP design pattern time again! Today I'll show a simple way to a) Encapsulate database access in a class, b) Make queries return objects rather than records or arrays, and c) Reduce code to process database results. All this is achieved by using the factory pattern. Read on!
How A Blog Saved My Day
Brad Wilson aka The .Net Guy saved my day today. I wrote some application for one of our Turkish customers, and while everything runs fine over here, it fails right at the beginning over there. It all came down to a problem with ToUpper() covered in Brad's article Beware Of ToUpper(), published a week ago. Thanks, Brad!
Applying Arbitrary Custom Filters To A Collection: Chain Of Responsibility
I faced some annoyance of my Randomized Blogroll Plugin the last days: My own blogroll contains some subscriptions to ego searches that I don't want to publicize on my webpage, since they are a) depressing, and b) not of any public interest. Getting tired of removing them by hand everytime I update my blogroll, I started to implement filtering. Here's what I came up with. See my mind at work.
What To Use Build Servers For?
If developers run their build locally, what's the build server for, robertdw asks and gives a list of things you can use a build server for.
Building A Better C++ String Class?
Preston L. Bannister tries to build a better C++ string class than provided by the C++ standard libraries (found through Christopher Baus). However, I thing he will fail, since he's too much involved in low level things, rather then design.

