Penguin at kooper.fanstvo.com

Review of "Working Effectively With Legacy Code" book by Michael C. Feathers

The book explores most complicated and hateful programming task - making changes in so-called 'legacy' code. To be concrete author defines 'legacy' code as code with unpredictable reaction on changes, thus making problematic to ensure correctness of changes made. Book therefore concentrates on tools and technics to control scope and effect of changes in order to overcome code complexity. Practical approaches are favored through the entire book.

In the begining brief introduction to unit testing is given. Later author proceeds with hands-on approach, providing examples of how to use mock objects and substitute implementations. Major part of book is concentrated on how to cover changing code with unit tests. Among different problems of unit tests adoption the main reason is highlighted - inability to obtain instance of object being tested in testing environment. Different sources of the problem are: various kinds of dependencies of the object to environment, such as global variables, libraries dependency, side effects, parameters dependencies and others. Every obstacle is examined and algorithm is provided to handle it.

To choose amount of code and boundaries of tests the author presents a 'seam model' - rules of how to find places in program code where it is feasible to alter program's behaviour. Such places are natural points for inculcation of mock and testing objects.

It was very interesting for me to know how to use 'seams' in compiled languages (linking with testing libraries and using preprocessors) and how compilers can be used as a refactoring tools.

Another part of the book is devoted to recommendations on how to actually make changes. A good change would not reduce code maintainability, but exact the opposite - it may increase code quality. It is achieved by applying separation of concerns and effective refactorings aimed for improvement of program design. Difficulties and obstacles are enumerated and described.

The last part of book is a registry of refactorings applicable for breaking dependencies in code.

Drawbacks: It feels like book lacks a bit of organization - problems are considered ad-hoc and with custom example and hands-on approach. They are not organized into any kinds of classes or taxonomies. Another thing - I read Russian translated version and it is awful because of pedantically translated every programming term into it's official Russian analogue. Albeit it may seems like a good idea - it is not. How would you like 'code reorganization' versus 'refactoring'?

Generally I would strongly recommend this book for software engineers willing to adopt unit testing for existing codebase or planning refactoring. It is also very helpfull to developing personal 'code quality' sense (Wed Jun 3 14:43:21 NOVST 2009)

News Feeds in Official APS Repository

The official APS packages repository at http://a pscatalog.com provides ATOM feeds with different information about particular packages or packages categories. Just explore it and follow the ... feed links (Fri Mar 6 08:28:46 NOVT 2009)

Personal OpenID provider packed into APS 1.0 package

What is so cool about OpenID? For me personally, it's an ability to claim my ownership of Internet resource. With help of OpenID I may prove to any another Internet site that I am indeed the person behind the URL. For example my personal OpenID identity is placed on itsme.kooper.fanstvo.com site. I am the only person who can be presented to OpenID-aware Internet as itsme.kooper.fanstvo.com

Literally everybody may place personal OpenID provider (providing identity for the only user) on arbitrary URL and use this URL as personal Internet face. To do this you need to run a personal OpenID provider, such as phpMyID on this URL. phpMyID is characterized as "spartan" software - there are several code tweaks one should make upon installation and no graphical configurators to change password or anything.

I packed phpMyID 0.9 into APS 1.0-compatible package, that allows easy installation and configuration of this software in APS-compatible hosting control panels. aps-phpMyID-0.9.2.zip (Sun Sep 14 01:08:45 NOVST 2008)

Application Packaging Standard 1.0 RelaxNG schemas

Here are validating schemas for APS 1.0 in RelaxNG (rng) format. They were converted from official APS RelaxNG Compact Syntax schemas with help of Trang utility. (Sat Sep 6 00:59:22 NOVST 2008)

Application Packaging Standard 1.0 XML Schemas

Here are validating schemas for APS 1.0 in XML Schema format. They were converted from official APS RelaxNG Compact Syntax schemas with help of Trang utility. (Thu Sep 4 00:32:43 NOVST 2008)

Application Packaging Standard 1.0 application sample

Below is very simple application package, compatible with Application Packaging Standard 1.0 (APS 1.0) It features a database requirement and configuration script that writes parameters into some configuration file within application installation directory. It should work for both Windows and Linux. (Tue Aug 26 16:57:21 EDT 2008)

aps-application-1.0.0.zip

Tools for Application Packaging Standard: APP-META.xml Wizard

There is a web tool written by Parallels, for generating APP-META.xml file for simple PHP-based web applications. It is available at http://tools.apsstandard.com/ Albeit it is marked as APS TOOLS DEMO it is functional and produces a working APP-META.xml (Mon Sep 1 23:34:34 NOVST 2008)

Friend Sites

Information related to APS is also placed at http://sites.google.com/site/apsinformal/ site.

Personal information is placed at http://sites.google.com/site/50percentplan/ site.


Locations of visitors to this page

Valid XHTML 1.0 Strict