PHP Interview With Sebastian Marek Software Architect at Plusnet A Sheffield based ISP – Learn From The Best And Don’t Take Shortcuts

Contents At Glance

Purpose Of This Interview

This is the #11th set of PHP Interview to help aspiring PHP developers and 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 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 A-List PHP guys.

A Small Intro..

In this edition I talked with Sebastian Marek, who is Software Architect at Plusnet (@plusnet) which is a Sheffield-based ISP. He is passionate about Continuous Integration (CI), process automation and everything that concerns “high quality code”. Sebastian is yet another faithful and helpful Knight of The PHP Community and has contributed much to some key projects as you will find out. Find more about him on his blog critical_log.You can find his presentations on slideshare – some of his talks include :-

  • Magic behind the numbers. Software metrics in practice
  • The Journey towards Continuous Integration
  • Back to basics – PHPUnit

And Now The Interview…

1) Please tell us a bit about yourself

Cześć! That’s “hello” in Polish. I am Sebastian and I am from Poland, although I’ve lived in Sheffield for the past six years. During the day I am a Software Architect at Plusnet (Sheffield based ISP), but after work I am proud dad of my 2 kids, who try to get as much of my attention while I am not working. Only mentioning that cause apart from that I am trying to do a lot of other things, which is very challenging. I love open source community and the way it works, so I try to contribute to open source software as much as I can. Over the past few years I contributed in one way or another to projects like PHPUnit, phpUnderControl, PHP Depend and Sonar. And it’s not a coincidence that I also use all these tools in my daily job. Continuous Integration is my passion and a way of working I am promoting. You can find me here and there, at various conferences speaking about it and trying to convince others to give it a try and see how it can change their way of working.

2) How you started with PHP

I always have problems remembering how I have started with PHP. I got my first own computer fairly late, cause it was around 1997 I think (I was around 20, so when I think about my son who’s 7 now it amazes me how it all changed), and it didn’t take me long to try and write my very first computer program in Visual Basic. At the Uni I did both Pascal and C++ and it was around that time when I first looked at PHP. To be honest I don’t really know why – I think I needed to create a web page and found PHP. Version 3 was just released at the time. Main problems I had with it was the learning curve – I had very limited access to the Internet (as it was very expensive) and I remember me buying a lot of books to learn it. It was a lot of fun, and I still remember one of my tutors at Uni asking me about PHP and saying there is no future with it and I should do stuff in flash LOL.

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

It changed, and it changed a lot and for the better. When I remember the procedural code back then and I compare it to the OOP style of programming in PHP now, well it’s a completely different language. It’s definitely evolved from a simple tool that was written to write dynamic web pages to a language that you can use to write large maintainable systems.

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

I am not gonna say anything new in here. First thing is: it’s so easy to get started with PHP. And this is both its advantage and disadvantage. I have seen many bad PHP developers in my life (cause you can crack on so quickly), but I also have seen a few very good developers who didn’t use PHP developers before and now are rising stars! I think I could easily say manual is the second bit that I love in PHP, and I use it all the time! Which brings another thing that I hate in PHP, which is the random function names and argument order, which drives me mad.

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

Find a good mentor and listen to what he says. Learn from the best and don’t take shortcuts.

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

Above + start contributing to open source software. I have learnt so much by looking at somebody’s else code. You wouldn’t believe how much you can learn from that. And it’s a brilliant lesson how to become a successful team player. It will help you so much in your future career.

7) The best PHP book you’ve read

I don’t think there is one. To be honest in the era of Internet I find everything I need in there. Although there is a few PHP books I bought, one being Sara Golemon’s “Extending and Embedding PHP”, cause there is only few things in the Internet about extending PHP. It’s a good start. (@SaraMG)

8) A PHP blog or resource you highly recommend

To be honest the main source for information for me is Twitter this days, although I do frequently look at Planet PHPUnit and PHPDeveloper.org .

9) The IDE that you use

At the moment Sublime Text 2, but also I often use vim and Eclipse / NetBeans when I do things in Java.

10) How do you debug your PHP code?

xdebug ftw. Although for quick things, var_dump and error_log is equally good.

11) A PHP framwework you use and would recommend

I do use Zend Framework for a few things, and I recently started looking at Symfony 2. And I must say I like it more and more! But I can’t tell you which one is better. It’s up to you to decide and see which one suites you better.

12) A CMS that you think is worthwhile

Worpress I guess. That’s what I use to run my blog. Does the job.

13) A unit test framework you recommend using and why?

PHPUnit! It is defacto standard, there is a few things that annoys me there, but I don’t think there is any viable alternative to it.

14) Your LAMP stack comprises.. ?

PHP, MySQL, Apache – standard really. And Debian on production servers.

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

Photo by Graur Razvan

I think it will be Rowan Merewood (@rowan_m). I have learnt so much from Rowan, both during the times we worked together and after that we meet at conference. I think he’s a brilliant speaker and really smart guy. I do envy his way of doing slides and how easy he can speak to the crowds.

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

That’ll be error_log, but I can’t say I like it. I should not be using it really.

17) One PHP Community that you recommend

PHP North West. That’s where I started. Jeremy Coates (@phpcodemonkey) is doing really good job there. Very friendly environment and amazing conference every year in October. Although I must say PHP Sheffield is growing now on the other side of the Pennines and we’re doing really cool and interesting stuff there now. So watch out Jeremy!

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

Honestly I never looked at it properly so can’t really comment on that. Personally I find it really hard to work in Windows environment as a developer and it really slows me down. But saying that, I believe it’s very good to have Microsoft finally looking at it. I also met Josh Holmes (@joshholmes) several times and I really appreciate his involvement in The PHP community.

19) Which was the worst programming mistake you did?

Photo by Phaitoon

LOL. If there was only one. Seriously though, I rather tend to learn on my mistakes then regret them. And I do that all the time. It happened several times that I picked a wrong tool for the job or I didn’t spend enough time doing an investigation or designing upfront. When I look back in time, the thing I regret the most is trying to patch something that is broken without contributing the fix back to the project.

20) Do you recommend using database layers and ORM? If yes, what database “framework” you would recommend?

No, I do think they’re efficient enough. I can understand how they can speed you up at the beginning, but eventually they will slow you down. I always find myself at some point that I have to write really complex dynamic SQL queries, and I know how inefficient they can be if not written right.

21) Testing is concept which is quite difficult to make Developers adopt. How would you convince a PHP developer that Testing is beneficial and should be part of their “way of coding”

Yes, you’re right. It’s actually very hard to resist temptation of “getting stuff done” quickly so you can see it working. The only way I found so far to convince a developer to start testing the code as he writes it is by closely working with him. Pair programming concept is the best solution. They need to be aware of the mistakes they make at the early stage and told how to avoid them. They need to understand and see how many issues can be revealed at early stage of development and how hard it is to find them at the later stage of the development cycle. You can’t teach that, you have to learn that through experience and making mistakes.

22) You have migrated a multi-gigabyte codebase from CVS to GIT
i) could tell us a bit about it and what tools you used to achive this
ii) the challenges that was involved
iii) if you had to re-do it again, what would you do different

It’s one of the most exciting things I have done actually. At some point we realized that the existing version control system (CVS) was slowing us down, not helping us. At the same time we knew that switching to SVN won’t really change much as it follows the same basic principle, so you could say SVN is really an improved CVS. We looked at different tools and finally decided that distributed version control system is something that is gonna help us out. There was a few challenges, mostly around the size of the codebase, its structure and most importantly there had to be a minimal downtime for the dev teams so we can keep working. We used cvs2git with set of in-house written tools to correct and automate the conversion. At the end we made a decision not to import the whole commit history to speed up the process, but it still took me over 12 hours I think (plus scripts running over night) to complete the migration. it’s something I still remember, cause the department was celebrating a major delivery at the same time, and I was only able to join them for a quick pint late at night. I don’t think I regret any decisions I would probably do it exactly the same way again.

23) Could you tell us a bit about the advantages of using/adopting Continuous Integration and any downside of it?

Downsides? I don’t think there are any downsides. The main thing that strikes me about CI is how quickly it allows you to deliver. Yes, how quickly. Everybody concentrates on the fact that writing unit tests takes time. What they often miss is the fact how much time they save in long run! It is proven that fixing a bug at the late stage of development cycle costs you a lot more money that at the early stage! The process set up norms and procedures that everybody needs to follow and this is what makes it so efficient. No shortcuts! If something doesn’t work find it quickly and fix it properly. Otherwise it will hit you hard later. The more you deliver and the often you deliver the harder it is to control the project and the only way to do it is automation and conventions that everybody follows.

24) What are the tools that you would recommend to automate Continuous Integration for PHP

Jenkins as the build machine is probably the standard now. It’s really good software giving us everything we need (well multiple masters would make it better ;)), PHPUnit as the unit testing framework, Behat for functional testing and to keep you code in clean state PHP_CodeSniffer, PHP Depend, PHP Mess Detector and Sonar to control it all.

25) How would you convince someone to move from SVN to using GIT? (I assume you find GIT a better option than SVN?)

If SVN works for you and your happy, there is no point to change. If you need more flexibility – you will find git with its distributed model and cheap branching much better. I think git works so much better in open source world – it is so much easier to contribute and work with larger teams. Personally I would never go back to CVS/SVN. It annoys me every single time I have to work with this tools. They just give me the freedom I need at work.

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

Never, I am not even close to people like Cal Evans (@calevans), Lorna Mitchell (@lornajane), Stefan Koopmanschap (@skoop), Michelangelo van Dam (@dragonbe) and the whole PHP core development team. For me it’s very hard to produce any sort of list of influential people that are promoting and actively working on PHP. Every conference I attend I meet more people involved with PHP, which would make the list grow so fast. Maybe the day I will start actively working on PHP source and make it better we can come back to that question again.

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

It depends what do you mean by success. The most important thing in my life is my family – my wonderful wife and my two kids. That’s the biggest success in my life. Apart from that, there is a few things I am proud of, but there is still a long way to success. I need to continue to work hard, but the longer I do that the harder it is for me to find the right balance between my work and my personal life. I’d really like to find somebody that can make my day to last 48 hours. I just don’t find enough time to do all the things I want. One way or another hard work is the key and you need to set yourself a goal and do everything that is possible to achieve it. It will happen – one day.

28) An off-topic question: You diffuse that you are a medieval ‘freak’ who wants to live in a castle and wear a full plate armour. Is there anything specific thing which have triggered that sense of being?

Image by Salvatore Vuono

Ahh, I love medieval times. It is something that makes me really excited. I love castles, I am still dreaming that one day I would be able to afford to live in a castle. I am not sure why. Part of this is probably the fact that I love history. I love looking at the past and trying to imagine how life looked like before. How people did things, how things that happened earlier changed our life today. I can’t deny the fact that my father played a huge role in that. My home was always full of history related things. I still remember that in primary school I wanted to be an archaeologist. Something of that is still in me.

29) A final word before closing up..

I must say I am really surprised that somebody finds me inspirational. If this is the case, it only means I must be doing something right. And it’s even better if somebody uses that for its own development. I think your idea of showing that we are all ordinary people doing ordinary things is amazing and really useful. It reminds me one of Stefan’s (@skoop) articles in php|arch when he went back in time to reflect on the fact that it doesn’t really take much to join the big PHP community and be part of it. It doesn’t take much to contribute and share your experiences with the others. That’s what it is all about.

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)!}

Donate Bitcoins

If You Appreciate What I Do Here On Seven PHP :: 7PHP, You Could Consider:

  1. Following me on Twitter | @7php
  2. LIKE my page on FaceBook
  3. Help diffuse this interview to the PHP ecosystem - Share & Spread the word as far as you can ==> That would be a FREE way to thank me
  4. Use my DigitalOcean referral link if you plan to use it as your VPS (it starts at only $5/month btw) or if you can refer it to your friends, highly appreciated.

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

Trackbacks

  1. [...] (typeof(addthis_share) == "undefined"){ addthis_share = [];} The 7php.com blog has posted their latest interview with a member of the PHP community – Sebastian Marek (Software Architect at Plusnet) In this [...]

Speak Your Mind

*