Junior Code Review: Cache, N+1 Queries and 'Messy' Code

preview_player
Показать описание
I was asked to review this Livewire code, and identified three main topics to improve, with smaller details along the way.

00:00 Intro
01:10 Installation Issues
05:01 Caching Issues
07:14 N+1 Query Issues
10:40 Smaller Issues
12:25 Overall Advice

- - - - -
Support the channel by checking out my products:

- - - - -
Other places to follow:
Рекомендации по теме
Комментарии
Автор

Thank you for reviewing my code and giving your precious advice. I will care on it.

satishksharma
Автор

I’m an aspiring junior developer who just finished my studies and am focusing on the Laravel + Inertia + Vue.js stack. I've learned so much from your videos—thank you very much! I really appreciate your junior code reviews.

tiborkovacs
Автор

Great video as always. One thing about using @class directive, I'm using vscode and it doesn't autocomplete tailwind classes when it's inside the @class directive. And it sometimes can be annoying to type all the classes by hand. That might be why they went with that approach.

To work around this, I give the classes in default html class attribute and then move it into @class directive. I can suggest this approach in case anyone else finds it annoying.

kemal
Автор

Was waiting for your video all week long. Happy 40.

minthantoo
Автор

One of the things I learned from you a few months ago is the importance of including a README file and other stuff. I’m currently working on a project, and once it’s done, I’d like to have you review my project if possible so I can keep improving my skills for future projects.

adilomer
Автор

Good tips, regarding the SQL performance I rather use Query Builder than Eloquent Relations, especially in this scenario this could be a better option and such a list could be written using one Query

ranostaj-dev
Автор

Thank you! Great, it is helpful for me!

ЖеняХристенко-еы
Автор

awesome review, very interesting and educational

Автор

I completely agree that the balance could have been calculated in the query.

But a lot of the time, I see that programmers only want to use SQL to fetch data, forgetting that it can also transform data as required.

odehadejoh
Автор

Hey Povilas,
Thanks for your video! I've been following your tutorials since 2019, and they've helped me a lot in improving code quality and optimization. If possible, could you please make a video on when developers should use raw queries versus Eloquent? While reviewing junior developers' code, I noticed they often mix raw queries with Eloquent without knowing when each approach is appropriate or what the best practices are.

mdatiqurrahman
Автор

I assume there was no tests.
A very simple test would have catch the factory issue.

marcelaodev
Автор

can u make video about stored procedure with laravel

iamriwash
Автор

Sir, is it possible to seed a particular table data in Database seeder? I mean, for example, i have subject table with some specific subjects and students table with student data like name regulation semester etc... When i run db:seed, i need to populate the student data and subject data (not random fake data) Is it possible? Apologize me i my question is wrong...

Thank you.

earavichandran