PHP Interview With Rafael Dohms The Brazilian PHP Evangelist – To Really Learn Go Outside Your Comfort Zone Try New Technologies New Frameworks

About This Interview

This is the #12th set of PHP Interview to help aspiring PHP developers and PHP fans alike to get inspired by listening from those PHPeople who are already highly involved into the PHP Ocean and *being there* taming the waves and 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 awesome PHP people.

A Small Intro..

In this edition I talked with Rafael Dohms ( @rdohms ), The Brazilian PHP Evangelist. He is to the PHP Community and specially to The Brazilian PHP Community, what Brazilian Ronaldo is to the Football World! He has founded two PHP user-groups and is seen as an AWESOME active member of the PHP Community; he is also an active contributor to some conspicuous open-source PHP projects as you will found out for yourself in this interview. Rafael is very passionate about helping out fellow developers generously; you can read more about him on his personal website/blog. You can also find his presentations on slideshare – some of his talks include :-

  • Your code sucks, let’s fix it (very nice one which I have personally gone through and discussed with Rafael)
  • Open a Window, see the clouds

And Now The Interview…

1) Please tell us a bit about yourself

I’m a modest developer involved with PHP for over 12 years. I have founded 2 User Groups and been to many a conference, both as a speaker and as an attendee. I’m driven by passion to help and contribute, give back to the great PHP community. I contribute to a few projects like ZF, Symfony and Doctrine as well as having a few libraries and tests of my own like the Facebook Test-User Manager and the DMS library.

I’m a Brazilian and know the Brazilian community like its my own family. Last year I decided to embark on a adventure and moved to Amsterdam where I currently reside and write code for WEBclusive, the awesome company that was crazy enough to “import” me. I’m an evangelist of PHP and have great passion for topics like testing, community involvement and code quality, having given sessions about these topics in conferences in and out of Brazil.

I’m also an easy target for flame-wars and tend to rant a bit, I’m working on solving that.

2) How you started with PHP

At my first job, well actually it was an intern-ship, I worked with HTML until one day my boss decided he was going to teach me this other language so I could do more with the websites. That day he showed me PHP and taught me to grab user names and birthdays from the database and print out a list of “birthdays” of the month. This was somewhere between PHP 3 and 4 already, and it was a very simple script, but after that my boss said “go forth and develop our Intranet”.

Well not in those words but that’s what happened, I continued to work with PHP at that job and in my personal projects, I had been longing to find a replacement for SSI or Perl scripts, which I had used to develop my “Counter Strike” Clan’s website (yes, I was young). PHP offered me exactly what I wanted and I worked a lot on personal projects, honing my skill. I had worked with Java, C and Pascal before, in university and otherwise, but PHP was just so simple for doing web stuff that it quickly became my language of choice, easy and flexible.

My memory fades from the in betweens after that, but I recall the first time Object Orientation came into the picture and MVC and that’s when the game changed for me and I started truly developing web applications and no longer used PHP as a simple tool to glue my HTML together. It has been one wild ride from then to today.

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

Simply put, it has matured. Its just an awesome language, it has always been easy and flexible, but now it offers advanced tools for advanced developers and still keeps things simple for beginners. Back then we barely had Object Oriented code, PHP was always the stuff between HTML and now its PHP outputting the HTML not just keeping it together. As I said, now we really develop systems as opposed to websites. There is just so much to do and so may resources to do them with. Code is more complex, but it is still only as complex as you wish to build it.

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

PHP has a few downfalls, like the lack of pattern in function names and parameter order, but we have all learnt to live with that. On the other hand it’s just so flexible that you can do everything with it, quick hack to beautiful architecture.

5) What would be the Top advice to a PHP beginner

Get involved. Developing, in general not just PHP, is not a 9 to 5 job. Take the time to learn more, to work on your skills, talk to other people. Developing is an art form and just like famous painters were influenced by other painters or schools, so is a developer, there are multiple ways to solve any given problem so listening to other people can make you turn your pocket knife into a Swiss pocket-knife. So read, reach out, and practice.

6) To someone who wants to become a better PHP developer, what is your advice?

As I mentioned, get involved. I recommend always having a pet project in your hands. But to really learn go outside your comfort zone, try new technologies, new frameworks, this is the right time because there is no pressure, no client. Its just you and your code, at your pace, so experiment, pick a different framework, build a different architecture, just learn something new outside your business hours.

7) The best PHP book you’ve read

I have problems picking one of any thing, but I guess PHP5: Powerful Programming was one of the most useful ones I read, in terms of PHP. But I deeply recommend “The art of readable code” for any developer looking to improve code quality.

8) A PHP blog or resource you highly recommend is a must-read resource, just like everyone else said, I also recommend PHPQuickFix (@phpquickfix), also from @phpdeveloper.

9) The IDE that you use

I have been around with IDE’s, from Zend Studio to NetBeans and now I have found PHPStorm. I truly fell in love with it, for one its much lighter and faster then NetBeans and my changes are always driven by speed and responsiveness. So far its doing great, but I still keep Textmate around, for quick stuff.

10) How do you debug your PHP code?

Its usually a mix between “var_dump debugging” and using XDebug. I usually run Xdebug alongside my phpunit tests and debug them on the go.

11) A PHP framework you use and would recommend

I don’t usually recommend a framework, I usually prefer to point the characteristics of a framework and then let you decide. This is because choosing a framework is very much about context, what’s the level of your team, the size of your project, and so forth. So currently I’m playing with Symfony 2 and the ZF2 betas myself.

12) A CMS that you think is worthwhile

WordPress, if I can call it a CMS. As I always say, please know the limitations of WordPress and the kind of platform it is, just because you *can* build anything on it, does not mean you *should*.

13) A unit test framework you recommend using?

PHPUnit (@phpunit), sometimes with a Mockery (@padraicb) sider to make mocking easier.

14) Your LAMP stack comprises.. ?

In 2008 I switched to a Mac and never looked back, my current go-to stack is Mac OSX, MySQL, PHP 5.3 and Apache.

15) One PHP person that you admire and what strikes you about him/her

Photo by Graur Razvan

If I have to pick one, then it will be Cal Evans (@CalEvans), he is like a godfather to me in the International Community. He opened door to me that I never thought I could get open and made me the PHP developer I am today. In 2008 we finally met at ZendCon and he was kind enough to introduce me to new developers and get me into a Community MeetUp for Community leaders, in that meeting I met the rest of the people who got me here today. And he does the same for so many people, that is what makes him someone to look up to.

But I can’t carry on without mentioning names like Michelangelo van Dam (@DragonBe) (the dude that has 48h days), Stefan Koopmanschap (@skoop), Guilherme Blanco (@guilhermeblanco) and up and coming names like Alexandre Gaigalas (@alganet), This would be very long if I had to list everyone I look up to, but start with everyone who was been interviewed here already and its a good overlap.

=> You might want to read a similar PHP Interview with the People Rafael Mentioned above:

16) One function that you like (or which you tend to use frequently)

I tend to use var_dump and die more then I like to admit.

17) One PHP Community that you recommend

PHPC (@phpc) for everyone, but if you are in Brazil I have to recommend PHPSP (@phpsp). Those guys are great and so very friendly, its what I miss most about leaving São Paulo.

18) Recently Microsoft has also started actively to concentrate on PHP, any comments on that?

Yes. I have been tagging along with them since 2009 and I love the work being done by Microsoft (@Windows). More then once have they reached out to the community for feedback on what to do, what needs work and how to fix it, I’m very glad to be part of that “task force” and even happier to say that I have seen lots of results, which means they are actually listening and making their tools better. Even if you are not on a Microsoft platform, things like Azure (@WindowsAzure) and Azure SQL are tools that can really boost your applications.

19) The best conference you attended would be..

Photo by nokhoog_buchachon

php|tek (@phptek) is by far the most fun conference I have been to. Its where I met most of these awesome people and get to hang out with them year after year.

20) Can you please share the good, and may be not so good moments, of being part of all the conferences you attended

If I go into details this article would be too long. Its all about the social, having dinner with the European crew the day before everyone else gets there, playing board games at the game nights, hanging out a shoeless joe’s (the bar next to php|tek), and all the awesome conversations about topics ranging from PHP to topics I can’t even mention here.

One time at tek I had awesome names like Joel Perras (@jperras), David Coallier (@davidcoallier), Scott McVicar all together trying to figure out why we could not compile PHP on a Mac, learning experiences don’t go much further then that.

21) What are the main aspects of conferences that can really help a PHP guy to get better in his progression

As Cal Evans (@CalEvans) already said one day: “I may not know the answer, but I probably know who does.“. Being at conferences put me in touch with the “greater” community I did not see on a daily basis, these people projected me further then I could imagine. That is the value, a solid network to get answers, friends and generally people who can open doors for me that I could not reach alone.

22) If you could change one thing with PHP, that would be…?

I have not hidden that I’m very much not fond of arguments all over the place. PHP’s ecosystem as well as its internals have changed in the past year, its not all negative, but there has been a lot more un-friendliness all over the place, be it between core developers and userland developers or between developers of different frameworks.

I feel its all counter-productive and we should really embrace the community spirit once more and try to make good things come out of everyone’s work, this does not mean having a “the one” solution, but respecting other’s people point of view and approaches to how problems are solved.

23) Which was the worst programming mistake you did?

Photo by Phaitoon

If you are not making mistakes you are not learning. So yeah, I make mistakes on a daily basis. The only huge mistake you can really make is to *not* leave your comfort zone. Out of all those the one I still remember from very early years, was actually a DB mistake, running an UPDATE without a WHERE clause, fun times.

24) Do you recommend using database layers and ORMs like Doctrine? If yes, what database “framework” you use and would recommend?

Yeah, read back to the frameworks question above, same applies here. Team, project and all those characteristics come into play. For most of my projects Doctrine is a natural fit, having worked alongside Guilherme Blanco, the Doctrine Core Dev (@guilhermeblanco). I’m very fond of Doctrine and know a lot about its inner working, which still scares me but makes me a heavy user of it.

25) What is your opinion on Traits and what’s on your mind for using them?

I personally really like traits for horizontal reuse. Much similar to “the force” it can be used for the dark side and for making code hard to read, but it has very good applications. One example I had recently was my test suite, I had a few custom TestCase classes with some automated functionality, but I needed to duplicate code in some points as I needed to extend from ZF‘s TestCase in some cases, traits would have done a good job of carrying common functionality between different “trees” of TestCases.

26) What is your opinion on PHP 5.4 and what important (new) features you think PHP programmers will need to focus on or to take advantage on.

PHP 5.4 has a lot of code goodness inside it, which should make for some interesting new code, but I really think that 5.4 is not about the code, but the language. Along with 5.4, PHP has rolled out a migration to git, an RFC and voting process and a release process. These were implemented before 5.4 but its the first release that really “tests” all of it.

I think this is a great sign of maturity in the language and has the potential to lead to faster adoption, more stable releases and many new great features in hopefully less waiting time. Apart from a few wrong doings in internals I believe PHP is at a great point for new contributors to step in and lead the way into future versions.

27) You helped found two PHP User Groups:-
i) what it takes to create a php user group

Above all else, passion. You of course need time and people you can depend on, but at the end of the day things only happen if someone is passionate about making them happen.

Photo by chrisroll

ii) what are those two groups

I helped found PHPDF (@phpdf_), the user group for the Federal District in Brazil and later on the PHPSP group (@phpsp) in São Paulo. Both were a team effort and i’m very lucky to have had the help from people like Augusto Pascutti (@augustohp), Ivan Rosolen, Adler Medrado, Anderson Casimiro (@duodraco) and Pablo Sanchez (@PabloSanchez). Who shared the creation and management of the groups. PHPSP was a great success to me, we accomplished a lot in the 3 years I led the group.

iii) the motivation behind for starting them

At first it was just a way to get to know more developers, get support and have people to exchange war stories with. But as we grew as a community I started looking further, trying to help new developers start right and existing ones go further, become speakers and teach. PHP is an awesome tool and for me helping the community is basically “paying my dues” to it.

Its a very pleasing feeling when you see a developer you coached become a speaker or make a name for himself, or to see the bug you fixed solve other people’s problems. Its kinda addictive.

iv) the challenges you faced

Lots of them. From finding people to finding time and partners, it takes a little effort to kick-off but then it tends to gather momentum if you do it just right.

v) some of the best moments

One moment will be forever etched in my memory. In 2009 PHPSP decided to participate in the worldwide PHP TestFest, I struggled to get it together but managed to find a venue and get some people there. We used a presentation by Sebastian Bergmann (@s_bergmann) about testing to get some idea of what to do then I sat with Guilherme Blanco (@guilhermeblanco) and we wrote our first ever PHPT test, so that we could teach the rest of our group. That day we wrote a solid amount of tests, by the end of the TestFest we were the group with the most contributed tests in the whole world, there is no better feeling that to give so much back to PHP and see how far we went with it.

vi) One thing you think other user groups can learn from them

Lessons we learnt ourselves are simple: Be an enabler, let people participate and always focus on the small and grow action from there. Keep focused and objective and seek to involve people. Also we found out that meeting in a Pub and having a interactive talk slot during that night is a success.

vii) One thing you think is lacking as compared to the other world wide user-group

No recipe is global, I think we learn from other groups, right now I don’t think we are really missing anything.

viii) If you had to go back, what would you do differently (in helping to found them)

Nothing. I value learning experiences and would have done it all the same way so I could learn the same lessons. Maybe I would have avoided the whole “organize and talk” at a same conference error at most.

28) Things that you’ve learned by being part of the PHP Community

In short, everything. Obviously in terms of code there is much to be learnt. But my real lessons with the PHP Community were about being part of a community. The spirit of giving back, of helping and contributing. That is the real lesson to do your part and see all the good that comes out of it, to you and to others. Seeing so many of us that started small and grew, names like Lorna Jane (@lornajane) who went from pupil to tutor and is a great inspiration to developers who are starting now, that is the lesson: There is no limit to your success if you are willing to help others reach their goals and learn from it.

=> To Read:

29) The day you realised “You’ve made it to the A-List PHP arena” ?

I’m just a bystander who got a brief spotlight. I can’t compare myself to so many great developers out there. Sure, I do my part and I have spent much of my free time trying to help especially the community in Brazil and we accomplished so much together. My part in the grand scheme is a small one and mostly of passion and spirit, inspiring people and giving them the means to reach their goals, i’m an enabler.

If there is such a thing as the A-List, then I won’t stop while anyone is still out of the list, I want to see people succeed.

30) Why you are successful and why others are not?

Photo by photostock

I have had my fair share of failures, we all have and need them. But I do count myself a success and to me the driving force, the one that helped me overcome the problems and achieve my goals was the most simple of them: passion.

I never gave up, and tried to get up as fast as possible after every blow. Not that that is all my credit, I do have a loving wife who rescued me more then once and a awesome community ready to help out. Its corny, but I honestly believe it.

31) A final word before closing up..

Well if you reached all the way down here, congratulations! You are a patient reader. But seriously, if nothing else is taken away from my rambling, take away the message that you should be passionate about what you do, you should practice it daily, reach out, and never stop learning. Go take action, go do something for someone, or even yourself. And if you need help, advice, support or bad jokes, hit me up on IRC or Twitter. I can’t offer much but what I can i’m glad to share.

Now Do Your Part!

1) Help diffuse this interview to the PHP ecosystem – Share, tweet and spread the word to your audience ==> That would be a FREE way to thank me 😉

2) Make a comment below using the comment form – I’m sure you can at least say 1 word about this interview

{I’m thankful to your response(s)!}

3 Comment(s)

  1. “If you are not making mistakes you are not learning. So yeah, I make mistakes on a daily basis. The only huge mistake you can really make is to *not* leave your comfort zone. ”

    that is great advice, Rafael you are a role model to us beginning php programmers, and after watching your lectures on “Your code sucks lets fix it” , that day it changed the way i write code.

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.