EuroPython 2024 — Lightning talks Wednesday
This is a modal window.
The media could not be loaded, either because the server or network failed or because the format is not supported.
Formal Metadata
Title |
| |
Title of Series | ||
Number of Parts | 131 | |
Author | ||
Contributors | ||
License | CC Attribution - NonCommercial - ShareAlike 3.0 Unported: You are free to use, adapt and copy, distribute and transmit the work or content in adapted or unchanged form for any legal and non-commercial purpose as long as the work is attributed to the author in the manner specified by the author or licensor and the work or content is shared also in adapted form only under the conditions of this | |
Identifiers | 10.5446/69437 (DOI) | |
Publisher | ||
Release Date | ||
Language |
Content Metadata
Subject Area | ||
Genre | ||
Abstract |
|
00:00
Inflection pointNon-standard analysisGoodness of fitLevel (video gaming)GodComputer animationLecture/Conference
00:49
Error messageComputer configurationTrigonometric functionsGoogle ChromeSource codeComputer fontGodGEDCOMGeometryFile formatObject (grammar)Bit error rateAreaScalable Coherent InterfaceHexagonTemplate (C++)Computer iconTournament (medieval)GoogolForm (programming)Game theoryRule of inferenceImage registrationExact sequenceCodeLink (knot theory)Software repository12 (number)Presentation of a groupVideo gameLink (knot theory)Repository (publishing)QR codeCodeComputer programmingComputer animation
01:50
Game theoryRule of inferenceDepth of field12 (number)Link (knot theory)CodeSoftware repositoryTournament (medieval)Computer configurationFile formatGamma functionObject-relational mappingLogic gateRandom matrixImage registrationGoogle ChromeLink (knot theory)Repository (publishing)CodeTouchscreenSpacetimeTournament (medieval)Computer animationLecture/Conference
02:32
Bit rateState diagramWebsiteInformationQR codeMereologyFormal languageAbsolute valueLecture/ConferenceComputer animation
03:07
Peer-to-peerLie groupAbsolute valueRule of inferenceLevel (video gaming)BootingMultiplication signComputer animationMeeting/InterviewLecture/Conference
03:48
FehlerbaumMagneto-optical driveMultiplication signGoodness of fitBitComputer animationLecture/Conference
04:23
Quality of serviceBitMereologyLecture/Conference
05:05
Design of experimentsRothe-VerfahrenAreaFrequencyType theoryOrder (biology)Sinc functionGoodness of fitLecture/ConferenceMeeting/Interview
08:13
SatelliteOrdinary differential equationGraphics tabletState diagramRoundness (object)Electronic mailing listLevel (video gaming)Speech synthesisOnline helpMeeting/InterviewLecture/Conference
08:58
Decision tree learningMultiplication signComputer animation
09:40
Magneto-optical driveDesign of experimentsSynchronizationAsynchronous Transfer ModeSystem callSelf-organizationPseudodifferentialoperatorNeuroinformatikSingle-precision floating-point formatEvent horizonBitMoment (mathematics)Lattice (order)Level (video gaming)Self-organizationDigital photographyLocal ringMessage passingMultiplication signComputer animationMeeting/InterviewLecture/Conference
13:34
Network operating systemNon-standard analysisExpressionRoundness (object)BitLecture/ConferenceMeeting/InterviewComputer animation
14:30
Length of stayMeeting/InterviewLecture/Conference
15:07
Regulärer Ausdruck <Textverarbeitung>Broadcast programmingExpressionTranslation (relic)Group actionString (computer science)Type theoryFunctional (mathematics)DataflowPlug-in (computing)Process (computing)WebsiteProjective planeComputer fileText editorPoint (geometry)Extension (kinesiology)Virtual machineMultiplication signContext awarenessWordTwitterConfiguration space2 (number)CASE <Informatik>FrequencyBitPerfect groupComputer animation
18:17
Configuration spaceFunction (mathematics)File formatConfiguration spaceSoftware repositoryQR codeFormal languageExpressionSoftware frameworkParsingCodeCuboidMultiplication signComputer animation
19:16
Object-oriented programmingOptical disc driveDean numberGame theoryVarianceString (computer science)Lecture/ConferenceMeeting/Interview
20:15
First-person shooterDigital photographyWindowGraphical user interfaceUser profileOrdinary differential equationCondition numberCompilation albumComputer-generated imageryConnectivity (graph theory)Vertex (graph theory)TouchscreenLevel (video gaming)Demo (music)Digital photographyBitLaptopResultantDatabaseSoftwareMetropolitan area networkComputer animationLecture/ConferenceSource code
21:50
Principle of relativityHand fanComputer-generated imagerySubject indexingDigital photographyPoint (geometry)Medical imagingSpacetimeSimilarity (geometry)Data storage deviceDemosceneCartesian coordinate systemOperator (mathematics)Einbettung <Mathematik>QuicksortService (economics)BitAreaPower (physics)Query languageZuckerberg, MarkDatabasePattern recognitionNumberEndliche ModelltheorieType theoryExpressionDebuggerBlogDimensional analysisMatching (graph theory)Vector spaceCASE <Informatik>Computer animation
25:26
Arithmetic meanConstructor (object-oriented programming)Right angleLecture/ConferenceComputer animationMeeting/Interview
26:07
RootSineOperations support systemDesign of experimentsWide area networkType theoryPiMeeting/InterviewComputer animation
26:54
Hand fanStatisticsLine (geometry)Bookmark (World Wide Web)Thermal conductivityDistribution (mathematics)CodeParameter (computer programming)Computer animationLecture/Conference
27:30
Design of experimentsDensity of statesConstructor (object-oriented programming)Social classObject-oriented analysis and designConstructor (object-oriented programming)Right angleMultiplication signStudent's t-testGodSoftwareWave packetCartesian coordinate systemCuboidCoefficient of determinationGoodness of fitFormal languageTerm (mathematics)Java appletSocial classPoint (geometry)Power (physics)Software maintenanceNumberMetreClique-widthAlgorithmData conversionMathematicsClient (computing)QuicksortCodeDomain nameCodeSystem callBitHost Identity ProtocolDisk read-and-write headLecture/ConferenceComputer animation
31:12
SatellitePascal's triangleCache (computing)Network topologyRoundness (object)Set (mathematics)MathematicsLecture/ConferenceComputer animationMeeting/Interview
32:01
Front and back endsSoftware developerView (database)Bookmark (World Wide Web)Presentation of a groupArtistic renderingStack (abstract data type)Server (computing)Data managementWeb browserFront and back endsService (economics)Web 2.0Pattern languageSoftware developerBitClient (computing)Context awarenessMusical ensembleMobile appAbstractionAxiom of choiceState of matterMultiplication signData storage deviceSoftware frameworkNumberProgrammer (hardware)Meeting/InterviewLecture/ConferenceComputer animation
34:27
Extension (kinesiology)Artistic renderingServer (computing)AerodynamicsWeb pageSoftware developerPresentation of a groupWindowBookmark (World Wide Web)View (database)Computer fileGraphical user interfaceSource codePasswordRootComplex (psychology)CodeFront and back endsMobile appResultantSign (mathematics)Cartesian coordinate systemWeb browserBitTemplate (C++)Source codeDemo (music)Limit (category theory)Form (programming)MereologyScripting languageWeb pageRoutingNewsletterProduct (business)LoginCASE <Informatik>Lecture/ConferenceComputer animation
37:24
System on a chipRouter (computing)Cone penetration testDemo (music)Image resolutionLecture/ConferenceComputer animation
38:06
Design of experimentsMotion captureVideoconferencingTouchscreenGoogolComputer-generated imageryOrdinary differential equationInformationEvent horizonSeries (mathematics)Game theoryWordPlastikkarteOnline helpView (database)File formatComputer fileCryptographyImage resolutionWordDatabaseRegulärer Ausdruck <Textverarbeitung>CodeSingle-precision floating-point formatWeb browserPlastikkarteVideoconferencingMedical imagingInformationSeries (mathematics)Constructor (object-oriented programming)Computer-assisted translationEvent horizonWeb-DesignerLogicVirtualizationString (computer science)Escape characterMereologyMultiplicationBilderkennungForm (programming)EncryptionMultilaterationType theoryComputer fontKey (cryptography)MathematicsWebsiteComputer animation
43:03
Web pageTotal S.A.Conditional-access moduleMagneto-optical driveScaling (geometry)Roundness (object)Level (video gaming)TelecommunicationLie groupGodLecture/ConferenceComputer animationMeeting/Interview
43:54
Rothe-VerfahrenForm (programming)Link (knot theory)Point (geometry)Computer-assisted translationLecture/ConferenceMeeting/InterviewComputer animation
Transcript: English(auto-generated)
00:04
Hey folks, good afternoon. We're about to get ready for the lightning talks, but before, Neil has a quick announcement for all of you. So please, let's welcome Neil to the stage. Hello!
00:23
I hope this works. No it doesn't. Oh god. As per usual, technical difficulties at a technical conference. We're not AV engineers. Or are there any in the audience?
00:41
Do you want to get up here? Ah, there's something here. Maybe I'll just leave it like that. So yeah, you may have heard this this morning quickly. It was quickly announced, but I basically made this video game where you can sail around the world and actually you play with this video game
01:03
not with your hands, but with a Python program. So there you start from France and you have a little ship and there's wind and you have to try and get around the world. There's two checkpoints that you have to reach and then you have to get back home.
01:24
There's basically, yeah, if you want to participate, don't be scared. If you think you're not good enough with Python, it's actually really simple. It's mostly about just plotting a course. And you are given a template code that already works,
01:41
so that also helps. And you can also ask a friend and submit as a team. That's also fine. And there's a QR code with the link to the repository where all the game rules and that crashed again. I should just not go full screen.
02:11
I'll just leave it like that. So you have about two days, two and a half days to work on this and then we'll do a tournament on Friday afternoon at one o'clock
02:20
in the open space where we'll run all the submissions and everyone will compete against each other. And there are prizes for the winners. Thank you very much. If you couldn't grab the QR code, there's also information on Discord,
02:41
so please do check that. And also on the website. And also everywhere. And also find Neil. He'll be happy to talk about it for sure. Jodie, how do you feel about Lightning Talks? I think they are one of the most chaotic, fun parts of a conference. I feel like this is where the Python conference really shows its creative side.
03:02
Absolutely. Do you guys all know the saying, I came for the language, I stayed for the? Lightning Talks. Lightning Talks, absolutely. That's how I feel about this. That's how I feel about this. Alrighty, I think, do we want to? Oh, we need to tell them the rules. Yes. I was about to... No, no, we don't like anarchy.
03:21
There needs to be some... I live in Germany, there needs to be rules. Of course. I don't live in Germany, but some rules sometimes are helpful. So. Five minutes. Strictly enforced. If the speaker overruns, what do we do? Exactly.
03:41
We don't boot them off stage, we don't do that here. We enthusiastically clap them off the stage to thank them for their time. Also, like Valeriu usually says, Lightning Talks, they're about anything. Everyone is welcome, all experiences are welcome, all feelings are welcome. You're here to talk about something you're passionate about.
04:02
It does not necessarily have to be Python. Did I miss anything? I think we're good. Did we miss anything? Are you ready? I said, are you ready? Then who's our first speaker?
04:21
As our first speaker, let's welcome Jakub, as he tells us a little bit about Czech wines. So if you're like me, when you think about Czechia, you think beer. And that's a really fascinating story, but not the one I'm going to tell today.
04:46
Czechia has three parts to it. It's Bohemia, it's Silesia, and it's Moravia. Silesia is a very small part, and the rivers there empty into the Baltic Sea.
05:04
In Bohemia, the river Vltava, which goes through Prague, empties into the North Sea. And in Moravia, there is the Moravia River, which goes to the Danube, and then it goes into the Black Sea.
05:23
And that happens in the vicinity of Bratislava and Vienna. And the Danube was the border of the Roman Empire around this area,
05:43
and they had problems with Germanic tribes that used to live in this area. So the Romans sent their legions across the Danube to establish an area where they pacified the Germans.
06:04
And by order of the emperor, they were allowed to plant wine there in the year 272. And wine has been growing in this area in Moravia, which is south of the city of Bernou since then.
06:28
So we've had the period when the Germans left, and we got the Czech people into the area, and then we've had the period of the Holy Roman Empire and the Austro-Hungarian Empire.
06:45
And that's the story of how wine came into Czechia. So they're still growing wine. They have the types of grapes that are common in Austria and Serbia and places like that.
07:06
And then they have even developed their own grape. So there is something called Cabernet Moravia, which is a blend between, or a crossing between the grape Zweigelt, which is an ancient Austrian grape,
07:29
and Cabernet Sauvignon, which is what they grow in Bordeaux. And this is actually a recent grape. It was invented or created in 1975.
07:43
And Czechia makes really good wines, but they're not known all that much around the world. I think this is a pity, so I would like you to investigate the area.
08:02
Buy some Czech wines, bring home, and try them out, because they're really good. Thank you.
08:23
I asked Jodie to help me out, but then I didn't give Jodie the list of speakers. So how is Jodie supposed to help me? Please, yes, please, Inacio. So I'm welcoming on stage Inacio, a fellow Portuguese-speaking person. And Inacio is going to tell us how you can create a Python community with friends.
08:46
Let's give him a big round of applause.
09:09
So, in early 2024, I was in Houen, north of France, at this café, and I told to my wife, if I had more social capital, I would organize at my work.
09:25
Not a Python meetup, big as a Python, but a small Python meetup at my work. She told me, you don't need that, just do it. So I work at Institut Couree Institute.
09:44
Here's the Paris unit, so the idea was to organize. I'm tapped over there. The first thing I did, as a postdoctoral researcher, I talked to my supervisor. She allowed me to do it, and I created an opinion poll to Couree people,
10:04
asking if they were interested, when would they like to make the conference. They answered, and later I opened a CFP for people to send in talks. We received three talks, one of them was mine,
10:24
and two of them were from invited people that I met. And after doing that, we organized an organization committee, because an event you must do in a team, not alone.
10:42
So Lucy is from my team at Couree, Thiebaud is from a neighbor team at Couree, and Mami is from the Couree Tech Bioinformatics. So once we had a committee, we could organize the event, and these two guys were the invited speakers,
11:02
Ulysse Martou from Oaken, an informatics company in Paris, and Giovanni Paya from SC-Verse, a Python community from Germany, which designs technologies and Python packages for single-cell genomics, basically. They gave awesome talks at the meeting.
11:25
This is the title of our meetup, Couree Python meeting. The idea was to get together Python people from Institute Couree to make a meetup. Here we have some photos of the talks.
11:43
I gave a talk about Python events. P.F. Mahon gave about explainable AI. Ulysse Martou about pydc2 here. Giovanni Paya about SC-Verse. Here a photo of the committee with the invited speakers. We had a catering funded by EuroPython,
12:06
which gave us a lot of support regarding that. And because of that, I'd like to present a thank you to, and as I live in France, I'm Merci beaucoup. In Portuguese, muito obrigado.
12:21
To Laisca Valle, Funes, and Vaiba from EuroPython in helping to make the catering happen. And the main lessons learned were start small, start with your local community. People hire the technology. The most important message you must take home from this slightly talk.
12:44
Without people, there's nothing. And the first time, you always miss something. That's why we try to do a second edition a little bit bigger. And don't give up. At many moments, I wanted to give up because there were many issues regarding the catering,
13:01
but in the end of the day, everything ran very right, so don't give up. And it's a reality experience because the talks at this meetup were EuroPython-level talks, really. And I also would like to dedicate this likely talk to the person that supported me at first,
13:22
and without her, I would not be even here. My wife. Thank you very much. Thank you so much.
13:42
So, next up we have Fabrizio. Tell us about making cron expressions readable again. A big round of applause, please.
14:10
So, let me see if this is... I was told that it's a bit of a random thing if it works or not. So, it's kind of a...
14:23
Shall we just go? I'm not sure. Let me see. This is where the jokes come, huh?
14:54
The Python joke. Let's see.
15:00
That's promising. There you go. Great. Perfect. So, hi, everybody. My name is Fabrizio.
15:21
I live and work in Hamburg as a data scientist there, and today I wanted to share with you a little project I put together a few months ago. It's been useful for me, and I figured it might be helpful for some of you folks as well. So, do we have any Neovim users here?
15:43
The editor Neovim users? A few hands up. Cool, cool. So, what I wanted to tell you about is basically a plugin, some extension in its functionality to, as the title says, make cron expressions readable again. So, let's see what they are and what I mean by that.
16:03
So, this is an example of a configuration file that you might have behind a GitHub workflow, for example, and you want to schedule this job. You want to tell this machine with which frequency to run the job. For example, you might want to say, I want to run every day at 12 a.m.,
16:22
or I might want to run every second day at 2, 3, 4 p.m., and I want to run every second day of the third week of the month, of the last month of the year, of the year 2022, 24, whatever. So, as you see, these expressions are very expressive,
16:40
but they get tricky, and whenever I look at them, I feel a bit more like that. So, what some people do, at least I do, is you copy this string, so the cron expression that you see after the word cron, and you go to some website that translates this string into a human readable,
17:04
as people are following along, and then you start kind of tweaking the things, and when you find the string that you actually wanted to, then you go back to your editor, you paste it there, and cross your fingers that everything is working fine.
17:22
So, that process is very cumbersome. By that time, I already checked Twitter three or four times, the newspapers, I mean, context switching is a problem. So, it'd be nice to have everything in the editor, so you just keep working on your flow, and that's exactly what this plugin allows you to do.
17:42
So, let's see it in action. Here I have a file, and as you see, as I type, it will detect the cron expression and render the human readable translation. So, for example, every minute or every second in that case, it will try to find all of them, so this is a more complicated example with many expressions.
18:02
You can turn it off. There will be a command there, cron explain, disable, they're off. You can keep on editing your file. At some point, you might turn them on again, and they should just work. So, that's basically the functionality, and this is all the configuration that you need to make it work out of the box,
18:23
just what you just saw. There's one little dependency you need, because this is not a parser or a checker itself, but again, this is all you need to paste into your configuration. If you have a few more minutes, you can spend some time,
18:40
make it look nicer, or even write your own, say, parser or cron expression checker, if you want, in Python or in Lua, whatever language you want, and Cronix is basically kind of a framework that would allow you to stitch that together and make that still work. So, that's basically what I wanted to show you. Here is a QR code for linking to the repo.
19:05
There is code. There is hopefully extensive documentation there to get you started, and yeah, let me know if you find it useful. Thank you very much.
19:23
Can I ask them something? Do you guys know the game Where's Waldo? Yeah. Let's play a variant of that. Let's play Where's Mark Smith? Okay, and while we wait for... Well, we already found Mark, but there's Austin that was set up. Who's going to get here first?
19:43
Okay, so Mark is here first. Alrighty, so then let's welcome Mark. I couldn't find Mark. Nobody said they were looking for me. While Mark sets up, his topic is searching for celebrities with your face.
20:02
I also did look up a Python joke, but I got back a compliment instead. A Python string is a collection of characters, much like yourselves. Aww. Go ahead. Shall I go? Okay. Yeah, I'm just going to spend a couple of minutes
20:20
talking about something slightly silly that I made. If anybody knows me here, they know that I make silly things. I do silly things with Python. I'm not sure why that's asking me to connect. Anyway. There we go. Anyway, so I built this to work on a mobile, so it's all a bit vertical. I'm just going to have to refresh this because the camera component doesn't like it
20:43
when my laptop sleeps. Okay, so that's me. I apologize for my face being so big on the screen. And I'm just about to take a selfie. I feel like you're looming down on us. And now I can look up my celebrity lookalike
21:01
in a database that we have. So this is using AI. I don't know exactly what results it's going to come up with, which is, you know, making a live demo even more stressful than it would normally be. It also takes a little while, and it uses a network. So, you know, taking a few risks while standing on stage. I just come up with some people, so I scroll down.
21:22
I don't know who that is. I've never seen him before. I do this a lot, and I usually get the same kind of faces coming up. I like, that's not so bad, kind of stubbly man. Usually they're a bit more bold than this. And I get, I've forgotten his first name. His surname is Thewlis. He's quite a famous actor. I get him a lot as well. Maybe it's this kind of intense staring into the camera.
21:43
I've also managed to get it to describe the photos and why they're kind of similar to each other. So let me explain how this works, because honestly I didn't know how to do this a few months ago. So this is what we call a farm stack app. So it's using fast API, React, and MongoDB.
22:01
And basically the way that I'm storing photos is that they go in through the front end of the application, get sent to fast API, and then behind the scenes I'm just using an AI service hosted by Amazon. There's a few services out there that will do this kind of thing. This just takes the image and runs it through a model called Titan embed image v1 that creates what's called an embedding,
22:22
which I'm going to represent this just, and through the power of magic, the magic of AI. And embedding, you can just think of it as being basically a number that represents this image in some way. And that gets sent back to fast API, and then I store the image and the number in my database. The number is using a special type of database index
22:41
called a vector index. There's been a few talks on this topic, so hopefully some people have kind of learned about these today. So when I'm searching for a photo, it's a very similar kind of operation. The photo comes into the React application, posted to fast API, and then sent off to Bedrock, where through the magic of AI, it's then converted to an embedding number,
23:01
it's then sent back to my application. And then I make a query against MongoDB where I stored that number to try and find a similar embedding in the database. So it just kind of looks at all the documents in my database, it kind of finds some similar numbers, and goes, well, those are the most similar numbers in the database.
23:20
These are also some people that quite often come up. It all depends on kind of my facial expression and how close I am to the camera generally. The thing is, it's not just a number. So this is why we need the special kind of index. It's a 1024-dimensional vector, so it's a point in 1024-dimensional space,
23:41
which is a very hard thing to conceive of. So I just tend to think of it as being like just a blob, just a thing that I could use to store in the database and look up similar things. It tries to store, in this case, images The data points that it finds tries to store them together if the images are kind of similar, or far apart if they're not similar. And so you can kind of find these points in space
24:02
using these magical indexes to find similar images. But the problem with the magic of AI is that because it's kind of powerful and flexible, we don't always think about all of the aspects of the way that we're using it. And one of my colleagues demonstrated this by taking a photograph of his hand,
24:21
which was something I really didn't expect anybody to do. Why would somebody take a picture of their hand? And of course, it comes back with matching images. So it turns out that Chris Evans looks a bit like my hand. And then weirdly, and this happens quite a lot when you take a photo of your hand, we always get Mark Zuckerberg back, often more than once.
24:42
So there's something very sort of hand-like about Mark Zuckerberg. And again, this is kind of a subtlety of the application, is that it's not really doing facial recognition. It's not doing any special kind of facial recognition. It's doing image similarity. So if you squint at these, you can see the photo on the left. It's kind of a Caucasian blob in the middle, and then it's kind of a dark area around the outside.
25:03
And none of these is a very good match, but those are probably the closest kind of composed photos in the database. So you always need to kind of consider what stupid thing somebody might do with your application, but also aspects around bias, around the data that models trained on and the data that you're kind of indexing and storing. So that's my quick demonstration of face search.
25:23
This is all available online if anybody wants to have a play. And it's all hosted online. Thank you very much. I think that gives new meaning to someone looks like a foot. All right. So we have Austin now presenting on, if I can juggle all this, name constructors.
25:44
Is it up there? It's the HDMI. There we go, maybe. Maybe I have to move that to another desktop. You're right, you're right.
26:06
I'm going to unplug it for a second and turn off that. Let me see if I can find more Python jokes in the meantime. What have we got?
26:20
Apparently, if you type in import anti-gravity, it links to the XKCD comic. Who knew that? Oh, it's just me. This Reddit is really not giving me much.
26:44
What is the release after Python 3.13? PyPy? Yeah. I'm not looking for controversy. Anyone else? Shout out your favorite Python jokes.
27:02
Code of conduct, please. That wasn't the joke. Jesus. Back when I was learning statistics, I used to come up with pickup lines. And the most romantic one I ever came up with was,
27:21
like a non-standard T distribution, you are unique at every parameter. I'm married now, by the way. All right, we ready? I think so. Let's go. All right. Right, so today, I'm going to talk about named constructors. In some sense, it's a dumb thing, right?
27:41
It's something you've all encountered almost certainly, and if you haven't, this is a good time to learn about it. The reason I want to talk about it is because it's good for this thing to have a name. It's not a term of art I've heard in other places, but we've used it at 60 North in our books and in our training, and it's something that we have found surprisingly helpful, just to have a crystalline concept for it.
28:00
So in Python, there could be only one, one constructor. You can have one initializer, right? Unlike other languages where you can have as many as you want in some ways. So here we have a simple class paper size, which you pass in a width and a height in millimeters, and you get a piece of paper. What size paper is that? Any paper nerds? A4. Good Lord.
28:20
No, okay. Okay, paper nerds. Right, that's an A4 size piece of paper. I wouldn't have known that. But you don't want to memorize those numbers. You want a more symbolic way, a better way of writing it, expressing that what you want is A4. So a really common way to do it is like this, a class method called ISO A4 that returns that size piece of paper.
28:42
This is what we call a named constructor. And of course, it's obvious. You see it, you go duh, of course I would do that, and of course you would. But we don't, as far as I know, have a common term for talking about this concept and having it in our heads in our design discussions when we think about how to build our software. And I have found for myself, for a lot of our clients and our training people, our training students,
29:01
that this really helps them keep that idea in their hip pocket for when they are building their software. So that's why I want to just kind of get it out there and maybe try to give it a name, or at least have you think about giving it a name yourself. So now I can just call paper size ISO A4 and I get the right size piece of paper. And of course, I can add as many of these named constructors as I want to my class.
29:20
So now I have the same power as Java and C++ and other languages like that. And what we find often is that this approach to designing leads us down a path to a much nicer API. I realize at some point that I can have an ISO A named constructor that just takes in the number and it gets called by ISO A5 and A4. And then I scratch my head and say,
29:41
well, I only need one of those actually, I just need ISO A. And I can call that like this, paper size ISO A4. And that reads really, really well. I don't have to memorize the width and height in millimeters of my A4, A5, A0s. I just have to leverage the fact that there's an algorithm for calculating those.
30:00
Okay. So, of course, we can extend this as much as we want. Maybe we have to start selling paper in America, where it's the only place I can think of where they measure in inches still, paper at least. From there, and I grew up with this. And you can keep extending it and extending it, you know, wash, rinse, repeat as they say. So, now we can produce a US letter-sized piece of paper
30:22
or really any size piece of paper in inches that we want, just by doing some conversion math in the in inches constructor. And what you end up with is what I find to be a really nice, really readable, comprehensible, maintainable bit of code, right? I can construct my pieces of paper
30:40
or whatever it is you're constructing in your domain in a really readable, straightforward way that I can understand when I see it And there's lots of other reasons why this is a good idea and lots of other sort of applications of it. But if you've encountered this and never kind of put it in a little box and given it a name, think about that. Name constructors works as a name,
31:01
but maybe you've got a better one. That's really it. This is my dog. She was really hungry earlier, so I thought I'd put her out there. She's super cute, looking for dinner. I guess she got fed right after this. Thank you very much, and sorry for the technical problems.
31:24
Thank you so much, Mark. I'm sorry. I'm just thinking, okay, let's make a joke, and I can't make none, so we'll just skip right on to Luke, who's going to talk about... What are we going to talk about, Luke? HTML. HTMLX. Yes, I just wanted to hear it from Luke.
31:41
Sorry. Let's warm Luke up with a round of applause as we set up.
32:07
The floor is yours. I'm just getting my notes up. My name's Luke.
32:20
I've been working as a backend developer, mainly in Python, for a number of years. And about a year ago, I kind of started dabbling in UI. I'm going to talk about how I used HTMLX to leverage my Python skills to be able to do some front-end development.
32:41
So the motivation for this is... I've been working on a app called Subbox, which is a music management service for DJs. And I wanted to get UI up and running without learning a whole new tech stack. I didn't know any React and JavaScript, and I didn't really have any interest at the time in learning that.
33:04
So I was kind of overwhelmed with choices about UI frameworks, and eventually I came across HTMLX, which seemed to solve some of the issues I was looking at, namely not learning JavaScript. So I think to understand HTMLX, it's good to kind of put it in context.
33:25
So a bit of history about the web. I'd say kind of the OG web kind of design was that you'd have your browser would make a request to a server somewhere, which would return HTML, and the browser would then render that HTML.
33:42
Fast forward to kind of modern web. The browser is really more of a JavaScript client, which is kind of dynamically requesting resources from a server, which typically responds in JSON, and the client manipulates that, stores some state on the client side,
34:02
and eventually returns HTML. So HTMLX really fits into that original pattern of server-side rendering. The backend is returning HTML, and it's kind of a... HTMLX really is a JavaScript framework,
34:23
but it abstracts a lot of the JavaScript away, so as a programmer, you just have to deal with HTML. It integrates quite nicely with Python and FastAPI because you can use those tools to create your backend that returns some HTML. So it gives rise to the HowlStack,
34:42
which is HTMLX and whatever you like, and in my case, that was Python and FastAPI. So this is a demo I've put together for the purposes of this talk. It's pretty basic, but you've got an About, you've got Sign Up and Login,
35:01
and the magic here is HTMLX is... I've kind of specified in the HTML when I press, say, the Sign Up button, that's going to do a request to some URI root, and then the result of that will be replaced in the DOM in place, just updating the bits that need to be updated.
35:22
So, for example, when I navigate to this page, the browser is going to do a GET request to the root, which in my FastAPI app is just this code that's returning this home.html, and if I was to, say, use requests
35:43
to request that same root and convert it to text, it would be this HTML code, but obviously it looks a bit easier on the eye in the browser. And you see the magic HTMLX script here, which is enabling the HTMLX features.
36:01
So one of the big features for HTMLX is dynamic rendering, so partially updating bits of the page that I mentioned, so, for example, when I click this Sign Up form, that button is going to do a request to this Sign Up form root and replace the HTML in the DOM with whatever that root returns.
36:23
So, yes, a bit of an overview of some of the features of HTMLX. Yeah, you can also include parts of the DOM and pass it to the endpoint. For example, this sign up to the newsletter, that truthy value will be passed to my FastAPI root.
36:42
Yeah, there are a lot of limitations, I think. Not well suited for complex UI behavior, as I've slowly found out. Debugging in the browser is pretty limited, and now my code base largely consists of HTML templates rather than, say, JavaScript code, which I think can be also a limitation.
37:02
So now I'm not migrating my app to React. If you want to find the source codes, it's here. Yeah, it's pretty much everything. It's a very basic application. Don't use it for anything, production, et cetera, et cetera.
37:22
Thank you. I'm always very impressed when people do live demos, especially with five minutes. I'm scared of doing it when I have half an hour.
37:54
Okay, so welcome to Olga. She's going to tell us about the art of puzzle solving. Yes. All right, thank you for having me here.
38:07
So I like talking about puzzles. I find it very fun. And maybe to this crowd, what will be more relatable is the art of problem solving. It's like preaching to the choir here. But I suppose we're at a Python conference, so I somehow have to make it related to Python,
38:22
and I will in a tangential way. So first of all, as I said, I just want to talk about puzzles, truthfully. What do I mean when I say the word puzzle? So to me, a puzzle, or to someone else looking at a puzzle, they go into Google, they type puzzle. And what do they get? I like to search by Google Images.
38:41
They get jigsaws. This is really, really disappointing to me because a puzzle is a lot more than that. And overall, it makes me very sad. So I actually want to talk about a brand of types of puzzles, which is a puzzle hunt. And that's an event where people, usually in teams, solve a series of puzzles. You solve one puzzle, unlock more, and so on and so forth
39:03
until you get a prize, which is usually nothing except the satisfaction of solving puzzles. Think of it like a virtual escape room on steroids. So the easiest way is to show you what I mean with these hunt-style puzzles.
39:20
Imagine a crossword, and then imagine it without a grid. It's still a puzzle, you just reconstruct the grid, fine. Now imagine a crossword, but, and you might see where I'm going with this, imagine it without clues. Hmm, I promise you, this is a real thing. Then what about if your grid is circular? What about if you have all your clues with emojis?
39:44
Multiple solutions? What if every single answer is actually written in Morse code? What about if your clues are regular expressions? And all of this is without instructions. So I do not tell you that the puzzle is about Morse code
40:01
or that it's about regular expressions. That's up to you to find out. And I will be the first to tell, to admit that some of these sound very far-fetched, but I will also tell you that all of them exist in one form or another. Each one has been designed very carefully to lead you to the solution in, hopefully, the most satisfying way possible. And this is what counts as citations in our community.
40:25
So what are some puzzle topics? Crossword is a very base example, but you can also have puzzles on Wordplay, fine. Mastermind, sorry, Wordle is just a rehashing of Mastermind. Logic cards, custom fonts, find one of those.
40:41
Video and image analysis, ciphers, math, so it gets pretty technical, and then you also get some pop culture. So I must admit, I've become more proficient at parsing the Pokemon database than some of my work databases and my browser history is ruined, as is every single puzzle hunters.
41:02
So to formalize a hunt-style puzzle, it is a puzzle that will give you some information. It can be in any form or topic imaginable. It will extract to an answer, which is almost always an English word or phrase, and the commonality is that you have no instructions. That's up to you and hopefully your teammates to find out,
41:22
your teammates being cats, that's key. And generally, in a puzzle, you have data thing goes in, solution thing goes out, which, again, to this crowd is like preaching to the choir, so why would you even do it? Then if you solve enough puzzles and you want to write puzzles, and this leads to a lot of custom code, web development design, nerd heaven, in a way,
41:43
and a lot of lateral thinking is involved and generally it's just really fun to open a puzzle and feel the horror on your face as you see this and then slowly decompose it into what it actually is, which is actually a crossword puzzle of regular expressions.
42:01
And as far as I am aware, this is the original one that exists. So I would like to just introduce you to this resource, the puzzlehuntcalendar.com, which is a very minimalistic website of what kind of puzzle hunt are available. They go from the most devilishly complicated one like the MIT Mystery Hunt held annually in January,
42:24
70 people per team on a hopefully maximum size, 150 puzzles all weekend, to a lot more beginner-friendly, which is the puzzle hunt might even be happening in your city. And a lot of more hunts are online and made by independent teams, of which I'm part of one of them,
42:42
and some next hunts, but you can all find it on the Puzzle Hunt Calendar, as well as some resources. With that, I would like to leave you with this XKCD meme about crossword constructors. It would be great, really great if some pop culture artists would name their album in very nonsensical strings. It would really help us a lot. So with that, thank you for your attention.
43:10
Thank you so much, Olga. I have one more question for you. On a scale from one to a huge round of applause, how much fun were all of these lightning talks?
43:26
So we have more. So welcome to the stage. Wait. I was trying to... I was telling Jodie, so this was the last one. And Jodie said, OK. I thought you said it was the next one. No, no, this was the last one. Oh, my God, we're having so many communication issues.
43:42
Yes. It's not you, it's me. Oh, it's OK. So this was the last one. For today, we will have more lightning talks tomorrow and the day after. See, I didn't lie. We still have more, but tomorrow. Yes, exactly. Yes, technically correct is the best kind of correct.
44:05
If you want to sign up for lightning talks, you just have to fill a short form. You can find the link on Discord. And I will see you all tomorrow at nine. Yes. Hopefully. I will strongly welcome lightning talks that have a lot to do with cats, like Olga's,
44:21
extra points. Extra points guaranteed.