Good morning. Thank you so much. But just to give you a little bit more background, I basically live and breathe Mar-Tech. So I run the UK's largest Mar-Tech festival. We do a lot of consultancy, a lot of learning. So I work with a lot of CMOs, CEOs, and chief marketing technologists to develop their marketing technology. But most importantly, today I'm here to talk about making marketing technology simple. But the truer thing I'm trying to do is make it simpler. There isn't simple. It's not easy to make it simple. But I do think there is some important foundations that need to be laid that don't currently exist. Now, we all know Mar-Tech's massive. We know it's booming. We're all here for that reason. And there's signs of it everywhere. I mean, it's amazing just to see how exponential the growth has been in marketing technology. You know, we can see this in agencies. Ogilvy has taken on 900 people to drive Mar-Tech. You know, IPG making a 2.3 billion acquisition. We've got 30% of people's marketing budgets is being spent on Mar-Tech. And this year, 62% are set to drastically increase that. It's a massive space, and it's a super, super exciting time to be working in this. However, naturally with this comes a lot of complexity. Now, it's interesting what Atta was just saying about a move to D to C. And we've got a fantastic example of this with Nike. Everybody is moving towards Mar-Tech. Everybody's investing heavily. Most recently, this is a fantastic quote here from the COO of Nike after their acquisition of an AI company. They're looking to beef up their knowledge, their skills, their expertise, their IP in the ability to better understand the customer, to hyper-personalize. So there's this massive opportunity with marketing technology now. And it's really exciting to be here and be part of it. However, there is a problem. And this is a fantastic slide, Mar-Tech's law from Mr. Scott Brinker, the godfather of Mar-Tech. And this slide's a little bit old now. It's about two or three years old, but it couldn't be truer today. Organizational change can't carry on at the same rate of technology. So we have this gaping hole in the middle, which creates a lot of confusion, a lot of complexity, and a lot of a challenge. And with this, we still find that there's a hell of a lot of chat about Mar-Tech or marketing technology. In fact, nearly 700,000 times the terms used in a year. However, in my opinion, it's used it correctly. You hear that, you think of this. You think, again, of Scott Brinker's landscape. You think 7,000 logos. You think technology. And this is wrong and it's not helpful. It creates so much confusion. You just start looking at vendors, solutions, and you're tackling this the wrong way around. So we need to start again. We kind of know what Mar-Tech is, but we kind of don't. Yes, it's the inception of marketing technology, but what does that mean? It means a lot more than technology. It means a lot more than platforms. This inception of marketing technology has an impact in different ways, in four areas. So this is the framework I developed called the four Ps of marketing technology. And it goes from planning and strategy, people and teams, platforms, apps and ecosystems, process and operations. Or put in a more simplistic way, it's the why. It's the who. It's the what. And it's the how. And all too often, people jump straight into that what? Straight into the 7,000 logos, straight into technology and solutions. It's not the answer. If you just tackle one quadrant, one quarter of this, it's where things go wrong. So I'm going to walk you through this framework in detail and give you a practical takeaway of how you can apply this yourself. So a lot of what I talk about might feel familiar, but it's bringing it all together so you ask yourself those questions. Am I really thinking about these four Ps? So let's go back to the landscape. Because I'm not suggesting it's not useful. The part that's useful is this. It's the organization and the aggregation of the solutions. It's thinking about these topic areas. It's breaking these down. Throw away the logos. Stop thinking about ex-solution. Think about what problem it's solving. So here's what we're going to go through. We're going to throw these together. We're going to put our four Ps of marketing technology together with the core classifications from the landscape. And we're going to use this framework to score out where we're headed and identify the areas for our roadmap we need to focus and develop. And from this, equally, we might understand areas we're already booming in and we're doing a fantastic job. So I'm going to walk you through all four areas, bit by bit. First up is planning and strategy. It's obvious you need a plan. However, I find increasingly people do not have a clearly defined and documented marketing technology strategy. Or if they do, it is a list of vendors and solutions. It's not a martech strategy. Having the four Ps in your strategy will give you an integrated martech strategy. And what we need to do is we need to start with the business goals. We need to understand what problems are we trying to solve? What are we doing in the customer journey? And then as we develop our marketing strategy, we need to hone in and we need to carve out an area which is dedicated purely to martech and how it integrates with everything we do, which takes us back to this framework. So we take those core classifications of the landscape and we take our four Ps and we systematically work through every single area. What we're trying to do is identify what do we currently have, audit what's in place, understand the people we have that are dedicated to data, or the planning and strategy we have in place for our social. Work for all of these. You could do a series of workshops. You could do interviews. You can look at platform adoption across your teams. There's a whole multitude of different ways to do this and aggregate all this information internally to then ask yourself honest questions of where you sit in your maturity. And you score that and you understand and go, right, I know where I am today. I'm very clear where I am today. And then you can visualize it. And you can ask yourself questions of what's wrong. So in one of these examples we've got, it may be that you've got fantastic people but you don't have the platforms. Or you've got great platforms with no people. Or you have no process or you don't have a plan. It's mixing and matching these together so you really map out where you have gaps and where you need to focus your time and effort. Now I can't go into too much detail in the small time I have but I ensure this prove unbelievably valuable for people to step back from the granularity and just say, what are we doing well? What are we not? Where do we need to focus our time and effort? So just a sum up. Fail to plan, plan to fail. You need to think about your objectives. You need to be very clear about what you're doing with your marketing technology strategy that fits around the customer journey. You need to audit where you are. Don't just jump in. Understand what exists right now before you move forwards. And roll that out in a roadmap. Spot those areas where there's masses of opportunity. More likely than not, you might have amazing technology that isn't that it's failing. It's that you're failing by not having considered the other parts. Right, jumping into people and teams. This I always find is the part that's forgotten. People are very quick to throw money at technology but when it comes to people, suddenly people go missing. So we find and this step backs it up massively that people don't invest. And partly they don't invest because they think buy the tech and it will solve the problem. The other thing they do is they suddenly think it will be easy. I'll be able to find these people. There's a massive shortage of fantastic talent which makes it particularly complex. And there's a gap also in terms of learning and development and part of that is the space is moving so fast. We saw the Mar-Tex law earlier. It's moving at such a pace that to be very good at this, you need to be a real learner. So we have this shortage of skills. We have this luck of understanding of just how important people and teams are. So I'm going to walk you for a few ways that you can help improve on this. So this is from Gartner and this is a nice approach which we've mixed the match with a few ideas. Now Gartner lays out what it says is developing in the market right now is a fat T.  Ultimately, there are these people that are fantastic at loads of things. You then have specialist roles. You have emerging roles. You have traditional T's. Gartner suggests that we're all moving towards fat T's. I think they're unicorns. I would love it if that was the case. These are the people you would love to have in your team or are super important, but equally, it's very tough to find them. But if you take that thinking of these different shapes and different types of people, different types of skills, you can tetris your team. So we recommend mapping out your team, the skills they have, and mixing and matching them together. So bringing together fat T's, emerging specialists, and then we've added one to the mix which is consulted to season agencies. Now, what I'm advocating here is that you don't look at finding a person with the core skills, but you think collectively. You think about your team. You think about the skill sets and mix and match those together to understand what you really need. Here's an example for you. So we have the full stack marketer, a lovely term coined from hacking marketing, also known as a growth hacker. And that person as the person understands a lot of different channels, lots of different technologies and brings them all together. We then have those that are emerging into fat T's. We have specialist roles like market automation specialists. We have data scientists. And then we might actually say, well, actually, if we're implementing a specific platform, I want a consultancy that's specialized in that platform. So in a market automation platform, if I'm going to use Marketo, I want a Marketo specialist. And when you bring this together, you start to understand that it's not about an individual and it's not about just going, I need a marketing technologist or I need someone to run my market operations. It's much bigger than that. It ends up having to reassess your entire team where marketing exists.   It depends on your company. It depends on how you match your roadmap to those individuals. But these are some example job titles that you might want to consider. Now, sometimes you'll have individuals that have multiple functions. Others maybe you want to specialize in. And I have noticed I've got too many people on the pitch, by the way. That wasn't an accident. I just couldn't get rid of people. And there's even more roles than this, but my message here is that you need to rethink marketing departments. Technology is now at the heart and operating is used to won't work. In summary, we need to mix and match our skills and functions, but we need to think holistically about our teams. We need to think about different shapes of people. We need to think about those that you need to be specialist and those that you need to understand a hell of a lot about different areas. Right, so with our plans in place, with our people and teams, now we talk about technology, not sooner. Now we're going to talk about platforms, apps and ecosystems, but the biggest mistake people have is they jump into this war too quickly. Before we start, we're not going to finish. There is no such thing as a perfect stack. It's an ongoing process. It's constantly developing. And this goes back to the importance of having people, because it's going to constantly evolve, so you need to make sure you've got the people that are on top of this and living it. So when we talk about your stack, we go, first of all, go back and audit what you have. Keep it simple. So there's lots of ways in which you can frame your stack. There's a company in the U.S. called Cabinet M, which is fantastic. They've got a book called Attack Your Stack. Yeah, Attack Your Stack, which talks about different frameworks. This is a simplistic one we've created. And what we talk about is just literally overlaying your current solutions against the customer journey. On top of that, we go back to the landscape. And we're going to make this available afterwards so you can literally play around with stickers and think about it in these terms, because we try and make things simple here. At very top level, this is how you maybe would look at the different classifications of the Marta landscape. Or we could subcategorize it out. We can debate some of these, maybe they appear in three areas, two areas, one on the top, one on the bottom. Sometimes you don't need everything, but it allows you to ask questions not about is it this blue logo or this orange logo or this purple one, but instead going, what do I need for this part of the customer's journey? You want to make this customer-centric. You want to be solving a problem, not just getting pulled into the technology piece. So once you've laid this out, once you've understood, okay, these are the different types of technology that I would need in my stack. You then start thinking about what you might have. These are just some examples. We're not in any way endorsing any of these. There's countless different versions you could have. But visualize what you have. Put it all into place. Understand what exists at the moment. And this could be an amazing exercise, because what you'll find is, when you share this around your companies, more often than not, people won't even know this stack exists. Once you've laid that out, you need to ask yourself questions like, what's not working? Let's get rid. What's doing a great job? We're going to keep it. Where do we need to actually double down and improve what we've got? Maybe we've got an amazing piece of kit, but we're just not capitalizing on it. Or where are we missing piece of technology? Now, this is super important. I would say you will find... Invariably, you will find technology you need to retire, and that will free up budget for you to reinvest. Equally, when we talk about invest, do it properly. I mean that. So many people go shopping, but they haven't done their business requirement gathering. They haven't defined what business goals, what problems they're solving. They haven't laid out an RFI, an RFP. They haven't really done the background. They haven't asked the end users of the products what they think. They've dived in and signed something off. And what happens?  It's more painful, it's slower, but it's doing it properly. And it's asking yourself the right questions about what is the point of this tech before you go and spend money? So once you have your stack in place, you then need to think about stacking it together. Sounds obvious, again. But people need to make sure they think holistically. Don't think about one solution in isolation.  Now, I could nerd out on lots of different areas here like talking about ecosystems and sort of ecosystems you might want to focus on. The point is just step back. Don't dive into one solution. Think that this has got to work across the entire customer journey and it's got to work with all the different pieces of kit you have. Therefore, you might find that part of your selection process fits more around what works and complements what you have in place versus what's exactly what you're after. Blend that out. Make sure you think about it properly. Make sure you're chatting internally. And make sure you understand the plumbing. Don't forget there's data underlying this. It's got to push and pull around that. Make sure when that data is pushing and pulling that you really understand what exists, that you model this out properly, that you have the right architecture, that you're working with your technologies, you're specialist in these areas. You don't need to understand every part of MaTeC but you do need to understand this at the top level. You need to be conversational and you need to have this approach where you look at this in such a way that you're chatting across the entire team and you're very clear about what it is you need to deliver. Again, these are the things that get lost. These are the things where people suddenly forget, oh, my God, there's data. I've just gotten bought a shiny new piece of kit. I haven't thought about how it fits with everything else I have and I haven't really considered how my data is going to flow seamlessly from one part to another. I think tech rarely fails. It's a failure to plan, it's a failure to map out and ask these types of questions that makes the real difference. Audit map and stack. Sounds really simple, but it's not. There's a hell of a lot that goes into this. Like I say, we could spend another half an hour nerding out on all these areas. This is just the top level for you to understand these foundations and ask the right question. Right, we're into our fourth P, our process and operations. This is bringing to life our plans. This is the part that differentiates us from capitalizing on the tech and the team we have in place. And again, it's another area that gets lost a lot of times. So when we say process and operations, what we really mean is that we're now in a more tech-enabled world. We've invested heavily in our stack. We've invested in a fantastic team. We've got clear plans in place. We now need to bring that to life. And that means reimagining the market operations we've previously existed in. It means embracing change and a different operational approach. It means thinking about those nuts and bolts and being open to accepting and embracing new technology and new approaches to tech that didn't previously exist. To kick that off, we always recommend that you look at agile. Agile's obvious. I say it's obvious. Technology has been using agile methodologies for a very long time. Tech is now in marketing. Why wouldn't you embrace it? It's that simple. Now, 50% of traditional marketers are now going to embrace it. And there's lots of different flavors of agile. There's a whole multitude. But it's very core. The reason why it makes so much sense and why it makes so much sense now you're in a matic-enabled world is because it's about collaborating. It's about breaking things down. It's about moving. It's about being iterative. It's about great communication and collaboration. It's about understanding that traditional approaches of waterfall are too long-term thinking. The world's moving too quickly to not embrace agile approaches. If you want to find out a hell of a lot more about agile, I'd strongly recommend the agile marketer by Roland Smart. Fantastic book. Quite nerdy. So only if you really like agile. My next point around process and operational change is being data-informed. And I purposely use the word informed and not driven. I think one of the dangers of being data-driven is we can sometimes forget people and being creative. So, yes, we have loads more data available to us and we should embrace that and we should think differently. We should be in a PQL, SQL, CPA, CPL world. However, we shouldn't let that override everything. So we do want a science-driven approach. Now, we've got unbelievable measurability we never had before. It allows us to be more formulaic in our thinking. It allows us to think about the ingredients of what makes the right execution. And we can constantly optimize this. We can literally be like a DJ turning dials as they're executing and finding the right ingredients and constantly improving and optimizing, which rolls into automation. Again, automation is not new. Everyone knows you need to do it, but you need to think about this very carefully. Before anything, we talk about automation. My big thing is make sure you're still looking underneath the hood. People step back from this and they get carried away. They go, I've created my content. I've created my workflow. That's it. It's done. The leads will take care of themselves. It's not as simple as that. Now, automation can be amazing and beautiful and incredibly powerful, but stay close. Even with amazing technology and the power of AI and machine learning, you need to make sure you're asking questions. And the data and the insights you get are only going to be as good as what's come before this. So you need to also make sure you're still having the human involved of being creative and questioning different automation workflows and making sure you're grinding down that data from an analytical perspective. When we talk about analytics, there is so much data available to us, so much insight. Again, there can be a big problem with this. We can end up in a vanity metrics world. I would encourage you to try and have one dashboard. One dashboard that really means something. If you have two or three minutes in a day, what would you look at? What metrics would really mean something to you that you would do something different? I'm not suggesting that one dashboard forever. I think you build on that, but start with one. There's a lot of people in data analytics that I chat with that create beautiful things and I love data. It's one of the areas I know it out on. But you could just end up with endless charts and prettiness, but... And so what? So get to the core and get the real, real... The real data points that mean something to you in place and have them circulated, elevate this, roll up your insight in such a way that it's accessible to your C-suite as well. You will need layers after that, but start with that main one first. Otherwise, you'll end up having needs is where you're talking about social media engagement versus ROI. So now the social media engagement isn't critical, but start with understanding your ROI and attribution first. And then you've got operational alignment with this whole multitude of different technologies, different channels now. There's so much happening that you need to align all of your plans. You need to be so organized and you need to be able to mix and match these just so that you don't miss a beat. This is why you need a multi-operations person at the heart of your business that's really owning this and living and breathing those different doles of execution for you. In summary, agile, data-informed, automation, analytics, ops. There's a lot there in process operations. Again, don't forget it. It's the execution. And when we talk about our four piece of multi-technology, it's a perpetual cycle. It's not one and done. You're constantly learning, you're constantly improving from one P to the other. You're going to find that you're going to need more people. You're going to optimize your processes. You're going to need different platforms. Your plans are going to change year on year as new technology comes out as internal business goals change. In summary, make sure you plan. Make sure you align your plans with your business objectives and the customer journey. Order everything you do before you start looking at anything new. Visualize that roadmap of what you want to execute by understanding the core areas of opportunity. Don't forget about your people and teams. They're absolutely critical and they're so important. It's not easy to get this right. There isn't a perfect type of marketing technology function, but there are lots of different roles that you need to embrace. And you need to find different people that really understand this. You need to find people that love to learn, that will embrace change and rethink how these people mix and match together. Think holistically about your team, about how they match up. And don't forget that actually, when you think about people and teams, you think about consultancies and agencies. Bring that all together. Platforms, apps and ecosystems. Don't just go shopping. And don't skip the first two Ps before you get here. When you are here, visualize it against the customer journey. Make sure you understand what you have in place before you go anywhere near spending cash. Don't be afraid to retire technology people aren't using. Understand why people aren't using it. Map it all out. Understand that when you do go shopping, you need to do it properly. You need to understand your business goals, your core requirements, and do it methodically. And then you're into your process and operations. Commit to changing how marketing operates when you're in a market-enabled world. I've only got five minutes left. I couldn't talk about everything that's in our four Ps, but you can go to our site and you can find out a little bit more. Also, I'm here all day, so more than happy to chat at length in any of these areas. I appreciate this is intended to give you a very top level. If you want to go a lot deeper, a lot more technical, I'm more than happy to chat with you more. And if you want to find out more from me, drop me an email, tweet me, add me on LinkedIn, and then just a side point. I love books.  So I run a marketing technology book club, which is super fun, and I strongly recommend you sign up for that as well. Thank you so much. It's been an absolute pleasure. Thank you.


I cannot wish as someone else with an Oscar Mayer wiener. I will not cut the vault guards in on the hall instead of fighting them. 1980s breakdancing moves had their place, and front of the Vodassi Prince is not one of them. Just because I was paid in advance doesn't mean I can let the incompetent expedition leader die. There is a limit to how much in your window I can fit into one combat round. Even if it was just my character speaking, I will not claim Texas was stolen from Mexico. I will live longer that way. I cannot put noddens on speed dial. I will not attempt to clear out the dungeons using only Bangalore torpedoes. Picking his pocket means more than just turning him upside down and shaking him vigorously. I will not do anything that Bilbo Baggins hates. Even if I have enough putting silencers on my mini gun doesn't work. There is no such thing as a magic murder bag of holding. I will stop referring to the Eladrin as just an elf mock too.  I will not take a phobia of anything that doesn't exist in the game world. If I have an ability that lets me alter minor aspects of my appearance, that doesn't include girth. Add bulldozers to the list of things vampires are allergic to. Can't strangle a werewolf with a roll of Kodak film no matter what we all know it's made out of. In the middle of a black ops I will not use up all the claymores just because I don't want to take them back with me. I cannot have my mercy surgically removed. Even if I'm in charge I can't order the assault lance to perform Westside story dance routines. If given a holy avenger sword I can't melt it down and reforge into a weapon my paladin actually uses. Even if it still gives a combat bonus to everybody else I can't just stand there and read a common book behind the villain. In the middle of a black ops I can't call my girlfriend a reminder to pick up some Chinese on our way home. I will leave out mating rituals when presenting a cultural exchange with diplomatic ambassadors. Letting the red shirt guard the plane is really frowned upon as it doesn't leave anybody to sacrifice to the shogoths. Cannot start the campaign on fire. Cannot start all my skills at 89% just so I get massive sand boost early. I cannot rick roll people with any video that increases or mythos lore. I will refrain from casting dimension jump at magnificent mansion on every police box we pass. I cannot wish we were playing the previous edition of the game. Stomining a water elemental right above the fire elemental doesn't work. There will be no more debating how much XP Mr. Tumnus would be worth. I cannot be the bizarro version of another player. Nowhere in my barbarian description will I include the word jaunty. My eschew does not get bonus frequent fire miles automatically during character generation. Doesn't matter how big we make it, a pit trap isn't going to take out the terrasque. I have to go into the dungeon not just send in dozens of summoned creatures every morning. Fireballs don't have a non-lethal option. I will ponder this after I cast one at the guy we needed alive.  I will not use a portable hole to cheat at golf. In the middle of a black ops I will not look at the target's HR files to see if they have better benefits. I will not use the major staff of wizardry and lube a pull queue. Torturing the forest doesn't give me any XP for anything inside the forest. I cannot have any gun that lets me kill the villain without being at least in adjacent county. A second level commoner is not twice as common as the first level commoner. If we don't have a thief I can't call triple A to slim Jim the dungeon entry door. I will lick the rhodians in 10A and stick him to the wall while he sleeps. No matter how long his speech is my sniper will not shoot the speaker introduced in the target. During the side jump my neutral can't do mean things to the scions while they are tripping. I will not try to feed the Quinn extremely salty food to see if he melts. Our mission is to rescue the princess, not to bring sexy back. Even if given detailed instructions on page 50-51 can't take Cloud City on a joyride. I can't wish to change my vote on what module we're playing. Baseline is not an acceptable perform skill specialty. Dry Kreen does not have the flaw Obsession Pretty Lights. The party leader is not the one that looks best in a chainmail bikini. I can't make it rain before the invention of paper currency. If I make a cowboy with a young in flaw I can't name him Sue. If I don't have any points in medtech I can't try faith healing. We will not end every adventure with a public service announcement. If my character requires a GM to memorize the rules for siege warfare, he's vetoed. We can't trade the Ranger for a giant pirate or Padre. I am forbidden from using more than 10 source books to make one character. I will wait for the GM to finish this incredibly complicated riddle before answering correctly. I can't wish for somebody to publish the rules for gnomes or barge. The time machine is not for collecting autographs. I can stop rolling at seven times dead. I am forbidden from doing anything that makes a passerby flinch. If even the rules allow it I can't have my uneducated peasant start with every known language. If the rules contradict Isaac Newton, Newton wins.  My brooding costume vigilani can't take the flaw Dark Secret will adjust it to society. Despite overwhelming evidence of the contrary, Dick Clark is not Shemsu Heru. Even if I spend the points I can't take the USS Montana as an ally. My knight will not buy a Shetland pony just so he can use his lance underground. I will remember the spiked chain cheese monster is allergic to the improved Sunderfeet. I will stop asking NPCs how much XP they are worth. The seduction skill does not have a two hit on roll. No matter how well I make my bluff check, the Star Destroyer crew isn't going to believe I'm the new captain. Dressing up the wizard as the monk still won't stop monsters from appearing beside him and attacking him first. When asked what game we want the LARP, Frogger is not an option.  No one won't help if we put a silencer on the bazooka. When approached by a famous historical figure, I can assume he's a time traveler and not a zombie. Paladin is due to urinate. In the middle of a blackout my buttocks is forbidden from making contact with the target's copy machine. It's okay to feed the Ewoks after midnight. Flashbangs are not to be handed out to trick or treaters. A stagehand does not get a better sneak bonus than ninjas. I will not conga-line the pattern. Superpowers that are only useful to ART majors are vetoed. My last wish cannot be for a cage match between Cthulhu, Godzilla, Galactus, and the Tarask. I will avoid making wishes that locks the game in an infinite time loop. I will not go to FTL just to avoid the red lights. I will not min-max the appraised skill just to clean up on the price's right. Even if we cleared it out, we can't turn White Plume Mountain into a theme park. Even if the rules allow it, I can't put a spinal-mounted weapon on a bicycle. I cannot have a destroyed that requires me to take the ally advantage two dozen times just to crew it. Stan Lee does not have to make a cameo appearance in every single adventure.


So the next talk will be functional programming inside OOP. It's possible with Python by Carlos Bichavisensio. Hello, Carlos. How are you? Hey, good morning, or good afternoon. Good afternoon, Pierre. Where are you streaming from? Actually, I'm from Chile. Yes. Oh, nice. I'm from Argentina. Well, I'm from Ecuador, actually, but for some reasons I'm in Chile now. And how's the weather over there? Well, it's freezing cold, yeah. Oh, here we are a bit warm at least. Oh, right. Okay, I think we can add a presentation, and you can start when you are ready. Good luck. All right, so hello, everyone. Welcome to me talk about functional programming inside OOP. It's possible with Python. Here we're going to run into some concepts and facts about functional programming. And my goal is that you raise some curiosity about these topics and make the world a better place. And first of all, let me introduce myself. I've been a software engineer at Stack Builders for more than three years. Currently, I'm working on a project as one of the tech leads in Python and some React applications. Besides that, I collaborate with community engagement by organizing a Meetup and more events like last year's October Fest. Feel free to connect on LinkedIn and check out my past blog posts. In my personal life, I practice Kendo and Yaido, both Japanese martial arts and also a photography enthusiast and regularly post interesting pics on my Instagram account. But I don't consider myself a functional programming expert. I work with languages such as TypeScript, Ruby, Java, C and PHP in the past. I'm currently playing a bit with Clojure and Haskell. Stack Builders, there are a lot of Haskellers from whom I have learned a lot. We use also functional programming patterns in hybrid languages. For the record, I haven't used a for loop in a while, pun intended. And why functional programming? Okay, to me it has made my life easier. And let me explain some of the reasons. Compared with imperative programming, functional programming solves the problem in an easier and an efficient way like focusing on what rather than how, which is the declarative programming way. Divide and conquer by focusing on the implementation of smaller and testable pieces, also known as functions. Makes the debugger process easier, which takes 80% of the development time according to the recent memes and makes our code simpler, which compiles with the PEP20, the Zen of Python. And the code will be easier to test. And I will elaborate more on this at the end of the agenda. In a blog post from 2009, our friend Gidovan Rosum brought up about the origins of Python's functional features. Although he made functions first class objects in the first place, he didn't design Python as a functional programming language. However, due to its popularity, the users wanted to do more with lists and functions. So they started to implement their own map function and use a hacky way to build anonymous functions. Then in 1994, the higher-order function map filter and reduce were included in the standard library along with the lambda expressions. And naming variables, it's hard, right? So imagine naming expressions when building a programming language. The term lambda led to unintended consequences, causing the users to compare the syntax to other programming languages and raise more issues about the lack of advanced features in Python. List programmers can get a clear idea of this issue. Lambda expressions didn't have the reference to the outer scope, which was added in version 2.2. And from then, it remembers the references from the outer scope. Is that concept familiar to you? If you're thinking about closures, you're right. This is an essential feature of functional languages. Nowadays, fans of list comprehensions are larger than all higher-order function syntax and lambda expressions. And reduce was moved to the fun tools package. But it's still encouraged to study its syntax to learn how things work under the hood and the motivations behind them. As Gido said in this blog post, not having the choice streamlines the thought process. Am I already convincing you? Let's walk through the most important features of functional programming that I frequently use in Python. Take this example from Django source code from 13 years ago compared with the latest version. The implementation migrated from an imperative design using loops to comprehensions with mapping and filtering. An immutable object is an object whose state cannot be modified after it's created. Python managed the mutability of objects differently. Booleans, strings and integers are immutable objects. List and dictionary in the other side are mutable objects. And what's the benefit of having immutable objects? We have threat safety. No matter which threat is accessing the object, it is guaranteed to have the same state it originally had. Also, in OOP, we can have better encapsulation. We can trust that our objects won't change when passing them to other methods, and they can always be passed as reference. So we won't need to use complex techniques for copying objects. And since objects don't change, it's easy to track down the causes for some bugs, making our debugging process more efficient. Let's say that we implement a function that adds something to an object, an element to a list, and some integer to a value in the next example. So it is natural to think that after the execution of any of these functions, the value will be affected. That's true only for the one that manipulates the list, a mutable structure. If we inspect the ID, the identifier of the value, and the mutated object, we confirm that it is the initial object, the list. A different behavior happens for the function that manipulates the integer value. So let's print out some information. A different object is assigned to a value inside the function scope, and after we return, it didn't affect the original full value. Decorators. Probably many of you might be familiar with this feature, which adds some functionality to an existing function. This is also part of metaprogramming, because one part of the code is being modified by another at compile time, and the decorators were born because of the higher-order functions. Instead of creating a new function, we just create an existing function, executed and extended the implementation inside a new one. It is a function being called inside another function wrapper. In short, decorator uses closures. Let's see this example. We initially defined a function that increments the number plus one. Next, we defined a decorator, and returned the decorator inside the double increment, which applies the function of it, receives and does some extra logic. Finally, we can use this syntactic sugar with the add symbol to apply the decorator function. If we do some introspection in Python's compile code, we can still find our original function inside the closure object. Okay, let's move on into partial application. So this function is incredibly useful when we need to reduce the number of arguments that any function takes. Let's take a look at this example. So we have this function, getURL, that takes two arguments, the URL to be fetched and some user role. But instead of calling it with a repetitive role every time, we can simplify this as a new function with a known role, using the partial function. See these other useful examples. In this case, we define functions that will match strings against non-regular expressions. For instance, the animate matcher or URL matcher. Okay, lazy evaluation. So this is an evaluation strategy that holds the evaluation of an expression until the value is finally needed. This concept also prevents repetitive evaluations. The lazy evaluation was introduced for lambda calculus in 1971. With lazy evaluation, we can define infinite data structures and reduce the memory footprint because the values are created only when they are needed. In Python, we can make use of it by using generators. And what is a generator? Well, it's just a simple function with a yield operator. Then the execution will stop on that point and resume it whenever we need to generate a new value for the same function. Did you know that opening and reading each of a file's lines yields a generator too? In this example, the variable line is assigned from the lines of the generator F. Type annotations is one of my favorite features of Python. Last year, I presented an entire talk about the type annotations in Python. And to sum up, type annotations can help us to detect bugs at development time and increase the readability and maintainability of our code. Have you noticed that my code samples have type annotations? It's really hard for me to write code without types. I currently use this feature in a production project. And recently, it has become more popular among open source developers to provide type hints in their APIs. In our recent presentation, Github and Rosam said that the type annotations feature is still growing and it has learned some things from other languages such as TypeScript. The type checking tools are now easier to use and easier to integrate in your favorite editor. You have no excuses for not using them. You can take a screenshot of this slide and check out this article I wrote last year and my talk that I did last year about this entire topic. Structural pattern matching. This is a new feature from Python 3.10. I think there will be another talk in this conference about this topic while we follow it. But in short, if you have used C or JavaScript, maybe you are familiar with the switch statement. The difference is that it is used to compare between an object or expression and a literal. But Python's design is more a declarative approach that uses the type and the shape of the subject. Of course, it can match a literal, but it can also match patterns with values, classes, unpacking, nesting, and even we can use the if guards. See this example. Given a point which is too valuable, we can implement our match logic for the object 0, 0, 0, y, x, 0, x, y. Maybe we have two cases for the x, y, which is implemented with an if guard. And even we can use the underscore at the end, which is a value that doesn't match the above patterns. The underscore, for example, behaves as a wild card, and it is not the default case as other programming languages. You can use also as a part of a complex unpacking in this example. You can see that the last case is doing an unpacking of the receipt value. And the last one, well, it doesn't matter because it's a wild card. If it match, it prints this error occurred. So let's see another functional programming patterns. Let's start with Korean. Well, Korean transforms a function that takes many arguments into a function that accepts just one. And returns a function that takes fewer arguments. This is a key pattern of any functional programming languages. I won't go deeper into the details, since I'm not an expert in this field, but as a quick overview, I can say that besides styling preferences, it's a way to save some state inside pure functions. Have functions with partial arguments applied, and reduce expensive computations. This is like the, you can see in the slide, like the definition of Korean, the mathematical definition of Korean. But let's review a quick example. Let's start with this function that sums up just five values that received as an argument. We can convert this as a function that returns functions with partial applications of its arguments. Then at the end, we can have this C5 function that only takes one argument, and we can pass just one argument to every of the functions. What about having something like this, a decorator that is easy to use for, I don't know, undetermined number of functions? Okay, so please don't reinvent the wheel. In this section, I share our references in the slide, where there's a neat implementation of query as a Python decorator. There are also some other open source Python packages that implement this functionality in their libraries. Let's move on into composition. Remember that in Linux, we do something like this. You may know that the vertical bar operator is called pipe, and it gets the result of the previous execution and passes as an argument to the next one. So composition is a similar concept but with the reverse order of function executions. It allows you to build more sophisticated functions out of simpler ones in an easy and readable way. There are programming languages such as Haskell, where the composition is part of its core, and you can do something like this. Pretty easy, right? But there's no native way to do function composition in Python. So if you need to compose two functions, you can write something like this. But what if you have n functions? Then you can write a piece of code that looks like this. And what happened here? Well, we're using reduce with the same name that most functional programming languages name this function, fold, to iterate and accumulate the applications of a list of functions received into a single one. So we can use it like this. And let's say that we have three functions. For typical HTML tags, then we can build a new function with a composition of these three in order. There are more functional programming patterns that we can implement in Python. An interesting one is monad for error handling. This will make the presentation a bit longer, so I'll try to write something about this in the future. Oh, finally, let's talk a bit about testing. So code that is hard to test is not a good code. That is something that your aims wrote. So if you're using PDD, test-driven development, or WTA, write test after, you know that tests are an important part of our daily projects. Writing pure and small functions with no side effects simplifies a lot the complexity of writing tests. Our code will be comfortable, reusable, predictable, and easier to test. Using an imperative approach to write our tests, we need to do everything in all the steps and create mocks in order. Otherwise, the flow will explode. On the contrary, the clarity paradigm is stateless, and we don't need to care about the order of the big picture of our logic. Just test our isolated pure functions. There's another interesting quote about the moving parts of a code. Object orientation makes code understandable by encapsulating the moving parts. Functional programming makes code understandable by minimizing the moving parts. Michael Federer wrote this one. What are the moving parts? Here are the state mutations. We won't deal with them in functional programming as object orientation does by encapsulating them. And yes, we reached the end of our journey, none of the road. I hope that today you feel curious about these concepts related to functional programming and why they will make your life easier, at least your programmer's life. There are a lot of interesting features that Python offers in the Functools model. So please go check out the official documentation of this model and play a bit with them. As you can see, Python is something like a hybrid language. It is designed to be an object-oriented language, but with an interesting set of functional programming tools that you can use, mix, and improve the way you write your logic. And of course, learning pure functional languages will change your mindset in the long term. All the references are included in my presentation. As you can see, you can see this presentation and download it into my profile. And yes, if you have any questions, feedback, suggestions, feel free to reach out and connect. Thank you for your time and attention. Hello, Carlos. Thank you so much. Really nice. You're welcome. Okay, we have time for some questions. The first one is, have you used dry Python lambdas? Not. I think that there can be a Python package or library. I haven't used it in the past, but I'll go check it out. The next one, what would you like to see from other functional programming languages in Python? Well, as I said before, the type annotation system is pretty good, pretty useful for my experience at least. But there's a lot of room of improvement in this area. There are some things in other languages such as TypeScript, for example, or Haskell, where the defining types and the type system is a bit stronger, even though Python is a strongly typed language. Well, that, for example, and there are some other things that I talk about in my presentation, for example, curing, it will be great to have this unimplementation, a native implementation in the language. I've been playing a bit with Rust, and I find it quite interesting the ideas they propose. The next one, does functional programming concepts are more performant than regular loops? Well, that's a really hard to answer question because there is a lot of debate of performant for functional programming. Some people say that functional programming is not as performant as regular loops, for example. There are some benchmarks that prove that. But in the other hand, it depends also on the project. If your project doesn't rely on expensive computations, maybe you can sacrifice a bit of it in favor of readability of your code and maintainability in the learn room, it will be easier to extend the code that you have instead of having an imperative design. Okay, and the last one is, you can use both object programming and functional programming in Python. What's your opinion combining them in some way? Well, I think it's inevitable to combine them because, as I said before, Python design is object-oriented. Everything is an object in the language. It's impossible to just not use it. The project that I'm working on, we have classes, but it's data classes, for example, and some other object-oriented patterns. But we try to use the functional programming philosophy inside them. For example, creating methods as pure functions, easier to test, try not to depend too much on the state, things like that. Combining them, it's easier to test and it's better on the learn room. I would like to see maybe more expressive lambdas. Me too. That would be nice. Okay, for now, those are the questions. If there are more questions, we'll print to ask in the breakout room for Optimal, breakout one. And that's it. Thank you so much, Carlos, again. Thank you, Santiago, and thank you to the conference for the opportunity. Bye. Bye-bye.


Everybody forced here. I'm ripping 22 23 Donor's Optic basketball hobby six box half case number 33 Give me just a second. I'll read off the names and teams Blake H Pacers Brian C Kings Brian R Hornets Carlos F T Wolves Christopher J Hawks Celtics bowls nuggets Clippers Pelicans 76ers Sons and Raptors Daniel L Nets Derek K Wizards Harper magic H Lynn has the spurs in queue heat Jonathan a Mavericks Justin o Nicks Kang L Bucks Kevin B Lakers Ramon has the Cavaliers Robert P Blazers Scott M Rockets Sean H Jazz saying L pistons and Warriors Timothy H thunder Grizzlies. Good luck everybody. Let's go ahead and get started here Hey, brother. What's up, man? How you doing? What's up KJ? Welcome welcome everybody All right guys, what's everybody's favorite type of like birthday cake or chocolate cake or whatever Favorite type of cake Is that okay? I guess that counts right? She's cake counts guys, right? Right? Come on We're talking like not talking like cake with like flour not devil's food Devil's food cake. That's pretty good, too. It's pretty good. If it doesn't count like German chocolate cake pretty good stuff It's made right. Hello Dylan Brooks Grizzlies Okay, let's be careful dude a really good care cake is like top as like tops here Like store-bought care cake. No, but like yes, like you're saying whoo actual homemade care cake is So freaking good Josh Giddy to 99 on the elite series auto for the thunder See, I'm I go back and forth with German chocolate cake and carrot cake To yellow cake chocolate frosting that that's a great one, too. It's classic basketball Evan Mobley Cavaliers J. Alexander's was that holler ready Ricky Tyrese Martin Hawks?   I just I like sweets. I'm pretty much on board with most types of cake and desserts guys, so What is King's cake that sounds fantastic J. Nivey rated rookie Stargazing That's not weird though, you know, what's really good so Jake dude, um, you like lemon stuff calling sex and photon jazz the same thing has been So the last week of crumble not this week, but the past one they had a There's a hollow rainy threes Duncan Robinson heat.  It's fire halibut and carrot rated rookie with the with the ding in it next to his like face I cannot get the camera to focus on the card There we go. Yeah, I'll send a box wrapper with the magic spot Danish I'm gonna have to get Jay Alexander's carrot cake then hollow Jared Allen calves Jayden Hardy rated rookie black velocity cam reddish blazers to 39 Halloween pretty simons blazers surprised no one has said, um, red velvet cake A good red velvet cake is pretty good, too Jeremy Sohan rated rookie spurs Like if it's soft enough like like moist enough I guess pretty good Tight I washed in all stars will roll the dye here. This one is spurs. I know I know We're gonna roll a dye though one two three left four five six right for the whole case unless there's a gold or lower We'll random instead. Yeah, I know this one goes spurs So we go to left side for the whole break Let's say, uh, a gold or lower will random instead Hello, jimmy butler elite dominators for the heat or sorry, jimmy butler Benedict matherin Orange Zire Williams grizzlies to 199. Is it the same j alexander illegal? You that you mean you j alexander's is jason alexander's All right, then i'm in shame. I'll have to get some start gazing hollow nicola yokich for the nugs basketball wiseman pistons hollow dremond green warriors the rookies jaden ivy for the pistons hollow lucas ontage mavericks now orange john wall clippers to 199 Orange to 199 lorry market and jazz Lights out hollow nicola yokich nuggets For a lot of the big hits. I mean, it's it's just like any other prism or select. It's kind of the along the same lines I was looking for parallels And it can be tough at times hollow jordan clarkson jazz I didn't mean for under 400 bucks. It's pretty solid pink velocity tj warren suns number 279 Uh, nope, no triple logo man today. Haven't gotten a flawless yet. Hello gary harris magic the francisco alvarez super fracture What else do we pour? Who's bobby scatch dylan terry to 25 black pan dora rated rookie autos for the bowls That's sick color match on the black. I mean people will definitely buy optic to get the parallels The chase is rated rookie autos and rated rookie parallels. That's the chase gilliam houston lime green buddy healed pacers number two 149 got hollow rated rookie nicola yokich for the heat chat gpt Oh, yeah, you gotta do that illegal Steve buscemi daniel de vito nathan lane nathan lane. It would have been weird They all would have been weird but Steve buscemi andrew nemard rated rookie johnny davis now wizards rated rookie base auto There you go wizards solid Chris ruckus castanza. Did that be crabby actually crazy? rated rookie chat homegrown thunder basketball rated rookie shade on sharp blazers. That's a really nice one Hollow rated rookie bucks marjan bochamp break starting heat up a bit You know j-dub rated rookie for the thunder The rookies hollow chat home grinder for the thunder Gold pitchers dual going on walker kessel rated rookie jazz another photon this time is chat homegrown I'll get that one magged for you thunder rated rookie chat home grin photon short print timothy there you go There he is Double heating up in this on this break here hollow step curry warriors Jabari Smith junior rated rookie for houston Oh, no Hollow josh Richardson pelicans. Oh, no Oh, no, I just saw it in the chat stuff that thunder Jabari walker basketball dfs nets And I mean chat cards are already like high like the expectation is still there true green scotty pip in jr. Lakers rated rookie numbered five of five Good stuff lakers true green rated rookie scotty pip in jr Good break good three boxes so far Only three Yeah, I think I think chat's gonna be pretty good. They don't have another high pick again So it's pretty much sga and then The other guys that they got are gonna have to kind of like, you know, giddy's obviously very good I think chat has high expectations, but you got to figure out how it works basketball jalen green batt for the rockets hollow davis and dirk And that went left, right? That goes to the davis side. I think it's a pelican there hollow alex caruso bowls All right, jay. How about this one? Do you go into a candy store? You can only buy one thing. What are you buying? It's our e-sand a red rated rookie josh minot tea wolves to 99 one item Or one like type of thing. I guess like you can only buy jelly beans or like Chocolate covered almonds.  I mean hollow. You notice valentine's for the pelicans You're gonna get the the paper dot things That's the worst that's the worst candy ever definitely not is that uh They have for first next year So 2024 right so they got to trade them right right lane iverson and carter Dude the the tahin peach rings that sounds legendary. Love peach rings. Love tahin shade on shark I think they're I think they're making people eat paper hollow market and jazz jaylen doran rated rookie pistons basketball kevin love cavaliers hollow air gordon clippers I was gonna say you can't get that anywhere Candy store only kennel brown blue bucks yana something kumpo number 249 Giannis That hueson pick that's a nice one is how to protect it. Does the hueson have that protected? Malachi brand and rated rookie spurs are they lime green lewdort thunder? 249 Entered the dorsher chamber Osha agbaji rated rookie utah All right, everybody See spots later this week coming in we still have cosmic at 18.  Hopefully you got red xire williams to 99 grizzlies. Yeah, sure too clippers could really uh Really be sol hollow marcus smart celtics Wesley lights out red jason tatum celtics That will look insane in a green parallel. So 99 there That will look insane And hollow xire williams The maniac that's a good episode the whole monitor one c-bear one is good. What was the other one I saw? Yeah, dude crab crabby land is a good one or crusty like crabby land or whatever the rookies palo ben caro david roddy grizzlies rated rookie base auto the dal jail and durin pink velocity rated rookie Detroit great card 27 of 79 that mag pink velocity is sick Sign on hollow rated rookie aug bhaji for the jazz. It's a nice one Magick are going to trade up for women. Yum. I just know it Hollow dominator suns kevin durant orange kairi mavericks to 199. I guess think kairi goes to the lakers It'll probably happen, right? It'll it'll probably happen hollow cunning ham pistons cunning ham black forest ham west ham Well, honey glazed ham honey baked ham hollow chamber for the third pelicans Jade and ivy rated rookie and a pink velocity behind it. We're stuck here It's gordon hayward to 79 for the hornets Yeah, the gm. We'll have to see That's his last chance to uh win with the lakers right before he has to go where brawny goes Got a lime green to 149 baggley for the pistons What if what if brawny goes like the hornet the hornets and the brawn's like I ain't going there Sorry brawny very possible. Sorry brawny. I ain't going there Ready threes hollow the mellow ball hornets I don't know.  So like what happens there then Like they're a they're a good team like they're fine They got them. They got to make some sort of move, right? Maybe they'll go up like van vleet or something All right, everybody lights out hollow cake cutting and pistons. We've got sunday funding football mixer and tops cosmic chrome baseball Both of those are still in double digits spots to go those last two breaks of the night. Let's get them filled up rated rookie jade and hardy Let's get them filled hollow malik bezley lakers red dairies garland the cavaliers numbered to 99 hollow beel wizards orange clay to 199 warriors halibut and caro rated rookie base for the magic pink velocity garland cavaliers to 79 lake westley dominators rookie autotan 99 san antonio Yeah, I agree with that ramars tie tie line green simons to 149 for portland hollow nice jail and uran rated rookie pistons Good break for the pistons had the uh hollow and pink velocity duran Benedict the matherin hollow stargazing tatum celtics Jeremy sohan rated rookie spurs and orange kominga to 199 warriors hollow tatum celtics keegan murray rated ricky kings and a red Nice stef and shrey goes left side warriors to 99 and a hollow maxtress heat Here's a link for cosmic Hurry up basketball shade on sharp rated rookie orange max christie red josh minot Blue yannis to 49 green five scotty pippin jr lakers Autos we had redemption pacers andrew nemard rated rookie auto giddy to 99 thunder nice giddy david roddy johnny davis to 99 dominators blake westley spurs and a black pandora to 25 dylan terry bulls rated rookie Signature there Pink velocity rated ricky jail and duran for the pistons to 79 This one is 27 of 79 and rated rookie Photon chad holmgren thundershore print. Thanks again everybody. We're moving on to more optics