Design Patterns Revisited in Modern Java by Venkat Subramaniam

แชร์
ฝัง
  • เผยแพร่เมื่อ 11 ต.ค. 2022
  • Design Patterns are common ways to solve problems that developers have discovered over time. They often fill the gaps between the language capabilities and the design goals. When languages mature, sometimes patterns become natural features of languages and blend in to the natural way of writing code instead of a special effort. Java has evolved significantly over the years. In this session we'll revisit some common design problems and see how patterns are realized to solve those problems with the modern capabilities in Java.
    VENKAT SUBRAMANIAM
    Dr. Venkat Subramaniam is an award-winning author, founder of Agile Developer, Inc., and an instructional professor at the University of Houston. He has mentored tens of thousands of software developers in the US, Canada, Europe, and Asia, and is a regularly-invited speaker at several international conferences. Venkat helps his clients effectively apply and succeed with agile practices on their software projects.
    Venkat is a (co)author of multiple books, including the 2007 Jolt Productivity award winning book Practices of an Agile Developer. His latest book is Programming Kotlin: Create Elegant, Expressive, and Performant JVM and Android Applications. Venkat is a well-recognized person in the software communities. He was once a recipient of the MicroSoft MVP award.
    He has received JavaOne RockStar award three years in a row and was inducted into the Java Champions program in 2013 for his efforts in motivating and inspiring software developers around the world.
    Venkat has been in the training, consulting, and mentoring business since 1996. He is recognized for his pragmatic approach, dislike for accidental complexity, continuous effort to seek minimalistic design, and simpler solutions.
    ------------------------------------------------------------
    INTRO
    * visuals & editing by @Mercator
    * music : Avocado by Ephixa
  • วิทยาศาสตร์และเทคโนโลยี

ความคิดเห็น • 108

  • @RamValli
    @RamValli ปีที่แล้ว +53

    0:00 design and design patterns
    9:45 Optional - patterns and anti patterns
    29:20 Iterator
    53:01 Lightweight pattern
    1:13:57 Factory method using default methods
    1:31:11 laziness using lambda expressions
    1:51:31 decorator using lambda expressions
    2:10:18 creating fluent interfaces
    2:19:16 execute around method
    2:30:00 using sealed

  • @_b0h4z4rd7
    @_b0h4z4rd7 ปีที่แล้ว +27

    I have almost 20 years of coding experience, but this talk makes me feel i'm a rookie. Very inspiring!!!

  • @MarcoBrasci
    @MarcoBrasci ปีที่แล้ว +95

    The boss is back!

  • @Saurabh2816
    @Saurabh2816 ปีที่แล้ว +14

    "If I'm stupid I'm gonna find it anyway that I'm stupid. I would rather find it out sonner than later"
    - Venkat
    18:20

  • @gequation
    @gequation ปีที่แล้ว +51

    This conference is a gem! I highly recommend watching it from start to finish.

    • @DevoxxForever
      @DevoxxForever  ปีที่แล้ว +2

      Thank you for the kind words ❤️

  • @bhatsachin
    @bhatsachin ปีที่แล้ว +25

    When you ask a scrum master to write a piece of code, he will write it like a story😀. Awesome presentation by Venkat.

  • @kendlyduprince
    @kendlyduprince ปีที่แล้ว +15

    This is pure stand-up java
    And I love ❤ it

  • @somethings6868
    @somethings6868 ปีที่แล้ว +7

    This conference has inspired and influenced me on so many levels. From his overwhelming knowledge (which smells like thousands of experiences) to the elegant use of a text editor without the support of an ide
    Spectacular

    • @nieczerwony
      @nieczerwony ปีที่แล้ว

      Yeah and inaccurate typing with constant going back with delete and retype.
      If you can't type fast and accurate, type slower.

    • @deepakbisht4957
      @deepakbisht4957 6 หลายเดือนก่อน

      Old developers are actually Quite comfortable in Writing code in notepads.

  • @rohitchakraborty1715
    @rohitchakraborty1715 ปีที่แล้ว +3

    This is the first educational video where I haven't felt sleepy

  • @prakashramachandran4
    @prakashramachandran4 ปีที่แล้ว +7

    What a talk.. as usual very informative. All these topics are mindset shift when it comes to design

  • @roshinivr123
    @roshinivr123 ปีที่แล้ว +3

    This talk is pure awesomeness! That Decorator pattern with lambda was something I really needed in my current project. Thank you so much for explaining it so wonderfully. 😊

  • @hutofrock
    @hutofrock ปีที่แล้ว +1

    Dr. Venkat is awesome! I always enjoy watching his presentations! 🙂

  • @toxema
    @toxema ปีที่แล้ว +1

    what a great "hand on" session. it is way better than a powerpoint presentation. thank you very much. ( NOT: Levent Kırca'dan Java dersi almadım da demem şu hayatta. )

  • @jamesschmames6416
    @jamesschmames6416 ปีที่แล้ว +2

    I love the opening. Just because you have the recipe doesn't mean the outcome is automatically good.

  • @peterg76yt
    @peterg76yt 7 หลายเดือนก่อน

    Subramaniam has a unique talent for explaining difficult subtleties with very simple examples.

  • @omnipoten8
    @omnipoten8 ปีที่แล้ว +6

    This guys is simply amazing. More I listen to him more I understand the programming.

  • @cirktap
    @cirktap ปีที่แล้ว +1

    I liked before and after I can watch !

  • @swarupcodes
    @swarupcodes ปีที่แล้ว +1

    What a storyteller ❤️❤️❤️

  • @Kidkromechan
    @Kidkromechan ปีที่แล้ว +4

    This was very helpful Venkat. Thank you. It's gonna take me a while to get comfortable with the patterns described here. The decorator pattern and the way you use consumer are very interesting. Also, now I finally understand Lazy loading a little better.

  • @Erik_001
    @Erik_001 ปีที่แล้ว

    Thank you. Always love his lectures.

  • @javisartdesign
    @javisartdesign ปีที่แล้ว +8

    Venkat the beast!

  • @mehmoodrehman6336
    @mehmoodrehman6336 ปีที่แล้ว +2

    Venkat The rising star ⭐⭐⭐⭐

  • @thinhduonguc4548
    @thinhduonguc4548 ปีที่แล้ว

    You're just amazing sir, especially for the one with low financial situation like me.

  • @cedrics7374
    @cedrics7374 ปีที่แล้ว +5

    I thought I would never use the decorator pattern. But after seeing this new approach, who knows :)

  • @silentsudo
    @silentsudo ปีที่แล้ว

    All your examples are so relatable to my curr project that applying ruby code style in java

  • @neelnath589
    @neelnath589 ปีที่แล้ว

    Great session..thanks for uploading

  • @ericm97
    @ericm97 ปีที่แล้ว

    Found this extremely helpful to understand what and why we use design patterns ! Well explained

  • @VasileSurdu
    @VasileSurdu 7 หลายเดือนก่อน

    that Execute around method is really something cool to use. Also loved the decorator example. great talk

  • @VictorLutin
    @VictorLutin ปีที่แล้ว +1

    great presentation! I always wondering what Venkat does use as checklist presentation?, it looks pretty geek to get a check list in plain-text :).

  • @anitsh
    @anitsh ปีที่แล้ว +2

    Arrive to the meaningful patterns via gradual refactoring.
    Build mindset as thinking of patterns as `a communication tool rather than a design tool`.
    Think in pattern.
    Evolve with pattern.
    Do not try to patch code with patterns.
    Patterns should be a part of a well designed programming language.
    We are already using it in frameworks.
    Well designed code should read like a story.
    It should not be a puzzle.
    Patterns should help write a good story that should be easy to read.
    Code should convey the intention clearly and easily.
    Code should revel what it's doing simply without making readers think twice.
    Code should be empathetic to the readers.
    Null is smell. Return a value.
    Fail at compile time, not at runtime.
    Understand mutability.
    Practice Pure Function.
    Do NOT mutate data.
    Return a value.
    A function must be idempotent.
    Idempotent: A property of some operations such that no matter how many times you execute them, you achieve the same result.
    Pure functions are the core of Functional Programming.
    Object-oriented Programming when done correctly, strictly, exercises pure function in a Class method.
    Minimize verbosity.
    Manage the level of verbosity.
    Too verbose is not good because it take more time read, think about it and understand.
    Never trust feature called "Management". 😂

  • @kaustubhpatange
    @kaustubhpatange 11 หลายเดือนก่อน

    Coding on vim without treesitter and lsp, is such a chad way to flex!!! Great talk BTW.

  • @dev-skills
    @dev-skills ปีที่แล้ว +2

    21:00, The method name is `orElseThrow()`.

  • @con_sci
    @con_sci ปีที่แล้ว

    I like this guy
    he's my favorite java talking guy

  • @ranjitdesai3926
    @ranjitdesai3926 ปีที่แล้ว

    Awesome........😀

  • @bikash7773
    @bikash7773 ปีที่แล้ว

    Really nice

  • @AnkushPuriSDE
    @AnkushPuriSDE ปีที่แล้ว

    Great presentation. Does any know details about his dev setup?

  • @Premkumar-eq1zv
    @Premkumar-eq1zv ปีที่แล้ว

    I love it ❣️

  • @jacobkurien
    @jacobkurien ปีที่แล้ว

    great perspectives and awesome jokes!!

  • @user-kd7tm6tr6x
    @user-kd7tm6tr6x 5 หลายเดือนก่อน

    very good session

  • @JMCe6a
    @JMCe6a 10 หลายเดือนก่อน

    Thanks, great talk. Though not really sure about labeling code verbosity as a disadvantage.

  • @PelikanVPustatine
    @PelikanVPustatine ปีที่แล้ว

    good job!

  • @maneshipocrates2264
    @maneshipocrates2264 ปีที่แล้ว

    Well talk

  • @tomasbjerre8869
    @tomasbjerre8869 ปีที่แล้ว +6

    Regarding Optional, I like having getters and finders. findName searches for name and will return Optional. getName will fetch it and return the name, thowing a clear exception if name is not available.

    • @RaminOrujov
      @RaminOrujov ปีที่แล้ว

      I use same approach 👍

  • @girishbharatwaj90
    @girishbharatwaj90 ปีที่แล้ว +1

    15:18 Not sure if iam thinking rit!. Whats the difference checking an object for null and checking optional.isPresent() ??

  • @GG-uz8us
    @GG-uz8us ปีที่แล้ว

    I wonder if there is a similar talk with Javascript/Typescript?

  • @onebeartoe
    @onebeartoe ปีที่แล้ว

    Thank you for sharing this, I was not able to attend.

  • @aishwaryas8283
    @aishwaryas8283 ปีที่แล้ว +1

    Thanks for the awesome and informative presentation.
    I am trying to understand one of the points mentioned in the presentation though. Would be great if someone can help me understand that.
    "If the Language is powerless design patterns help to fill in the gap" - What does this statement mean? On the contrary, I have always seen Java use a lot of design patterns internally in their implementation for making the developer's life easy. So if I understand Venkat's statement correctly, may be it means that the language should take the responsibility of implementing design patterns wherever necessary to make the Dev's life easy?

    • @adityalahiri4529
      @adityalahiri4529 ปีที่แล้ว

      it just means that there is an "intended/optimal" use for every programming language which should be intuitive to developers based on how the programming language usage and syntax. However, sometimes the "optimal" way is not obvious at first glance. Design patterns are just tools to nudge programmers in the correct direction in this regard.
      The programming language obviously used design patterns internally, but these are often abstracted away when the developer uses it. Most developers don't need to sit and ponder on why constructors work the way they do or what design principle was used to implement the collections framework. Hence, Venkat has probably made the separation between programming language and collections.

  • @yashwanthbedre8220
    @yashwanthbedre8220 ปีที่แล้ว

    Final preparation

  • @iamseban
    @iamseban ปีที่แล้ว

    Which Laptop he is using Macbook Pro 14 or 16" ?

  • @168Abhinav
    @168Abhinav 9 หลายเดือนก่อน

    Universal Java boss

  • @vikranthreddyk
    @vikranthreddyk 9 หลายเดือนก่อน

    🙏🙏🙏🙏🙏 Enlightened🙏🙏🙏🙏

  • @jamesmansion2572
    @jamesmansion2572 ปีที่แล้ว

    An optional collection does make sense., 'I don't know' is different from 'I know there are zero items'. Arguably better to return a tuple of a success status and a collection, but in functional terms this is a status (might be fail or 'don't know at the moment') OR a collection, and pattern match on the type (or enum variant).

  • @nikhiltaneja6673
    @nikhiltaneja6673 ปีที่แล้ว

    Execute around method sounds very similar to Context manager in python

  • @31redorange08
    @31redorange08 ปีที่แล้ว

    2:08:03 He should have used reduce(BinaryOperator) instead. Every invocation of snap(Color) passes through the useless identity function.

  • @BosoChannel
    @BosoChannel ปีที่แล้ว +1

    What kind of IDE he are using?

    • @Anbu_Sampath
      @Anbu_Sampath ปีที่แล้ว +1

      he uses TextMate with scripts, refer his website.

  • @jeycode9180
    @jeycode9180 ปีที่แล้ว

    My frienddddd

  • @TJ-hs1qm
    @TJ-hs1qm ปีที่แล้ว

    19:24 or read Alexsi Kings's article: Parse, don’t validate

  • @erinas
    @erinas ปีที่แล้ว

    Me hearing "you really want to avoid null" looking at my code, 90% of my fields have null at some point practially any none native field to say. :< ...should I be concerned about that?

  • @santanusen3930
    @santanusen3930 ปีที่แล้ว

    Can we get a C++ version of this guy?

  • @OmprakashYadavIIT
    @OmprakashYadavIIT ปีที่แล้ว +2

    Awesome:
    compute(value) // do it now, (eager)
    () -> compute(value) // do it later (lazy using supplier)

  • @89dvdmd
    @89dvdmd 4 หลายเดือนก่อน

    Once you hear Christopher Walken, you can't unhear it.

  • @rolandinnamorato1953
    @rolandinnamorato1953 ปีที่แล้ว

    The Weapon of Devoxx

  • @dhrumilshah1992
    @dhrumilshah1992 ปีที่แล้ว +1

    50:00

  • @bobbycrosby9765
    @bobbycrosby9765 ปีที่แล้ว

    The only purpose of Stream.forEach is side effects. That's why we lint it out of our codebases.

  • @zurumogbonda3225
    @zurumogbonda3225 ปีที่แล้ว

    was here

  • @dev-skills
    @dev-skills ปีที่แล้ว +1

    13:38 - Typo Option, It should be Optional. Other than this, the importance of Optional types very well explained.

  • @abhiesa
    @abhiesa ปีที่แล้ว

    Strange, like every other talk by VS in you tube, no one asked here in comments,
    WHICH EDITOR VS IS USING.
    😂😂😂😂😂

  • @xgorgk
    @xgorgk ปีที่แล้ว

    2.5 hours?!

  • @sandeephalder7536
    @sandeephalder7536 ปีที่แล้ว

    Boss

  • @275drago
    @275drago 5 หลายเดือนก่อน

    get on optional should have been private😅

  • @heyyrudyy404
    @heyyrudyy404 ปีที่แล้ว

    Defensive Design is cheap for the organization in short term perspective but expensive and counterintuitive in long term perspective ⇒ Architect 📛
    Defensive Programming is cheap for the organization in short term perspective but expensive in long term perspective ⇒ Developer 📛
    Offensive Design is expensive for the organization in short term perspective but cheap in long term perspective ⇒ Architect ✅
    Offensive Programming is expensive for the organization in short term perspective but cheap in long term perspective ⇒ Developer ✅

  • @rydmerlin
    @rydmerlin ปีที่แล้ว

    I’ve missed his grammatically incorrect “isn’t it”

  • @arvindkumarrukmaji
    @arvindkumarrukmaji ปีที่แล้ว

    Great information. But with a small gripe. A lot of chatter/ too verbose. Could’ve avoided all that typing and miss typing if came prepared with a slide. Also it’s not hard to simulate a shared mutability scenario. Why not jus demonstrate it and show the problem. It’s some pain to go thru these long videos. Could’ve have been half of it!!

  • @31redorange08
    @31redorange08 ปีที่แล้ว

    26:00 Heavily disagree with overloading for optional parameters. Don't do this.

    • @illyam689
      @illyam689 ปีที่แล้ว

      what's your suggestion?

    • @31redorange08
      @31redorange08 ปีที่แล้ว

      @Arsenal K Is my comment from 8 days ago not visible?

    • @kurtailed
      @kurtailed ปีที่แล้ว

      @@31redorange08 nope.

  • @poojanpatel2437
    @poojanpatel2437 16 วันที่ผ่านมา

    Why he gotta do fake accent jesus fking Christ. Taking all the fun out of a such a great video.

  • @narainsankar
    @narainsankar หลายเดือนก่อน

    Some people can never be helped 😅🤣

  • @zephyrinesplanade
    @zephyrinesplanade ปีที่แล้ว

    moustache is lazily evaluated on his face seems

  • @georgeshalvashvili6270
    @georgeshalvashvili6270 ปีที่แล้ว +5

    Another boring Vim. What do those people find in Vim... no colors, distracting background, no automcomplete

    • @atomicarena
      @atomicarena ปีที่แล้ว +1

      Clearly you are not the audience.. nor are you going to learn Java. You want colors, go to some art class.

  • @izebit
    @izebit ปีที่แล้ว

    many many words and the complete lack of new ideas for 2023. it's a boring video 🙄

    • @springboot-devops
      @springboot-devops ปีที่แล้ว

      Really ??????? Are you serious ?

    • @izebit
      @izebit 11 หลายเดือนก่อน

      @@springboot-devops Yes, unfortunately. 😉

  • @manaslovesbirds
    @manaslovesbirds ปีที่แล้ว +2

    Having coded Java for 9+ years (and some JS as well) and recently started learning Kotlin, all I can say is more devs should start using Kotlin instead of Java, at least for new apps. Java feels too bloated, and sorry to say that there is nothing modern about the recent Java versions.

    • @57skies
      @57skies ปีที่แล้ว +7

      you should listen to a few talks about java architects. java does not want to be "latest and coolest", it wants to be stable and _good_. I've been coding in java for the past 15 years, am an active open source contributor and somehow I still find Kotlin "not my language". perspective matters .

  • @HoneyMalviya
    @HoneyMalviya ปีที่แล้ว

    My ears bleed listening to that ascent!

  • @mehrdadk.6816
    @mehrdadk.6816 ปีที่แล้ว

    The fact that he writes notes and code in Nano text editor amazed me

  • @silentsudo
    @silentsudo ปีที่แล้ว

    I have a similar time bomb example, we have a treemap used somewhere in the code(10-12 years before written) and the place is not guarded for concurrency and randomly cpu spikes up, now i am finding hard time to convince the developer that it is this piece of code that is causing issue, - verified with visualvm, dynatrace. sample place

  • @trumpyla
    @trumpyla ปีที่แล้ว

    A zip? Dude we need GitHub repo