PHP Interview With Giorgio Sironi | Only Reinvent The wheel If You Want To Understand How A Component Works 

Purpose Of This Interview

This is the #40th set of PHP Interviews to help aspiring PHP developers & PHP fans alike to get inspired by listening from those PHP guys who are already highly involved into the PHP Ocean and being ‘there’ taming the waves, surfing better than ever to make themselves an awesome PHP Expert both in their own eyes (for self-accomplishment) and for the PHP Community.

On the other side, this is an opportunity for new PHPers to get to know their “PHP Elders“. I hope you will derive as much fun to read my interviews as I’m having by interviewing those #PHPantastic guys.

The Interview…

>> Hi Giorgio, please tell us a bit about yourself

I’m a software developer, humanist and risotto maker. I am interested in testing and in general in tools that help us achieve an high level of internal quality – sometimes the best tool to have is a bit of theory.

Giorgio Sironi bio pic

>> How you started with PHP – what’s your #elePHPant story

When I was 15 I started an online community in Italy along with another person who then became my first business partner. After coding for ourselves and for free for an year it slowly became my first job, as the skills picked up in creating a dynamic PHP websites were transferrable to commercial web sites and applications.

>> Your L(A)MP stack comprises.. ?

It started out as the classic Linux, Apache, MySQL and PHP. Today I’m not a taliban of using a particular database or web server, or even language – so I can even go to Nginx, Postgres and Python. But Linux is a constant, not even Mac OS X cuts it when it comes to Unix flavors.

>> The relationship between You and The PHP Community comprises..

After studying several of Fowler’s huge books I wrote hundreds of articles translating the patterns described into PHP examples for the community. Today I continue to go around conferences trying to push topics that I feel are important, like sane testing and operations of systems over “code and fix” endless loops.

>> How do you find PHP now as compared to when you first started

It has advanced a lot, introducing real object-oriented programming (I remember PHP 4) and progressively becoming more statically checked. Its dynamicity is still key in writing code quickly, but it has a double nature now. Some tools are feeling their age (see the PHPUnit namespace transition) but have become real standards.

Speaking of the ecosystem, Composer is really one of the best package managers and one of the things that makes PHP great; comparing it to Python’s pip or JavaScript’s npm. It’s not about popularity on shared hosting anymore, I use PHP because of the breadth of libraries and tools that prevent my decision fatigue and make me able to write clean code, quickly.

>> Based on your experience, what are the good and bad parts of PHP

The bad part is definitely the inconsistency accumulated over the years. But the good part is the batteries-included approach, whether it is about the availability of stable database extensions or the easy access to Unix primitives like popen().

>> What would be the Top advice to a PHP beginner

Don’t reivent the wheel: always look for existing libraries and frameworks before inventing your own. Stand on the shoulder of giants.
Only reinvent the wheel if you want to understand how a component works, not to use that code in production.

>> To someone who wants to become a better PHP developer..?

Try contributing to a small open source project: it’s free labor, but in exchange for free training about the PHP ecosystem.

>> What are some common PHP mistakes you often see beginners make?

The confusion of simple and easy: Active Record libraries and static methods are easy, but not a simple solution that will work in the long run. Simple means cutting the problem into pieces that are difficult to break; easy means monolithic projects where the behavior can be chaotic due to the multitude of things that can go wrong.

>> The best PHP book you’ve read

Don’t read only PHP books! I think language-specific training is best provided by the manual itself and through blog posts, tutorials, and so on. Read PoEAA instead.

>> A PHP blog or resource you highly recommend

The Qafoo team blog always has high-quality content.

>> The IDE that you use

I use Vim! Unix is my IDE, as in my terminal I can run all sorts of tools which *also* run in Continuous Integration systems.

>> How does your typical project workflow look like from start to deployment phase (including toolset you use to achieve your goals).

  • Check out the code locally
  • Build the project, run all tests (you have lots of tests right?) to check your setup is correct
  • Make changes to tests and code, commit on a branch
  • Open a pull request which will get built by CI
  • Get it reviewed and address the comments you get
  • Merge and watch it go through end2end tests
  • Wait for production deployment, demonstrating the change to someone on the product side

>> The one feature(s) of PHP 7 that you like and dislike?

Return type declarations! Continuing the move towards optional type checking.

>> What’s the best way for people to jump onto PHP 7 if they are from a PHP 5.x background

I don’t think there is such a big incompatibility. You can mostly just install PHP 7 and check your tests still pass, then propagate it to all your environments and then start using new features.

>> A PHP framework you use and would recommend

Symfony, mostly in the Silex incarnation. It’s just simple and consistent, fitting with my view of object-orientation where input and outputs are explicit.

>> A unit test framework you recommend using?

I have been using PHPUnit for more than 10 years.

>> Do you believe a PHP dev is better or less paid than any other dev? Why do you think it’s rising or declining?

I think this depends a lot on the country you work in and the company you work for. If you want your responsibilities and pay to rise you have to improve your skills beyond just PHP programming: architecture, design, testing, operations…

>> Do you believe it’s still not too late for someone to make a career as a PHP Dev?

Totally subjective impression backed by no hard data, but I see the PHP ecosystem as being stable (compared for example to Ruby declining). However even if a language is declining, it’s still unclear whether it will decline for you, in your city, with your current company. I would put down this to a matter of: do you like it? Do you want to try other paradigms, platforms?

>> How do you time manage all the stuffs that you do, coupled with your personal life?

I don’t! When I was in university it was easy, not having the same life responsibilities I have now.

More seriously, you realize it’s a never ending queue: you have to manage and prioritize TODO items in the same way as you would with a Kanban board for your team. And sometimes you have to say no, I cannot commit to do this.

>> Why do you think you are successful and what others could learn from you to lead either a better life or a successful PHP career?

I think you should always strive to understand how a piece of software works, and when your mental model doesn’t match reality you should investigate why. This either leads to you fixing your mental model or fixing reality – and both are precious things to do.

>> Is there any pet project that you are working on (or is live) and would like to share a bit with us?

I work on Eris, a PHP property-based testing library that can be used to generate random input for your tests.

>> Your hobbies when you are not coding

I cycle and got to humanist meetups… and I cook a lot! Especially as an Italian in the UK, it’s important to preserve your (food) culture 🙂

>> A final word before closing up with the rapid fire..

We are fortunate to be in a profession that is growing, creating good careers. I hope we can get the inspiration to use these “powers” to improve a bit the world we live in.

The Rapid Fire Section

>> Symfony or Zendframework

Symfony, because of the components

>> PSR-2 or your own coding style?

PSR-2

>> Use a framework or build yours from scratch (reusing components)?

Depends!

>> Zend Studio or PHPstorm?

Vim

>> To attend a conference: Europe or US?

Europe

>> Mac or PC (either linux or windows)?

Ubuntu

>> Tea or Coffee

Tea

>> PHP 7 or PHP 5.x (if you forget about the performance for a minute)

PHP 7

>> Early Riser or Late Sleeper

Early Riser

>> Coding or Managing people

Coding

>> Podcast or video recording – which you like better?

Podcast

>> Photography or Paintings (art)

Photography

Khayrattee Wasseem's Picture

About Khayrattee Wasseem

PHP enthusiast | The PHP Community Fanboi | Founder of PHP Usergroup for Mauritius (#PhpMauritius) | Aspiring Entrepreneur | Ex-country Manager of a global award winning Magento Agency | Passionate about all things Wordpress & Servers

Mauritius https://wppp.io

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.