Java Design Patterns Revisited through a Functional Lens with Daniel Hinojosa

Estimated read time: 1:20

    Summary

    This engaging presentation by Daniel Hinojosa explores Java design patterns revisited through a functional lens. Hinojosa starts by introducing useful tools for Java developers, followed by a deep dive into various design patterns. He covers how Java patterns like Factory, Builder, and Observer have evolved with functional programming. The discussion extends to modern alternatives using concepts like monads and lambdas to simplify and enhance traditional patterns. Through humorous anecdotes and practical demonstrations, Hinojosa illustrates the shift towards functional programming in Java, offering insights into how these paradigms can improve software design.

      Highlights

      • Daniel introduces Java Almanac and MCS as essential tools for Java developers, simplifying access to APIs and Maven dependencies. ⚙️
      • Static factory methods are examined, highlighting their role in improving Java object creation patterns. 🏗️
      • The session explores how lambdas and functional programming provide elegant solutions to traditional design patterns like the Builder and Singleton. 📏
      • Detailed exploration of the Builder pattern shows its evolution with immutability and functional constructs like curring. 🔨
      • A clear explanation of functors and monads demystifies their utilization in Java, making advanced programming concepts accessible. 📚

      Key Takeaways

      • Design patterns in Java can be revitalized using functional programming concepts like lambdas and monads, simplifying traditional approaches. 💡
      • Static Factory methods and suppliers are modern solutions for creating objects without the complexity of classes. 🏭
      • The Builder pattern remains a staple, but modern adaptations using immutability and functions like curring are emerging. 🚀
      • Singletons are less prevalent now but remain useful with frameworks like Spring Boot, often implemented as single-use objects. 🔄
      • Functors and monads, especially through Java's optional and stream APIs, are powerful tools in functional programming, offering more flexible data handling. 🔁

      Overview

      Daniel Hinojosa's session kicked off with an introduction to Java tools that enhance ease of development and manage dependencies more effectively. By showcasing tools like Java Almanac and MCS, Daniel provided valuable resources for developers to streamline their workflow and quickly access relevant documentation and dependencies.

        The talk progressed into a robust exploration of Java's design patterns from a traditional perspective towards a more modern, functional approach. Daniel tackled patterns like Factory and Builder, emphasizing the efficiency of static methods and the power of immutability in today's programming landscape. His insight into using lambdas to simplify these patterns was a highlight.

          In the latter half, Daniel brought clarity to more advanced concepts such as functors and monads, using Java’s optional and stream APIs to illustrate their practical application. These discussions were enriched with real-world examples and humor, helping the audience grasp the shift in programming paradigms and envision new ways to address common software design challenges.

            Chapters

            • 00:00 - 17:00: Introduction and Tools Overview The chapter begins with a greeting and an introduction to a session or meeting. The speaker welcomes the audience and emphasizes the importance of starting on time due to the extensive presentation planned by a person named Daniel. The presentation is expected to last between one to one and a half hours. The speaker also mentions a humorous remark about wanting to go home early, indicating a casual and friendly tone. The anticipation for an engaging and 'great' session is highlighted.
            • 17:00 - 37:00: Static Factory and Builder Patterns The chapter discusses the collaboration and partnership between different tech user groups, including the Chicago Java Users Group, Chicago Kotlin Users Group, and others. The leader of the second group, John Burns, is delayed at work but is expected to join soon. The introduction sets the scene for a discussion on collaborative efforts in the tech community.
            • 37:00 - 61:00: Singleton, Functor, and Monad Patterns The chapter introduces a special event being held in collaboration with the Virtual Java User Group. The focus of the event is on Java design patterns, specifically the Singleton, Functor, and Monad patterns, as revisited through a functional programming perspective. The speaker for the event is Daniel Inoshos.
            • 61:00 - 100:00: Reactive, Adapter, and Decorator Patterns The chapter introduces the concepts of Reactive, Adapter, and Decorator Patterns in software design. It discusses the structure and purpose of each pattern, illustrating their importance in creating flexible, efficient, and maintainable code. The section begins by mentioning a group that hosts global speakers, emphasizing virtual collaboration. It serves as a segue into explaining how these design patterns enable similar collaborations in software, enhancing interoperability and functionality through adaptation and decoration methods.
            • 100:00 - 151:00: State and Interpreter Patterns The chapter discusses the State and Interpreter design patterns, with a focus on practical applications and examples. Specific attention is given to the challenges of implementing these patterns, especially when dealing with various operational contexts like different time zones. The narrative suggests a team environment where everyone is contributing, with Sam being highlighted for her effort and flexibility in adapting to late-night sessions due to time zone differences. This underscores the collaborative nature of software development and pattern implementation.
            • 151:00 - 184:00: Discussion and Q&A The chapter titled 'Discussion and Q&A' covers the following points: The speaker mentions that they will be sharing a link to a slide on their YouTube channel for those who miss it. The link can also be accessed via the Virtual J YouTube channel. Before starting the discussion, the speaker announces the giveaways for the day, including two Jet Brains licenses that will be raffled off at the end of the presentation and Q&A session, with an additional special offer for the evening.

            Java Design Patterns Revisited through a Functional Lens with Daniel Hinojosa Transcription

            • 00:00 - 00:30 hello ni yeah welcome everybody to C tonight yeah we try to start on time so because um Daniel will have a full presentation and could go over an hour to like an hour and a half so we want to make sure we start three hours well you're in I want to go home that's right anyway but it should be great we're so happy happy to have
            • 00:30 - 01:00 Daniel here today so yeah so is it all good um J yeah we make sure our video we're on live stream Okay cool so um first of all welcome welcome again and to tonight we're actually also partnering with besides Chicago Java users group we also have Chicago cotland users group and John Burns uh he's the leader of the seock uh he actually got a bit delayed at work at gral and he's on his way too but otherwise too yeah we've been like collaborating a lot to to to
            • 01:00 - 01:30 do events so tonight is one of those nights and plus we have special also uh group to be with us which is the virtual Java user script and I'll show you in a second so tonight we'll have Daniel uh inos hos let me make sure I say it correctly we go um talking about Java design patterns Revisited through a functional lens so let me go ahead with just some uh housekeeping but first I wanted to welcome again the V virtual Java users
            • 01:30 - 02:00 group and they are a virtual presence but they actually uh the folks who run the group they are based in London too if you're familiar with them and maybe you are you're already member of of them as well they are really cool having speakers from all over the world too so we have a warm welcome tonight uh to our Java friends from around the world so if you're on virtual ju welcome welcome this is the first time we're trying it out with CJ and Sam I wanted to thank
            • 02:00 - 02:30 you especially Sam over there and Kim too but Sam is the one who's staying up late tonight because as you know in London it's like past midnight now and she said now no problem I can switch you know switch the turn the switch on but I think later she's going to give us the key so she doesn't need to stay out but for the first time she said she wants to stay up so thank you Sam um so okay so tonight if if anybody is here if you're watching too if you have problems we also have therefore have the signal cast to the virtual jug uh link to so if you
            • 02:30 - 03:00 kind of take a look at this and I'll be sharing on the on the uh on our YouTube channel the link um to this slide that so if you miss it um you can get access to the YouTube link um virtual J jug or if you go to Virtual J YouTube channel you'll find the link as well okay before we start I just want to give you the goodies which is today's ravels normally we have two jet brings licenses that we're rling off at the end right after the presentation after the Q&A and T tonight we have one special
            • 03:00 - 03:30 one and that's why that's also the one purpose of tonight's talk is also to introduce to you or kind of remind you there will be the resuming I guess of okay of the no just stuff great lak software Symposium is a mouthful and as if you're familiar with the nolff series they are really great they have speakers for example like Daniel fanat and uh Josh and I think a bunch of really great speakers too and this year I'm very fortunate to be invited to speak put
            • 03:30 - 04:00 there for the first time so it will be on May 16th and 17th so if you want to check out not off just stuff and um Jay who's the um owner of this conference series he has donated one free admission ticket and to be raveling off at today's Meetup too so please stay you know towards the end if you're interested in participating um in that Ravel uh but I do have to say though for folks who are not in Chicago then you you won't be eligible for
            • 04:00 - 04:30 unless you know you'll be in Chicago we only offer to folks who will be in Chicago and can attend that um conference to wonder yeah and then this is how you enter if you haven't already done so the QR code also the bitly link if you're interested in entering essentially three things to be ring of okay okay just now the housekeeping um just remember uh two we have the Chicago Tech swack if you haven't already joined that is a Chicago area that kind of
            • 04:30 - 05:00 invited everybody to not just Chicago folks but you can join that uh slack uh yeah Channel and then also the Java off keep run by um Freddy G and also uh Bob who's still helping us uh at times too with with the CJ too um it's very popular uh podcast if you're not uh aware of it yet and then we are also on meetup.com if you haven't already signed up with us and we are also on uh x uh actually Twitter the old Twitter and that's our
            • 05:00 - 05:30 handle there actually I need to also update we're also we also have math student too I I'll update you next time I always forget about that okay and then we are now also on Discord if you haven't already joined us there and would like to join us and that's our Discord link and also for tonight too we create every time when we have a meet up we we would create an special room so then it can facilitate your conversation with the speaker too so if you have questions and things related to the meet up you can always find a room that's
            • 05:30 - 06:00 created for the meet up so tonight's room is the one here listed below uh by date and by title of this talk of this presentation too and then Community info wanted to remind you if you plan to go to uh Europe to Germany um in May uh jcon which is a very popular Java developer conference and now expanding to many different topic areas too uh they will be celebrating the 10th anniversary of Jon and also Java is 30
            • 06:00 - 06:30 30 years 30 years old this year so it'll be a special one to this uh in May so if you're interested let me know because all drug members will get in for free too you get free tickets to go but of course then you have to make your own travel Arrangement too um and then we also are Community uh partner with jet brain so that they donate every month they would donate like to uh free licenses for us to graffle off the ultimate license and then uh also we are
            • 06:30 - 07:00 partner with the defit jobs. US they are online recruiting U opportunities if you're interested in signing up with them okay and some upcoming events so in March uh right now we're still actually waiting to hear the confirmation of the location uh but otherwise said March 12 we'll be having prti Patel and he's the VP of developer advocacy at AO he'll be here and then we also have a special guest Mo haiki and some folks are from disc
            • 07:00 - 07:30 John in here so Mo uh and John is working with Mo so Mo will be here to doing a short lightning talk as well he just recently moved to Chicago from London so we want to welcome him here and then uh in April we'll have jison Baines who is also in here he has his own startup company called inverin did I pronounce it correctly inverin yeah so yeah he's running his startup company and he'll be doing a park in April and then in May uh on the 13th we'll have a speaker from temporo they are the company that makes um you may be aware
            • 07:30 - 08:00 their spin-off sort of startup from Uber um and they do some very cool like workflow kind of streaming systems too so and then in June I'm planning to do a lightning talk so if you're interested in speaking I'd like to invite all of you to submit your proposals too and we try to accept everybody's proposals and as long as you keep your talk short then we can have more speakers too um and other confirmed speakers we have Alina yurinko from the grvm team but she was going to be here but then she cannot uh
            • 08:00 - 08:30 various reasons she cannot uh be here she'll be in the US but cannot stop in Chicago but she's going to find another opportunity to come and then Josie pamal who's also an oracle Java developer Advocate um he'd be able to maybe do a virtual presentation and then also Garett Grunwald from Germany and he works for aul he'll be here in September and then we're still planning um an un Meetup like an conference style Meetup so if you're interested um please let me know I'm trying to see if folks are
            • 08:30 - 09:00 interested and we can organ organize one oh cool yeah M thank you yeah I'll remember cool and uh now just some more event information Java 1 will be on March 18th to 20th in Redwood chores California that's the link to the event and then J member will get a discount of $100 off but not um available for public sector take it uh but this is the the uh the code for it too if you're interested and then great lake software Symposium
            • 09:00 - 09:30 again will be May uh May 16th to 17th in Chicago and brought to us by the nolu just of people and so this is the link to their event and we have a $100 Chicago jug discount this is the promo promo code in here and uh there are also group discounts available too so say for example I think Alexander your whole team is here so you can consider getting a group ticket discount um yeah so that would be cool and today again we'll have the special raffel for one free ticket
            • 09:30 - 10:00 um at the end to the Great Lakes software Symposium okay if you're interested in speaking at CJ please send us email at present at c.org and if you are seeking uh for looking for jobs or if you are trying to hire people uh this is a group that we've created on LinkedIn where you can communicate with one another too okay now we go to the next section which is just introduce our sponsor again and thank them NE 4J is our go
            • 10:00 - 10:30 sponsor uh for until June this year and then actually there will be another raffle too if you're interested NE 4J always runs like a monthly um Ravel too and they will be raveling off something like a drone for example this I think this month too will be a mini SE drone as well um they usually do that or maybe a slightly different model so if you're interested you can do that and then they will be running their Ravel at their office and they will notify if you're the winner so
            • 10:30 - 11:00 okay and if you miss it let me know I'll share with you the SL act and here too tonight we have our venue host thank you so much again to David gard and where's David David I think stepped out so yes David was here earlier but if you if you see him you can thank him too um he's the one that helps us with cooking this room so thank you and thanks to Microsoft and also our friends of CJ um you know we are really friends with all the jug communities all throughout the world but in particular the Atlanta jug
            • 11:00 - 11:30 Boston Java user ACM chapter Garden State jug in New Jersey Kansas City jug New York City Java s the oldest jug in the US and Pittsburgh jug Portland Java users group and now also the virtual Java users group as well so again welcome folks on the virtual Java users group uh and let me go to the next slide which is to introduce our special speaker today from Land of Enchantment anybody knows where he's from land of enchantment Walter White's uh City ah
            • 11:30 - 12:00 okay if you're if you're into that yeah so yeah alquerque yeah yeah thank you good so yeah welcome Daniel Daniel is an independent software professional and a deeply experienced s self-employed consultant and developer providing Solutions through private education and government entity since 1999 and he's also a teacher who teaches development and also an international keeper since the early 99s um he's also
            • 12:00 - 12:30 a co-founder of the Alber berky uh Java users group and Specialties in all these things as you can see in here I need to update that I don't know where you got that one but yeah those are some older texts there J2 that's right sign off to change it's on your LinkedIn oh I need to update that one then all right all right cool sorry but so all the others Technologies too but I'm sure there there are actually many more to all right excellent thank you thank you so the stage is
            • 12:30 - 13:00 yours all right thank you very much Mary appreciate it you thank you all right uh yeah can you hear me okay like all right uh just wanted to mention that also for no fluff just stuff there's Uber comp in Denver I think Mary will be speaking there that'll be July 15th through 18th uh and you could save 250 uh if you register by uh March 31st uh also um I do stuff uh for aul as well
            • 13:00 - 13:30 I'm not an employee with him but if you're uh interested in any kind of jvms that are uh less costly than uh the Big O uh come talk to me and uh more than happy to fill you in on that uh as well uh let's see I think that was it as far as the announcements let's go and uh let's go and Dive Right In I want to start off with a couple of items first just to make sure that uh you know about them uh one of them is is Java Almanac
            • 13:30 - 14:00 anybody know about Java Almanac and use it on a day-to-day basis all right great anyway let's take a look here Java almanac.com [Music] for all you oldtimers let's go back to Memory Lane right over here and uh uh
            • 14:00 - 14:30 what these usually have is uh you can click on any of the versions here uh and take a look at it but what I was going to mention is for some of the old-timers here uh that if you take a look at you know some of this is this is what the uh API used to look like in Java look at that and right here I don't know if I could magnify look at that old font there yeah so beautiful yeah so um but um you know you see LTS
            • 14:30 - 15:00 EOL and by the way again LTS uh is uh the long-term support but that's usually based on your vendor on uh how that long-term support is going to be used but for every version here you can see you have the API the language specification the VM specification any notes uh where to download the jdk where to download the JRE because let me ask you this if you ever wanted to look up the API what do you usually do right you just go to Google and say API Java API
            • 15:00 - 15:30 like and sometimes you'll get like jdk8 when you're working on 21 you're like ah what is going on here uh so what I like about this is that you can get to wherever you need to right away like hey I'm using Java 21 let me go to the API right away and then I am good to go right and I love that but what I also love is this right over here this Matrix so I can compare hey what's different between Java 21 and Java 17 right common
            • 15:30 - 16:00 question on there so this would have like a nice little diff of you know what was added what was removed what was deprecated uh things like that so just want to make sure that you always have this one bookmarked I think it's a wonderful Java resource that uh you can use uh the other item is uh the following uh let me CD over here how many of you know about MCS as a tool okay we got one nod yay
            • 16:00 - 16:30 one nod anyway so MCS is a wonderful tool that you could install with SDK man or you know just go look for it it's MCS uh Maven Central search so when you want to look for a particular dependency like how do you do it right do you go to search. go looking for a dependency usually that
            • 16:30 - 17:00 way I think you really dig this tool here it's MCS search and uh let me do a spring core for example here and so you know let's say I want to look for that dependency I could do an MCS search and see how cool that is it's just right there on the terminal now what I'm going to do is you know what maybe I don't want to use 7.0.0 M2 I don't trust that one quite yet uh so let me go ahead and highlight this I'll go and copy that and let me do
            • 17:00 - 17:30 another MCS search here MCS uh search but now let me give it a gav in here with the group ID and uh that and now I get to see other versions in here so let's say you know what I like that one maybe I like that one right over here so let me go and grab this one uh MCS uh search and I'll bring that one back up here and there we go and now I get a specific version and it ran into an error okay
            • 17:30 - 18:00 excellent oh yeah there we go uh let's do that again and MCS search there we go and there it is and I could also you know you just take that and uh you could probably do I don't know if you could do that I was GNA thinking like hey you could pipe that to PB copy or xdg copy but all in all I think is that's really cool right because you don't have to go like looking and rifling through uh web pages
            • 18:00 - 18:30 just to get whatever it is okay so just thought I'd drop a couple of those in there so that way uh some nice tools uh that you could use now this right over here I have this is actually part of a full class and I'm not going to go through all the the slides in here so what I ended up doing is uh ended up just uh creating a little list in here of things that I'd find uh really interesting for us to talk about uh in this uh particular uh section in here um and I'm going to
            • 18:30 - 19:00 start off here with uh factories uh for uh one item about factories is for many years when we create factories and I think uh Java has this bad rep that everything is a factory oh you do Java so everything's a factory of a factory of of a factory of a factory of a factory um but uh the thing about factories is um I think they're important right they're
            • 19:00 - 19:30 uh I need something I need it created it I need it lazy you know that's the idea of a factory I think in the old days we did like a class and we had like one method that says create something and we would get something out of it uh one thing that I think uh is you know kind of like the way we do things now is that we do lambdas right uh A supplier if you ever did a supplier in Java I think most of you have done so ready A supplier is
            • 19:30 - 20:00 a factory right you get um something out of nothing and you create something out of it right that's that's already the factory that's the easiest way to create a factory so uh functions have really lightened the load for that we don't have to create classes upon classes upon classes of like factories these can just be done uh using a Lambda um but one of the other things that is coming out now is um well for one let start start here with static Factory so we take a look at
            • 20:00 - 20:30 um the uh shoot what is the name of that book Java um the one where they oh let me see over here give me a second here brain just decided uh let's go take a little bit of a trip here uh the static Factory pattern Josh block yeah there we go Effective Java Third Edition yeah uh so in Java third Edition he talks about uh
            • 20:30 - 21:00 the static Factory and the static Factory is the idea of uh you are able to create a static method which is how you would create things right you wouldn't use necessarily uh the Constructor for that and uh like something like this date from uh from an instant right that's the static Factor you have like meaningful names as part of it and that's really one of the cool things about it value of like big uh big integer value of is that's the uh static uh Factory that we
            • 21:00 - 21:30 have there we're creating something for big integer out of a meaningful method and so we've kind of um you know embraced this here's another example here uh stack walker. getet instance from this and another way that we can create a factory for that uh new type you can have some like files new buffered reader so in the Java you know world now we kind of do this in order to create objects this is also a factory uh as well so um that works
            • 21:30 - 22:00 out uh really well uh for what we are doing but uh also there's this new one as well let me show you another website that I think uh you will uh need as well this one's the Jep so if you go to let me highlight this one and here we go open jdk dog uh JS uh zero this is the Java enhancement uh proposal uh known as JS uh j0 is um
            • 22:00 - 22:30 you know just what the je is but if you ever want to know what's coming up and what's new in Java this has it all right this is the website that you would need to go to uh and uh if we take a look here we have inflight jeps we have submitted JS and draft JS there's a big list here uh but but when you come in right over here these are the delivered
            • 22:30 - 23:00 features right and we could take a look at this list here structure concurrency all this good stuff linking runtime images so on so forth Vector API scope values uh but one of them on here is this one I don't know if you've seen this one this one's called uh flexible Constructor bots so one of the cool things that we are going to be able to do now possibly as a pattern is uh the following Let's uh scroll down over here
            • 23:00 - 23:30 well one of the reasons why we do have these uh static methods is because something like this right if I did this as a Constructor I would have to have like a super call right the rule for Java is if I am using a Constructor I have to call Super first right to call up the chain uh but there's there's a little bit of a load there right because if we take a look at this one right over here we have value if value is less than zero
            • 23:30 - 24:00 then uh we'll throw a new legal argument exception this right here is a invariant right it's a rule I I need this rule obeyed and I don't want to you know call up the chain all the way up right and so what they're going to be doing now and so this talks about all the different ways that uh they can go about it but what they're aiming for here here is something like
            • 24:00 - 24:30 this okay and I think this would be official on jdk 24 so that way we could just call hey let's check the invariant first and then we could call Super afterwards so the one of the reasons why we did the static method Factory you know the way we did is because we have these invariant right we didn't want to call up the stack plus other reasons as well uh so look forward to that as a particular pattern as well okay uh let's
            • 24:30 - 25:00 go on to Builder Ye Old Builder pattern friend of mine um uh James award says I really really dislike the Builder pattern I'm like wow interesting um I think a builder pattern uh it is a creational pattern uh very much like the static Factory and the factories uh but the uh Builder pattern kind of gets a bad rep I think as well but uh highly
            • 25:00 - 25:30 useful uh I think the Builder pattern is not going to go away either uh I think it is here to stay although how you go about doing it uh that may change um and it's already changed a little bit now so let's take a look uh a little bit at the uh Builder pattern and uh wherever my intellig went where are you intellig let's see there's that one here okay give me a
            • 25:30 - 26:00 second of course during a presentation intellig decides to take a low vacation hey there it is not responding stand by okay uh I will I will ignore for now let's try it again and ultimate there we stand by ought to be
            • 26:00 - 26:30 here pretty quick yeah and there we go uh so let's talk about the Builder pattern and um let's see we have a couple of them here uh for the uh Builder pattern give me a second here all right there we go so uh we are back uh let's see so uh one of the items for the uh Builder p pattern uh is uh
            • 26:30 - 27:00 the uh following so uh here's an example of one and by the way take a look at this date uh this uh this presentation is a work in progress I did this presentation of the Albuquerque Java user group on May 29th 2012 W all right yeah uh so this is the classic pattern that I presented uh that day and you're probably aware of this uh pattern as it is uh this one is an espresso drink uh that I wrote a long time ago uh I
            • 27:00 - 27:30 decided to start up the Builder with ADD shots uh where you would add the shots for the espresso and uh this would return the uh Builder and here's the Builder right over here okay uh the Builder would just carry along this would just be an object that would carry along the state uh what's really great about the Builder pattern is that you can call it in any order that you would like uh when you use it uh and if I over here for the Barista this is what it
            • 27:30 - 28:00 would look like right and I think we're all familiar with the builder pattern the old classic style Builder pattern uh so this is the way you can call it right and that's the benefit of using a builder pattern I'm able to say uh espresso drink add shots uh set it to decaf uh again if I wanted to I could move that line up and I shouldn't get a red line on it yeah there it is and that's really one of the cool Parts about uh that particular Builder pth okay um but a couple of items that I think
            • 28:00 - 28:30 probably hasn't really stood the test of time I guess uh it would be the uh Builder itself uh would return a this uh the Builder pattern would also mutate right and that's the other thing here I think most um most of us now have gone into like an immutable style uh development so I think this part is kind of uh not use quite as much anymore I
            • 28:30 - 29:00 don't know if I'm correct on that one but this is the classic pattern and generally what we do at the end of uh everything is that we call a build uh the purpose of this and the reason why you want to bring this one up is because you don't want uh a Constructor that is right you know 15 elements long or anything like that you want uh the ability to pick and choose how you wish to construct things uh so that's one way to go about it uh but let's take a look at a functional way to go about it and
            • 29:00 - 29:30 this one here would be the uh functional Builder now I'm not advocating this is a solution uh just because it is really noisy but maybe something to look out for and maybe something to look out for when it comes to the future of java and let's take a look at this one this one's called curring so curring uh in functional programming languages is making a down payment on an argument it's not necessarily a builder but I think it is a kind of a cousin or Ain to the Builder
            • 29:30 - 30:00 pattern in that it is a creational pattern and you're doing you know bits and bits and bits you're paying down payments on it so what is the down payment here this is a little bit verbose here and again I'm not necessarily advocating it just because uh I don't think Java's quite there yet uh but the idea for this is hey if you give me a string which will represent the first name then what I'll do is I'll return a function back to you and given that function if I give
            • 30:00 - 30:30 that a string then I'll return another function and if I provide that a string then I will provide the construction on here downside or disadvantage on this one is you have to go in order right so first name uh Etc but you get a function and one of the things you find about functions is that you can carry over that state so in other words if you plug something into a function it kind of holds on to that state which is kind of
            • 30:30 - 31:00 like a neat little thing about a function and when you get that object backed then you could do something else with it so you could essentially do kind of like a forking let's take a look at that so um let's say I have this uh record uh person here with a first name middle name last name and right over here what I'm going to do is I'm going to apply the function one round and I'm going to say Thomas well that's going to return a function that returns a
            • 31:00 - 31:30 function right now let's say after applying the first name I'm going to apply the name Falco to it well that returns another function now I'm going to take that function remember it's holding on to the state every time I apply to this and then what I'm going to do is apply a last name to that uh which will be Dolby and then finally I'm going to get the person out okay so making down payments along the way but what's really cool about this and what I like about functions is let's say this applying
            • 31:30 - 32:00 first name which is this reference right over here if I apply uh and so after applying the first name this is already Thomas and this is already a function that is holding on to the name Thomas well right after Thomas I'm going to apply Rogers and Stevie so if I run this maybe uh then we should see the same first name on each one of these Thomas
            • 32:00 - 32:30 one is Falco Dolby and the other one's Roger Stevie I really like that right I like the way functions are able to hold on to State uh you give a down payment and you could reuse that multiple times over and that's going to be like a recurring theme when we talk about functions uh in Java okay so cool uh how many of you use what was the name of that and I hardly ever use it um for um lombok I had to look it up okay uh I'm
            • 32:30 - 33:00 not going to make a claim on like hey I love lombok I'm not going to go go down that route or or not but uh I particularly don't use it but one of the cool things about lombok is uh well you know creating the Builder pattern is that's a lot of work uh to it uh so uh one of the things about lombok uh is that they have a builder annotation and here's what that would look like so instead of creating all
            • 33:00 - 33:30 that code for you one of the uh cool things that uh you were able to do with this is here's that Builder pattern again uh but one of the cool things that you're able to do about that is uh this right and so whenever you create a class you could say at Builder and then you could have a default uh value associated with the name and age and you could have something to where you can set up uh a multi like occupations there and that would
            • 33:30 - 34:00 take care of all your builder stuff for you and that way you would end up with a builder pet a lot of people love that and I think that's a great utility there so another way that you could take a look at that uh here's an example of a builder but except this time the Builder is returning uh a immutable object so in other words this time a different take on that Builder pattern is that I'm going to set like let's say for example here I'm going to set the name notice
            • 34:00 - 34:30 what I'm returning here I'm returning another Builder object back out immutable this time remember uh the classic one was mutable and it kept saying return this return this return this this one on the other hand just returns a new object for that okay so this one has name Capital demonym uh which is name of people so Chicago is chicagoan right that's a demonym population and uh currency a different
            • 34:30 - 35:00 take on that and do you've seen this before maybe maybe you've seen it before uh let's do jshell right over here right I argue that this is a builder pattern and um we may have seen it before uh here let's take a look right over here like list 1 two 3 45. stream right it don't H it doesn't have to be called Builder or build uh but the idea
            • 35:00 - 35:30 from this is if I do list of one 2 three four five and then stream on this I end up with this right and all of us have done streams before and if you've ever won run jshell this is what it says right a Java util stream reference pipeline right uh that's a reference and what do you do you just add elements in whatever order that you want right not amp but map right and if I do x x 2
            • 35:30 - 36:00 for example I get another reference from that as well but notice it's a different number right it's a different reference so that's the immutable version of to me that's the immutable version of that Builder you're getting a different reference in return cool right all right uh and then finally you know when you call you know two list here uh this would be uh same as like that dot build okay this would be an immutable
            • 36:00 - 36:30 immutable version of uh a builder and has a lot of applications for that so your classic Builder is going to look a little bit different uh because of that cool all right groovy although we're not talking about groovy but all right so Builder uh Singleton pattern um on this one uh let's go with uh let's see where should I start with
            • 36:30 - 37:00 this one um I think this one is probably that one design pattern that has given a lot of people consternation just like oh yeah that single pattern there was a time probably early 2000s if I remember correctly that Singleton were so prevalent and I think often times misused particularly they would create a Singleton and they were like H we needed multiple objects of this you know and we kind of locked ourselves in um single tins uh are still being used but the way
            • 37:00 - 37:30 we use it I think is vastly different now I don't think we use the pattern quite that much directly how many of you have like Singleton now like the classic style Singleton pattern in your code base what's that a couple okay it probably was probably more prevalent before but now we uh we did that down to a couple uh they were tough one they're hard to test uh just because they had their state and uh sometimes you would have to use an annotation to say uh I
            • 37:30 - 38:00 want to make this visible for a particular test so that way I could get into it uh so that was always one big problem with uh the Singleton uh a little bit hardcoded um oh not a little bit hardcoded it definitely was hardcoded uh written incorrectly as well uh they didn't put a synchronized block or any kind of lock associated with it so if you ran this uh you know with multiple threads uh then uh that would be a issue um there's this wonderful guide
            • 38:00 - 38:30 uh misco heav uh testing and uh let's see I think he is yeah it's right over here so it's a wonderful little uh book here guide to testable code have you ever seen this one I think this one's really good and uh if you want the you you could either take a picture of that now or ask me after the talk uh but this was a list of uh PDFs uh on how to do testing Misha heav
            • 38:30 - 39:00 went on to do um angular so if you recognize that name uh he's now an angular but before that he was with Google and he was doing a lot with uh testing and so he has this one in here for like flaw uh Global State and Singletons and what's wrong with Singletons and how dare you do that and why did you do that um but all the same things that I was uh discussing here for example Le let me see if I could scroll down on here yeah like this one on here
            • 39:00 - 39:30 this one's hard to test you'll notice over here let me highlight that I have a visible for testing right that's the way to get into that state so that way you could test it that's a lot of hard work and if you're spending a lot of hard work on your testing you know is it worth it so there were a lot of things with uh Singleton that made it uh kind of tough but we still use Singleton I use Singleton in Scola it's actually a big part of Scala to create a Singleton it's called an object okay uh it is a
            • 39:30 - 40:00 construct that is meant to replace uh static and we use it all the time and it's you know it's not really that bad because it's not really exactly the same thing uh as this but for all of you who do spring boot right you do what at Singleton on top which is what it should be right if you want one object just use it one time right you don't have to go through all that extra ceremony uh in order to do that so Singletons are
            • 40:00 - 40:30 still there probably not as much as a pattern anymore but just make sure you only use it once use that in your spring or use that in your juice or whatever dependency injection framework that you would like to use okay all right now let's go to funtor monad O and filter uh oh have you heard these terms before right nerds nerds will use this term
            • 40:30 - 41:00 quite often nerds will use these terms quite uh often uh but I think they're a fundamental principle and they will be uh from here on out so let me come in over here to uh let's see I have one here called uh functional here we go uh here let's just discuss monoid first as well you might be hearing these
            • 41:00 - 41:30 terms uh if you go to cotland if you go to definitely if you go to schola you'll be using these terms quite a bit is it going to cross over into Java I I think so um yeah you have a definite yes I I have a yeah that's right and I'm going to talk about optional right we we kind of see this you know what I'm going to go with your absolute yes on that right uh this right here is a monoid doesn't look too
            • 41:30 - 42:00 scary does it some of you are like yes yes uh a monoid just joins things together uh and what is your natural gut reaction to if I say uh a monoid of integer what would what would be the implementation it would probably be a plus right if I want to join two integers together your gut feeling is like yeah that should be a plus if I say I want to join two strings together what would that be concat right that's your
            • 42:00 - 42:30 gut reaction to it well this defines what that gut reaction is or whatever it is that you need from so monoid of string would be the concat for that but a more General abstract form is what a monoid is to me these are functional patterns these are patterns that are in use greatly in functional uh programming languages and I think they'll um you know or they are uh currently available oh what is a functor well here's the definition of a
            • 42:30 - 43:00 funtor funtor sounds like a robot at a disco to me I'm funtor but here's what funtor is functor is map so when you use a map you're using a functor okay so um that would take a function typically from an A to B of some sort and then return a from it okay uh which is you know this right this is the way we
            • 43:00 - 43:30 use a functor we just don't we we're just not explicit about it uh functional programming languages will use the term type class to Define it and I'm kind of doing a type class here uh notice what this is this is a type class to where I am using a collection of a one of the things we don't have in Java is a notion of what's called a higher kind of type I'm going to scare you with a bunch of terms I don't know if you know that but
            • 43:30 - 44:00 uh we'll take it easy but a higher kind of type uh is uh when we describe generics you know we usually describe generics as you know something like this collection of a right and a represents whatever right that's the generic form or the parameterized type that we're talking about uh but in languages like Scala and I kind of have that up there could say I'm going to make a generic type for the collection or the holder of that that's
            • 44:00 - 44:30 F of a so you mentioned optional optional of integer has that form that's what the higher kind of type is it's creating a generic around that uh F there okay optional of integer as that form of f of a right in now functional programming we generally use this uh notation here called the star notation right that if we have this uh f in here we could resolve that then we could resolve that and then have like a
            • 44:30 - 45:00 concrete type like optional of integer and if you think about these forms you see them everywhere in Java right observable if you've used observable or maybe flowable or maybe flux um future future has that type list of a or list of integer has that type uh set does but it doesn't follow some of the rules so we'll leave that one out but a lot of these have this kind of like pattern to it okay uh map doesn't map doesn't work because map has two generics right so it doesn't
            • 45:00 - 45:30 have that shape right like list of integer has that shape but map of integer and string doesn't have that shape okay maybe we'll uh maybe we'll have that in Java and I don't think it's that spooky but uh uh that's that's how that would work monad let's let's tackle this big term here I consider this a pattern one that I think we would need to uh be very well versed in but a monad
            • 45:30 - 46:00 is flat map boom most people like take this long road as to what a Monet is but a monad is a flat map so when you use a flat map you're using a Monet when you're using compositions of flat maps and maps that is a you'll hear that term monatic composition right don't get scared about that you're just using flat maps and Maps together in order to do things you ready to dive in on that one
            • 46:00 - 46:30 okay don't let it scare you too M too bad uh but here let's talk about uh a uh monad and we'll go here to this uh monad test on here well uh let's see what should I do well here's an example of monoid show you what a monoid is uh here's this one here here called uh join all and uh here's how a monoid would
            • 46:30 - 47:00 work see that monoid there with e monoid just means bring things together so all I'm going to do here is going to bring in this list and I'm going to bring them in together and have this result so if I do list one two three join all with this list and this right here is kind of a strategy which is is how am I going to bring bring things
            • 47:00 - 47:30 together okay and that's where this comes in and if I take a look at the implementation for this here it is string monoid of a string how do I bring two strings together I'm just going to concatenate them okay and if I go ahead and run that all we'll see here is that you know they were just concatenated but this right here is a strategy on how to join things together and that's what the term monoid uh
            • 47:30 - 48:00 means here's funter you've used funter before you could leave today and say hey I know what a funter is and I've been using functors that's what it is it's a map okay and uh so that looks pretty cool but every time I'm going to talk about like funter and monads and things like that there is a good side and an evil side to funter and monads if I if I say uh a a um a non-evil or a
            • 48:00 - 48:30 good refrigerator what comes to mind what would be a good refrigerator in your opinion it has food right but an evil refrigerator would be like you open that up you're like there's just one Red Bull in there right or it's like it's totally empty uh so when you design programs and this is what we have in Java now is that that if you're composing things together and if anything in that
            • 48:30 - 49:00 chain is empty the whole thing is empty and if you think about that you get validation as part of that because if anything's empty the whole thing is empty think about that one as well this is what a principle of monatic functional programming is it is a pattern right if anything is going to be empty the whole thing is empty so here's this one and you could tell right 1 2 3 4 and
            • 49:00 - 49:30 here let me go and run this one 1 2 3 4 multiplied by 10 uh I should get 10 20 30 40 but if I have a stream of empty and I'm running a map on this no problem I'll just return a list and or the answer will just be a list right an empty list if you think about this right we've been doing TR catches for so long that you know having something like this that doesn't like disrupt your code
            • 49:30 - 50:00 seem may seem kind of odd right but that's the idea for this is that I can run a bunch of flat maps and Maps it's non-disruptive I just get an empty whatever collection that is that's another principle of this monatic style program and here we are right as said we have optional optional typically has that shape right something of something optional of integer and in this case
            • 50:00 - 50:30 here I have an optional of 40 I want to do a map on that well but what am I going to get in return well let's take a look here I'm going to have a optional 400 kind of cool right I get to keep the outside shell of optional I'm just changing what's inside of it or at least that's what my perception is okay but same sort of thing is if I have an evil optional right whatever chain I have on here doesn't really matter I'll get an
            • 50:30 - 51:00 empty optional from it again I don't have to put TR catch blocks on this that's part of that monatic style uh of program okay here's a is this a bad moned no this looks like a no I think that's a good one I don't know why I called it a bad moned oh I know why I call it a bad moded all right let's talk talk about uh flatmap and monad and hopefully it wouldn't be too
            • 51:00 - 51:30 scary if you've used flatmap before uh you know that on my line uh what is it 82 over here stream of map where I'm going to take a x what usually you want to look for is when you have a map here it is if you have a map and you have a function to where you take one element and you return a plural that's when you're going to need a flat map right and I think many of you have
            • 51:30 - 52:00 already have the eye for that right oh there it is I know I need to do a flat map on this because you're doing a map and you're getting a single element and essentially you're exploding it right for one element boom I'm creating another stream from that and you end up with a stream of a stream on here well if you don't want the stream of a stream and again sometimes you'll just fall into it you're trying to do a map and then the type on the left hand side ends up with a future of a future stream of a stream or something like that uh then
            • 52:00 - 52:30 what you typically want to do is you typically want to flatten it and that's where that monad comes in okay so you've been using monads up to this time uh up to this time maybe didn't know about the name for that but the idea here is you know I'm able to crush that so for every element in here I'm exploding it negative x x and X+ one that's a monad pattern right not part of the classic design patterns but part of the functional uh design patterns and if
            • 52:30 - 53:00 anything is empty and anything within that chain is empty the whole thing is empty okay it's pretty cool uh in how that works and then finally over here what I have is uh or I guess I have a couple of more items here is that this is an arbitrary example in here uh but one of the things that you could do with this is let's say I have a stream of 10 1 205 and 25 and I'm going to do 100 divide by
            • 53:00 - 53:30 that number now yes I could do a filter beforehand but maybe I don't know what's coming up like right here I could see what's coming up but if I don't know what's coming up and one of the numbers is zero uh well what I could do is I could use a flat map in order to filter out bad elements so in this case here 100 id0 will throw an exception and that will be an empty and one of the things about a moment monatic style programming is if any element is empty and you flatten it
            • 53:30 - 54:00 you end up removing it okay nice little feature uh to do uh monatic programming like that uh and um here's another composition in here uh in fact this one is a very important one this one is the true monatic style programming and it is flat map flat map flat map flat map flat map flat map map and then may be a filter is sprinkled in than there are so but the notion of a flat map flat map flat map flat map flat map map uh is
            • 54:00 - 54:30 that monatic style of doing chains of items together okay this is present in hasal this is present in Scala I think it's probably present in uh cotlin as well uh and that is flat map flat M the last one all the map you could chain uh equal elements together so if I did let's say for example optional Dot of uh 20 on here uh notice what this is
            • 54:30 - 55:00 looking like here I'm going to take 30 x represents 30 here I'm going to take 20 y represents 20 here's 10 right over here and Z represents 10 and I'm going to add these together okay how many you use intellig uh for your editor I don't know if you knew this uh but uh variables that are closured are purple did you know that like taking a look like really deeply at it so uh I have a hard time looking at
            • 55:00 - 55:30 it yeah X and Y X and Y here are closured right because this function right over here is closing around X just because it's nested like that and Y is closured as well that's why that's purple okay maybe hard to see on this screen over here uh but what's really cool about this is that this is the way that we chain things okay that's the kind a pattern okay so map
            • 55:30 - 56:00 flat map uh filter how many of you in your codebase uh do you have the Observer pattern still like the old classic Observer pattern used a lot in goys the idea for an observer pattern was you would broadcast information this class would say hey I got this new element and others would be notified for it okay uh and that's the classic Observer pattern uh I think still very useful uh in um
            • 56:00 - 56:30 you know user interface programming uh iterator Pro uh iterator as a design pattern I don't think anyone's everever made their own you've just used Java Lang uh iterator right that's the iterator P called Next and has next uh for that uh let's take a look at the uh classic style um Observer pattern see what that looked like because I was just waving my hands on that one let's take a look over here and let's go to uh
            • 56:30 - 57:00 Observer classic uh and yeah I think let's see here yeah here's the here's the brunt of it here so uh what I could do with this is I could do the following right this is registering a listener RSS Observer okay and what I could do with this is you know I could add The Observer here uh and a friend of mine John wrote
            • 57:00 - 57:30 this and he's just returning the Observer back I could return observers this is like a a newspaper publication or an RSS publication where you register Observer and if if this RSS feed has anything to talk about then this would just say yes Tada here it is and anyone who is interested in me can get the information that's the Observer pad okay kind of nice is the classic Observer pattern the iterator pattern is is of
            • 57:30 - 58:00 course a interface that has has next and next do you have something for me great give it to me next you have something for me give it to me next right uh if you've ever done result set jdbc programming that's a iterator okay uh so what would it be if I combined I feel like a candy bar commercial what would it be like if I get the tastiness of chocolate and mix with peanut butter but this time let's take the tastiness of a Observer pattern
            • 58:00 - 58:30 and let's mix it up with an iterator pattern well this is where um I think one of the patterns that we talk about a lot nowadays uh is uh the reactive pattern how many of you used like an ARX Java or project reactor at your work okay uh this is uh what I'm going to explain to you on this one is the reactive pattern this is uh an RX pattern as well very common uh in a lot of uh
            • 58:30 - 59:00 programming applications now uh one of the things that it's uh undergone as of recent is because of java virtual threads uh one of the uh things that is often talked about now is is the reactive pattern going to survive interesting uh so what's what's the deal with this anyway this is uh both Observer pattern and iterator pattern uh
            • 59:00 - 59:30 and I think it's really cool my opinion on the whole virtual thread is going to kill off reactive is I really don't see it because one of the things about the reactive pattern it's also a great event bus okay so if you do any kind of like DDD style programming and you have like two Aggregates or two you know parts of your software and they need to communicate to one another this offers a really wonderful channel in order for it to do so but the
            • 59:30 - 60:00 reactive pattern is able to do a couple of things for us uh one serve as a event bus uh but the other one uh which is the one that's you know under contention right now and that is uh handle threading issues okay but here's an example of uh I love RX Java um RX Java is just a competitor to project reactor for spring but the idea here is that this is an observable and I'm going to
            • 60:00 - 60:30 say on next 100 onx 140 on next 290 on Don or on Blitz and on 10 and Etc and I'm able to State here on next on next on next and then at the end of this I'm going to say on complete generally for an RX pattern it's on next on error and on complete okay those are three elements that we emit and so this is an observable which is a thing that is emitting
            • 60:30 - 61:00 elements now what I could do with this is I can stem from this and do something with it now why is this a benefit well uh I don't know if you knew this here let's uh let's play a little game here game with Jame jell all right here we go I'm going to do uh list of stream no no no no let's do this here uh list of let's do vars here uh list of one
            • 61:00 - 61:30 two3 let's do a stream on here and uh there we go or not oh list of I know Java all right here we go again hey there we go hooray for me all right so let's say I'm gonna do the following uh string map I'm going to take each number and I'm going to multiply by four uh if if I hit enter right now will it
            • 61:30 - 62:00 work yeah sure yeah right so far so good let me take that reference S now and let's do filter and I'm going to filter all the I don't know even numbers no here we go is this going to work oh illegal State exception so one of the
            • 62:00 - 62:30 things about streams is that you can't Fork it and this is a fork right here right S and S can't Fork it with a stream and that's by Design okay but what's cool about reactive uh but you have got to pay the toll somewhere you can Fork this right and so if I run this one you know I get to see uh one set being done and the other set being done okay and that's awesome with a butt and
            • 62:30 - 63:00 the butt is uh if you're running this on multiple threads where the source is on one thread pool and the sink is on another thread pool you're you may suffer what's called back pressure okay back pressure is uh if you know I go to you and I say write this down and I go right and I start like saying a bunch of words very fast and I'm asking you to
            • 63:00 - 63:30 write it down that's not fair to you right that's a back pressure because I'm running out of oxygen uh the uh endpoint's not writing things down or consuming uh very quickly that's a back pressure issue and so that was one of the things that Java said you know what we're not going to handle this at all when it comes to a stream so you can't Fork a stream but you could Fork this but again you have to pay the toll somewhere and that toll is got to think about back pressure okay uh here's one of the benefits as to
            • 63:30 - 64:00 why we have um this pattern this reactive pattern uh and here it is we get to do bulkheading with it just about everything in your job is this IO like this part right here should be an IO thread because you usually get something from a source right restful endpoint right that's
            • 64:00 - 64:30 IO um go to a database right that's usually IO and then the rest of the stuff here is usually and I'm just hand waving here but usually the inner stuff is going to be computation and then at the end of it you do something IO store it to a hard drive store it to an S3 bucket or do something with it just about every everything we do at work is IO
            • 64:30 - 65:00 computation do stumping with a payload and then IO put it somewhere else okay so that's how this works uh with this particular what I call a pattern uh let's see and I love this these are called marble diagrams this is the observe on take a look at this one see that Black Arrow there uh that's the thread that uh we're currently operating on but observeon says after this step jump onto a
            • 65:00 - 65:30 different threat and all I had to do was do this schedule on here so this says let's start off with 1 2 3 4 five at this point here let's jump over to a computation thread that's what that means subscribe on let's take a look at the documentation for that one cool well that one says if you hit me as the operator uh then what I'm going to say is I'm going to dictate to the source of of it all and say you should be on this
            • 65:30 - 66:00 thread that's what a subscribe on is Project reactor and spring works the same way so this means start at the very beginning on IO this means from this point down minus the subscribe on make sure you're on the computation thread and this one on here just make sure that we're on the io thread and I think it looks beautiful right because you're just able to programmatically declare you know boun boundaries of threading okay using what's called auler okay sorry I was calling myself
            • 66:00 - 66:30 names here I was was it a low Point all right excellent okay hopefully not too nerdy for you there okay uh adapter pattern uh so on these uh ones here particularly the adapter pattern uh I think many of us are familiar with the adapter pattern think about like uh the European plugs and your American plugs when you're trying to you know uh connect uh into an outlet depending on
            • 66:30 - 67:00 what kind of outlet that is use an adapter for it same concept uh when it comes to uh Java and this particular pattern uh it can go through a different kind of uh reimagining for it uh and we could use lambdas in its place as well so let's take a look at uh the classic pattern uh first here and uh let's take a look so I got a couple of adapters here let's take a
            • 67:00 - 67:30 look at um this one here and I think my friend John wrote this one uh here's Celsius and here's Fahrenheit okay couple of interfaces in here uh this has a temperature in here and here's the adapter the adapter is and so the format of this one is you're going to bring in a class so I want to convert Celsius because that's not a real temperature
            • 67:30 - 68:00 scale right am I right people anyone here you Celsius damn straight oh everyone's like raising their hands like my thing is uh I think just an opinion on my part I love Fahrenheit sorry virtual jug everyone's like but I love Celsius because like zero is like I'm cold 100 is I'm hot right for like The Human Condition that's like that's like perfect to gauge and but like Celsius like a
            • 68:00 - 68:30 16 should I wear a coat right that's not true I mean if you're born with a you know using a certain scale and raised using a certain scale you're going to know that scale very well anyway so let's do a like conversion in here that's what an adapter is for okay so if I bring in this uh Celsius thermometer in here I could get the temperature in fahrenheit see how this like plugs in very nicely like an actual electric adapter like you go you know out of the country and you use that particular adapter that's what we're fitting over okay so that's the
            • 68:30 - 69:00 classic adapter pattern now one thing I just want to mention here uh when it comes to the adapter pattern is that the method names are generally different that's one of the characteristics of the adapter pattern okay like get temperature in fahrenheit you usually have something else uh one other great uh reason for an adapter pattern is if if you inherit code in in a different spoken language the adapter pattern really shines there because you get to
            • 69:00 - 69:30 name the methods whatever you want that's the idea for a adapter pattern uh my reimagining of this is uh the following uh we are in the midst of um really embracing value objects as of late okay this is a different shift in what Java programmers are doing and this right here is a value
            • 69:30 - 70:00 object uh DDD proom uh proponents domain driven design proponents use value objects all the time uh there is a je coming out this one's going to take a while this is part of project is it Panama Val Valhalla yeah thank you uh and um what that one is I don't even know if it's on here larvel state of is that right
            • 70:00 - 70:30 that's an interesting term on here uh but the larel state of uh value objects now there's not uh let me see if there's another one here I wasn't looking for the larvel one uh let's see over here uh value ah they don't have another one here uh but one of the items I'm kind of surprised they removed it um or maybe they didn't but the idea for a value object is that you
            • 70:30 - 71:00 have a wrapper around uh something like this INT in here we're going to be doing that more and more and maybe you already have those are called value objects uh one of the things that we use value objects for is to get rid of a code smell called primitive Obsession I anybody know about primitive Obsession like if you have like person that is like string first name String last name String social security number right uh in age uh those are kind of like bad member variables because like int age
            • 71:00 - 71:30 could be like negatives zeros right and there's like a whole Space of like what it could be value object kind of con strain right and that's a good thing so celus you know would have a value in here but right in here is generally a good place for that conversion it has a home it has context this is where I would do a conversion on here here's the fahrenheit in here where I would do a convert to
            • 71:30 - 72:00 yeah Java X time okay oh okay right yep absolutely one of my favorites and what inspired me for this one it's a weird name but it's one of my favorite projects uh is uh squant uh in Scala and I think think you'll find a lot of Beauty with this one I do uh I'm you know really
            • 72:00 - 72:30 impressed by this and you can see the value of a value object here uh even you may not be familiar with Scala but I think this is fantastic right this is a thanks for asking that question because now I'm inspired to just show you this uh and that is uh Val which is like our VAR load kilowatt 2.2 you see the Primitive Obsession here 2.2 of what and that's just a variable name is anyone going to stop me right from you know ensuring this is a kilowatt no it's just
            • 72:30 - 73:00 a double number no one's going to stop me there uh energy megawatts per hour 24.2 it's a double who's going to stop me right if I'm and then here's the who's going to stop me par summon kilowatts well that's incorrect right if you ever done calculus or physics particularly physics right if you don't put the labels on there you're you're uh on your test that question was marked wrong right cuz you may have ended up doing this uh well this one is where it talks about type safety and value
            • 73:00 - 73:30 objects are a great thing and to think about when you're designed so this one on here is kilowatts this has a new implicit on here new kilowatt 12 new megawatts 023 and this has an operator overloading which I think is cool uh and I could I could add this load which is a power I could add this load which is a power internally though one is a kilowatt and the other one's a megawatt but it'll take care of that for
            • 73:30 - 74:00 you right uh and it will do all of that uh particular work for you well I'm using that inspiration here uh when it uh comes to this one to where I could just say a convert to so that way it would look like this so how you create your um adapter pattern may change from the classic design and More in favor of like the value object because the way this would look I have a Celsius and then I would convert to either
            • 74:00 - 74:30 Fahrenheit or Celsius uh how would this convert to look like I didn't even talk about that well this one right here is using some new features right uh and this one's using the switch Expressions not statements but expressions in that uh after the switch gets resolved what ever the answer is gets returned and one of the things I'm able to do here is ask what it's Fahrenheit this is what the conversion
            • 74:30 - 75:00 will be if it's Celsius this is what the conversion will be okay so some new ways to go about it okay Bravo uh let's do a decorator pattern and uh I'll quickly go through uh some of these in here uh decorator pattern is uh to me one of the and these are this one's a
            • 75:00 - 75:30 silly example uh but uh let me explain like uh why you would want to use a decorator pattern you may have heard hey let's use a decorator pattern for something but the question is why why would you do that well here's a uh here's just one example here uh this one is using a Sunday uh and here's the demonstration in here this is the old class pattern where I could have like vanilla ice cream wrap it up in a whipped cream sunday
            • 75:30 - 76:00 decorator and wrap that up and decorate that in a fudge Sunday and then sprinkle some nuts on that there we go and then later on we could add a cherry on it you kind of see here that we're adding layers and layers and layers and layers and layers on it and that by the time we uh roll this out you know by adding all these wonderful layers together and we have nuts fudge whipped cream vanilla ice cream and you know we get a add an ADD and add and add uh to it so cool um
            • 76:00 - 76:30 and that's a fun silly example here here's the way it looks with functions oh let's take a look at this one oh but what's the uh what's the key thing for these uh decorators they have the same methods as opposed to the adapter all of them have described Sunday all of these have a described Sunday because they all inherit from
            • 76:30 - 77:00 this you have to call this method or I'm sorry where uh does it get decorated oh I guess this one doesn't uh but they should have that uh same one is that the right one or maybe it's this oh there it is describ something I was like where's that interface but they should all have that same uh method but here's the uh here's the functional one and like a lot of these patterns you could just do with a particular function
            • 77:00 - 77:30 okay or with any kind of function this is the same sort of thing this is called functional composition and where the good stuff is is 16 through 18 this decorator is let's take whipped cream and then fudge and then nuts nice right and it looks good too what do you want to do with this ice cream well I want to put whipped cream on it then I want to put fudge on it and then I want to put nuts on it right how clear could it be here and that's me
            • 77:30 - 78:00 decorating it so what I could do then is uh take this Sunday or let's rename it to Sunday uh Sunday decorator and then here's that whipped cream and then fudge and then nuts and then just hey here's here's vanilla ice cream uh going and decorated cool and then it just goes through this functional chain beautiful now while that's a a fun tasty uh example uh this is a
            • 78:00 - 78:30 presentation uh that I talk about uh and this one's called uh testing the undesirable and that's me with a beard I got rid of it and it's actually Microsoft's fault sorry I'm G to have to ruin your sponsor there Mary uh but I had this beard and Microsoft had this thing called like guess my age and I don't know I forgot how old I was in this picture but I submitted it and it added like 12 years to me it's because I had that Frosty beard in here
            • 78:30 - 79:00 but anyway uh let me come down sorry about all this in here uh let me go to the good stuff here uh and it is called WP I believe it's WP method 2 let's say this is a bank and I have a deposit in here um one of the um principles in software is the open close principle uh which is uh open for extension close for
            • 79:00 - 79:30 modification like what the heck does that mean uh well my interpretation of that is write your software for what your need is and uh make sure that it's extensible but when making a change don't be Hasty about it and just like start changing that piece of code because you work very hard on and so here's an example here uh the need is we need to add auditing to um to this bank
            • 79:30 - 80:00 right fub Bank on here with this particular deposit um well one of the things that we can do is um you know we have the deposit now one of the things we could do is we can change the code but we want to keep the interfaces because that's going to you know blow the rest of the application up so I can add a audit in here uh and add whatever kind of audit Ting uh that we need here uh so that works pretty cool but we could also use
            • 80:00 - 80:30 what's uh I meant to do a wrap class here it is uh so I want to make a audit on this deposit so what we could do is we could extract the interface I don't know if you have ever seen this maneuver here but for this object here I could extract the interface for what it is and this would have a deposit now I can have my logger right open for extension I'm extending it by um you know implementing this
            • 80:30 - 81:00 interface and then what I could do is I could do tdd on this and do the auditing I leave the original class alone that's the best part about this and it almost feels and looks like a adapter but you know this is going to be decorated one on the other on the other right I'm adding auditing so if I want to use uh afka or Pulsar or whatever and send information to it I could do so and here's the logger which would be
            • 81:00 - 81:30 you know the original which is this but the auditing would be included in here and what's interesting about this is that if you tie this in into a uml diagram you're like oh my goodness we just got The Decorator pattern okay highly highly highly useful uh for that but again we could Lambda eyes it um let's see we're at uh 7:32 Mary what time do you usually
            • 81:30 - 82:00 end okay now I just have my list here so just wondering uh decorator pattern one of the interesting things about it is that there's also a composite pattern here let's take a look at the uml for that one I don't know if you've seen this before or even if you agree with me uh let's go I think I have the ml's for that one give me a second here as I look for it well here's a decorator
            • 82:00 - 82:30 pattern that's the way it looks like uh the uml for that which kind of looks like that one I was just showing you with the auditing uh but that's the way that looks like I have the interface I have The Decorator I have the concrete component and a concrete decorator uh which uh will'll use that decorting okay and I could just layer things together it's like add auditing to a uh component uh but if we take a look at the let's say the composite
            • 82:30 - 83:00 pattern here's this one here's this one this one this one right I'm uh taking a look at these two together here they look very similar right a little bit and they are so a composite pattern is a decorator pattern uh except it has multiples that's the idea for that so if I go to one component that one component
            • 83:00 - 83:30 can send to multiple items let's Show an example of that so right in over here uh let's show a composite pattern which really is a decorator pattern except multiple items when would you use that well let's say I have this here's an example of it I have a repository on this now you can probably
            • 83:30 - 84:00 see there we go a little bit better and whenever I want to add an employee to this as this decorator uh I am implementing a repository in here but let's say I have a list of repositories that I want to post to okay all I have to do is have that same method in here but what I could have is a collection of repositories so if I want to if I want to store to you know my SQL and Oracle and this and this
            • 84:00 - 84:30 and this I don't have to change the interface that's part of what this composite is and so as long as I provide that list of implementations of that repository I could send to you know multiple data stores for that but to me it's still a decorator pattern except you just have multiples of it but what about a proxy I don't have a really good example for appr proxy or at least I don't think I have a few of these in here uh but um and let's let's see if this one here
            • 84:30 - 85:00 I have a database and I have the proxy to a real database but in the end if you take a look at this uml diagram a proxy which is just a remote call it is a decorator with a remote call okay on one side you're holding on to the real uh connection and on that client you're doing something on behest of that real connection but it's still based on a
            • 85:00 - 85:30 particular interface okay with uh the proxy and the real database you're extracting an interface you're using it like a decorator it's just a different style of that on how you use it okay nerdy uh let me jump to uh State and interpreter because those are big ones here uh and I got a really good story for state so um have any of you seen cyber
            • 85:30 - 86:00 doo. cyber Dojo let's take a look cyber doo. G uh if it comes up cyber Dojo is a website that you can do tdd with other groups of people together as a team uh across the world uh and it looks like it's not coming up unless I got this wrong cyber Dojo there it is so what's cool about
            • 86:00 - 86:30 this is you can say create a new practice here and uh let's say fizzbuzz right everyone knows that one write a program that prints the numbers 1 to 100 Etc okay um so I did a class for tdd and um it went okay but it didn't go great and I don't mind telling you my failures cuz we learned a lot from our failures uh and I said you know what uh choose one I got all egotistical
            • 86:30 - 87:00 about it just go ahead and choose one and we'll we'll do it together we'll solve it and they were like okay fine tennis and I'm like choose a different one no I'm just kidding we did tennis um and if you play tennis uh this was just you know how do you do the scoring right love 15 30 40 but you kind of tell where like things started falling apart part right the 40 part the 40 part is just crazy right because you uh it depends on
            • 87:00 - 87:30 who your opponent is right uh and what score they have when you get to that 40 if you're even matched at 40 and let's say I win then I win no I don't uh we go so it's in from Deuce and if I win that goes into Advantage but if I am at 40 and my opponent's at 15 and then I win then I win the game right and there was a like twist here everything was going fine until that last part and I knew
            • 87:30 - 88:00 something was wrong because we had like a bunch of IFL statements uh in our code and we were deriving it with tdd so we got ourselves in a pinch and that's the way the day ended and I felt kind of bad about that uh but it's one of those things that I think all of us know this when you have a hard problem and you walk away from it how long does it take you when you walk away from it to solve that problem right just 5 minutes like oh what the heck happened to this one you walk away and you're like oh that's what it was
            • 88:00 - 88:30 anyway I was in San Francisco I'm on the ferry and uh having a beer watching the the water and I was like State pattern if we had just used the state pattern we wouldn't have had all the FFL statements like that's what that's for and I knew it but you know sometimes when you're in the middle of something it's hard to see uh that solution so uh here's an example of of
            • 88:30 - 89:00 this one here uh and here's the classic uh pattern where I have context and I have execute this is representing an on state so the idea for a state pattern is that I have a class that represents a certain state the benefit for this is that there's no if statements on here you just focus on that one state and see how easy that is
            • 89:00 - 89:30 to implement when you're just focused on that one thing what should an on switch do when you execute it that should just be off right that should just be your next state sorry about that I keep moving getting excited uh and if I take a look at the off State what is the next state this is just like an onoff switch right offs if the switch is off then the next state is on you just bring Focus onto that one state now the classic pattern has this
            • 89:30 - 90:00 weird little thing called context here uh and the problem with that is that it's it's mutable in here where we have that switch state in here so H you know maybe we could do something a little bit better with it but uh here's the run in here and uh yeah what we're able to do with this is you know create a state uh and determine what the state is so if I have on State and I hit execute then the state I should get here would just be
            • 90:00 - 90:30 off right that makes it easy but I was like really bummed out that we didn't have like a perfect uh uh tdd session so I decided you know what what would a modern State pattern look like with all the wonderful new amenities in Java now let's take a look at this one so what I have here is I have I have love don't we all right and so the idea for this is I'm
            • 90:30 - 91:00 using switch Expressions I'm using seal types for this uh so what is this uh sealed on here uh let's go to score this is using the new seal type so a score only has these stes in here okay have you used these yet these permits they're wonderful so this one is
            • 91:00 - 91:30 I have an interface but I'm going to dictate who the children are and they're going to be used for pattern matching so what I decided to do here is have a score four uh and have children of Advantage 15 40 love lost that sounds horrible 30 and one right those are the states of tennis right every player should have that so I thought oh man this is going to this is going to look really nice yeah let's see how this one looks now I like to focus on love so let's take a look at love here
            • 91:30 - 92:00 love is a score uh in tennis and if I just want to think about the logic of love then I just focus on that right no if else statements on here I just focus I just focus on love so right in here is what happens if I uh if there's a win uh and the opponent score is this score well I did something a little um and I did do this intentionally if my
            • 92:00 - 92:30 opponent won then it's invalid anyway I'm just going to stay at my St same score if my opponent lost um you know I'm just going to stay at this score uh which is true right nothing changes in my state here so this is something I had to put in uh but um otherwise I'm GNA move to 15 right that's from my score perspective and that's all I'm looking at here that's the best part about this state pattern is I'm only thinking about this and it
            • 92:30 - 93:00 makes it easy to test and easier to reason with uh let's go to a hard one in here uh if I am at 40 I want to use a switch expression here if my opponent won uh I stay where I'm at if uh my opponent lost um you know the game's already over so I'll just to stay where I'm at this this will allow me to handle State uh long after the game if someone
            • 93:00 - 93:30 decided to change something if the game's already won or lost I stay at the same state is is essentially what that is but if I win and my opponent is at 40 see how I'm able to focus on that then I move to Advantage uh if uh if I win and uh I don't know if that one's correct if if no I'm sorry if my opponent is at Advantage uh then I stay where I'm at otherwise I'll win the
            • 93:30 - 94:00 game but the idea here is I get to focus on just like one part of the uh state right and that's the idea for this now how do I wire all this in well that was where the fun uh was here and I'll I'll probably be a little hand wavy in here uh but what I just decided to do was get a little clever here and I was inspired by the state monad from hll and Scala remember I told
            • 94:00 - 94:30 you what a monad was uh using flat Maps but this one over here is like hey can I use functions to represent a tennis game that's where that bif function is so I'm going to give my end user the uh ability to take two players and they decide who's going to be the winner and then I'll take that function and I'll do all the immutable hard work here and determine uh you know what's going
            • 94:30 - 95:00 to happen when someone beats who and someone beats another player things like that so that way when we run this and let's take a look at our runner in here this is what it looks like so I think with functions you can you know elaborate and imagine different ways that you can write applications like this State monad like in hasell doeses this all the time except I'm not using flat Maps here uh I'm using like
            • 95:00 - 95:30 Rich methods like next turn uh but you kind of get the idea here is that you can say here's a tennis game between Salvador and Raphael and right over here I have tennis game next turn between Sal and Raphael and the way you use this is I'm giv two players I'm going to return the one that won that round here's another one and another one and each time I move forward I have a
            • 95:30 - 96:00 certain state so at this point right now Raphael should be what uh 30 something like that uh Raphael should be in the lead though right so Raphael should be 30 s should be 15 okay let's go run that one and let's take a look at the first one here uh well I think the first print line is uh at the very beginning so both love love and then on the second one here is 305 but because I'm using functions now
            • 96:00 - 96:30 guess what I could do I could Fork right that was like a recurring theme when we talked about functions is that I could take that state and then do next turn next turn next turn carry from that one particular state so in this case let's say s won them all well here is that state but in a different branch well that's what the alternative universe is but like on a different branch let's say Raphael won it so I get
            • 96:30 - 97:00 to Branch off of one state and create different alternate scenarios from this because that's just the way functions work I think U well I wrote it but I think it a really nicer um you know State on there or you know nicer State pattern cool all right let me finish with this one how many have you ever dealt with The Interpreter pattern before this one comes close to my heart uh The Interpreter
            • 97:00 - 97:30 pattern was this one uh it was often called the most useless uh design pattern uh and here's the classic one the idea for a interpreter pattern is to create a programming language within a programming language that's the idea for an interpreter okay um often Ed for creating dsls so something like this where I have
            • 97:30 - 98:00 an expression this is the classic pattern and I have a context that I'm bringing in I could have a constant so what I'm writing here is a calculator with number here's the constant uh here is multiply multiply takes a left expression and a right expression and what do I do with this is interpreted now this is the classic pattern what's wrong with
            • 98:00 - 98:30 this my opinion is that the interpretation is hitched to the model what if I wanted to interpret things differently I'm locked in have you ever thought about two string like two string is a lock in right it's a uh implementation or an interpretation of what your object should look like as a string but you're locked in that once you write that two string you're kind of locked in and you
            • 98:30 - 99:00 can't really change it because everyone else is dependent on that two string looking a certain way but what if you wanted to write it a different way right you're kind of locked in there so in this case here this interpretation here is kind of locked in this is a multiply what if I wanted like a string representation for that I'm kind of locked in uh and so here subtract right the interpret a uh locked in with a model but all in all it works pretty well and so therefore if we call that
            • 99:00 - 99:30 particular Runner this is the way that it would look and again I'm I'm actually just implementing a calculator uh within Java so like a line 24 sum of constant of six with the subtraction of 3 minus 2 I should be able to interpret something from it and that's what The Interpreter pattern is uh but let's take a look at a functional reimagining of this and here's what the constant looks
            • 99:30 - 100:00 like right it's just the model right the interpretation should have been on the outside not locked in uh if I take a look at multiply here's multiply here's subtract that was easy here's some but what we're doing here is we're going to take the evaluation or the interpretation outside right should be
            • 100:00 - 100:30 done elsewhere and uh here's an example of that here's evaluate and here's evaluate string two different interpretations so yes what if I wanted to add and subtract for all these here's where the logic is in functional programming we call this actually The Interpreter because the interpretation is outside of the models and that's what
            • 100:30 - 101:00 we're looking at here how do we interpret that right I can construct a expression but how do I want to interpret it do I want to interpret it as this regular evaluate which is actually do the arithmetic that's one way to interpret it right 4,000 uh but what if I wanted to interpret it as a string which is this what if I
            • 101:00 - 101:30 didn't want to do the arithmetic and I wanted a two- string representation of the expression I should be able to just call that one as a different interpretation nice right different interpretation which is what that interpreter pattern should have done all along nice and let me sum up with this one and where I'm kind of like pushing all of you uh to think about um this one is uh type level
            • 101:30 - 102:00 cats and uh right over here is uh what we call a program uh the idea for this is that this is monatic programming this is using functions this is writing uh like in DDD this would be uh similar to writing a service to where you have verbs and things the business things that you do I want to put wild cats to in this I want to use
            • 102:00 - 102:30 uh update and where I want to update wild cats and add 12 to it I want to put tame cats as five I want to get the number of wild cats and I want to get the T I want to delete tame cats from here and return the number from it all these here are actually and type this is scolin type level cats these are just all flat Maps flat map flat map flat map flat map map kind of like what I was uh mentioning to you so uh this one's a compiler but let me uh scroll down further here for uh
            • 102:30 - 103:00 running it this fold map here is your interpreter so you write a program using flat map flat map flatmap map that's really what this is uh you call that a program and then you interpret it here uh with you know something called a compiler which is eval everything and I'll do the work thereafter okay so there's a whole functional Road for these design
            • 103:00 - 103:30 patterns same design patterns that we know and love different take on it different reimagining of it using functions you could reimagine um you know your own style for a lot of these particular patterns uh but think about this there's I think there's a different future in Java the more functional we get one of the things I do like about Java is that um I think where Scala had some issues Scola said here's everything functional that you ever desired and you're like what do I do with this I don't know what what this
            • 103:30 - 104:00 is crazy what am I going to do with it whereas Java kind of like here's a little bit to Intrigue you give that a try and we're going to add a little bit more give that a try a little bit that a try and that's why I think you know we've you know uh for at least for Java programmers we've really become excited over time because we that has been trickling in who knows where jav's going to trickle in but it may trickle in into these kind of patterns uh as we proceed uh into the future okay cool all right
            • 104:00 - 104:30 hopefully your your brains aren't burning too much hopefully that was exciting but uh I'll leave it at that all right thanks everyone yeah I'll plug the monitor back in sorry
            • 104:30 - 105:00 yeah P are most popular for developing internal applications what kind of no you're looking for a framework or mostly other programs you know internally
            • 105:00 - 105:30 okay that they would want to use in particular that would beneficial for their purposes or something like yeah and I think there was a missing word there how did you say that z Oh popular design patterns for banking um I don't think so and I don't I don't know if there's any like occupational uh patterns uh they're mostly to me like programming design patterns uh but uh maybe there are maybe there are things that you know banking
            • 105:30 - 106:00 applications have done over and over again and maybe they're just the the design patterns that we were talking about we found this pattern uh to be absolutely great for this particular application within banking I think that's probably the way it would go but I'm not in the you know officially in the bank yeah I don't know there could be and I think you probably find that more like uh banking consortiums like software design and and there likely be would be hey we use this particular
            • 106:00 - 106:30 pattern uh for our particular uh need and then that would just like hey that's the one that that we're going to use and that's the one that's going to going to help us yeah because floting for numbers right we use money use them for uh monetary Val you yes yeah so one of the ones would be like um one of the things I learned is
            • 106:30 - 107:00 that um uh wrap it wrap money around pennies as integer values or really large integer value so you don't lose any uh information just because of floating point you end up you know missing fractions of of money all the time like those things like that like it's the same pattern right it's still the same value object pattern but just a different application of it for a particular uh domain yeah and I think
            • 107:00 - 107:30 that's probably that's where the conversation may lead but again if you talk to other uh Financial programmers uh you know and you should like all of you should you know get together and find out like what are the things that work what are the patterns that work for us yeah bu rid use those objects you could effectively exploit that yes but it's worse than that because the
            • 107:30 - 108:00 numbers don't add up so if you've ever seen people complain about JavaScript saying well if I add 0.1 plus 0.2 it doesn't equal 0.3 yes that's normal because true every Lang but that's a huge problem if someone put 10 cents in and then put 30 cents in or sorry 20 cents they're expecting 30 not yeah well and then it becomes a much much greater issue when you're talking
            • 108:00 - 108:30 about sure yes and no I mean the floting point is more of a problem like uh you divide like get3 it turns out that you use spase three you wouldn't have that problem uh Spas two and it has its own weird situ yeah but you know what you gave me an entry way as well there's there's a
            • 108:30 - 109:00 whole other set of different patterns like in web applications model view controller and there's that model mvcc one or whatever but uh the other thing that you're probably going to find in in financial space is that Financial space uses a lot of event driven architecture uh but that those are architectural design patterns uh so when a deposit is made for example um that deposit gets turned into a message and goes into a Kafka or a pulsar or uh some sort of
            • 109:00 - 109:30 pubsub uh so you need to ensure things like uh item potency make sure you're not redoing the deposit uh multiple times over and over again uh you're going to uh think about exactly once semantics and so there's a whole other layer of different design patterns there that are definitely going to crop up uh just because you're in the financial space you don't want multiple deposits you don't want multiple withdrawals you want that exact uh one on there and
            • 109:30 - 110:00 because you're using a messaging service that becomes important as well what uh Eda event driven architecture uh I think most do I would be surprised if they didn't that's where you use a messaging system uh to send deposits withdrawals transfers and everything like that those are usually done in messages but once you start dealing with distributed messaging uh there are a whole lot of concerns that you have to think about the first one was item potency and the other one was
            • 110:00 - 110:30 exactly once semantics and then afterwards I could fill you in all all that stuff too so that way you could get a list for that so if uh you're likely going to be going down that road as well so you have the software patterns that I was telling you about today at Java but then you have architectural design patterns which is another whole list of patterns that uh you would want to take a look at for whatever job that you want to uh Endeavor into architecture patterns are
            • 110:30 - 111:00 just as important as software patterns yeah wonderful any other questions all right pizza time I'll be here for any other uh questions and thanks everyone yep thanks Mary