DateTime
: a bulletproof approach to date and timeI’ve been obsessed with time ever since a tiny timezone mismatch in my code almost caused an ugly off-by-one-hour error in airport taxi orders for congress speakers.
It helped me realize that time is a domain present in every web application, and as such deserves proper attention. There are many very different temporal concepts, and we should have better abstractions for them than standard libraries – including PHP’s DateTime
and JavaScript’s Date
– provide.
This has become my favourite topic and I talk about it wherever people want (or are forced) to listen, including at:
Production is a magical place. People go there and do things, and sometimes, despite the best-typed and tested code, a bug slips through – and it's likely to be all the more bizarre the higher the quality of your code. In such moments, it's invaluable to have a place to find everything that might be relevant to the situation. This talk shows in theory and in practice how to approach logging so that you have perfect oversight of production and no such bug remains an unsolved mystery. Co-presented with Marek Humpolík.
Generics: an ingenious tool of abstraction for some, a nightmare for others. And yet, it's likely that most of us have used them. This talk explains what generics are and illustrates how to use them in PHP thanks to PHPStan, covering everything from the most trivial situations to advanced use cases such as type bounds, variance, type projections, etc.
As developers, we deduplicate code to achieve abstraction. But far too often, abstractions tend to stick around even after requirements change in a way that renders the particular abstraction obsolete and impractical. This talk is a gentle reminder to always question your abstractions in the face of requirement changes.
A feature likely known to Kotlin developers, sealed classes and interfaces provide a way of enforcing restricted inheritance hierarchies. With the most recent versions of PHPStan, we can use statically analyzed sealed classes in PHP!
In this talk, I discuss dependency injection and show how Nette Framework's DI container leverages PHP's type system to truly obsolete artificial service identifiers.
They say you should understand floating-point precision by 35.0000000000014. This talk discusses how floats are (im)precise and why, demonstrates the problems you inevitably encounter when doing math with floats, and presents ways to prevent those problems by using more proper data types and structures.
This talk brings a practical example of how to use Naja to implement AJAX in a Nette Framework application. On top of that, it touches related topics of the front-end development ecosystem in 2019, namely Webpack and its integration into Nette Framework.
The activities of PHP communities made it possible to build robust applications, uniquely composed of little bits, without relying on a big framework. This talk discusses how they work and if they are a good approach.