Laracon EU unconference

Laracon, Laravel, Unconference

This week I attended the European version of Laracon. It was a lot of fun and I talked to a lot of friends. There were a lot of great talks, but I had one favorite: the one about Monads by Christopher Pitt.

Monads?

Yes, Monads. The Monads design pattern comes from functional programming. It is basically a way to write code like this:

$store->address->city

What happens if a store has no address? This would throw an error. Monads are a way to work around this while leaving this code intact. Christopher used PHP's magic methods to reach this result.

The unconference

Laracon also offered an unconference track. The concept is simple: anybody can give a talk on any subject. In the weeks before the conference I decided that I wanted to give a talk, but I did not really know a good subject.

While I was at Laracon during one of the talks, there were questions asked about testing. And then it hit me: testing is something I like, it makes me program faster and lets me easily refactor existing code. But it took me some time to get to a level where I did this comfortably. So I decided what the title had to be: The introduction to testing I wish I had.

So the evening after day 1 I opened Google Slides and started working. I had about an hour to spare so it was a very quick presentation. Luckily I only had to talk for 20 minutes, which is something I can do easily. So I created some code, took a screenshot of it and put it in the slides. But then I had a better idea: I created some extra tests and decided to show them live.

I did not receive much feedback, but some people were mind-blown by the use of data providers. With this you can run the same test with different input.

Reflection

What could go better? Well, for starters, I don't speak English very often. I need to improve this. A second thing is that I didn't have time for a test run. So while I was presenting I realized that some choices were odd. I noted them for next time.

Michiel Gerritsen
About the author

Michiel Gerritsen

Connect on LinkedIn

Founder of Control Alt Delete, a Magento agency specialised in testing, CI/CD and checkout integrations. Working with Magento since 2015, and board member of Mage-OS.

Missing anything?
What are you missing? X
Thank you for your feedback!