As a self-taught programmer and guitarist, I have honed my skills through determination and hard work. I am proud to say that I'm also paying my own college fees, purchased my own MacBook Air and saved money to cure my body issues without any financial or emotional support.
My diverse background includes past experience as a dancer, painter, author, Tabla player, and chess player. I approach every opportunity with a passion for creativity and a love for spreading happiness and positivity.
I am excited to use my skills and experience to contribute to any team I am a part of. Whether it's developing innovative solutions as a programmer or creating beautiful music as a guitarist, I am committed to excellence and always strive to exceed expectations.
Thank you for taking the time to learn more about me. I am eager to connect and explore new opportunities that align with my values and passions.
Full Stack Engineer
FundfinaFull Stack Engineer
Bestfares365Web3 Developer
FreelanceFull Stack Developer
Eduphore IASFull Stack Engineer Intern
Settyl CorporationFull Stack Engineer - I
Settyl CorporationOffice Automation Engineer
BalajiNPro SolutionsAdobe Premiere Pro
Canva
Google Sheets
Google Forms
Calendly
VS Code
Netlify
Play Store
Android Studio
Okay. Uh, could you help me understand more about, uh, your background by, uh, giving brief introduction of yourself? Yeah. Sure. So I'm, and I have worked on basically, uh, most of the React project, Monstack projects, and I have also worked on, uh, some mobile projects. For example, uh, I'm majorly worked on Flutter applications. I have also required those application. I have also required, um, a lot of, uh, React application, the full stack application, not just React application. I have worked on Node. Js, MongoDB. I've also worked on Figma and all these things. So, um, um, basically, I have worked on in a startup for, like, one point six years. And, uh, as an intern, like, six months as an intern, then one year as a full time employee, then I switched my career. Uh, not career. Basically, I switched my job to other company, which is. There I worked for ten months. Then there I created some AI projects. Um, the name of the of the project is CreditGibberty, which is a charity for banking institution, but that are full, very custom data and, uh, very personalized data. Yeah. Um, like, these are the projects I have worked on. I also worked on Figma projects in my company. I deliver design. I have also, uh, contributed a lot of open source projects and, um, uh, worked with a lot of, uh, international science. So these are the projects I have worked on. And, um, I also worked on a lot of freelance projects, uh, contract basis projects. And I have also guided a lot of interns, and, um, they took, um, like, more than 15 interviews. And, um, um, like, all of the projects, basically, you can find on my resume. So that's it for my introduction.
Okay. We have the following. You have the following query on your MongoDB. Uh, query order. I mean, the performance is slow. Okay. How can you optimize this query? Okay. First is finding the customer ID. K. Another is also finding the. And, uh, total amount is greater than one hundred. Uh, d b order. 5125. Okay. Sort. Okay. So what I can see, uh, like, all of these in, uh, making query in order collection with the same customer ID here. So, basically, it will create three different requests to same collection for the same person. So what I will do, I will, uh, I will combine all this query into the one, uh, uh, one query. So just make 1dv.order.find and customer ID and combine all this query in in just one, um, one statement, and, um, it will be optimized. So there's the answer for me.
Given this JavaScript function, is there anything you can improve? Uh, for instance, can the runtime complexity or port clarity be enhanced? Okay. We it's passing two area one intersection. Okay. Uh, looping through this, looping through that. Checking if one is equal to to intersection. If it's not present in intersection, in just it includes array one. Okay. If the item is not present in intersection intersection, Push it here. And, basically, if it's not present, else it will get break. Okay? Is there anything we can improve for instance, kind of, complexity or for clarity of enhanced? Um, actually, I can enhance a lot of things here instead of for loop here. I can use, uh, dot map operator, which is more clearer. Because error dot one and accessing it with index I doesn't clarify that much thing. We have some good operators, good methods on array that are mapped, like, and for each. Uh, that can enhance the readability of the code. So with that, it will be more readable. Another thing I can improve is, uh, just give me one second. Break. Actually, break doesn't make sense here because there's not a while loop. So um, in any case, uh, it will hit the break statement. So maybe I can remove the break statement, but just let me clarify why we did removing the break statement. If if it goes if they are equal, okay, then it will just pause the, uh, nested for loop. Okay. We don't need to remove the break statement then. It's fine. If they are equal, then, uh, just move to the another element. So, yeah, the only the readability of the code I can improve with the dot for each or dot operator. Yeah. That's the answer for my side.
Given this output function, can you find effective approach? Has pair with some pair with some okay. Array target. Okay. Okay. It's going. It's going. Yes. Close. Then it's going. I plus one. Okay. You connect index to the. Okay? Okay. One area is going from all the element. Another is going from next element from the previous, uh, from the outer element, outer loop. So if array I plus j, it's a previous element and next element is equal to target return to. Um, can you identify an effective approach? Okay. Just give me one second for the effective approach. Um, as well with some. A new binary search. I mean, Actually, I can include the runtime complexity of this. Uh, because we don't need, I guess, uh, another loop here. Uh, if we just loop through the first element, for example, if I next element. False. Fair existing too. It's false now. Just a second. Some check. Just a second. Blend and j. Just finding a pair with some. Okay. Actually, no. I can't really find infected way as of now on this code. Sorry.
Given the three are component, can you identify bad practices? So this implement okay. React of parent, uh, concept message. That's fine. You state hello world. How are you doing? Uh, okay. Return child return, grandchild message. Definitely, I can suggest. First, the thing is we should have a profile per component. So in a one file, you have mentioned the parent, child, and grad child, everything here. So and it's exporting by default parent only. So we should avoid that. We should create, uh, per component, per file, per file, per component. And the next thing would be, um, in the function grandchild, it should be a smaller case called it's just returning it's a helper function, and React component should be named as pastel case. So and the function helper function should name as camel case so that we identify whether it's a helper function or whether it's a, uh, component. So grand gel, we need to make, uh, uh, something. If it's returning component, then it's fine. But right now, I don't see anything if it's returning, so it's not good. And this thing function child message here. Use status order. It has some default message. It's returning what? So this thing we can do, uh, up to three level is fine. But if it's more than three level, then we can use context browser. If anything, change in the message, and then all the components, I'll grant you, and we'll get 300. So that's what we can improve. And, yeah, these are the thing basically improve as of now. Yep.
In this notice, because fragment, we are handling an API request can spot a potential security or performing vulnerability concerning the handling of using codes. How do you mitigate the issue? Uh, okay. Get user ID. Request response user await user find by ID. The ID return who user after that reviews a user by ID. Okay. Okay. Sometimes the user contents can, uh, contains, um, like, a password in their database, which is hashed, but still it's not we consider to send it in the send it to the, um, client side. So we should not send, um, the whole object to user. We should send whatever is necessary only. And here I can see there is no authentication middleware, uh, which another thing. We should, uh, like, if anybody's on another user ID and it can pass user ID and it will get the details of other user. So it's just a very big vulnerability in this API. So we should definitely avoid this thing. You should add a authentication, um, middleware. So not anybody can pass the ID here and get access. And, also, we should wrap this thing and try and cache block out sometimes. Uh, like, this is a bit technically good practice because, uh, sometimes the request uh, I mean, we are making, uh, HTTP query. Right? It get get failed with different network issues or maybe some type issues or maybe the method issues or anything. So it's a good practice to wrap up looking and try and catch block. So this is the thing. What else? What else? What else? What else? What else? What else? I told you three things. No? Uh, what else? What else? Okay. Find the ID. Yeah. But I'll decide the ID is fine. Okay. We can also add a return statement, uh, before rest so that it won't go to next line. Like, it's a good practice call. It's returning everything then. So this four thing we can add.
Yeah. Component has some issues. Can you verify them? React to use that use state function counter. Use that. Okay. Console log count updated. Increment. The assumption is update this decrement. Count is greater than zero. Okay. The code is not rendered correctly here. There is some issue with the, um, this code render. So but still, I can assume two things. Just a second. First thing they missed is the dependency array and user type. So whenever it get rendered, it will just print account updated. So whenever this component get rendered, it will print the discount updated count. We should we only want the, uh, log, basically, when we actually update the counts. Right? So we need to create a dependency here, uh, uh, which is an array. And inside that array, we need to put count here there. So as we put count so whenever we update, increase or decrease thing, then it will be fine. So under the dependency part is missing here. Yeah.
How would you avoid callback hell? Okay. In a complex while still handling a synchronous operation. Call back hell. Okay. While it's still handling asynchronous operations. Okay. Maybe I need to see the code, but maybe I can, uh, think of it as a recursion function, and I can add an edge cases. So on a certain cases only, then it will call the callback function. It's it won't I'm handling I'm just running asynchronous operation. We use async and await, so we have much more control over the code, and we can just use if and else. Still, I need to see some example of the callback health so I can value better because I'm not aware of this, uh, particular technology. Yeah.
Okay. Given this JavaScript function that returns the total number of occurrences of the target in an area. Okay. And a bad practice of this improvement. Okay. Bad function. A, b. If a is not there, return. What to do? Yes. Yes. Again. Total number of currencies of target. Okay. First thing we can improve here is instead of directly checking the length, there is a method. Array dot is array. We need to check whether it's a array or not. If it's not array, then we can return. Maybe a bad function. We can return zero, uh, instead of just returning nothing. It's better to return zero. Like, there is no occurrence of it. It tells more. So or maybe we can throw an error, but that will be too much. We just need we can just throw a zero, uh, return zero. If it's not the return zero of these two line, we can just return. Add is, uh, is Array dot is array and pass in it and check whether if it's an array or not. If it's not array, uh, we will just return as you. Okay. Bar instead of bar, we can use, uh, letter because bar is very dedicated, and we it's not advised to use bar. Okay. I less than a dot lens. I plus plus if a dot I is equal to b. This will also use three, uh, equal signs here. Thousand. It will check the data type also, and We should not use global, uh, variable like this global val. Uh, it's not a good practice. Uh, because maybe another function will modify it, and this that happens. So we should avoid using, uh, like this. Inside the bad function scope, we should put this Google account variable. That's how it should, uh, increase the global one variable. And when it get increased plus equal to b wait. Just a second. If if AI is equal, it will be equal. Plus Okay. We shouldn't increase it by one, not by the target value because if the target value is like, the question here is we need to to give the occurrence of it. And if we increase the target value, which is b, then this is randomly increase to any value. Right? Which increase it with the one. Because we are, like, basically counting things how many it it is have occurred. Right? So these are the improvement we can make, and we can make it a good function.
Lens. Last question. Right? Uh, the following component has a bug when trying to update the state. Can you identify it? Trying to update the state. Okay. Increase the time. Set count to set count. Okay. Remain twice. Okay. I can see here. Instead of using two count, first, we need, uh, we can use only one. Another thing is, uh, there in this method, we should not directly, uh, use the, like, set count and update from its variable count. Uh, use test count, provide this kind of function, provide a method where it provides a default argument of the previous state. So we should only avoid the state from the previous state instead of directly using the count variable. So the better function would be if you wanna incre increment it twice, uh, then just use a set in in inside the increment twice function. Use a set count and pass it a function of previous, uh, like, as argument, which will give you the previous state and, uh, use previous and return it with, like, three plus two. So it will just increment it twice. In this, uh, it will perform some issues in batching. It will in increase this thing and, uh, delay the other part. So it will cause some issues in batching performance. So batching and this, that. So that's why, like, it will cause some issues here. So if we if you do what I suggested, then it will just work. Yeah. So that's it.