-
Notifications
You must be signed in to change notification settings - Fork 0
Description, Database Schema, Future Work
Motivation It is not uncommon for students in majors like Computer Science and Engineering to get noticed by top tech employers. Many students interview with Google, Microsoft, and countless others. In deciding who to hire, these companies all share one thing: the coding interview. Anyone who has been asked to write code during an interview can tell you that it can be rather daunting. Having to come up with a correct and efficient algorithm to solve some contrived problem as fast as possible makes any other kind of interview sound like a joke. Even the best programmers find these kind of interviews difficult. Writing code without references or documentation is just about as unnatural as it gets, but in order to land your dream job, it’s a skill you have to master.
Features
- The main portion of the website will allow users to add questions
- Clicking on a question brings up a page that shows answers to that question
- Write solutions to posted questions
- Vote on the solutions others have written. In a manner similar to stackoverflow, the best solutions will move to the top as they are voted on.
- Most recent questions are placed at the top of the question list.
Implementation Details
- Front end uses React
- Back end stores data in MongoDB
- Supports an authenticated REST interface as an API for the back end
####User
A user includes the name
of the user is shown when asking or answering questions. username
and password
are used for login only.
var userSchema = new Schema({
name: String,
username: {type: String, index: true, unique: true},
password_hash: String,
});
####Question
A question is a header
with an included body
. It also stores the user
who posted the question.
var questionSchema = new Schema({
user: {type: ObjectId, ref: 'users'},
name: {type: String, default: "<user's name>"},
header: String,
body: String,
timestamp: {type: Date, default: Date.now},
});
####Answer
An answer is a body
and number of votes
associated with some questionID
. ONE question can have MANY answers (one-to-many relationship).
var answerSchema = new Schema({
user: {type: ObjectId, ref: 'users'},
name: String,
questionID: {type: ObjectId, ref: 'questions'},
body: String,
timestamp: {type: Date, default: Date.now},
votes: {type: Number, default: 0}
});
Features to be implemented:
- Allow user to enter code instead of plain text (WYSIWYG editor)
- Users can request to receive notifications when someone answers a question they post, a comment has added to their solutions, a new resource has been added, etc.
- Star questions for later reference
- Profile page for editing information and adding profile picture. Includes list of starred questions.
- Add functionality for comments on answers and questions.
- Include a reference page with links to language-specific review sheets, book recommendations, and other helpful web pages.
Bug Fixes:
- Users should only be able to vote on an answer once. Users should not be able to vote on their own answer.