With a little help from my friends: Tools for writing state-of-the-art PHP code
International PHP Conference June 2023 – BerlinDo you feel that the code quality of the project you are working on gets worse and worse? You want to refactor your code, but don’t know where to start? Or you intend to start a new project and make it right from the beginning this time?
Writing high-quality code gets easier when you use the right tools to help you. In this talk, you will learn about software quality, insightful metrics and useful tools. Particularly if you work in a team, controlling the overall code quality and standards is key for a maintainable project.
The best tools won’t help if they are not used correctly, so we will also address how to integrate them into your workflow. And, of course, the faster you get the feedback, the better—let’s not wait for the CI pipeline, but rather report problems even before the push.
The Green ElePHPant – How to create sustainable PHP applications
International PHP Conference June 2023 – BerlinThe share of global IT on the worldwide greenhouse gas emission is aiming towards 4% per year and continues to grow. The energy consumption of software is not a marginal problem anymore, and we all have to play a part in the climate solution.
But what can we, as PHP developers, do to mitigate the issue and reduce the carbon emission of our applications? In this talk, we’ll discuss which concrete options there are to create sustainable PHP applications already today.
From algorithms, profiling, and performance benchmarks over frameworks and packages to carbon-aware operations, we’ll cover many ways for you to take action and become part of the global Sustainable Software Engineering movement.
Coding against climate change
code.talks 2022 – Hamburg
Die Menschheit stößt weiterhin enorme Mengen an Treibhausgasen aus. Wir Software-Entwickler*innen haben unseren Anteil daran, denn die ganze Hardware, auf der unsere Software betrieben wird, muss auch erst einmal produziert werden und braucht dann in Betrieb mehr als nur Luft und Liebe. Und der Anteil der IT an den Treibhausgas-Emissionen steigt unaufhörlich. Was können wir dagegen tun?
In diesem Talk erläutere ich zunächst, warum es zumindest kurzfristig nicht reichen wird, unsere Rechenzentren mit Ökostrom zu betreiben oder sich durch Klimakompensationen freizukaufen. Da unsere Software immer umfangreicher und leistungshungriger wird, betrachten wir im Rahmen des Sustainable Software Engineering, welche Möglichkeiten es gibt, Energie einzusparen und so die Emissionen zumindest zu reduzieren. Gerade auch trendige Technologien wie Blockchain und NFTs sind in diesem Zusammenhang sehr problematisch. Und, fast noch wichtiger: wir müssen wieder dazu übergehen, unsere Hardware längerfristig zu betreiben.
Da Software-Entwickler*innen oftmals nur Requirements umsetzen, überlegen wir zum Abschluss noch, inwieweit das Product Design seinen Anteil leisten kann. Und auch als User*innen sollten wir uns unserer Marktmacht bewusst werden und unseren Konsum überdenken.
YouTube: https://www.youtube.com/watch?v=spPflIHmxz8
Coding against climate change – Sustainable software engineering
International PHP Conference October 2021 – Munich
International PHP Conference June 2022 – Berlin
Mankind is releasing enormous quantities of greenhouse gases, which are continuously heating our planet’s atmosphere. Yet, we as developers can’t do much about it anyway, since after all, we only produce code, and that doesn’t hurt anyone. Isn’t that right?
Of course, it’s not quite that simple. The energy that powers our servers and sends our data around the globe has to be produced somehow. Even though the share of regenerative energy sources continues to increase, every year counts if we want to limit global warming to a halfway tolerable level. We can do a lot more than run our laptops in energy-saving mode or the IDE in dark mode. Of course, we can use more efficient algorithms, but also the system architecture and infrastructure plays a significant role. And, if we think outside the box, there are also some opportunities in product design to reduce the carbon footprint of our users.
YouTube: https://www.youtube.com/watch?v=aAdGNw2JMZw
Reduce Boilerplate Code with PHP 8
International PHP Conference October 2021 – Munich
With PHP 8, some new, quite interesting features have been introduced. Some of these features can even help us remove code like getters and setters that have been necessary in the past to work around the shortcomings in earlier PHP versions. As a benefit, the code will even become more robust and easier to maintain than before.
After the theoretical part, we will have a small live coding session and see how we can shrink a typical PHP class to a fraction of its original size — without losing any features! Is it finally time to get rid of some best practices that we used without question for many years?
YouTube: https://www.youtube.com/watch?v=8TfKDMLvi8I
Frameworkless – the new black?
International PHP Conference June 2021 – Online
Frameworks are undoubtedly helpful. They wouldn’t exist otherwise. Yet are they always necessary? What drawbacks do we blindly accept when we chose our beloved framework again for the next project without even thinking about if it fits the actual problem? And why is it cool to consider oneself a Symfony or Laravel developer instead of a PHP developer?
In this talk we’ll have a brief look at the history of PHP frameworks in general, discuss their good and bad sides and eventually come up with the unthinkable: why not try going without a framework in the first place? We will discover the standardisation that has happened within the PHP ecosystem and how it helps to achieve framework-less applications.
Finally, we’ll have a look at a simple webservice written in Vanilla PHP. We will consider when it is beneficial to use a framework, when we should rather ditch them and if there maybe is a sweet spot in-between both extremes.
YouTube: https://www.youtube.com/watch?v=D3Qvt7YeewU
Refactoring – Change your running system
Eurostaff Meetup January 2020 – Berlin
January 2020, when Covid-19 still was some sort of freaky virus going around in China only, I had the please to speak on the Eurostaff Meetup about Technical Debt and Refactoring.
The talk was about my experience with Technical debt, which I also wrote down in this series of articles.
Go here for the slides of my presentation.
Continuous Testing and beyond – Software Quality in Web projects
Test Automation Day Conference 2018 – Berlin
Surely it’s not a new insight, but software with lesser bugs leads to happier customers, non-frustrated developers and eventually increased revenue. So why not just test the heck out of it in the first place?
Well, this still has not yet settled in the DNA of every web developer. This talk is about the options you have if you want to test Web projects in, let’s say, the PHP ecosystem.
Of course it’s not limited to that, as we don’t go into any language details. We start with the the basics, explore what measures might be easiest to use in your project (a bit like these “low hanging fruits” that creepy sales guy keeps babbling about), make a detour on some advanced or probably even exotic testing techniques, have another short stop on Software Quality measures and finally end up with the conclusion that testing simply has to be automated and happen before every single deploy to production. Period.
Read the Slides about Continuous Testing and beyond – Software Quality in Web projects
The Lone Stranger or: You can’t establish Clean Code on your own
Clean Code Days 2016 – Munich
You’d love to use Clean Code principles in your project, but you seem to be all alone in the world? If you try to establish Clean Code all by yourself, you will end with rolling the same boulder up the hill again and again, because you can either start fixing the code of others, or try to keep your code clean and watch the rest of the code rot. Both are options, but not good ones. So what can you do?
This talk can roughly be separated into two parts. Firstly we talk about why you need help to get Clean Code into your products, and provide you some bullet-proof arguments which “the Management” can’t deny. But it’s not only about the Management – you have to convince your co-workers, if there are not yet into it. “But Uncle Bob says…” will not be enough, especially in the PHP world.
Nobody can write perfect code at first; it will always require iterations to improve it. So secondly, we introduce some basic Clean Code related measures, which can be added even to existing projects one by one. Here we’ll see how to generally support the daily development and refactoring process. Starting with relatively simple measures like Code Styling and Code Reviews, over to Automated tests, Code Metrics and finally Continuous Integration.
All examples will be in PHP, or PHP-related. However developers from other languages are more than welcome, as we don’t dive deep into the language features and are happy to learn from others.
Read the Slides about The Lone Stranger or: You can’t establish Clean Code on your own