Friday, September 23, 2011

Who disagrees with me? Fourth and final issue

I've just sent the fourth edition of the Who disagrees with me? newsletter, a pretotype for an aggregator of challenging links aimed to burst the filter bubble and confirmation bias. If that sounds obscure, consider as an example picking a PHP programmer like me and showing him where Ruby (or Java, or JavaScript) beats its preferred language. Ignoring the fact does not make the PHP programmer any better...
With this fourth edition I conclude the experiment of the newsletter and start thinking about a web application; I will take a look at analytics and subscriptions/unsubscriptions to see what has been the level of interest in the last weeks to see if the idea can be pursue further.
Please your opinions and criticism about Who disagrees with me? and these four issues in the comments.

Sunday, September 18, 2011

Weekly roundup: speaking at DDD Day

On October 8th I will speak at DDD Day in Bologna, an Italian event for Domain-Driven Design practitioners. The topic of the talk is DDD in PHP: which part of the approach changes with the programming language and platform, and which stay the same.
The abstract (in Italian, as for the talk) follows.
Cosa cambia nell'applicare Domain-Driven Design quando si passa da un linguaggio fortemente tipato e compilato come C# o Java ad uno dinamico e interpretato come PHP? Ci sono differenze ancora più subdole: il tempo di residenza degli oggetti in memoria è molto diverso, così come il livello di sviluppo degli ORM; per non parlare della differenza di mentalità fra gli sviluppatori, abituati a siti pubblici invece che a domini (applicativi) aziendali. Passare ad un linguaggio veramente diverso ci fa capire quali sono le parti di DDD che importano solo dal punto di vista tecnico (che quindi possiamo trascurare), e quali sono invece i concetti che non cambiano mai.
Here are also the links to my articles published this week on DZone.
Practical PHP Refactoring: Encapsulate Field
Backbone.js: MVC in JavaScript
Practical PHP Refactoring: Encapsulate Collection
Web typography in 2011

Friday, September 16, 2011

Who disagrees with me? Third issue

I've just sent to subscribers the third issue of Who disagrees with me?, the newsletter providing a weekly article guaranteed to challenge the assumptions of your preferred programming language. There are still 5 different editions - PHP, Ruby, C/C++, Java and JavaScript.
Last week I got a feedback on Google+ about subscribing to multiple Preferred technologies. It would definitely be handy, but I can't change the setting now without losing the data from already subscribing people. It's something to keep in mind in case this becomes something more than a newsletter.
Who disagrees with me subscription

Sunday, September 11, 2011

Weekly roundup: ergonomics

I've been using a mouse not at the same height as my keyboard for years: it took different pains and a transition to Vim (where the mouse is useless) to realize that the ergonomics of my main workstation was not excellent.
OSHA (I trust the US government on these issues more than the Chinese one) has a checklist for checking your own work desk, along with links to further explanations and pictures of good and bad setups.

While you're checking and avoiding a Carpal Tunnel Syndrome, take also a look at my original articles published this week on DZone.
Practical PHP Refactoring: Change Bidirectional Association to Unidirectional
All the Git hooks you need
Practical PHP Refactoring: Replace Magic Number with Symbolic Constant
Future JavaScript, today: Google's Traceur

Friday, September 09, 2011

Who disagrees with me? Second issue

I've just sent to subscribers the second issue of Who disagrees with me?, the newsletter providing a weekly article guaranteed to challenge the assumptions of your preferred programming language.
After two weeks and a half from the launch of the pretotype, the newsletter has grown to 5 of the 6 technologies available: there is a C, Java, JavaScript, PHP and Ruby edition.
I plan to prepare two more issues for the coming weeks before wrapping up the experiment. The result would be either the start of a new website or the end of the service, depending on user response (that's you!).
Who disagrees with me subscription

Tuesday, September 06, 2011

Automatically assign constructor parameters to private properties

In Scala, a JVM language, constructor parameters become private fields of the class, by default:
class Person(age:Int) {
  def grow() = {
    age += 1
I find it handy, as I always use private properties which are the target of dependency injection, in particular constructor injection.
Here's how to emulate this functionality in PHP, with great hacks. I post this code here so it won't be lost in the interwebs.

Sunday, September 04, 2011

Weekly roundup: speaking at PBC 2011

There is no official schedule yet, but speakers are beginning to confirm their presence to PHP Barcelona 2011. I will be there, with my talk on the Pomodoro Technique, a time management tool inspired by eXtreme Programming/Agile methodologies and widely diffused also outside of the software development field.
I also have seen confirming Juozas Kaziukenas, Stephan Hochdörfer, and Marcelo Duarte from iBuildings. See you all in October in Barcelona!

Meanwhile, here are my original articles published this week on DZone.
Practical PHP Refactoring: Duplicate Observed Data is a refactoring associated with moving fields from the presentation layer to the domain one, in the cases where their values take part to the execution of some logic, like validation or a change in state.
There's no reason not to switch to DocBlox is an overview of an Api documentation generator for PHP 5.3, which together with phpdox will replace the older phpDocumentor, not maintained anymore.
Practical PHP Refactoring: Change Unidirectional Association to Bidirectional targets the transformation of a pointer between two objects in a bidirectional reference, where each object can navigate the graph towards the other.
Offline web applications: a working example is, in fact, a working example of an HTML5 application that you can load in the browser once and then use forever after severing the connection with the server, or closing and reopening the browser. The goal of course, is to make a comparison with native mobile applications.

Friday, September 02, 2011

Who disagrees with me? First issue

I've just sent to subscribers the first issue of Who disagrees with me?, a service providing a weekly link to an article guaranteed to challenge your thinking.
For example, readers who have subscribed to the PHP edition (selecting PHP as their preferred technology) are getting an article describing an advanced feature of Ruby that PHP lacks by construction.

If you want to jump on board, subscribe. I am pretotyping this service by selecting links manually: if there is a recurring interest in the list, I will transform it into a website covering other areas too (economics, or maybe music).
Who disagrees with me subscription