Sunday, February 26, 2012

Biweekly roundup: PHP.TO.START

The Turin PHP User Group has been growing in the last months and have now organized a free one-day conference on March 21st. I will be a speaker with a basic talk on automated testing of PHP applications.
I'm getting to know better the diffusion of PHP in Milan and Turin - cities where historically there was not much attention for this ecosystem. The message is clear: investing on PHP as one of the platforms you specialize in your career is not a dead end.

Here are my articles published in the last two weeks on DZone. The Practical PHP Refactoring series has ended, but I will always have space for PHP related articles.
Practical PHP Refactoring: Separate Domain from Presentation is one of the most necessary large-scale refactorings to perform on legacy code.
Bottle: a lightweight Python framework explains the first steps for developing a Python web application with Bottle.
Practical PHP Refactoring: Extract Hierarchy explains how to segregate the responsibilities of a God class.
Spam filtering with a Naive Bayes Classifier in R is a full-featured example of R usage for data mining.
Erlang's actor model explains one of the ways this language blows your mind.
The 7 habits of highly effective developers is an essay on a fluffy topic - which personal habits are beneficial to our job, solving problems?
Writing clean code in PHP 5.4 is a photograph of the new features of PHP and how they may be abused to write spaghetti code.
Our experience with Domain Events is a summary of how we have come to use Events as an additional Domain Model pattern in DDD.

Monday, February 13, 2012

Biweekly roundup: distributed systems

Fowler's first law of distributed objects:
Don't distributed your objects.
Indeed after six months submerged into academical distributed projects, I can too say that designing interfaces for local objects and for remote one is a different task: there is no trasparency. For more, google A note on distributed computing.

Here are my original articles published in the last two weeks on DZone.
Practical PHP Refactoring: Replace Inheritance with Delegation explains how to refactor towards composition, since inheritance is highly overused in PHP and many modern languages.
My use case for checked exceptions sees Java checked exceptions as a way to enforce contracts that involve distributed computation.
Practical PHP Refactoring: Replace Delegation with Inheritance is the previous refactoring when applied in the opposite direction.
An Introduction to the R Language is a tutorial for starting to use R, a platform for statistical computing similar to Matlab and Octave.
Practical PHP Refactoring: Tease Apart Inheritance is about separating code into multiple hierarchies to avoid a single, large and incomprehensible one.
What WSGI is: a Python standard for web applications and frameworks to conform to.
Practical PHP Refactoring: Convert Procedural Design to Objects is a large scale refactoring involving, as a first step, moving away from the record/procedure pattern,
The Decorator pattern, or its cousin, in JavaScript is my take on implementing a Decorator with prototype chaining; in JavaScript we can even add methods with this technique, which wouldn't be feasible with the classic pattern.

Thursday, February 02, 2012

PHP Goes Mobile postponed

The PHP Goes Mobile event scheduled for tomorrow in Milan has been postponed due to the exceptional weather, which has slowed down and in some cases blocked transportations. The next date is not fixed yet.