Junior Developer Sent Me Another PR For Review

  Рет қаралды 101,811

Amigoscode

Amigoscode

Жыл бұрын

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 Жыл бұрын
This is the better way of implementing s3 integration - kzbin.info/www/bejne/b5qUmIRtrJeJaJY Free courses - bit.ly/2JgGW0w
@SachalChandio
@SachalChandio Жыл бұрын
Hands down you are the best online mentor I've ever come across. Keep doing the amazing work.
@abubakaramasa5203
@abubakaramasa5203 Жыл бұрын
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 Жыл бұрын
We need more Spring Boot Microservices, AWS, Angular and DevOps tuts please and thank you for the great content.
@Nimkrox
@Nimkrox Жыл бұрын
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 Жыл бұрын
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 Жыл бұрын
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 Жыл бұрын
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 Жыл бұрын
What about ControllerAdvice? Isn't it better or more ellegant way to handle exceptions, instead of try/catch in service methods?
@mohamedmhiri4213
@mohamedmhiri4213 Жыл бұрын
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 Жыл бұрын
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 Жыл бұрын
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 Жыл бұрын
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 Жыл бұрын
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 Жыл бұрын
thanks for your video~
@piotrl8315
@piotrl8315 Жыл бұрын
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 Жыл бұрын
Do anyone see the link of the video where it's implemented in right way as mentioned in this video
@caffeinejavacode1475
@caffeinejavacode1475 Жыл бұрын
I did't get problem with IOException
@jamesamo9682
@jamesamo9682 Жыл бұрын
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 Жыл бұрын
My bad, this is Java and not JavaScript
@todimuisewon5662
@todimuisewon5662 Жыл бұрын
He should also add a "/" to the end of the @RequestMapping url in the ImageController
@ivansishchuk8138
@ivansishchuk8138 Жыл бұрын
No, he shouldn`t
@trentarchibald1120
@trentarchibald1120 Жыл бұрын
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 Жыл бұрын
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 Жыл бұрын
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 Жыл бұрын
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 Жыл бұрын
@@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).
@Krankschwester
@Krankschwester Жыл бұрын
They are, by using Lombok annotation.
@maksym.pavlenko
@maksym.pavlenko Жыл бұрын
What's the argument behind avoiding the use of mocks in that test?
@tofahub
@tofahub Жыл бұрын
I think you better use mock Mvc to test controllers
@maksym.pavlenko
@maksym.pavlenko Жыл бұрын
@@tofahub oh, right!
@shreysoni4117
@shreysoni4117 Жыл бұрын
One more thing that is not there in PR is Java docs which is very important
@nesier07
@nesier07 Жыл бұрын
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 Жыл бұрын
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 Жыл бұрын
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 Жыл бұрын
There's no dependency injections, he's not Autowiring, the service or repository bean.
@hovhannes5
@hovhannes5 Жыл бұрын
He's using constructor autowiring. Lombok creates an AllArgsConstructor, and Spring can use that for DI
@csrchandra8832
@csrchandra8832 Жыл бұрын
Good🎉
@acefisherman913
@acefisherman913 Жыл бұрын
What tech stack is this? Is it React?
@notkamui9749
@notkamui9749 Жыл бұрын
Java, Spring
@mohdtalib7350
@mohdtalib7350 Жыл бұрын
Where is the link where you should to implement this with the right way? If anyone find kindly paste to my reply
@amigoscode
@amigoscode Жыл бұрын
I just pinned the comment
@mohdtalib7350
@mohdtalib7350 Жыл бұрын
Thankyou so much
@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 Жыл бұрын
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 Жыл бұрын
Vaaleikum Assalam
@jordyr367
@jordyr367 Жыл бұрын
Controllers should be package privated
@stevegatspaul
@stevegatspaul Жыл бұрын
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 Жыл бұрын
🔝‼
@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 Жыл бұрын
Don't use regex to validate email addresses. Write a parser.
@sebastianui3
@sebastianui3 Жыл бұрын
Why?
@radon-sp
@radon-sp Жыл бұрын
@@sebastianui3 performance
@salehjafarli6469
@salehjafarli6469 Жыл бұрын
keep it simple, writing custom parser is too much overhead and covering all edge cases will take your time
@giovannisins
@giovannisins Жыл бұрын
@@salehjafarli6469 aren't regex like the one showed not recommended because they are unreadale and impossible to debug?
@salehjafarli6469
@salehjafarli6469 Жыл бұрын
@@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.
Let's Review Your Backend Code | SHALL WE???
36:24
Amigoscode
Рет қаралды 300 М.
10 Most Common Java Developer Mistakes
16:13
Amigoscode
Рет қаралды 101 М.
New Gadgets! Bycycle 4.0 🚲 #shorts
00:14
BongBee Family
Рет қаралды 14 МЛН
How to bring sweets anywhere 😋🍰🍫
00:32
TooTool
Рет қаралды 14 МЛН
How Senior Programmers ACTUALLY Write Code
13:37
Thriving Technologist
Рет қаралды 1,3 МЛН
I Found the Perfect Open Source React Project (Code Review)
22:36
Cosden Solutions
Рет қаралды 61 М.
Lets Refactor this Telegram Bot To Use Generics | Code Review #3
37:35
OK i need to change your code. SORRY
43:18
Amigoscode
Рет қаралды 165 М.
5 Common Mistakes Spring Developers Make
18:06
Dan Vega
Рет қаралды 14 М.
4 Spring Boot Mistakes to AVOID in 2024
15:18
Java Brains
Рет қаралды 52 М.
When You Ask the Intern to Review Your Code
4:01
Nicholas T.
Рет қаралды 520 М.
Code Review with a Jr JavaScript Developer - Here's What I Found!
10:03
Java Spring Boot 14 Years Interview Experience [God Level Skills]
54:49
Contract Testing For Microservices IS A MUST
18:36
Continuous Delivery
Рет қаралды 27 М.
СТОИТ ЛИ БРАТЬ IPHONE 13 В 2024?
13:53
DimaViper Live
Рет қаралды 29 М.
📱 SAMSUNG, ЧТО С ЛИЦОМ? 🤡
0:46
Яблочный Маньяк
Рет қаралды 1,9 МЛН