Coding Task
Coding Task
Create a REST api to be consumed by a mobile app, which is somewhat similar to various popular apps
which tell you if a number is spam, or allow you to find a person’s name by searching for their phone
number.
You can use whichever language/framework you're most comfortable in. However, we give strong
preference to candidates in the pipeline who’ve done it using Django, and to a lesser extent Flask or
Rails. For persistence you need to use a relational database along with an ORM for your framework. We
will not evaluate NoSQL or raw SQL queries.
Spam:
● A user should be able to mark a number as spam so that other users can identify spammers via
the global database. Note that the number may or may not belong to any registered user or
contact - it could be a random number.
Search:
● A user can search for a person by name in the global database. Search results display the name,
phone number and spam likelihood for each result matching that name completely or partially.
Results should first show people whose names start with the search query, and then people
whose names contain but don’t start with the search query.
● A user can search for a person by phone number in the global database. If there is a registered
user with that phone number, show only that result. Otherwise, show all results matching that
phone number completely - note that there can be multiple names for a particular phone number
in the global database, since contact books of multiple registered users may have different names
for the same phone number.
● Clicking a search result displays all the details for that person along with the spam likelihood. But
the person’s email is only displayed if the person is a registered user and the user who is
searching is in the person’s contact list.
Data Population:
● For your testing you should write a script or other facility that will populate your database with a
decent amount of random, sample data.
Evaluation criteria:
● Completeness of functionality.
● Correctness under thorough testing.
● Performance and scalability of APIs.
● Security of APIs.
● Data modeling.
● Structure of code.
● Readability of code.
Offer criteria:
● If you are applying for an internship, we expect most functionality to be present with few bugs.
● If you are applying for a full time role, in addition to all functionality we expect your submission to
be strong in each of the evaluation criteria, depending on the experience level for which you will
be evaluated. Basically it should be something that can be used in a production application
directly. You need to think of what all needs to be handled in a production API above and beyond
what’s mentioned above (we want to evaluate whether you will be able to work independently).