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).

Sunday, October 30, 2011

Weekly roundup: the Pomodoro Technique in Barcelona

Here are the slides of my talk The Pomodoro Technique at PHP Barcelona last Friday. If you have found it interesting, remember to rate the talk on joind.in. I'd like to thank all the staff (who also gave away a Pomodoro Technique Illustrated book) and the audience, which was very interested and involved in the topic.


Here are my original articles that I published this week before the conference.

Practical PHP Refactoring: Replace Conditional with Polymorphism is the cornerstore of the elimination of conditionals.
Getting started with Selenium 2 is a primer for the usage of WebDriver, only with the official Java bindings for now.
Practical PHP Refactoring: Introduce Null Object explains the creation of an object dedicated to special cases.
I've had enough of running Scala in a terminal, let's try with a web application is the first step in my quest to develop for the web in Scala.

Sunday, October 23, 2011

Weekly roundup: going to Barcelona

I'm leaving for Barcelona on Thursday afternoon for the PHP Barcelona 2011 conference and I will hold my talk on the Pomodoro Technique on Friday morning. Feel free to ping me if you will be there, I like to discuss about the themes treated in my writings. :)

These are my original articles published this week on DZone.
Practical PHP Refactoring: Remove Control Flag is about refactoring from a boolean variable to statements like break and continue.
A look at Dart from the eyes of an OO programmer is my opinion on Dart.
Practical PHP Refactoring: Replace Nested Conditionals with Guard Clauses explains how to simplify a complex conditional before starting to extract objects.
Tell, Don't Ask in the case of a web service is a practical case of changing a design from a getter-based style to a Tell Don't Ask one.

Sunday, October 16, 2011

Weekly roundup: hardware design vs. Continuous Integration

I'm taking a course in ubiquitous computing where we are studying hardware design. It's interesting how a common methodology reminds me of waterfall - each phase from the behavioral specification to the logical synthesis (where you decide how many and, or and not to use) contains a thorough verification step.
The reason is simple - the last phase, the actual production of a custom integrated circuit is very costly (hundreds of thousands of Euros). So iterating a design including this phase is not possible at all.
In software, it's a bit different. We can afford a dedicated server that builds our application dozens of time each day.

Here are my original articles published this week on DZone.
Practical PHP Refactoring: Consolidate Conditional Expression is about extracting code from conditionals and applying polymorphism when possible.
What I have learned at DDD Day is about my experience at a conference on enterprise software, mostly oriented to .NET.
Practical PHP Refactoring: Consolidate Duplicate Conditional Fragments is about avoiding duplication even in ifs.
OAuth in headless applications explains how to access Facebook, LinkedIn and other Apis when the user can't continuously authorize your application.

Featured post

A map metaphor for architectural diagrams

It is a (two-dimension) representation of a pipe. The map is not the territory , but in software engineering terms they are models of it....

Popular posts