Junior Developer Sent Me Another PR For Review

Поделиться
HTML-код
  • Опубликовано: 6 май 2023
  • In this video, we'll take a look at a pull request (PR) submitted by a junior developer for review. As a more experienced developer, it's important to provide constructive feedback to help junior developers learn and grow.
    We'll walk through the PR step-by-step and discuss best practices for reviewing code changes.
    Whether you're a junior developer looking to learn more about code review, or an experienced developer looking to improve your reviewing skills, this video has something for everyone.
    Join us as we explore the world of code review and help junior developers take their coding skills to the next level!
    Watch the better way of integration s3 - • Spring Boot, React.js ...
    Don't Forget to
    ===========================================
    💯 Subscribe to Amigoscode - bit.ly/2HpF5V8
    💯 Courses Available for free here - bit.ly/2JgGW0w
    💯 Join Discord - bit.ly/3Llkf7T
    🙊 Here are the goods for all my videos video 🙊
    ► Recommended Books
    ===========================================
    - Clean Code - amzn.to/2UGDPlX
    - HTTP: The Definitive Guide - amzn.to/2JDVi8s
    - Clean Architecture - amzn.to/2xOBNXW
    ► Computer and Monitor
    ===========================================
    - New Apple MacBook Pro - amzn.to/3464Mmn
    - Dell 27 INCH Ultrasharp U2719D Monitor - amzn.to/2xM3nW1
    - Double Arm Stand Desk Mount - amzn.to/3aYKKfs
    - USB C Hub Multiport Adapter - amzn.to/2Jz7NlL
    ► Camera Gear
    =============================================
    - Sony ILCE7M3B Full Frame Mirrorless Camera - amzn.to/346QIJn
    - Sigma 16 mm F1.4 DC DN - amzn.to/2wbic3Q
    - Sigma 33B965 30 mm F1.4 DC DC - amzn.to/39G37Fd
    ► IDE & Tools I use for coding 💻 🎒
    ===========================================
    - ITerm
    - VsCode
    - GoLand
    - IntelliJ Ultimate
    - Sublime
    P.S
    ===========================================
    💯 Don't forget to subscribe | bit.ly/2HpF5V8
    💯 Join Private Facebook Group and Discord - amigoscode.com/p/join-community
    💯 Follow me on Instagram | bit.ly/2TSkA9w
    ❤️ Thanks for watching
  • НаукаНаука

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

  • @amigoscode
    @amigoscode  Год назад +11

    This is the better way of implementing s3 integration - ruclips.net/video/9i1gQ7w2V24/видео.html
    Free courses - bit.ly/2JgGW0w

  • @SachalChandio
    @SachalChandio Год назад +2

    Hands down you are the best online mentor I've ever come across. Keep doing the amazing work.

  • @abubakaramasa5203
    @abubakaramasa5203 Год назад +4

    Salam bro, coming from a node js background to java, u've made my transition extremely easy. Learnt a lot from you this short period, keep it up. 💯 just had to leave this here

  • @michelchaghoury9629
    @michelchaghoury9629 Год назад +10

    We need more Spring Boot Microservices, AWS, Angular and DevOps tuts please and thank you for the great content.

  • @Nimkrox
    @Nimkrox Год назад +5

    Your videos are amazing, thank you for recording them :D
    If you're looking for ideas for the next videos, I would be grateful for:
    1. examples of some of the most used design patterns (like factory method, abstract factory, builder, prototype, ...) with an explanation of why we should use them in certain cases and when using a design pattern is a bad idea. For me, it's tough to recognize situations when I should use a specific design pattern and when I shouldn't because it will only cause complications in the code.
    2. hacks & tips on how to debug like a pro

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

    I just reviewed some code with these exact issues last week. You can just just default provider everywhere, never need spring-cloud-aws. Just set the environment variables at deploy time or specify a profile that on-startup performs a System.setProperty(...) on the data you get from startup variables or a profile-specific propertied file. Also I always enforce a null-check at startup using InitializingBean or PostConstruct. You want to know about required variables that are missing immediately, not when the machine might have already been spinning for a few hours. 100% agree with all your points, learned something new today about proper controller structure too :)

  • @ujwalborle7213
    @ujwalborle7213 11 месяцев назад

    Dieses Programm hat meine Produktivität enorm gesteigert. Vielen Dank, dass Sie es zugänglich gemacht haben.

  • @smarttrupti2007
    @smarttrupti2007 Год назад +30

    Could you please make a video on how to handle exceptions well at all layers controller, service and repo with correct way of setting the response and correct status code? And if possible to include global exception handling? Would really appreciate. Thank you.

    • @user-vw1ru3ns4o
      @user-vw1ru3ns4o Год назад +2

      You should now specifity of handling exceptions in Security filters. RestControllerAdvice works on controllers, service and repos, but not on filters layer.

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

      Basically look into spring AOP as a concept

  • @santiagosuarez6470
    @santiagosuarez6470 Год назад +1

    Yoo thx, this is one of the best PR review i saw. I am developer java than work with aws, and i did't know that kind of function to s3 secret key. Thx bro!

  • @user-ut7md1tz7h
    @user-ut7md1tz7h Год назад

    Very valuable observations. Will review again to remember well. Thanks a lot!

  • @lwa.dev74
    @lwa.dev74 Год назад

    Hi Nelson, wow, this was great to watch and learn as you went through the pull request; I have never had that experience myself as I have been trying to learn on my own but always found many roadblocks and tried to work around them but lost a little faith along the way but still keep trying as I know this is the way. I pray Allah will give me the courage to continue as I believe it is possible. I have always watched your content, and now I know you have paid courses I can take to achieve my goals for the future. The developer roadmap on AmigosCode has given me a visual overview of what I need to focus on. I never thought about Java, but I know of JavaScript. Thank you for bringing this content to many such as myself-blessings to you, my brother.

  • @bartuchy5946
    @bartuchy5946 Год назад +6

    What about ControllerAdvice? Isn't it better or more ellegant way to handle exceptions, instead of try/catch in service methods?

  • @mohamedmhiri4213
    @mohamedmhiri4213 Год назад +1

    Waalaykom al Salam, great job.
    I have some more tips:
    - ImageService from line 33 to line 37 could be replaced with a custom controller taking in parameter the id, type, date and customer (encapsulation)
    - I would use interfaces rather than classes as much as we can to ensure that the code is not highly coupled with amazon technologies

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

    assalamu'alaikum, great video as always, thanks from Indonesia ❤‍🔥

  • @Md_sadiq_Md
    @Md_sadiq_Md Год назад +1

    Pushing the algorithm ❤️

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

    Usually the video are very basic. This instead I found more enlightening, especially on the AWS credendials part (on working right on that currently).

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

    I generally check for following things :
    #1 API specifications, error handling (not throwing exception to client)
    #2 security concerns
    #3 generic code and not too specific, but also not complicating things
    #4 use of design patterns - strategy, factory, facade, visitor, pub-sub (mostly use Kafka if already in system), decorator (yes, annotations)
    #5 good documentation for complex functions with any assumptions taken
    #6 Error handling with segregation into 3xx, 4xx, 5xx codes
    #7 better use of language specific constructs - Scala, Kotlin, Java (lesser code variants in all 3)
    #8 segregation and maintainable of code structure
    #9 decent logging and monitoring/metrics at Grafana, Kibana, Hadoop end
    #10 use of threads - depends on use case

  • @tailevan447
    @tailevan447 Год назад +1

    As you are reviewing your current project, I see that you are still using ResponseEntity, so I have a question as to why the projects I am working on have to custom a response instead of using ResponseEntity , or is ResponseEntity available? some downside, please explain to me, thanks

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

    As for exceptions I would recommend to create your own exceptions (would be a bit more clear in term of logic ) throw them and handle them in global exception handler.

  • @kaan4708
    @kaan4708 Год назад +7

    Hey Amigoscode, I enjoy your videos very much. I had a request. Could you make a video on how to make a good CV for a Java Developer with no work experience? That would be awesome if you would make one!

  • @Mars-fm6ni
    @Mars-fm6ni Год назад

    at 07:35 isn't it better to use a builder for the media Class? Also we use final for our method parameters.

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

    Hi Nelson! Can you teach us how to use Websocket with STOMP protocol using Spring? How can we test STOMP endpoints? (I tried POSTMAN, but unsuccessfully)
    Have a good day!

  • @xXxDerfoufixXx
    @xXxDerfoufixXx Год назад +2

    Is there any project like this that haven't started so I can join as someone who's just starting with spring boot?

  • @wasoncheung3851
    @wasoncheung3851 Год назад +1

    thanks for your video~

  • @piotrl8315
    @piotrl8315 Год назад +1

    can you make a video how to handle credentials in code ?

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

    what is the reason that we should not use @Autowired here to inject the service? why use constructor injection?

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

    Thank you ! :)

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

    @amigoscode do you any course or videos on how to deploy spring boot services into openshift platform using helm deployment script??

  • @rahuldebnath3919
    @rahuldebnath3919 Год назад +1

    Do anyone see the link of the video where it's implemented in right way as mentioned in this video

  • @caffeinejavacode1475
    @caffeinejavacode1475 Год назад +1

    I did't get problem with IOException

  • @jamesamo9682
    @jamesamo9682 Год назад +1

    this is really helpful

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

    We can easily get into those traps when tdd is not applied

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

    Why are you making all the service instances as final ?

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

    Should actually use v3 of the SDK. V2 is going into maintenance mode. I recently did a few migrations to cater for this.

    • @carlhandy
      @carlhandy Год назад +1

      My bad, this is Java and not JavaScript

  • @todimuisewon5662
    @todimuisewon5662 Год назад +1

    He should also add a "/" to the end of the @RequestMapping url in the ImageController

  • @trentarchibald1120
    @trentarchibald1120 Год назад +1

    Member variables do not always have to be declared as final. I'm assuming you looked at the changes prior and saw it was only set in a single place. I've seen many instances where people over-use the final keyword.
    Also, there are cases where it makes sense to have your own custom exception handler in which case it's perfectly acceptable to throw an exception on the endpoint impl method.

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

      if the reference is never supposed to change, it's final, period. Especially when doing dependency injection.
      There is NEVER an overuse of final, because it is restrictive.

    • @hovhannes5
      @hovhannes5 Год назад +1

      Putting it to final will let you change that @AllArgsConstructor to a RequiredArgs too, so you can null-init some fields if you want without having to write your own constructor or manage which fields are effectively final and which ones might change and/or be null

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

    please i really interested and want to be part of the Amigoscode mentorship program, how can i join?

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

    Weird and slightly unrelated question, how do u keep your eyes so fresh and hydrated? my eyes are always dry

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

    Thank you

  • @getvivekjoshi
    @getvivekjoshi 6 месяцев назад

    How do you know everything? Why people fail in learning, can you please make video your journey, you know react, Java, angular. When other people are got failures. Can you please make video on this. I know you knows bigger than this micro services and others tech stack too. I am struggling to learn one tech stack.

  • @kirilmilanov1096
    @kirilmilanov1096 Год назад +2

    What do you mean by you should never use mock is API tests? I usually use something like Wiremock to test my contracts

    • @habeebafolabi7292
      @habeebafolabi7292 Год назад +1

      He's not saying you should never use mock in your API test, what he said his there're ways you can mock test AWS implementation...

    • @kirilmilanov1096
      @kirilmilanov1096 Год назад +1

      @@habeebafolabi7292 I mean I think he explicitly said that you should never use mocks in API tests but maybe he can answer in order to be sure

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

    Suggestion:
    Why not use dependency injection ( injecting the service class in the controller constructor).

  • @maksym.pavlenko
    @maksym.pavlenko Год назад +4

    What's the argument behind avoiding the use of mocks in that test?

    • @tofahub
      @tofahub Год назад +2

      I think you better use mock Mvc to test controllers

    • @maksym.pavlenko
      @maksym.pavlenko Год назад +2

      @@tofahub oh, right!

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

    One more thing that is not there in PR is Java docs which is very important

  • @nesier07
    @nesier07 Год назад +1

    Well, I'm also using the aws sdk for java 1 because it has auto JSON serialization and deserialization. It would be very helpful if you could point me to some good tutorials on how to address this problem in version 2

    • @amigoscode
      @amigoscode  Год назад +1

      Why is that important?

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

      @@amigoscode Good evening Mr Nelson, well I wanted to migrate to the second version for better performance but I couldn't list any resources like ec2 instances ebs s3 and so on due to the absence of a json deserializer unlike in version 1 that I'm working with now

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

      Make your own json serializer and deserializer

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

    Super 💯💯

  • @Md_sadiq_Md
    @Md_sadiq_Md Год назад +2

    Walekum assalam

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

    The better option then passing media files bytes over api will be presigned urls :). The currently apporsch is very wrong because dev using internal api memory, only to pass a bytes. Btw. C# RuLLLeZ, java is for Dinos 😂

  • @harshsinha3221
    @harshsinha3221 Год назад +1

    There's no dependency injections, he's not Autowiring, the service or repository bean.

    • @hovhannes5
      @hovhannes5 Год назад +1

      He's using constructor autowiring. Lombok creates an AllArgsConstructor, and Spring can use that for DI

  • @csrchandra8832
    @csrchandra8832 Год назад +1

    Good🎉

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

    What tech stack is this? Is it React?

  • @mohdtalib7350
    @mohdtalib7350 Год назад +1

    Where is the link where you should to implement this with the right way?
    If anyone find kindly paste to my reply

  • @Larry21924
    @Larry21924 3 месяца назад

    This is a game-changer. I had the privilege of reading something similar, and it was a game-changer. "Mastering AWS: A Software Engineers Guide" by Nathan Vale

  • @Hanfahhussain
    @Hanfahhussain Год назад +1

    is it worth learning javascript in long term? because i know ai is coming to place

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

      Yes, don't buy into the fear mongering. Learn software engineering and computer science. JavaScript script kiddies will be replaced

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

      .

  • @IslamNasrylaev
    @IslamNasrylaev Год назад +2

    Vaaleikum Assalam

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

    Controllers should be package privated

  • @stevegatspaul
    @stevegatspaul Год назад +1

    Hi, I have 20 classes, to get data from 20 classes using join is very slow, I use JPA query example @Query ("select t1.p1, t1.p2, t2.p1, t3.p4, t3.p6, t5.p1, t6.p3, t7.p11, t8.p1, t8.p2, t8.p3, t9.p9, t9.p1 FROM table t1, table t2, table t3, table t4, table t5, table t6, table t7, table t8, table t9 where [some condition]") public List getMyInfo([condution]);
    can you give me another solution?
    thanks

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

    His names on the top of the PR 😭😭😭

  • @gleitonfranco1260
    @gleitonfranco1260 Год назад +1

    🔝‼

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

    not a single line of comment or javadoc. most of us work in the teams and others might not understand what's the purpose of everything. even if he works alone, someday his code could be passed to someone else as "legacy", in this case he will be hated soooooo much

  • @EhteshamShahzad
    @EhteshamShahzad Год назад +1

    Don't use regex to validate email addresses. Write a parser.

    • @sebastianui3
      @sebastianui3 Год назад +1

      Why?

    • @radon-sp
      @radon-sp Год назад +1

      @@sebastianui3 performance

    • @salehjafarli6469
      @salehjafarli6469 Год назад +1

      keep it simple, writing custom parser is too much overhead and covering all edge cases will take your time

    • @giovannisins
      @giovannisins Год назад +1

      @@salehjafarli6469 aren't regex like the one showed not recommended because they are unreadale and impossible to debug?

    • @salehjafarli6469
      @salehjafarli6469 Год назад +1

      @@giovannisins yea i guess i agree, that one was so big. But i usually validate inputs with simple regexes

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

    First point in review should be not writing instant legacy code = Java.