I believe that this does not fulfill Interface Segregation principle of SOLID principles. There is no need of insertCoin and presButton in some cases. We should make different interfaces if any state does not want to implement a function. Tell me if I am wrong. I would love to get corrected.
@rohitshaw68622 жыл бұрын
A much needed content. Very few people are there who create videos on this topic. Thank you for your initiative 😁.
@rite2riddhi2 жыл бұрын
Pleasure
@rohitshaw68622 жыл бұрын
Also can you please wrap the whole content in single playlist, so it will be easier for me to track all the videos. Thank You.
@rite2riddhi2 жыл бұрын
Sure
@chetanpareek44287 ай бұрын
@@rite2riddhi can you please provide the gjithub link of this code ?
@debmalyapan532 жыл бұрын
this was highly required. thanks da.
@snehomoymaitra93172 жыл бұрын
Amazing content as many of the companies are asking LLD questions in their SDE-1 (e.g - freshers) interviews.
@rite2riddhi2 жыл бұрын
Thank you ❤️
@vinamrasangal84367 ай бұрын
how can a person write such a big LLD code in just 1 hr ???
@fares.abuali2 жыл бұрын
Thank you so much, Mr. Riddhi. Consie & Informative
@sarfrazz342 жыл бұрын
Riddhi, could you please share the git repo link for the same?
@chetanpareek44287 ай бұрын
@Riddhi could you please share the github link of this code ?
@aishwaryapani46622 жыл бұрын
Very helpful video, at a time when there is a dearth of LLD resources. Thank you for making these ❣
@Kapil_Sharma_Engineer2 жыл бұрын
Small doubt is do we really need a State interface on which Vending machine is dependent. I feels like we can have a enum of states or a current state variable based upon that we can give the functionality output
@rite2riddhi2 жыл бұрын
Won't that result in a lot of if else handling? How would you achieve runtime polymorphism?
@Kapil_Sharma_Engineer2 жыл бұрын
@@rite2riddhi yes there will be more if-else handling. And regarding polymorphism maybe I will use a strategy pattern but one this is I will give try to use the Abstract class with default function definition so that we don't need to define a function with the same functionality in multiple classes
@rite2riddhi2 жыл бұрын
@@Kapil_Sharma_Engineer using multiple if else might not be good for code readability. But yes , again design is an open ended discussion. 😅
@Kapil_Sharma_Engineer2 жыл бұрын
@UCKyTTBdDH3I%F0%9F%98%87635HQMrPvz_A Completely agrees every person has their own view to look at the problem and give the solution accordingly 🙂
@abhishekrai52122 жыл бұрын
I really liked the design as well as the explanation. Please create more such LLD design content👍
@rite2riddhi2 жыл бұрын
Thanks abhishek
@Anonymous____________A7214 ай бұрын
Thanks GOAT
@obsessiveDreamer2 жыл бұрын
Are you passing the object of the vending machine into all three states' constructors as a reference or a copy of the object? I mean all three states is working on the same instance of vending machine?
@rite2riddhi2 жыл бұрын
Right.
@soumyarv40182 ай бұрын
Can you please explain any idea on how to implement online payment in place of adding a coin .
@sudipasarkar79812 жыл бұрын
Amazingly explained much needed one😃😇
@rite2riddhi2 жыл бұрын
Thank you
@rishav1442 жыл бұрын
need more LLD videos like this ....please
@zahidkhan-ln3jv2 жыл бұрын
Great explanation! Can we use the same design pattern to design a shopping cart?
@chiragkarnwal67402 жыл бұрын
Thanks sir very helpful video 😊❤️
@rite2riddhi2 жыл бұрын
Pleasure
@dopamine003 Жыл бұрын
Great explanation
@harshraj22_2 жыл бұрын
It's kind of strange that states need vending machine to initiate, and vending machine meeds states. Looks like a kind of circular dependency, and becomes more confusing when you think composition in terms of " class has a" property. Also, taking out inventory instance out of vending machine class, and performing operations on it doesn't sound quite good to me. Wouldn't it be more better if vending machine rather exposes some methods to operate on inventory, rather than giving off its internal objects to outsiders ?
@rite2riddhi2 жыл бұрын
For 2 , yes have added addProductToInventory() in the Vending Machine itself. User will only interact with VM. I focussed on the main problem , hence skipped few things. For 1 , it won't be a cyclic dependency. Again , as I said no design is perfect , and it is not possible to come up with a flawless design in a 1hr interview.
@tanveer.shaikh2 жыл бұрын
instead of throwing illegal state can we sent some warning and be on same state
@divyajyotibasu3001 Жыл бұрын
Hi, Thanks for the helpful tutorial. If possible kindly share the codebase in a repository. Regards!
@debmalyapan532 жыл бұрын
also plz make a video on elevator, distributed cache, splitwise. 😁
@rite2riddhi2 жыл бұрын
Next singleton then elevator
@Lucifer-xt7un2 жыл бұрын
@@rite2riddhi bro please maintain consistency in this series and increase frequency of making videos
@Maneeshce2007 Жыл бұрын
Where is the github url to find the code ??
@akankshagaur845 Жыл бұрын
can we get the source code link as well @Riddhi Dutta
@nikhilk47352 жыл бұрын
Great explanation. Can you please share link to this code repo
@pratosh Жыл бұрын
is there any github repo for this design?
@namantyagi62942 жыл бұрын
In an actual lld interview, do we need to write the whole methods and class or just a skeletal design with the classes and methods just declared and not completely implemented?
@rite2riddhi2 жыл бұрын
Depends. In an lld interview , important functions you have to write. For machine coding , you have to write everything.
@digitaljunk2 жыл бұрын
To reduce echoing and delay in the recording point the microphone opening towards the sound source (your mouth). Please don't record the room space.
@rite2riddhi2 жыл бұрын
Hey this is an old recording. Sound is sorted now.
@chodingninjas74152 жыл бұрын
Great stuff
@sayankarmakar13 Жыл бұрын
It will be very helpful when you share the github link
@iamdips003562 жыл бұрын
Amazing video
@raginibhadani72572 жыл бұрын
Is this code available somewhere?
@satyajeetkumarjha14822 жыл бұрын
Can you post the link to GitHub repo?
@meme_engineering45212 жыл бұрын
bhai i wanted to ask, how important is LLD for freshers? and especially for campus placements
@rite2riddhi2 жыл бұрын
Not that important but good to know before joining any company
@meme_engineering45212 жыл бұрын
@@rite2riddhi okay, thanks
@kumarabhishek6777 Жыл бұрын
you explain nicly but i am getting error in this ,,,, might be missing something so if possible provide the source code of the pattern
@hell-o84702 жыл бұрын
where can i get the code?
@JigyasaGupta-nx9pk2 жыл бұрын
do u have a git hub link
@vishalmishra1937 Жыл бұрын
plz share the code link
@lokey8084 Жыл бұрын
This feels like it breaks Liskov's substitution principle
@thesoftwareengineer172 жыл бұрын
bro plz add github links for all these questions too
@vinamrasangal84367 ай бұрын
give code plz
@ManeyyNeg8 ай бұрын
pls share github link
@Mukeshkrk1082 жыл бұрын
sir MIke and Voice is not clear and Sir on more thing that is You talking very fast
@rakeshpramanik2 жыл бұрын
Wow
@ratimohan5765 Жыл бұрын
You explain very fast, need extra effort to understand. Didn't like this tutorial.
@rite2riddhi Жыл бұрын
Oh so sorry to hear that.. I would try to be slow from next time. You can watch it at 0.75x for now.
@no_name45689 Жыл бұрын
Exactly.
@cj-nr5ni Жыл бұрын
Dude
@aditigupta68709 ай бұрын
Why are you unnecessarily violating interface segregation just to explain a state design pattern?
@RishabAgarwala11 ай бұрын
I guess you could have improved the design more by not create Objects of each state