Interview icon indicating copy to clipboard operation
Interview copied to clipboard

Geetesh Kalakoti - Frontend, Backend and Database challenges

Open geeteshk opened this issue 6 years ago • 2 comments

I have complete the 3 challenges specified in the title and I must say I had fun coming up with what I thought was the best solution for each of them. I have some things to say about how I solved each challenge and the problems I faced so I will divide it up into sections for each challenge.

Frontend

I approached this challenge and I thought that the requirements were rather vague and that a barebones website that met them would suffice. However, I wanted to see how creative I could get with this and decided to create a React application with a custom Form Component. NPM already had a React Component which interacted with the Google ReCaptcha V3 API. I simply had to provide my key and work the callback into my form. I also included Bootstrap just to give it some polish at the end. In order to improve this I might make the validation for the form a bit more intuitive and check the values instead of just making sure they are not empty.

Backend

For this challenge, I really had to consider my options for which framework to use for the REST API. I was deciding between Django, Spring and Flask. I ruled out Spring, despite it being a very powerful backend framework it's built of Java which requires more setup and code than Python. Between the two remaining Python frameworks I chose Flask as I am more familiar with it. The main challenge with the backend was to make sure I error checked all the data and returned a correct error code and appropriate message with it. Overall though great challenge and I had a brilliant time testing lots of numbers with cURL.

Database

The database challenge definitely required a lot of thinking about how the relational model is going to be structured. Just from looking at the NoSQL database record structure it is difficult to decide what the client is looking for in their model. However, I managed to come to the conclusion that since they have a lot of users it would be more organized for them to keep the orders and user information separate and have a one-to-many relation between them. This way its easier to separate orders from users and it allows one user to have many orders with less redundancy. model.png demonstrates the new relational model.

When it came to writing the program to translate the JSON, I used Mockaroo to generate some fake data that I could test my program with. I decided to go with Python for generating the statements as I feel Python is very powerful when it comes to handling String formatting and JSON files which is perfect for this use case. The program felt pretty trivial, all I had to do was error check the JSON object coming in and if it was valid I can just generate the INSERT statements. All the statements are formatted for MySQL since that is what I learned at UTA. I also provided the CREATE TABLE statements for the two tables at the start of the program.

I feel like I am coming out of these challenges having learned some very useful new concepts and am very grateful for the experience. I will proceed to annotate my code with further explanations where necessary and can't wait to hear some feedback on where I can improve.

Best Regards, Geetesh

geeteshk avatar Nov 08 '19 06:11 geeteshk

Thank you for submitting your solution and thoughtful commentary @geeteshk ! Are you seeking a full time position or internship and when would you be looking to start work?

CharlesAHunt avatar Nov 20 '19 20:11 CharlesAHunt

Hello @CharlesAHunt ! Currently I am looking for an internship for the Spring 2020 semester, just before I graduate.

geeteshk avatar Nov 20 '19 20:11 geeteshk