Sunday, January 30, 2011

Weekly roundup: first round of exams

I am in the middle of the first session of exams of the Master's course in Computer Engineering here at Politecnico di Milano. My specialization is in multimedia and data engineering, so there are new interesting topics I may write about in the future, like image processing, computer vision and web-scale search.

Here are my original articles for this week, published on DZone.
Practical PHP Testing Patterns: Chained Tests explains how to write tests which recycle the results of earlier tests in PHPUnit.
And now instead, 5 things Java envies PHP for received only 2 downvotes (with 13 upvotes) on a Java-centric website like DZone. I think my PHP audience will like it.
Practical PHP Testing Patterns: State Verification starts the comparison between checking state and checking interactions, and also between Stubs and Mocks.
PageRank in 5 minutes takes a short time to tell you how this million-dollar algorithm works. PageRank is now taught in universities, just like Quicksort.

Sunday, January 23, 2011

Weekly roundup: genetic programming

Genetic algorithms are stochastic algorithms which emulate the tools of biological evolution in order to find solutions to a problem: crossover and mutation of chromosomes, survival of the fittest, and so on. I'm currently trying to get one to work to match points of two different images.

Here's my original articles published this week.
Practical PHP Testing Patterns: Suite Fixture Setup
An humble infographic on methodologies compares on a pair of scales Rational Unified Process, Scrum, XP and Kanban.
Practical PHP Testing Patterns: Setup Decorator - did you know you could run the same test suite twice, with two different databases (such as PostgreSQL and MySQL) just by decorating it differently?
5 things that PHP envies Java for - this article raised some less than happy responses from the PHP community. But stay tuned: next week we will explore what Java envies PHP for instead.

Thursday, January 20, 2011

References are actually good

I realized in the last weeks that I'm guilty of not citing enough references while writing here and at Web Builder Zone. References are something that cannot be avoided in academic work, where they are called citations.

For example, in my slides on image manipulation detection, references look like this:
Main Hany Farid, A Survey of Image Forgery Detection (2009), in: IEEE Signal Processing Magazine, 2:26(16-25)
Valentina Conotter, Giulia Boato and Hany Farid, Detecting Photo Manipulation on Signs and Billboards, in: International Conference on Image Processing, Hong Kong, 2010
R. Hartley and A. Zisserman, Multiple View Geometry in Computer Vision, Cambridge University Press, 2004
...


What references are
References are simply a list of academic papers (good), books (also good) or web pages (not good in academia, but often the only viable reference on the web). The reader interested in learning more, or in verifying that you're not scamming him, will follow the references. It's like saying: this isn't something I dreamed last night after after several beers; there are other sources which propose the same concept, and they are generally trusted by the community.

Yet, I don't see many references in blog posts and articles (if you leave out the original source, for republished articles.) And I'm the first to plead guilty for this. I know many posts present an opinion, and not a scientific research, but while explaining a pattern or a methodology citing independent sources would actually help our case.

The worst thing a technical writer can think of is that there is no added value in posts that link similar articles. Actually, your argument is stronger when backed by someone else, even if it loses a bit of originality. This is how you add value to something already written on another web page.

  • You make an additional explanation of the topic from your point of view, and moreover with your background, which is different from everyone else. I know what my colleague, a front-end developer, thinks of Ajax. Now what do you think, as a graphic designer, a PHP coder or a or salesman?
  • You port the example to other tecnologies and fields. Some of the things I say to PHP developers have been well-known from Java programmers for years.
  • All ideas are made from other ideas*, so even the most original articles build on previous work.

Myths of Innovation

Wednesday, January 19, 2011

Blind detection of image manipulation slides

As part of the Image Processing course, I have given a presentation on Blind detection of image manipulation. Which means: how to crunch an image with an algorithm and tell is it has been photoshopped or not.
Here are the slides.

Tuesday, January 18, 2011

Slides from CouchDB university presentation

As part of the Advanced Database course at Politecnico di Milano, I have done a short presentation on CouchDB, a NoSQL database. Here are the slides, in case they are of interest to you.

Sunday, January 16, 2011

Weekly roundup: diving into DDD

At Allbus, finally we have abandoned our archive-like modules and dived into something more complex, which comprehends invoices and money. [Essential] Complexity in behavior should not be feared in this case, as Brandolini taught us it is mandatory for applying Domain-Driven Design with some return on investment. A challenge is also adapting some practices, like a model free from the influence of database tables, to PHP technologies (we jumped from Doctrine 1 to Doctrine 2 just for that.)

Between transforming specification documents and the Domain Expert's Verb into unit tests and discovering tacit concepts of our codebase, I' ve written some article for you.
Practical PHP Testing Patterns: Prebuilt Fixture discusses test fixtures built in the bootstrap of the suite.
Why Twitter is not an RSS replacement sums up the issues with Twitter usage. For example, it's impossible to follow a conversation.
Practical PHP Testing Patterns: Lazy Setup explains how to lazy-create a test fixture such as a database connection.
TDD for algorithms: the state of the art is my take on what you can use Test-Driven Development for.

Saturday, January 08, 2011

Weekly roundup: returning to university


On Monday I'm returning to the university regularly, after the vacation. This week I will give another presentation, this time as part of the Image Processing course. The topic will be techniques for image forgery detection, which simply means how to discover if an image is photoshopped. I will publish the slides after the short talk.

Meanwhile, here are my original articles for this week. They were published on DZone between Monday and Thursday, as always.
Practical PHP Testing Patterns: Creation Method
These are not the buzzwords you're looking for
Practical PHP Testing Patterns: Implicit Setup
A programmer on the cloud

Sunday, January 02, 2011

Weekly roundup: happy 2011

Happy 2011 to all my readers, I hope you're passing some nice days off work so that at your return on "stuff with computers" you'll be able to take a fresh perspective.

My writing activity however takes advantage of pre-written articles, so that it essentially never stops.
Practical PHP Testing Patterns: Inline Setup
Reuse your closures with functors
Practical PHP Testing Patterns: Delegated Setup
CouchDB from JavaScript

ShareThis