Sunday, July 31, 2011

Biweekly roundup: The Goal

What is the goal of a business organization? To make money, or in a software development sense to provide value.
More precisely, in the case of a software development team, to deliver as many features as possible (throughput) while minimizing the developers time (operational expenses) and the amount of Work-In-Progress features which are stuck inside the development or testing phase without having been deployed (inventory).
The Goal: A Process of Ongoing ImprovementI'm reading The Goal by Eli Goldratt (and apparently I am the only one at ASP), the book that introduced the Theory of Constraints and transformed these goals into a process for improving production. It's really fashionary these days to transport industry-related concepts into software development. :)
The lesson I am learning so far is that targeting the wrong metrics, like the amount of time worked by each person, is not what moves us towards The Goal. Code coverage is one of our tools, but if our software never gets deployed it is the most useless of metrics.

While I'm finishing the book, please enjoy my articles published in the last two weeks.
First week
Practical PHP Refactoring: Move Field is about moving private members between nearby objects.
What new feature in PHP 5.4 is the most important to you? is a poll on the release candidates of PHP 5.4
Practical PHP Refactoring: Extract Class is one of the most underused tools for isolating logic.
Phantom JS: an alternative to Selenium is an headless browser we experimented for end-to-end testing of web applications.

Second week
Which browser do you consider the fastest? is a poll on current browser speeds.
Symfony 2 from the eyes of a ZFer is my first date with the new framework.
Practical PHP Refactoring: Inline Class is about Extract Class performed in the opposite direction.
Practical PHP Refactoring: Hide Delegate tells us one of the ways to follow the Law of Demeter.

Tuesday, July 19, 2011

Hardware metaphors

Computer metaphors do not always work well in real world.

Here's an example of a metaphor that produces good results when transported in life: RAM vs. permanent storage. Each productivity system (e.g. Getting Things Done) worth its salt recognizes that our brains have limited RAM and we cannot keep in mind too many things at once. But we can use what is called an exocortex - an extension to our brain to augment our capabilities - namely, the Internet, but even a sheet of paper where to write our calculations, or diagrams.
One of the uses of the exocortex is storage: a simple paper notepad that is always with you will be able to function as an hard disk, and your brain RAM will be freed and available for other purposes. The point is not only to avoid forgetting an idea or a TODO, but to avoid worrying about forgetting at all.

Here's an example which doesn't work. Real time notifications are more and more embedded in our system; the sources of input are instant messaging system like email and Twitter. Technology does wonder: compare snail mail to an email being delivered in seconds.
Yet we find ourselves avoiding the wonderful technology of real time communications: interruptions are considered a menace for our flow and our Pomodoros. In order to get large batches, I visit GMail only few times a day, and I'm working on lowering this number; I avoid any kind of GMail or Twitter applet in my panel (although they may work for managers: I'm talking about creative work as put in danger by interruptions).
Polling is often a waste of CPU cycles for computers, and in fact they are built from the ground up on an event-based model: hardware interrupts. Yet the model fails miserably when, due to the inability of humans to multitask like a machine.

Sunday, July 17, 2011

Weekly roundup: Uncle Bob's inspiration

From Robert Martin's pragmatic podcast:
Certainly employers will coem to you and say "Geez, you're doing such a good job programming, let's have you not program. You should go in management where you can make the real money." And of course that happen to me as well, but I could never take my fingers off the keyboard [...] even while running a company, I still write code and I write it a lot.

Here are my articles published during this week.
Practical PHP Refactoring: Substitute Algorithm is about changing an algorithm without impacting the rest of the codebase.
HATEOAS, the scary acronym is a list of metaphors for understanding this REST concept.
Practical PHP Refactoring: Move Method is one of the first larger-scale refactoring we can make to PHP (and non-PHP) code.
Unit testing JavaScript code when Ajax gets in the way describes isolation techniques for, well, testing JavaScript code.

Sunday, July 10, 2011

Weekly roundup: PHP.TO.START

I'm packing up some gear (and some dinner) for my trip to Torino for the PHP.TO.START. The path from Porta Nuova station to the event is in the most central area of the city, so I'll take a walk in the morning; maybe I'll try the metro for the return trip, which (unlike the Milan one) is very modern and completely automatic.

Here are my original articles published during this week.
Practical PHP Refactoring: Remove Assignments to Parameters is a small scale refactoring to ensure the values of parameters remain invariants of a method.
Testing JavaScript when the DOM gets in the way uses jsTestDriver for testing JavaScript code which manipulated divs, inputs and other HTML elements.
Practical PHP Refactoring: Replace Method with Method Object describes how to extract a too complex method as an object of its own.
The era of Object-Document Mapping is a snapshot of the current Doctrine tools for mapping PHP objects to a NoSQL database.

Friday, July 08, 2011

PHP.TO.START - July 11th

I will be in Torino on Monday for PHP.TO.START, a day-long event oriented to PHP businesses and university students. The event would be in Italian and has been created by Indigeni Digitali and Skuola.net.
Who wants to work with EJBs if you can work with PHP? :)

Subscription is mandatory and closes on Sunday. I will make the trip with the 8:00 AM Freccia Rossa if you're coming from Milan.

Thursday, July 07, 2011

The ultimate web 2.0 note-taking tool



It's always with you, because it fits in your pocket. You don't have strange synchronization processes which would eventually overwrite something. It does not require an Internet connection, so it works everywhere free of charge. It does not force you into a textual form or anything, you're free to draw mind maps or graphs.
And it is web 2.0, if you buy it on eBay (not suggested due to shipping costs).

No seriously, leave out the web 2.0 part. The fact is that the information I keep in this notepad has a cycle that goes from written to discarded of some days at maximum: I write on it Google queries I should make, ideas and exercises got from books that I should explore, or titles of articles to write.
Since I do not have to keep these information around for long, there are no disadvantages with respect to a digital form. I'll never write an article on it, but for my reminders works pretty well.

Sunday, July 03, 2011

Weekly roundup: Agcom

It seems that Italian regulators understand just enough of the Internet to craft meaningless measures. The recent proposal for arbitrary removal (without the intervention of a judge) of content from Italian websites would extend the YouTube doctrine to all Italian websites: after a suspect violation of copyright, the related pages have to be cautionarily deleted (or the website's ip and domain name be blocked, if you're wondering how); after a controversy, maybe someday you'll get your content back. Maybe.
This regulation is either a a) copyright protection gone bad or b) a censorship act. In the former case, is like sending SWAT teams to expropriate children tapes, because they may contain copied songs (or they may not; but we'll confiscate them just in case.) In the latter, it's just a way to take down everyone that does not lick the government's ass and transforming the Internet in Mediaset. I don't know which is worse.
To make an international comparison, we are on the level of absurdity of the DMCA, although this issue is not related to DRM systems; the DRM system here is simply blocking Internet addresses.

By the way, here are my articles published this week (unless some prankster says I have infringed his trademark on the Self-Initializing Fakes term and they are taken down):
A week without Flash
Practical PHP Refactoring: Introduce Explaining Variable
Self-Initializing Fakes in PHP
Practical PHP Refactoring: Split Temporary Variable

Image of the Students for Free Culture movement.

ShareThis