Talk in English - UK at Dutch PHP Conference 2019
Short URL: https://joind.in/talk/0f47d
(QR-Code (opens in new window))
Harnessing Errors & Edge-Cases with Ease & Elegance.
Imagine handling error conditions and unexpected edge-cases with code that is easier to read, maintain & extend.
The temptation is real.
We create methods that return an array of objects, or "false" if nothing was found. Or "null". We might further "signal" unexpected results or error-conditions with integer values.
It then becomes the responsibility of consumers of these methods, to properly interpret what "false", "null", or "-500" mean. As a result, we produce code that is difficult to read, maintain and extend.
Exceptions are seldom leveraged, and most often thought of as objects thrown by some frameworks for instrumentation. When properly leveraged, they however offer an opportunity to manage unexpected and edge-case behavior at various layers of our applications, with elegant control flows.
By leveraging your language's Exceptions alongside its "Type System", we can create elegant, flexible and advanced handling of Error conditions, which will promote code that is easier to work with.
Comments
Comments are closed.
Great overview of why and how exceptions can make life easier for a developer. Thank you for that.
But sometimes it felt like you where a bit confused by the slides. I was also a bit confused when you started converting an ORM Exception to null. Perhaps an example that doesn't throw exceptions at the beginning might help reduce confusion here.
THE GOOD :
You're a natural speaker with the talent to catch people's attention seemingly at will, which is great.
You went out of your way supplying code examples, which I always appreciate.
You brought the talk with a whiff of humor, which is also appreciated.
I certainly have picked up a few things to try out in the coming weeks at work.
THE 'LESS' GOOD :
At times, you seemed 'lost' for a second or two when viewing your own slides. Can happen to the best of us, of course, but given your natural talent at speaking, it really showed. No harm done, really, just letting you know :)
Good overview and very well presented.
But somehow I expected a bit more in-depth information because the talk was rated with 2 stars.
Finally I got the chance to see you live! You were so well presented, too! I enjoyed your talk and you as a speaker a lot and would see a talk of yours without a doubt again.
For five stars I want you to rely waaay less on slides. As Dutch author Remco Claassen put it: never share the stage with anything brighter than you! The slides stole the show too much, and left you hanging a couple of times. In my opinion, you should never put anything on the slides that you have not already talked about, except code. Everything else should only be a *summary*, *after* your story.
Content was useful, people need to think about these things and you're fighting the good fight. Keep it up and I hope to see you again on this side of the Atlantic!