Junior Developer Sent Me Another PR For Review

Поділитися
Вставка
  • Опубліковано 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 - ua-cam.com/video/9i1gQ7w2V24/v-deo.html
    Free courses - bit.ly/2JgGW0w

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

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

    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 :)

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

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

  • @user-ut7md1tz7h
    @user-ut7md1tz7h Рік тому

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

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

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

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

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

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

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

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

    Pushing the algorithm ❤️

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

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

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

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

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

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

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

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

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

    thanks for your video~

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

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

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

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

    Thank you ! :)

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

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

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

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

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

    this is really helpful

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

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

    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

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

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

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

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

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

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

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

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

    Why are you making all the service instances as final ?

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

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

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

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

    Thank you

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

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

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

    I did't get problem with IOException

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

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

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

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

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

    Super 💯💯

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

      .

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

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

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

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

    Good🎉

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

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

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

    What tech stack is this? Is it React?

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

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

    Vaaleikum Assalam

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

    🔝‼

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

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