I think the main point I would evaluate is how easy it is for other developers to maintain your code. Not inventing new patterns, using well-known libraries, sticking to established standards, naming variables properly, and splitting code when it needs to be split. The part of the code that threw me off was the "handleOrderBookData" function. When the logic of the code is complex, that’s when you need to ensure the reading is easy, and anyone else can jump in and continue from where it left off. Instead of accessing hard-coded array indexes, it could have destructured and named them appropriately, named the if conditions, moved the code inside the ifs to handlers, and paid attention to typing
@TheRichNuke16 сағат бұрын
Prices can be unique, and probably even must be unique since there is bid functionality. So probably searching by price can be correct and not buggy
@cosdensolutions14 сағат бұрын
interesting
@palyanytsia10 сағат бұрын
you can't rely on users/admins that they will always make the price unique, even if they have to. Users are dump. Code should be protected from that errors
@omarhassan21245 сағат бұрын
@@palyanytsiaprobably users can't even bid with the same price and the backend will validate first if the price is used (or if it is higher than the latest price) before adding it to the db
@TheRichNuke2 сағат бұрын
@@palyanytsia but you can rely on system which requires unique value and throws in case it's not
@seba926016 сағат бұрын
for junior or mid, I would have let him pass - there's some really good thinking in the code. senior maybe not. dead code is no criteria for me - I wouldn't expect a highly optimized application. but it depends on the interview situation.
@coders-oasis2 сағат бұрын
Based purely on this one review, I would be more than happy to hire this person at the junior level, fine with intermediate if other fit-style interviews went well and they were able to show a willingness to learn and grow, and a no for senior and up based primarily on the lack of re-use (I consider this a bit of a miss in the places where it wasn't present), proper typing, and the likely bug you identified (can only assume to be a bug since it doesn't seem like price is enforced to be unique elsewhere in the project). Without knowing the prompt its hard to say anything further really, if it was open ended I would love to see some basic tests that could potentially have caught some of the buggy code in such a critical portion of the project or at least demonstrate the attempt to do so. Thanks for demonstrating the review!
@trung_ai6 сағат бұрын
On an order book each price is a unique price level with volume corresponding to it so updating it should not be an error ( I worked with crypto market data for a few years so quite familiar with it). Though I agree he should define types and handle response data better, for example websocket can return different message types like an update (to append to a snapshot) or an entire snapshot, and it can changes depending on the pair/ pairs subcribed to, or the depth of the order book etc. One more thing I notice is that his bids and asks are defined as Order[], which is usually reserved for orders placed by account.
@IgorKravets8114 сағат бұрын
I remember I did same test but in nuxt3 and there was an event bus usage requirement.
@reallegendcode16 сағат бұрын
I would have hired the candidate
@jakubfrei375711 сағат бұрын
I dont see a reason why not for Junior/Medior position
@siya.abc12310 сағат бұрын
I would hire the applicant for a junior - mid role. They clearly know react, all they need is a little bit more real world experience with it
@yeinsdavidllanohernandez12288 сағат бұрын
Depends on the seniority level they were looking for. For a beginer or even intermediate the core is completely ok, the lack of types is just a matter of feedback. Quite sure after this reviewng he wont forget anymore to type everything
@IgorKravets8114 сағат бұрын
Dude by price might not be wrong. Bids and asks are the "order book" - which represents commulative volume by the price.
@cosdensolutions14 сағат бұрын
interesting
@TheRichNuke16 сағат бұрын
I prefer to use old function syntax instead of arrow. This doesn't require additional React.FC import. Not sure here but probably there is a way to use generics instead of creating useTSelector.
@a-yon_n9 сағат бұрын
And you don't need an extra line for default export. Actually, I use this code style to distinguish a person who knows React and a person who really knows JavaScript. Well, one factor.
@snatvb9 сағат бұрын
it looks like strong junior code, maybe early middle one more thing: i don't see any work with memorization, on every action on the page u will get rerender whole the app
@cosdensolutions2 сағат бұрын
That's okay, nothing expensive is re-rendering
@ptolemyhenson683816 сағат бұрын
Through what method is this code submitted to you?
@cosdensolutions14 сағат бұрын
discord
@jakubfrei375711 сағат бұрын
I would hire him for Junior/Medior position, most of the code was ok.
@elmersupersonic16 сағат бұрын
Please put on another color of t-shirt 😅
@vladimirs.josans16 сағат бұрын
haha why
@lucke4614 сағат бұрын
Great content!
@RADIOSCATRACHASUTAN8 сағат бұрын
Lol, gonna have to clean up code after all works.. I am very dirty..
@MohammedWaseemAnjum6 сағат бұрын
Hi sir can you review my code too? i really want to improve as a react developer really means alot if you will respond thanks!
@holup503516 сағат бұрын
I had failed tech interview last week as well... I had to edit code in case so it works. It was useState question, I can't live with that embarassment.. Basic shit and I couldn't do a thing, I forgot about everything. And I have done big projects for years now almost without thinking or using google, yet bombed it on some basic state stuff...
@cosdensolutions14 сағат бұрын
it happens, don't worry about and focus on the next one! 🤙