Laravel UK 2019 - Day 2
Oliver Sarfas • June 12, 2019
programming laravelIf you haven't already, check out my notes on Day 1 of Laravel Live UK here. I will be referencing some points made in those talks here.
Day 2 has arrived! After a rather sleepless night in my hotel (thanks to London's permanent traffic and general city noise), I made my way to the venue once more to collect my daily ritual of pastries and a coffee. Although, I swapped out the coffee for a few glasses of Orange Juice, as caffeine often gives me a headache when drank too early. First up to the stand, was Marcel of beyondcode.
Marcel Pociot
@marcelpociot** - Package Design 101**
Marcel is a well-known name in the Laravel Community, and he's a frequent talker at these kinds of events. He put his own spin on this talk by 90% of it via a live code demonstration.
His bravery to undertake this with a live audience is both astounding and incredible. The fact that very little, if anything, wen't wrong is an achievement in itself. To commentate on what you're doing, whilst making sure no mistakes are made and think on your feet about what you're coding - very impressive.
Marcel took us through creating a package from scratch, the project being "Laravel Badges". He took us through creating the ServiceProvider, config rules, as well as any migrations necessary. The entire package was built using TDD which was a great demonstration of how things "should be done" nowadays.
My only criticism is that the speed of the delivery could have been a little slower. Those who are new to Laravel Package development might not have digested all the information before we moved onto the next piece. However as I've done this before, it was a perfect pace.
Highlight: Packaging up your code makes it easier to distribute and share. Both for internal projects, and with the community.
Dries Vints
@driesvints** - Laravel Event Sourcing with EventSauce**
This one was a 🤯🤯 kind of talk. I've not really looked into Event Sourcing as a pattern / concept that much, however I understand the basics of what it is, and why it's a good thing.
Dries however, went into really fine detail of the inner workings of Event Sourcing, and how it both benefits your software, but gives you a more robust debugging and replication environment to use.
Dries opened by setting the tone and subject for his example, which would be a pull request action. This would then trigger various events that are logged to the Event Store. Giving a verbose "read-and-append" only style of logging.
The main advantage of this is that you can see exactly, how, why, and when your data reached a certain level. Gone are the days where your data has a current state, and that's it. Using this technique you gain a deeper understanding of your process flows, and where certain issues arise.
You also gain access to the almighty power of time travel! By pairing up VCS and Event Sourcing replay / rebuilding, you could go back in time to the exact state that you application was at any given time.
Highlight: "With event sourcing, you can time travel. Yes, really"
Katy Ereira
@maccath** - Testing Legacy Code & Safe Refactoring**
A genuine code-ninja! Katy is a developer who is trained in the Japanese martial arts of Ninjitsu and passionate about tests for software.
Her enthusiasm and confidence when talking about an often laborious talks really shone here, as she approached difficult topics such as Mocking and Dependency Injection in a test codebase.
You can't go to a London talk in today's age, and not mention Brexit, so Katy put her own spin on it for a test case
Brexit in PHP unit tests. presented by Katy Ereira
_Highlight: You **could **rewrite the entire code base, but don't. Refactor to the point where testing is possible, then write your tests._
Liam Wiltshire
@l_wiltshire** - Learning Machine Learning**
As mentioned in my Day 1 post, Liam has vast experience in the "g-commerce" sector in his role with Tebex. Giving people a storefront for their games and servers so that the players can purchase in game skins, items, etc etc. They know their way around a payment gateway - and all the "quirks" thereof.
This is where Liam's talk on Machine Learning (ML) came into play. Due to the vast volumes (both transactionallity, and in value) of sales that go through the Tebex solutions, there are naturally "charge backs" that occur. This is the same with any e-commerce / sales solution.
However, where this differed, was that by using ML, Liam was able to reliably (though not without some minor "hiccups" and margin for error) predict whether a transaction was going to be charged back in the future, or was a potential flag for suspicious activity.
He opened up about what algorithms were being used, and tested, for the solution, such as the "k-nn" algorithm, and Naive Beyers as well. The explanations were give in "plain english" which was greatly received by everyone - as we can't all be Data Analysts / Mathematicians unfortunately.
Highlight: If you want chargebacks to be 0.5%, and your ML returns "clean" everytime, you're already 99.5% of the way there... Sort of 🤔_ _
Martin Westphal
@adeanima** - How we abused PHP and Laravel to do Big Data**
I'm not gonna lie here; a lot of this talk went over my head.
Martin's talk was very detailed into how to manage big data using custom optimisations and overriding some of the functionality set within Eloquent, Illuminate\Collections and other core features of the "Laravel Stack".
He approached the audience and invited them to shout out reasons why "PHP would be a bad idea for this" kind of thing, and the obvious answers were mentioned:
- Performance
- Memory
- Database Limitations (Read speeds)
All of which Martin had prepared answers and feasible solutions for.
_Highlight of talk: Can you do Big Data with PHP? Yes. Should you do Big Data with PHP and Laravel? Sure, but why?! _🤔🤔
Neal Brooks
@nealio82 - Running your Laravel application on AWS Lambda with Bref
Neal brought his same charisma as yesterday to the stage and went into detail about getting your Laravel Application running in a "serverless" environment.
Serverless is a term that is thrown around a lot lately, however it's not quite true to it's name. It's more like a "Just In Time Server" that dies once it's finished responding.
Back to the talk however, and Neal's methodical yet comical approach to the process of getting Lambda setup and working with a Laravel application was very detailed yet didn't feel overwhelming at all. He gave frequent reviews about the "progress so far" that'd been made in the talk, and showed times that things hadn't gone to plan - such as the restrictions on region setting within AWS and how important that can be for this scenario.
Neal walked through the issues of having a serverless setup, such as sessions, database, the filesystem, etc. with ease and made the audience feel competent in knowing that this can be done, in a civilised manner.
_Highlight: Doesn't everyone have a library of high-res kitten pictures? Just me then _😅
Joe Dixon
@_joedixon - Leveraging Laravel Events
Rounding out day 2, and the conference, was Joe.
This talk was something that I don't think I'll forget for a long time, not only for the content which was a great resource of knowledge and understanding - but because of his unique approach to the presentation style and audience interaction.
Joe had prepared his slides as a web application, that the audience would then interact with, showing the uses and impacts of Laravel's events (using Laravel Pusher for Broadcasting, and the VueJS to manipulate real time interfaces)
The talk had an interactive quiz that was light hearted and kept everyones attention whilst also demonstrating how events worked behind the scenes. As answers were made on the audience devices, the slides were updating live as well.
I've never seen this approach to a talk before, but I very much enjoyed it and hope to see this done again in the future.
Closing Out
So that's Day 2 of Laravel Live 2019 done. A great show by all. The Speakers, event organisers, staff at the venue, and also the community for their attendance.
This was my second time attending the Laravel Live UK event, and I must say it's been massively improved. That's not to say that 2018's was bad at all - it was a great start and the talks, event planning, and staff, etc were incredible then too. But this year has seemingly set the standard for events in the future.
I spoke to Jonty Behr briefly at the pub following the event and he was elated at how well the event had gone. He's begun plans for next year, and hopes that they can continue improving and maybe bring some new ideas to the conference 👀 Some of the ideas he has are great, and I'm sure they'll be executed brilliantly.
My final point on this conference is that it's the community that has made this so memorable. Everyone I met, spoke to, or shared a drink with was great. We all had a shared passion for either Laravel, Tech, and our Industries. I've been to many conferences before, however the Laravel ones are always the most "welcoming" to go to, and that's thanks to the people that make this community a please to be a part of 🤗