Archive for February 2008
Issue Tracker extension for MediaWiki

MediaWiki is definitely one of the most widely used and best known Wikis out there, it powers Wikipedia.com, but I’m sure you already knew that. I’ve been using it at work to record and document all our internal systems and projects. It’s a great tool, it allows developers and projects managers to collaborate, provide and share information in a very simple and organized way.
In the last couple of months, I’ve been developing some extensions for MediaWiki, the latest one is called Issue Tracker. Watch the following screencast to know more about this extension:
Executing external tasks in the Zend Framework
Duane O’Brien wrote a series of articles about three widely used PHP frameworks: Zend, Symfony, and CakePHP. He examines their similarities and differences while building and extending a sample application in each of the three frameworks.
In Part 5 he explains how to execute external tasks in the Zend Framework:
“Due to the pick-and-choose nature of the Zend Framework, creating an automated task using the framework allows for some flexibility in deciding what you use and don’t use. Because you are not going to be accessing the Web application through the existing front controller, which services Web requests, you should create an additional controller to control script execution. This controller will look similar to the front controller, in that you will be registering the autoloader and defining the base adapter for the model. But an important difference may be in your PHP installation or configuration.”
The only thing I can add to that is: If you setup a job that executes a script that accepts parameter passed via HTTP, you might need to pass them through the command line as well, for example:
php /column/protected/zend/scripts/prune.php modified=2008-02-28 archive=true
For that to work, you’ll need to detect the SAPI type first and then process the arguments.
$sapiType = substr(php_sapi_name(), 0, 3);
$params = ($sapiType == 'cli') ? $argv : $_GET;
if ($sapiType === 'cli') {
array_shift($params);
$args = array();
foreach ($params as $param) {
$param = explode('=', $param);
if (isset($param[0]) && isset($param[1])) {
$args[$param[0]] = $param[1];
}
}
$params = $args;
}
Read Duane’s articles:
Part 1: Getting started with three popular frameworks
Part 5: Integrating external tasks
DataPortability, your portable identity.
DataPortability gathers existing open standards into a blueprint for a social, open, remixable web where your online identity, media, contacts and content can follow you wherever you go. Find out more at dataportability.org
Software Development AntiPatterns
An AntiPattern is a pattern that tells how to go from a problem to a bad solution. For example:
- The Blob
Procedural-style design leads to one object with a lion’s share of the responsibilities, while most other objects only hold data or execute simple processes. The solution includes refactoring the design to distribute responsibilities more uniformly and isolating the effect of changes. - Continuous Obsolescence
Technology is changing so rapidly that developers often have trouble keeping up with current versions of software and finding combinations of product releases that work together. Given that every commercial product line evolves through new releases, the situation is becoming more difficult for developers to cope with. Finding compatible releases of products that successfully interoperate is even harder. - Lava Flow
Dead code and forgotten design information is frozen in an ever-changing design. This is analogous to a Lava Flow with hardening globules of rocky material. The refactored solution includes a configuration management process that eliminates dead code and evolves or refactors design toward increasing quality. - Ambiguous Viewpoint
Object-oriented analysis and design (OOA&D) models are often presented without clarifying the viewpoint represented by the model. By default, OOA&D models denote an implementation viewpoint that is potentially the least useful. Mixed viewpoints don’t allow the fundamental separation of interfaces from implementation details, which is one of the primary benefits of the object-oriented paradigm. - Functional Decomposition
This AntiPattern is the output of experienced, nonobject-oriented developers who design and implement an application in an object-oriented language. The resulting code resembles a structural language (Pascal, FORTRAN) in class structure. It can be incredibly complex as smart procedural developers devise very “clever” ways to replicate their time-tested methods in an object-oriented architecture. - Poltergeists
Poltergeists are classes with very limited roles and effective life cycles. They often start processes for other objects. The refactored solution includes a reallocation of responsibilities to longer-lived objects that eliminate the Poltergeists. - Boat Anchor
A Boat Anchor is a piece of software or hardware that serves no useful purpose on the current project. Often, the Boat Anchor is a costly acquisition, which makes the purchase even more ironic. - Golden Hammer
A Golden Hammer is a familiar technology or concept applied obsessively to many software problems. The solution involves expanding the knowledge of developers through education, training, and book study groups to expose developers to alternative technologies and approaches. - Dead End
A Dead End is reached by modifying a reusable component if the modified component is no longer maintained and supported by the supplier. When these modifications are made, the support burden transfers to the application system developers and maintainers. Improvements in the reusable component are not easily integrated, and support problems can be blamed upon the modification. - Spaghetti Code
Ad hoc software structure makes it difficult to extend and optimize code. Frequent code refactoring can improve software structure, support software maintenance, and enable iterative development. - Input Kludge
Software that fails straightforward behavioral tests may be an example of an input kludge, which occurs when ad hoc algorithms are employed for handling program input. - Walking through a Minefield
Using today’s software technology is analogous to walking through a high-tech mine field [Beizer 97a]. Numerous bugs are found in released software products; in fact, experts estimate that original source code contains two to five bugs per line of code. - Cut-and-Paste Programming
Code reused by copying source statements leads to significant maintenance problems. Alternative forms of reuse, including black-box reuse, reduce maintenance issues by having common source code, testing, and documentation. - Mushroom Management
In some architecture and management circles, there is an explicit policy to keep system developers isolated from the system’s end users. Requirements are passed second-hand through intermediaries, including architects, managers, or requirements analysts.
Source: http://sourcemaking.com/
Ohloh Goes Open Source

300 Most Influential Websites According to Information Architects Japan
Information Architects Japan presented a beta version of the 2008 Web Trend Map. They’ve taken almost 300 of the most influential and successful websites and pinned them down to the greater Tokyo-area train map. By popular demand, they enlarged the poster size from A3 to A0.

http://informationarchitects.jp/web-trend-map-2008-beta/
Late Static Binding (LSB)
Late Static Binding (LSB, yes, not LSD) finally got committed in HEAD and is now part of PHP 5.3.The following article describes what LSB is, what problems it’s supposed to solve and how.