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

  • @MarcoBrasci
    @MarcoBrasci Рік тому +92

    The boss is back!

  • @RamValli
    @RamValli Рік тому +51

    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 Рік тому +26

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

  • @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 Рік тому +50

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

  • @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 Рік тому +14

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

  • @javisartdesign
    @javisartdesign Рік тому +7

    Venkat the beast!

  • @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. 😊

  • @ievgeniiiegorushkov8862
    @ievgeniiiegorushkov8862 Рік тому +7

    As always a gorgeous essence of wisdom seasoned with a bit of humor.

  • @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 5 місяців тому

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

  • @omnipoten8
    @omnipoten8 Рік тому +6

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

  • @hutofrock
    @hutofrock Рік тому +1

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

  • @Erik_001
    @Erik_001 Рік тому

    Thank you. Always love his lectures.

  • @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.

  • @cirktap
    @cirktap Рік тому +1

    I liked before and after I can watch !

  • @rohitchakraborty1715
    @rohitchakraborty1715 Рік тому +3

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

  • @mehmoodrehman6336
    @mehmoodrehman6336 Рік тому +2

    Venkat The rising star ⭐⭐⭐⭐

  • @silentsudo
    @silentsudo Рік тому

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

  • @VasileSurdu
    @VasileSurdu 6 місяців тому

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

  • @thinhduonguc4548
    @thinhduonguc4548 Рік тому

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

  • @ericm97
    @ericm97 Рік тому

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

  • @neelnath589
    @neelnath589 Рік тому

    Great session..thanks for uploading

  • @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". 😂

  • @peterg76yt
    @peterg76yt 6 місяців тому

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

  • @cedrics7374
    @cedrics7374 Рік тому +5

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

  • @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.

  • @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 :).

  • @maneshipocrates2264
    @maneshipocrates2264 Рік тому

    Well talk

  • @yashwanthbedre8220
    @yashwanthbedre8220 Рік тому

    Final preparation

  • @168Abhinav
    @168Abhinav 9 місяців тому

    Universal Java boss

  • @AnkushPuriSDE
    @AnkushPuriSDE Рік тому

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

  • @Premkumar-eq1zv
    @Premkumar-eq1zv Рік тому

    I love it ❣️

  • @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

  • @kaustubhpatange
    @kaustubhpatange 10 місяців тому

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

  • @vikranthreddyk
    @vikranthreddyk 8 місяців тому

    🙏🙏🙏🙏🙏 Enlightened🙏🙏🙏🙏

  • @user-kd7tm6tr6x
    @user-kd7tm6tr6x 4 місяці тому

    very good session

  • @JMCe6a
    @JMCe6a 9 місяців тому

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

  • @bikash7773
    @bikash7773 Рік тому

    Really nice

  • @ranjitdesai3926
    @ranjitdesai3926 Рік тому

    Awesome........😀

  • @girishbharatwaj90
    @girishbharatwaj90 Рік тому +1

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

  • @jacobkurien
    @jacobkurien Рік тому

    great perspectives and awesome jokes!!

  • @GG-uz8us
    @GG-uz8us Рік тому

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

  • @iamseban
    @iamseban Рік тому

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

  • @PelikanVPustatine
    @PelikanVPustatine Рік тому

    good job!

  • @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.

  • @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.

  • @onebeartoe
    @onebeartoe Рік тому

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

  • @nikhiltaneja6673
    @nikhiltaneja6673 Рік тому

    Execute around method sounds very similar to Context manager in python

  • @TJ-hs1qm
    @TJ-hs1qm Рік тому

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

  • @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).

  • @jeycode9180
    @jeycode9180 Рік тому

    My frienddddd

  • @31redorange08
    @31redorange08 Рік тому

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

  • @OmprakashYadavIIT
    @OmprakashYadavIIT Рік тому +2

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

  • @rolandinnamorato1953
    @rolandinnamorato1953 Рік тому

    The Weapon of Devoxx

  • @santanusen3930
    @santanusen3930 Рік тому

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

  • @BosoChannel
    @BosoChannel Рік тому +1

    What kind of IDE he are using?

    • @Anbu_Sampath
      @Anbu_Sampath Рік тому +1

      he uses TextMate with scripts, refer his website.

  • @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?

  • @89dvdmd
    @89dvdmd 3 місяці тому

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

  • @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.

  • @dev-skills
    @dev-skills Рік тому +1

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

  • @zurumogbonda3225
    @zurumogbonda3225 Рік тому

    was here

  • @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 ✅

  • @sandeephalder7536
    @sandeephalder7536 Рік тому

    Boss

  • @275drago
    @275drago 4 місяці тому

    get on optional should have been private😅

  • @xgorgk
    @xgorgk Рік тому

    2.5 hours?!

  • @abhiesa
    @abhiesa Рік тому

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

  • @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.

  • @narainsankar
    @narainsankar 7 днів тому

    Some people can never be helped 😅🤣

  • @zephyrinesplanade
    @zephyrinesplanade Рік тому

    moustache is lazily evaluated on his face seems

  • @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 .

  • @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 11 місяців тому

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

    • @izebit
      @izebit 11 місяців тому

      @@springboot-devops Yes, unfortunately. 😉

  • @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

  • @trumpyla
    @trumpyla Рік тому

    A zip? Dude we need GitHub repo

  • @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