Today, We are honoured to have Stefan Priebsch for this interview. He is a cofounder of thePHP.cc, a well known PHP consulting firm. He is also an entrepreneur, university lecturer and a thought leader in modern software application architecture. Stefan specializes in PHP powered enterprise applications and has built an enviable reputation as one of the best trainers in Germany.
Additionally, Stefan speaks regularly at international PHP conferences and wrote a book PHP 7 Explained with Sebastian Bergmann and Arne Blankerts. In this interview, he talks about his career, PHP 7 ebook and the latest developments in the industry.
Cloudways: Hello Stefan and thank you for taking out time for this interview! Could you please describe your career as a PHP developer and what motivated you to choose this line of work?
Stefan: When I was 10 years old, my Dad bought a Sinclair ZX-80. I was curious to find out what you could do with it, so I learned programming. Ultimately, this motivated me to study computer science. Following that, having worked as a software developer for some time, the Dotcom boom got me interested in scripting languages, and I started to use PHP. I was actually one of the first Germans that built and sold commercial software – a time tracking system – written in PHP. That was in the year 2000 or 2001. A few years later, I started to speak at conferences, and subsequently was approached by publishers who asked me to write books. Since 2008/2009, I solely focus on PHP, and have been working as a consultant and trainer.
Cloudways: What is your opinion on the new PHP 7.x? How developers could use it for their applications?
Stefan: PHP 7.x is great. I think it is a giant leap forward in making PHP even more suited to build mission-critical, enterprise-grade applications. Due to the dynamic nature of PHP, however, it can also still be used as a simple scripting language. I love PHP because it gives you the freedom to write procedural, functional, or object-oriented code, and its use cases stretch from simple automation to enterprise applications. This freedom, however, comes with a responsibility: PHP allows you to do some very stupid things, so developers need to be well-educated and know what they are doing. With PHP, there is no separate compilation step, so you can even push code with syntax errors into production, unless you put additional safeguards in place to prevent that. Still, I do not view this as a shortcoming of PHP, but rather as a competitive advantage of scripting languages. To me, PHP 7 is just the start of a new chapter: we will see great new features in the upcoming minor releases, and the abstract syntax tree that is part of PHP 7 will allow a whole new generation of analysis tools to be built.
Cloudways: I still see developers use PHP 5.5 and 5.6. Do you think that the deprecated functions are a huge security risk?
Stefan: It depends. Some very “old” code constructs like register_globals and the magic quotes are really problematic. The former was already gone in PHP 5.5, and the latter has luckily been removed in PHP 7. Using these constructs can lead to very serious security issues. And all this because of a convenience feature (register_globals) and a feature that was designed to magically make code secure (magic quotes, as the name suggests). It is very important to understand that there is no such thing as “magic” security out of the box. Again, the responsibility to know and understand what you are doing is the price PHP developers pay to get a language that is very flexible.
Should your project still rely on magic quotes, you should make it an important goal to get rid of this as part of your preparation to migrate to PHP 7.
Cloudways: You are working with Sebastian Bergman in thephp.cc How is the experience and have you contributed to PHPUnit?
Stefan: I thoroughly enjoy working with Sebastian and Arne Blankerts, the third co-founder of The PHP Consulting Company (thePHP.cc). Sebastian has already been well known in the PHP community before we founded our company, which has been very helpful in getting business and growing our company. With regards to PHPUnit, I have in fact contributed in various ways, but mostly “behind the scenes”, not by writing code. Sebastian discusses ideas or bug reports with us, for example. I have made some suggestions that have led to new features being built into PHPUnit, or existing features improved. Since Sebastian knows PHPUnit in and out, it usually takes him a very short time to implement new features, while it would take me hours to find out where to even start.
Cloudways: Stefan, let’s talk about your book PHP 7 Explained. You guys did an excellent job in highlighting PHP 7 features. What are the key takeaway points of the book?
Stefan: Thank you, it is good to know that you like the book. It’s hard to reduce our book info a few sentences, actually. I guess the main message is: use PHP 7, it is the best PHP we have ever had. We talk about the new features, obviously, but also about some changes in behaviour, and the things that are gone. We explain in great detail how to replace the old features, plus we give a lot of background information on why PHP 7 exists and what motivated its development. The really interesting thing about the book is that we keep updating it for all minor versions of PHP 7. So you do not only buy a book on PHP 7, but you get a living document that can be your companion as long as PHP 7 is around. With each new 7.x release of PHP, we email our readers and send them a download link where they can get an updated version of the ebook.
Cloudways: What development workflows and tools do you use for your projects? Briefly, share your strategy of achieving deadlines?
Stefan: I usually work with PHPStorm, PHPUnit, phpab to build autoloaders, PHP_Depend, and PHPCodeSniffer. I recently started to use an interesting new tool called dephpend, a very promising dependency analysis tool that can detect architecture violations. It is actually a side-product of a master thesis written at Rosenheim University that I have recently mentored. I use Composer to manage source code dependencies. To manage my development tools, I use phive, a nice tool that my friends Arne Blankerts and Sebastian Heuer have created. Then, of course, Git as version control and Jenkins for continous integration, though I do not usually set up a CI server for my private projects. If I could only choose one single development tool to work with, it would be version control, because without that, you just cannot develop software professionally.
As for the deadlines: I am a consultant working with different teams, so whenever the team achieves a deadline, it’s their success, and whenever they miss it, the blame is on me (laughs). Seriously, though: deliver early and often, and find a Minimum Viable Product that makes sense from an economic point of view. Then, be flexible on the scope. When you continuously have the project in a state where you *could* go live, even with missing features, deadlines are not so scary any more. The trick is to be able to go live with *something*, but not necessarily all the requested features. This approach works best, of course, with a clever prioritization of features. Actually, I find myself working with my clients a lot on defining scope. I have learned that you can always reduce the scope while still delivering value.
Cloudways: How does thephp.cc help its clients develop their dream applications?
Stefan: First of all, we help our clients to figure out what that dream application needs to do, and how it has to look like. So we discuss architecture, feature set, quality goals, and of course software design. Then, we make sure that the developers share the vision and understand what needs to be done in order to move their company forward. During the course of a project, we help with trainings, coaching, and milestone reviews. Sometimes we fill in for missing roles, for example as lead developer or software architect. Everything we do is about know-how transfer, we enable our clients to build software successfully.
Cloudways: How do you spend your free time? Are you fond of travelling or speaking at conferences? Will you attend any upcoming PHP conference?
Stefan: When I am off work, I try to spend as much time as I can with my family. Being the father of twins makes me a scalability expert (grins). I like to cook, play the electric guitar, and recently started to do home improvements and build my own furniture.
Of course I am fond of travelling, otherwise my choice of profession would be highly questionable. My job has allowed me to visit various countries on different continents, and I would not want to miss out on all the places I have seen and people that I have met.
I really enjoy speaking at conferences, as it allows me to share my experience, get in touch with other people, inspire them, and learn from them. Since I became a Dad, I have tried to cut down a bit on the number of conferences I attend. I will speak at the Munich PHP user group this month and at IPC in Berlin later this year. We maintain a list of conferences that we are going to attend at thePHP.cc.
Cloudways: To inspire our readers, could you post some pics of your office space and the workstation?
Stefan: There is not much so see, I am afraid. I stopped using a desktop workstation, and do all my work on a laptop. That’s a ThinkPad running Fedora Linux. Since I travel so much, and usually work on site with my clients, “my” office space looks different almost every day.
Cloudways: Stefan, What do you think about managed hosting solutions like Cloudways that provide a full-featured and highly optimized best PHP hosting stack with Laravel and other applications? Do you think that managed hosting solutions help developers kickstart web projects without worrying about server management issues?
Stefan: Of course they do. I like the idea of being able to start quickly and on a low budget. Still, whether you can take advantage of the high scalability of cloud-based solutions depends largely on your application architecture. There are still too many monolithic applications out there. I prefer a domain-driven approach to development, trying to avoid focusing on technology first, to avoid the vendor lock-in that often comes with technology. I thinks that at scale, cloud computing can get rather expensive, so whether it makes sense on the long run, every project needs to decide for themselves. But then again, if you have a viable business model, hosting costs are usually the last you have to worry about.