[VIRTUAL] Stop using mocks & Trio

London Python
London Python
Public group

Needs a location

Details

*This is a virtual meetup, the venue is wherever you are, yes, you can even bring your bicycle!*

Due to #coronavirus, we're going to try out a virtual meetup, thanks to TerminusDB (https://terminusdb.com/) for providing us their Zoom account to make this happen!

** If the room is flooded, you can watch it on my Twitch channel: https://www.twitch.tv/cheukting_ho (it's my first time doing it so let's keep our fingers closed) any updates will be posted here. (ps. you can also catch up on it within 14 days if you missed the event) - Cheuk

HOW TO JOIN THIS MEETUP:

Join Zoom Meeting
https://zoom.us/j/674025492

Meeting ID:[masked]

One tap mobile
[masked],,[masked]# US
[masked],,[masked]# US

Dial by your location
[masked] US
[masked] US
[masked] US (Chicago)
[masked] US (Houston)
[masked] US (San Jose)
[masked] US (New York)
Meeting ID:[masked]
Find your local number: https://zoom.us/u/aCfFKdxzw

---

Agenda:
7:00pm - Intro
7:10pm - "Stop Using Mocks" by Harry Percival

Classic testing tutorials usually present code that’s free of side-effects and external I/O dependencies, but the real world is seldom so straightforward. We find ourselves reaching for mocks to keep our tests isolated, and that often leads to tests that are hard to understand and maintain, and we start to question their value.

When we substitute integration or end-to-end tests to assure ourselves that things work in the real world, we end up with test suites getting slower and slower, and instead of a “test pyramid” we end up with an “ice cream cone”.

This talk proposes a cure: if we stop ourselves from using mocks, cold turkey, we will be forced to think more carefully about how to design our code, how to separate business logic from integration and I/O concerns. The talk will cover patterns like “Functional Core, Imperative Shell”, the use of Dependency Injection and hand-rolled fakes as an alternative to mocking and patching, and show how they can help us get better-designed code, more maintainable tests, and a healthy test pyramid.

8:00pm - "Web Development with Trio" by Phil Jones

The introduction of asyncio to the Python stdlib led to a flurry of new web frameworks. Lesser known though are the async/await based event loop alternatives to asyncio, curio, and trio. Yet the development of asyncio has been and continues to be, heavily influenced by these two projects.

This talk will introduce Trio and motivate why I think it is a great choice for web development. I'll talk about the advantages trio brings and the ecosystem available to developers. As a practical example I'll show my own site (frontend React + backend Quart-Trio).

Phil is the CTO and Co-Founder of Moneyed (https://moneyed.co.uk/employees/) which enables you to manage your finances and plan your future all in one app.

He primarily contributes to open source Python projects related to web development specifically the HTTP stack. He maintains Quart, and Hypercorn and help maintain related projects such as Flask and Werkzeug.

---

This will be the first time trying out a meetup in this format, so bear with us, this will be exciting!

Also, the limit of 100 is due to the limitation of the Zoom account kindly provided to us, so it's really 100.