Don't worry, I am constantly looking for feedback, trying to improve, asking colleagues for review, helping out colleagues, reading into new topics.But I will still stay junior forever.
Nice recommendation. I think useReducer can be a nice option to delegate some of the logic from the component while avoiding overusing redux or context for some state management only occurring in one component.
You can use Eager Loading or "Nested reads" as Prisma calls them to fix the performance issues you mentioned. ORM are not bad, it's the developer(s) that does not know how to take advantage of it
@@LjupcheVasilev I used to think the same long time ago. The problem is that you need to learn different ORM for each framework and programming language while you only need to learn SQL once and you can use it everywhere. Also, instead of ORMs more valid solution would be to generate type-safe code from SQL instead with tools like sqlc that verifies if your queries are valid and matches table schemas created with migrations. SQL should be source of truth for the table schema and queries. Using ORM or DSL for it just adds problems. The initial idea for ORMs comes from old times when we needed abstract databases to give ability to support multiple database types like Postgres, MySQL, SQLite when self-hosting. Nowadays we rarely builds products that need that nor do modern ORMs even support it right now.
Whenever I'm starting a project I always rush through the initial design phase and lean heavily on chatGPT to make my db models and solve my engineering problems for me. It has been a huge issue for me as a learning developer and I've realized that just taking the time and spending a few hours (or even days if you have to) on designing the infrastructure of your app manually and gathering a deep understanding is way more important than rushing through and coming out the other end not having learned anything.
Thanks for sharing that and yeah I completely agree. I didn’t have ai tools when I was learning to code but once in a while I would just copy and paste a whole solution and at the end realise that I’m only fooling myself :)
Yeah that's wise. Db modeling is as much of a business problem as it is an engineering problem, in my opinion. For now, AI won't be solving business problems for you.
Reason why prisma does this is because it was never meant to be an ORM, it started as a graphql thing and that graphql engine still lives and is the default way the query engine works unless you specify "protocol: json", but still joins are horrid and rarely work. Their focus is on monetization right now and they've built entire walls and gardens regarding this (prisma data platform etc), i think they're building edge DBs right now which solve nothing. tldr write your own sql or compile sql to typesafe code (sqlc+go) or runtime check it (sqlx + rust).
I noticed that you're using the MacBook Air M2 with 8GB of RAM and a 512GB SSD. Do you find that 8GB of RAM is sufficient for cs, especially considering the MacBook's ability to utilize swap memory?
Yeah absolutely! Mine is 16GB of RAM but yeah it works great. I watched some videos reviews and comparisons before buying it and apparently the 8GB RAM or the 256GB SSD is considerably slower so I went with what I have now. If it's only for coding I think most of the M chip Macs will be great. Docker is known to require a lot of resources but if you don't use that then you're good. The heaviest work I do on mine is editing these videos and it handles that great too
@@LjupcheVasilev Traditionally, I've been a Windows user. However, I've recently seen many positive reviews about Apple Silicon processors and their optimization and efficiency with RAM. Initially, I thought that 8GB of RAM would be sufficient. Currently, I'm a full-stack developer using a PC with 16GB of RAM and planning to transition to cloud engineering. Considering this, I think I'll opt for 16GB of RAM. Still don’t really know what suits me or of macOS is really worth it. Thanks for sharing your opinion :)
I'd say yes, modelling the data helps understand the structure and realise where things can be improved. Also certain things that you know are going to be expanded in the future can be set up in a way where that is made easy
I've been trying to understand the distinctions between using types, enums, and const in TypeScript. Could you shed some light on how they differ and when to use each one?
Types is a way to define what kind of values does the variable hold and it helps with type safety, catching issues while developing etc. For example `const status: string = 'active'` Enums are a way to define a set of named constants. For example when we have a variable of status and we know the status can be Active or Inactive only, that's when enums are most useful. Then these enums can be used to validate the input or whenever we need to use the status we can see which values it can be. Const is just a way to define a constant variable, same as in javascript. Constant means the value of the variable never changes. If the type is an array then we can mutate it like add/remove items but if we define a string we can't reassign it. Hope that helps.
I probably could have explained that better. At this point I didn’t have plans for adding users but the idea was there will be forms to create/update meals. I am currently implementing most of that but have added users and roles so if you watch my latest video it might make more sense
You can set up the middleware to run before the protected page(or any other pages you want) is loaded so at that point you can check user authentication redirect them wherever you want if they arent authenticated. so even if they type it out they wont access it.
Nice video 👍 I'm also thinking about starting this type of content. Do you by any chance have a discord server or want to start one? Would be nice be around like minded individuals :)
Nice one bro! Another demystified section of software development done well. It begs the question, why is it that all these years software/programming was mystical with jargon words, poorly written articles and books, etc. I've been saying this for years, software development itself is not that difficult; but the devs make it look difficult, either on purpose to look smart, or because most devs themselves don't have teaching and communication skills. A lot of devs speak too fast, use jargons, complicate things for no reason, thinking that everyone can follow their way of thinking and pace. I've noticed that a lot. Devs are socially awkward (borderline autistic), hence why the poor teaching skills.
Thanks! Yeah, maybe, but I haven't felt the same way tbh. I started learning about 16 years ago and everything I've learnt came from people on the internet. I would come across complicated tutorials but never really dwelled on it just thought there's more I need to learn in order to understand that one and then after a while it clicks. And also I think it's not easy trying to explain something in a very simple way, especially when it requires prior knowledge.
I like this video bro. Now I’m more comfortable with architecture. Coming from the frontend side, I always thought that you needed some special skill to design an architecture, since every time I saw one, it was complex with many bits and pieces including spaghetti arrows and shapes. It used to put me off app architecture for years. But lately I decided to step up and dive into it. I still didn’t know there was a thinking process until I saw videos like this, which makes it more palatable and fun. It’s all about following a process, not the lines and shapes. Thanks bro. Also what software did you use in your video to draw your architecture?
Appreciate the comment. Software architecture can seem daunting but with anything it just needs time to understand it and then the repetitions to fully comprehend and understand how to use it. I used Eraser in this video.
Great video! For a serverless architecture, what's your opinion on bundling all CRUD operations into 1 lambda VS decoupling into separate lambdas for each operation?
Glad you like it! I think it depends on the load of the api. Like I said in the video for MVP it doesn’t really need a lot of lambdas, one graphql lambda is enough. As the load increases decoupling helps serve the users faster and more efficiently. This can be done gradually for example instead of making one lambda per operation it can be one lambda per micro service first and if load increases even more then split those into separate lambdas per operation.
That is good content! I’m surprised that there are not many videos talking about this. Most of the content about architecture are talking cloud environments and networks protocols. What about the regular software developer that wants to ship fast, usually deploys on Vercel and having a BaaS in Supabase, Appwrite or Firebase… There’s no content for scheming it in an intuitive way.
Thank you! I agree 100%. I did go a bit overboard on this one with the enterprise architecture but like I said at the end, starting with something small and validating the idea is the most important step
The reason why I’m checking the types there is because in my types they are set as required properties, but because they are input from the user we can’t be sure the user has actually sent all the required fields. I could’ve made the properties optional and then typescript will complain if they are not checked.
Yes, kind of. Clean architecture for me is mainly about separation of concerns and you can definitely do that in a React project. It may not be as straightforward as in backend, or there won't be a chance to implement all of the layers. But some of the clean architecture principles, yeah sure.