Let's Review Your Backend Code | SHALL WE???
Ғылым және технология
In this video I code review code sent by the Amigoscode community.
#amigoscode #programming #codereviews
Don't Forget to
===========================================
💯 Subscribe to Amigoscode - bit.ly/2HpF5V8
💯 Courses Available for free here - amigoscode.com/courses
💯 Join Private Facebook Group and Discord - amigoscode.com/p/join-community
⭐ Table Of Contents ⭐
===========================================
🙊 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
Пікірлер: 457
This style of content is actually really great. You should definitely do more of this. It's incredibly educational.
@infinteuniverse
2 жыл бұрын
when you're on the job. Your team is expected to give you regular code reviews every time you want to merge changes.
@dwikikurniawan9878
2 жыл бұрын
yes, another video like this, please! 😉
@KawoskiKoh
Жыл бұрын
agree especially when you write code similar to these you can see where you improve
@Kotik112
Жыл бұрын
Agreed. I'm looking for my first job as a spring boot developer so these sort of code reviews are "gold".
@phil86_
Жыл бұрын
Absolutely agree. Getting code reviews from Senior devs is crucial and it’s not so obvious unfortunately. This is gold actually.
"Add some tests, it's not difficult", as a support engineer I wish it was more difficult. So many engineers write crap tests that validates their work. It's like awarding yourself a medal
@lion816
2 жыл бұрын
i feel this. test driven development is something everybody should look into imo. i learned it once and will never write code without it. improves quality of tests and production code
@matthewchunk3689
2 жыл бұрын
@@lion816 Just learning how to write fuzz tests. Are there any good resources?
@lion816
2 жыл бұрын
@@matthewchunk3689 we dont really use fuzz testing at work atm, im not so familiar with it sorry :(
@ProxyDE
2 жыл бұрын
hey, i did a great job and my tests prove it. i deserved that medal
@heliophobicdude
2 жыл бұрын
@D C what do support engineers do? Thanks!
Dear Nelson, thank you for the great content. Please do more of these code-review-style videos. As a beginner it is one of the best ways to see different projects through someone's more experienced eyes. Truly invaluable!
cool video idea! but it would be much more helpful if you would explain shortly why you would do things different (and not just what). So a few questions came up for me: 1. why to use "BigDecimal" instead of "Double" for prices 2. why you think that "implements Serializable" can be removed for the dto class 3. which response code is returned if we throw an exception in a controller, 500? 4. why to additionally add the "@Query" annotation to the method declarations of the repository interface, instead of relying on the method name
@RaviYasas
2 жыл бұрын
I have the same question "why do you think that "implements Serializable" can be removed for the dto class"?
@stevenr3537
2 жыл бұрын
I'd actually suggest using the jpa function is better than query, unless you actually have something custom to do. Computer is best at generating these basic queries. The big thing people forget is to ensure their queries hit indexes they have on their table.
@codebitcookie8053
2 жыл бұрын
Computers can sometimes miscalculate floats with rounding errors. See the video about Floats from Computerphile. Since Double is just a bigger float. You should rather use Integers for dollars and cents so 1 dollar = 100 cents, 1.25 dollar = 125, etc.
@stevenr3537
2 жыл бұрын
You should use Big decimal for money amounts, more precision again then Integer
@climatechangedoesntbargain9140
2 жыл бұрын
@@codebitcookie8053 what do you do with 0.9 cents? -> decimals
Bro, simply amazing channel. That's awesome that you're doing this public reviews for the people and pointing the improvements. The community needs more people like you.
I liked this a lot! Thanks! Would be nice if you could do these types of content from time to time and also explain like how and why it could be better implemented when you don't agree with some of the stuff you review. Or even make a video for best practices, programming principles, designs like package by feature vs package by layer and etc.
I know this first code. It was written in Semana DevSuperior in Brazil. The instructor is quite nice, a really smart guy. But it's really awesome when we can see a feedback like this from Mama Samba.
i enjoyed this. you're one of the few YT instructors I respect
we aleykum Selam, a Muslim doing code Videos, damn I am happy to see a brother sharing his knowledge with The World! We need more people as amazing and nice as you representing there religion in such a good manner! May Allah bless your Heart jazakallahu khairan!
Code reviews are my favorite programming content on the internet. Subscribed. Please do more! 🙏🏻
Hey amigos code I just loved the "old lady" you used on your Thumbnail, she's in a lot of my own videos. About your video? A great Job as always. Congrants!
Your sense of fashion is amazing dude, also props for being so informed and knowledgable
awesome video! This is the best way to learn how to properly write code ! It's awesome to learn good practices from such pro as You! Please do more in the future !
This content is awesome! I really enjoyed this video. Its really cool to get an inside look into what is going through an experienced developers mind in a code review!
I LOVE THIS! We need more of this . Thanks Amigos
You have a very positive influence on our coding-community. Nice work!
I learn english by watching your content, thanks for your efforts! From Russia with love ❤
I really enjoy watching these code reviews! I learned a lot watching you review Spring Boot-based app. Well done!
hello nelson great content, can you show us how to test a secured endpoint in spring boot and how to user swagger with spring security
This is the best series!! I really liked and learned, please keep on giving these review videos
Really good advice. You always have to remember that the Tech-Lead is not the one who is hiring you but he has to defend your application and if you follow Amigos advice you make it very easy for somebody to defend your position.
Incredibly useful, it's like a video version of pull request review. Keep it up!
Greetings from Brazil ! Congratulations for your content, it has helped me a lot! I don't understand English very well, but your diction is very good and you don't speak super fast like other people lol, so I can follow your content more easily! thank you !
If anyone asked me what's the difference between junior and senior developer I will show them this video
Great content here.. Thank you Nelson for making one! Please bring more code review videos.
KZread brought me here and I'm so happy I found you! subscribed.
This video is amazing! Got to learn so much from reviews. Thank you!
This is a truly channel for developers unlike other channels that shows any kind of crap except programming itself.
I'm from Brazil and your "Olá, tudo bem?" was perfect. Congrats! You have a little of brazilian in your life.
really like this kind of professional code reviews. Would be great if get to see more.
I usually skip most of your videos, but this one was an eye catcher. You should keep on doing this type of format. Another idea to consider, you do an open source project with fans and do code review/coding sessions with them.
i encountered so many problems in my project just by watching this video, thank you so much sir.
This is incredibly usefull and helpfull especially to someone like me (who has not landed a job yet) to get insights on how things should be
First time Im seeing this kind of content on youtube, but its really good. Please more of it
i totally loved this video. It is super useful to have your feedback since you seem to have a lot of experience with Springboot and Java. Kudos for this video
Strongly agree that this is very good educational content, it was entertaining and informative!
Thank so much for this content, it really helps me get familiar with the backend part of web dev
am a MERN developer - this is the most helpful content I've found all month. Thanks alot
It was great video man. Thank you so much for all this tips.
Great video! I Always learning new things from watching your videos. Regards from Tijuana, México
Just look at this guy inspiration for all the Muslims, glad to see this guy following sunnah with prayer cap.
Wow beautiful content as always 😊😻, haven't been seeing ur channel in a while,(KZread algorithm hasn't been recommending me ur videos :( ) i realised i missed a lot of interesting videos💫👌... Will be catching up soon
wa alaikum as'slaam. your videos are true learning material. Not just beginner level but for some experienced like me. Keep them coming brother. jazakaALLAH :)
Really enjoyed watching this. Great stuff, thanks!
Thank you so much! Please do more of these :)
Great stuff man, much love all the way from Angola
I love the way you do the cr, I learned a lot in this video, thanks a lot!!!
Thankful for you Amigos I remember being a beginner and you guided me thank you
Hello Nelson, I think you should do more of this. It's enlightening. Thumps up 👍
Incredible walkthrough. Insisting more on tests
Definitely more of these videos. It would be great for them to go a little longer as well.
This is awesome mate. Great content and a unique approach.
Walaikum as Salam..... Masha Allah , this is great man ,this helped alot analyzing myself. Looking for more such reviews. Thanks!
I strongly disagree on 2 points: 1) There is no bad thing about using Instant, it's part of Java 8 Date/Time API as LocalDate. 2) The bad practice in repositories is actually to write a @Query when it can work automagically thanks to the method name (I really don't understand why would that be a wrong practice tbh)
@sinamarki
2 жыл бұрын
Im agree with you. I use @Query only for complex query or optimisation and instant is not a bad practice
@tyvain
2 жыл бұрын
@@sinamarki yes, use the power of jpa without typing the query most of the time is great / easy / readable
@xxcsokixx
2 жыл бұрын
Yes please. Dont write unnecessary queries...
@DavisTibbz
Жыл бұрын
Yes
@jorgerst
Жыл бұрын
This. Thanks for also pointing that fact about the unnecessary @Query annotation.
I stumbled upon your video by accident, why didn't I do this earlier?? Your content is the best I have ever seen. And yet, what are your background configurations and so on? The appearance of the IDE with the code makes the eyes happy
I have been working on Software Development for the last 8 years and I never had a code review. Recently I have been promoted to be a tech lead, and I didn't know how to do code reviews. Please, do more of this, and maybe I'll learn how to work better. Thanks.
@shiningass
2 жыл бұрын
LGTM
@mishikookropiridze
2 жыл бұрын
Looks good 👍
@LeadNevertell
2 жыл бұрын
@@shiningass HHAHAHAHAHAHAHA That killed me.
The "olá, tudo bem?" made a big smile on my face, thank you
I wanted to give a like every time you said "TEST YOUR CODE". KZread is full of guys teaching bad practices so this video is GOLD. I'll save it for future reference.
Hey man! :D Awesome video, you could explain more, detailing why he should do it the way you told him.
"What is this, man? Have some tests!" XD haha that was so good.
Great content, this is amaizing and an added value 😍 Much L❤VE & Support 💪
Thank you Nelson very much. Keep going 😎👍👍
I wish I had the chance to see code review like this earlier in my career. You are doing a great job جزاكم الله خيرا. I have a question please, why it's not good practice to have an interface for each service? Without interface you're depending on implementation not abstraction.
@zlarak
2 жыл бұрын
Completely agree with you. Having dependencies in the constructor is nice, but Dependency Inversion requires you to reference an Interface and not the implementation itself. Otherwise you're introducing unnecessary coupling to that one implementation. Interfaces also are usually easier to mock during tests.
@31redorange08
2 жыл бұрын
@@zlarak No, no interface required. Unneeded bloat.
The reason for writing tests is not just to be sure that everything works but also to improve your code. Testable code is usually much cleaner. Just to give you guys extra motivation for testing.
It was a great and different and practical content in KZread 👏
This is really great! Please do more.
I've learned so much from you. Thank you!
The IDE has also the option to optimize the imports for you when u commit something in your repo. I saw so often unused imports....
Nelson, this video is very helpful, great man go on.
Just came across your channle. Subbed!
Awesome content, Nelson. Thanks a million.
Salam, You love testing bro, I don't test my code, you got me interested about doing them on future hahaha, The airplane example was good.
Why is it considered a bad practice not having @Query on top of the methods in the repository?
@Quillraven
2 жыл бұрын
I also did not get that. Why define a query when spring is automatically doing it for us? I get it for complex queries but for simple ones I personally prefer it without @Query unless someone has a good reason for it.
@theyreMineralsMarie
2 жыл бұрын
It's not bad practice, it's just his opinion. Not everything this guy says is law.
@TheN0odles
2 жыл бұрын
@@Quillraven Agreed
Grande Nelson! Hope you keep doing more videos like this.
@hamadimhissen5072
2 жыл бұрын
Same
Hi there, great video there, enjoyed watching it a lot. If you want to make this format even better, you could go a bit more in depth about why things are not working. Well, maybe not naming conventions because they are just conventions, but say: - constructor injection -> you say multiple times to use it over field injection, but you never explain the reasoning behind this - exceptions in controllers -> you say not to throw exceptions in controllers, but never explain why that should be avoided And so on. Basically, I feel like this type of content could have GREAT potential, but that it calls for a more in-depth analysis
The algorithm have blessed your channel.
Please do some more videos of this type, they are very useful and it is secured to have at least 150k+ views because people are looking into watching and learning from videos like this one. Thank you
Really like this content. It would be good if you continued this,maybe like a weeky thing.
This video was helpful. Thanks Amigo.
amazing content Nelson, please do more of that :D
Bless you man! Hope you're ballin'!
Please do expand on the feedback you make so people know why doing 'xyz' is not a good idea rather than just this is not good practice, helps strengthening the point as to what can happen if this is not done. Appreciate the video though, one of the most informative ones I've seen in my career!
This channel is a gem for the java community
This is what I often looking for on youtube, the only channel that doing code review is Laravel Daily, it's hard to find a content like this.
wow, you should definitely do more of these
I'm always glad whenever I see smart young black software engineers, this was never usually the case like 10 years ago in which very few of us existed. keep up the good work buddy
that salam hit different bro keep up the great work!!
I can't thank you enough for putting this together. 💖💖 May Allah reward you well
@speedfastman
2 жыл бұрын
Allah's not really rewarding Ukraine rn. 🤕☹😥
@forevermist3838
2 жыл бұрын
@@speedfastman God gave all of us free will and a ruleset of moral obligations to live by. Now just because a war happens or someone close to you dies. You don't blame God you blame the person who used his free will to cause deaths.
@speedfastman
2 жыл бұрын
@@forevermist3838 Why would God be so silly to give us free will when he knows we'll have pain and suffering because of it!
@forevermist3838
2 жыл бұрын
@@speedfastman Without free will you are just a robot, you won't have the ability to make your own choice .This life is not given to us for free, Through out your whole life you are tested. You have the capacity to do good or bad, Hence the reward and punishment according to your actions. You will get reward if you do good things in this life and in the hereafter and for wrongdoers Justice prevails. If not for God you can do bad things and hopefully justice serves but sometimes you get away with it. You don't have a punishment waiting for you in the afterlife and you don't have the fear of being punished by God. Same argument can be put against athiests, Why do humans have the ability to think and make choices? If not then the world wouldn't be so bad right?
@speedfastman
2 жыл бұрын
@@forevermist3838 Is God good and omnipotent? Yes? Then he wouldn't have created suffering. End of story.
Please upload more of this. Thank you @Amigoscode
Thank You for movie like this one. Please, make more movies about code review. Peace!
Hello Nelson! Thanks for sharing great content. I have a doubt, why are we removing @Autowired and adding constructor injected ?
@stevenr3537
2 жыл бұрын
It's switching from setter depending injection to constructor based injection. Constructor based, using final is a immutable dependency injection method, whereas with setter based technically the dependency could be changed after initial instantaniation of the controller
It's wrong to catch every `Exception` at 6:00, since there are many things that could go wrong. However I think you should catch a custom service exception NotFound (or findById exception if it already throws a DoNotExistException) on the controller and return a HttpStatus.NOT_FOUND. I don't use Spring for years but I don't think IllegalStateException will automatically map to a 404 response. Normally unhandled exceptions will throw a 500 internal error on webservers.
@fauzrukendworld1633
2 жыл бұрын
I don't know Spring but on my projects I usually use some kind of exception event or at a higher level than the actual action that does this exception conversion from Not Found from the ORM to the HTTP 404 exception. This avoid having to repeat the try catch in all the controller actions I might have.
hello bro... u really did motivate me to come back to coding and it has been my resolution for this year to catch up with some front end and back end programming so far am really loving , enjoying it...programming has always had a soft spot in me but due to career change i have been about 9 years out of thew game and i have been always feeling like now am too old to catch up but i was really wrong.
@blighthornsteelmace820
Жыл бұрын
so, are you coding now?
Please do more of this!!💕
Oh man, this type of content is great, thanks bro
DON'T FORGET TO ➡️ Join the community here: amigoscode.com/p/join-community ➡️ Checkout best premium programming courses: amigoscode.com/courses
great video, inspires me to write tests for my code lol
That "olá tudo bem ?" was perfect. Nice portuguese bro
I learn a lot from this video!
Great content. Incredibly educational.