Devtools Tech is a RU-vid channel which was started as a collaborative effort among like-minded engineers to provide high-quality programming tutorials for free. We firmly believe in knowledge sharing and easy access to quality content for everyone. Hence, this channel is an effort to give back to the community and a step towards our belief -- "We rise by lifting others".
Array in in the video is used as a stack only. Since, JS doesn't support stacks natively or doesn't have STL, I didn't want to create a stack separately and used an array.
Hey i think your website is not properly functioning as some styling effects are not rendering properly and the code editor is very glitchy as some of the buttons are not working and are placed incorrectly
Imagine being asked this question in 45 minutes 😂. I mean people shouldn’t judge a candidate based on a single question . Many would freak out and won’t be able to build it in that period of time.
Great video. nicely explained and well-structured approach. One minor improvement or a slight miss is in the BarChart component, the useMemo should have data as inside the dependency array. a linter would anyhow point that out. but since the data could be anything and could change as well, the derived values should be dependent on it.
TIL that returning a primitive value from a constructor function returns the implicit this. Thanks for the explanation. Just a follow up, if we'd want to make sure that the constructor function is invoked using the "new" keyword, we could also use `if(!(this instanceof ConstructorFunction)){throw new Error("Call me with new keyword")}` right? I was wondering what's the difference between using `new.target` and `instanceof`?
We do ConstructorFunction.call(foo, "bar"); then instanceof will still return true but new.target would not be true as the new keyword was not used so target check makes more sense if we want to enforce the rule.
I recreated your Uber interview shapes question in Tamil and would like to post it online. Additionally, I want to solve the Atlassian problem and create a video about it. May I have your permission to do so? Brother!
Hi, it is okay if you want to make it but please mention my video/channel in your video and provide the link to it so that there is due credit. Thanks!
Great. One more suggestion: try solving the question on the platform devtools.tech/questions/programming and record it. You can solve it on your local too. I just want to have some feedback in terms of how the user experience is and if any challenges faced by the people. Your feedback would go a long way improving it for all. Thanks!
Thanks Yomesh, I would like to mention that 5th point in functional requirement of this question is a bit confusing "During de-selection, user should be able to select a new box as in disable any box interaction." Can you please fix it.
Thanks man, one thing that came to my mind is while unloading, instead of using unloading state to control the click event, we can get the parent div element and make its pointer-events to none
do companies ask you to write plain css or are we allowed to use tailwind? I know most of the time its up to the interviewer but what is the usual case scenario do they allow or now?
Varies from company to company. However, general trend is to have a working knowledge of a framework but good grasp on vanilla CSS. If one doesn't know underlying properties or doesn't have a good understanding of the basics then if there is a complex bug then they won't be able to resolve or have difficulty with it. Only framework developers aren't that desirable.
No, it is possible to apply framework classes but not understanding how box model works or why width is higher than declared because padding is also applied but box-sizing is not.
You can ask the interviewer. If they allow then sure else use vanilla CSS. Many questions involve strict guidelines and are conveyed at the start of the interview. If not then always confirm before using.
function cal(num) { this.result = num; } cal.prototype.add = function (num) { this.result += num; return this; } cal.prototype.sub = function (num) { this.result -= num; return this; } cal.prototype.val = function () { console.log(this.result) return this; } Here's my solution returning this object after the operation is done in the function. Returning this makes us able to call the function which is defined for the instance of the cal.
Please make more videos like these. Despite being a developer with 3 years of experience, I have literally learned at least 3 to 4 new things in just 26 minutes of absolutely smooth explanation.
Same here although I don't agree with few stuffs such as using recursion or the event bubbling thing (that will complicate things with typescript) but still great content.
Hey man! Thanks for another great video. I had a few questions here: 1) Why flatten the array? The 2D array provided might have the row and column details but when you flatten, you might lose that and is being hard coded to 3 columns and n rows. 2) Using of non-primitive data structures in the dependency array, wouldn't it defeat the purpose of memorizing? Also, I left you a message on reddit yesterday, I just wanted to thank you for the platform and the videos!
I wanted to simplify the problem that is why flatten it. Ideally, it should be configurable and no hard coded CSS. Columns count should change as per the data. If you mean selected then we need an effect whenever it changes. It is a state and unless explicitly changed, we will get the same value across re-renders.
Sir, I recently gave an interview where I solved the reactjs coding question he given, but he pointed out my code quality. After I have gone through many open source projects structures, do you any other suggestions for me ?
So much value. Do you have any document which consists all these best practices and some more or any resource or blog you refered for these ? Want more such videos. Next video ideas : 1 mock interview on reactjs ,where you will guide fresher through these mistakes 2. designing a small npm package live in 1 hour, with no preparation before hand
Great explanation. Wondering if it'd be better to throw OR return something like NaN instead of 0 inside the multiple method when the array length is 0. 0 might be a valid return value as well and doesn't distinguish enough from an edge case (like the empty array)
Valid point. This is also a discussion point with interview about what is the expected behaviour. I agree that 0 is a valid output. However, we need to make a decision that should we break the application by throwing an error or return 0 that shows like a default output as for user if the application breaks then that is a really bad experience.