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.
Don't rely on AI to do it all, but use it like a coworker / expert in the field of a problem you are solving. You can move fast AND learn at the same time. That is the most optimal to ensure you move a little faster but also learn and retain it all as you go rather than just letting the AI do it all and then being clueless.
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
If there is ingredientsAmout in the mealIngredients table How can you calculate the calorie value of that meal? Suppose we have chicken as an ingredient in the ingredients table and in the mealIngredient we select 100 grams of chicken? If Ui wants to display the calories of the meal, how will it be done?
The mealIngredient table will have an ingredientId and the ingredients table will have macros like how many calories per 100g. A simple join can give us the information combined so then we just need to multiply the ingredient calories by the ingredient amount.
Yes there’s an SQL/ORM but depending on what database you use it might not fit exactly. I used Prisma when filming this and had chatGPT transform the sql to prisma table definition
No the Eraser tool provides the code for the data model which I give to ChatGPT with the prompt to change it to postgresql for example. More info on the eraser data model feature here: www.eraser.io/use-case/data-model
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
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.
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.
My former lead engineer used to tell me,"Haste makes waste". It sounds like you're learning from your past. Keep up the good work!
Don't rely on AI to do it all, but use it like a coworker / expert in the field of a problem you are solving. You can move fast AND learn at the same time. That is the most optimal to ensure you move a little faster but also learn and retain it all as you go rather than just letting the AI do it all and then being clueless.
How on earth this video doesn't have 100k views? Amazing content!
I keep wondering the same thing bro 🤷♂️
This is genuinely helpful 🎉
Glad you found it helpful :)
great video man, keep making more
Thanks!
You have helped me a lot with my project. Thanks!
Glad I could help!
Thanks for sharing brother. Good practical use case.
Thank you 🙏
I will need something like this in the future
Is the reason you created a separate ingredients table is so you wouldn't break 1N (first normal form) rules:storing a repeating group of items?
I think so. I couldn't really articulate it at the time but the experience probably came through and felt like the right thing to do.
what is thne name of this DB design tool you are using in the video?
It’s called eraser
0:47 so should model your data if you’re likely to pivot?
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
What's tool you use for design db in this video?
looks to be Eraser io
Yep it’s Eraser io
What software is this!!?
Eraser io
If there is ingredientsAmout in the mealIngredients table
How can you calculate the calorie value of that meal?
Suppose we have chicken as an ingredient in the ingredients table and in the mealIngredient we select 100 grams of chicken?
If Ui wants to display the calories of the meal, how will it be done?
The mealIngredient table will have an ingredientId and the ingredients table will have macros like how many calories per 100g. A simple join can give us the information combined so then we just need to multiply the ingredient calories by the ingredient amount.
hi what is the tool used here? subbed
Thanks! I used Eraser to model the db if that’s what you meant
Can we export the diagram to sql statements to create the database
?
Yes there’s an SQL/ORM but depending on what database you use it might not fit exactly. I used Prisma when filming this and had chatGPT transform the sql to prisma table definition
@@LjupcheVasilev Thanks for the insight, do you send the ER diagram as prompt to ChatGTP 4o to get the SQL statements to create the database ?
No the Eraser tool provides the code for the data model which I give to ChatGPT with the prompt to change it to postgresql for example. More info on the eraser data model feature here: www.eraser.io/use-case/data-model
does the user provide any input or not? are all the meals predefined? I am unable to understand the purpose of web app
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
❤
So we buying 2 kilos of chicken or nah 😅
2kg per week 😂
@@LjupcheVasilev 😂😂😂
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.