Sunday, November 27, 2011

Weekly roundup: PHPUnit_Selenium

I am now the maintainer of PHPUnit_Selenium, the PHP library for writing PHPUnit test cases that make use of Selenium RC to drive a real browser (usually to perform end-to-end tests). PHPUnit will continue shipping the library, and PHPUnit_Extensions_SeleniumTestCase will continue to be compatible with the Api in the manual.
Right now, you should use PHPUnit_Selenium in tandem with Selenium 2. Selenium 2 integrates WebDriver (not supported yet from PHP code) and implements the old Selenium RC Api, so it will continue to work and be maintained. If you encounter a backward compatibility break, open an issue.
PHPUnit_Selenium was not maintained and was broken in PHPUnit 3.6; with the next release, it will resume working. I'm integrating all sort of pull requests initiated during 2011, so if you want to contribute or to merge back one of your forks, you will be welcome!

Here are my original articles published this week.
Practical PHP Refactoring: Replace Parameter with Explicit Methods explains how to break up a method into a few, finer-grained ones.
Setting up a LAMP box with Puppet is an how to on writing Puppet manifests for provisioning packages and services like Apache, PHP and MySql in a machine (instead of writing long scripts containing apt-get, yum and /etc/init.d/ calls).
Practical PHP Refactoring: Preserve Whole Object explains how to pass an entire object to a method instead of extracting its state and passing a series of variables.
PhoneGap: native applications written in HTML is a review of a mobile application frameworks which promises to wrap your Ajax-based applications into an Android or iOS one.

Sunday, November 20, 2011

Weekly roundup: Italian Agile Day

Yesterday I followed via streaming the 8th edition of the Italian Agile Day, since I was unable to go to Rome for the event. If you speak Italian, stay tuned as many talks have been recorded and will be published (the event does not seek profit.)
Of course I missed the networking dimension of such a big event, but at least I enjoyed some talks on methodology while I am mostly a technical person. Look for the bottleneck!

Here are my original articles published this week on DZone.
Practical PHP Refactoring: Separate Query from Modifier is about respecting the Command/Query Separation principle.
Selenium 2 from PHP code explains which options you have right now for accessing the Selenium 2 (WebDriver) Api from a PHP script.
Practical PHP Refactoring: Parameterize Method explains how to unify different versions of a method in a single one with more parameters.
Creating a virtual server with Vagrant: a practical walkthrough is an howto for making Vagrant build a virtual machine with your OS and software of choice, instead of creating that machine and go through the installation process of an .iso image yourself.

Sunday, November 13, 2011

Weekly roundup: universal software development rules

This week, Kevin Schroeder from Zend collected responses to his tweet asking what are the universal software development rules. My take, cited there, is that there not many universal practices that you can follow. There are many conflicting metrics to measure the quality of a software piece, and their relative importance depends on the domain in which we are in.
For example, in development of embedded systems (which do not even run on general purpose microprocessors), many "clean code" practices like Don't Repeat Yourself and Keep It Simple Stupid are subverted. We may replicate the code for an operation to parallelize it and lower the response time of the system; we may micro-optimize operators and substitute multiplications with binary shifts. Power, energy and cost of a circuit come into play more than expressiveness of the code...

These are my original articles published this week on DZone.
Practical PHP Refactoring: Add Parameter is about adding an explicit parameter to a method instead of trying to look it up in a singleton or in some other place by itself.
Eventual consistency is everywhere in the real world contains a few examples of how eventual consistency (popularized in the programming world by NoSQL solutions) make many businesses work.
Practical PHP Refactoring: Remove Parameter is about simplifying a method by removing a parameter which is not needed anymore.
Web applications with the Play framework is a primer for the usage of a clean alternative to bloated enterprise Java stacks. And it supports Scala, too.

Sunday, November 06, 2011

Weekly roundup: a short Pomodoro presentation

Here is my Pomodoro Technique short presentation held at phpDay 2011 in Verona. It's not the same as the full one at PHP Barcelona, but it contains some frequently asked questions about Pomodoros along with some handy tricks.
Remember that English is not my native language. :)

Giorgio Sironi - An year of pomodoros - phpday2011 from GrUSP on Vimeo.

Here are also my original articles published this week on DZone.
Practical PHP Refactoring: Introduce Assertion is about the ancient usage of assertions, when they were embedded in production code instead of being segregated in an external test suite.
PHP on a Java application server is our experience with Quercus for running a PHP application on Resin. TL;DR: not really working.
Practical PHP Refactoring: Rename Method is about making method calls easier to follow: when a method's name is really explanatory you don't have to read into its body to understand what it does.
Using a virtual machine to play with multiple versions of PHP is a tutorial on setting up a VirtualBox machine with PHP 5.4 (the newest unstable version).

ShareThis