Testing and Refactoring Legacy Code

Поделиться
HTML-код

Комментарии • 35

  • @dvdmtchln
    @dvdmtchln 8 месяцев назад +1

    Loved it!! The SEAM tip was amazing!

  • @michelchaghoury9629
    @michelchaghoury9629 2 года назад +9

    This man is awesome, really useful vid please intellj idea team we need more vids with this awesome instructor

  • @softwarengineeringwithfabri
    @softwarengineeringwithfabri 5 месяцев назад

    Always amazing to watch Sandro refactoring code 🎉

  • @Quillraven
    @Quillraven 2 года назад +9

    Super interesting call and techniques and presented in a cool way 👍
    Thank you for that!

  • @suvankarbose
    @suvankarbose 2 года назад +3

    Super session . Coding is really art !

  • @iolumin
    @iolumin 2 года назад +3

    Beautiful refactoring, thank you 😊

  • @ruixue6955
    @ruixue6955 Год назад +3

    4:55 1st piece of code
    5:57 business rule
    6:39 goal of working with legacy code: no test => cannot start refactoring immediately
    6:48 => idea: write tests until we have 100% test coverage, then refactor
    7:14 *challenge: retrofitting tests for existing code is not easy*
    7:52 problem:
    8:21 so the only thing we need to do: *automatic refactoring*
    8:57 *if we change the public interface of the class or module, we are going to break the code*
    9:21 if we *introduce state* => multi-threading problem
    9:40 important tip: try best to *keep the public interface intact, but still try to isolate the dependencies*
    9:49 *technique* : landscape of code
    10:42 *shallow branch* - shortest path to the exit of the method
    11:32 try to understand the small piece of code and write unit tests on it
    12:34 build the knowledge of that code base *one test at a time*
    12:40 in order to get the *deepest branch* of the code, need to *play the input data*
    13:24 coding demo in practice

    • @vanteole9427
      @vanteole9427 10 месяцев назад

      my brother in christ you a saviour

  • @leandrosoares6
    @leandrosoares6 2 года назад +5

    Incrível. Apesar de não dominar bem o inglês mas consegui abstrair cada parte dessa incrível jornada de como testar um código legado. Obrigado pela excelente contribuição!

  • @Chemaclass
    @Chemaclass 2 года назад +4

    Awesome, especially the last words. Thanks for sharing your wisdom! :)

  • @PabloSagoz
    @PabloSagoz 2 года назад +5

    Quite interesting and educational, Thanks!

  •  2 года назад +3

    This is pure gold!!! Txs

  • @hermawanhermawan9843
    @hermawanhermawan9843 2 года назад +2

    Awesome! Thanks for sharing such a great knowledge.

  • @aldosilva6
    @aldosilva6 2 года назад +1

    I've never started a refactor by a test. Very interest technique!

  • @LaurentLaborde
    @LaurentLaborde 2 года назад +3

    i liked the quote about legacy test being worse than legacy code :D

  • @vixdc
    @vixdc 2 года назад +2

    @Sandro this is a cool presentation!

  • @etienneboutet7193
    @etienneboutet7193 2 года назад +1

    Great presentation ! Glad to learn new Intellij tips

  • @tipazas
    @tipazas 2 года назад +2

    Superb, waiting for more.

  • @androidstudio1995
    @androidstudio1995 Год назад

    What an explanation! This is what i was looking for 👍

  • @vadimprudnikov9072
    @vadimprudnikov9072 2 года назад +4

    Thanks for tips! I would consider further refactoring: move the loggedinuser parameter to another interface like Context#requireCurrentUser() that, in turn, will throw an exception, and inject that context to the service. As a result, the service won't care of the nullable user at all. I feel the code will become simpler and more RSP'ish :)

  • @hemanhy
    @hemanhy 2 года назад +5

    Awesome session

  • @RobertoFlores-dc3pb
    @RobertoFlores-dc3pb 2 года назад +1

    Gracias por otro video educativo e interesante como siempre.

  • @eduardssizovs6384
    @eduardssizovs6384 2 года назад +1

    Nice video! Thank you!

  • @bigheat86
    @bigheat86 2 года назад +2

    I'm loving it!

  • @jonyisinthehouse
    @jonyisinthehouse 12 дней назад

    Very useful

  • @kid9807
    @kid9807 2 года назад +2

    Awesome

  • @lesgeeksducode5189
    @lesgeeksducode5189 Год назад

    Awesome!

  • @krige
    @krige 2 года назад +2

    38:00 I would rather use Lombok @Builder annotation on the User class

  • @pkcomments
    @pkcomments 2 года назад +1

    Came here to understand on how to use intelliJ to refactor legacy code. But ended up in watching a video on writing unit tests.

  • @petrushoc
    @petrushoc 2 года назад +1

    Noice

  • @pedronavajas98
    @pedronavajas98 2 года назад

    😑

  • @pedronavajas98
    @pedronavajas98 2 года назад

    😒

  • @emorozov
    @emorozov 2 года назад +1

    Hate unit tests😀

  • @Mohamed-uf5jh
    @Mohamed-uf5jh 8 месяцев назад

    Beautiful refactoring, thank you