Skip to content

Instantly share code, notes, and snippets.

@trentonstrong
Created September 1, 2011 19:02
Show Gist options
  • Save trentonstrong/1186969 to your computer and use it in GitHub Desktop.
Save trentonstrong/1186969 to your computer and use it in GitHub Desktop.
tech interview project
Weight Widget Project
=====================
To get a good example of how you work and approach design and problem solving, we would like you to design and build
for us a relatively simple "weight widget". This document will act as a rough specification for the widget, but you are encouraged
to wear your creative thinking hat. In order to minimize the amount of external requirements for this project, the widget itself
should be built in Javascript and rendered in the browser using the HTML and CSS.
The code can be uploaded to Github or your code repository of choice, as long
as we can be provided access to it to review. The main HTML file of the project should be named index.html, but the rest of the project's
files can be organized however you like.
The use of open source libraries is acceptable and even encouraged, though the behavior of the widget should be implemented by you.
All source attribution should be left intact!
Requirements
============
The point of the weight widget is to allow a person to track their weight over time. The interface needs to be intuitive to new users
but also efficient so that regular users don't feel burdened by having to enter thir weight. The widget can easily thought of as being
separated into three separate components: Data, Inputs, and Graphical Interface. How these components interact is for you to decide.
Requirements for each follow:
Data
----
Since this is a purely Javascript project, data requirements are minimal. You can store and access the weight data however you feel comfortable.
This could range from simply using the DOM, to internal Javascript objects/arrays, or even HTML5 local storage. Weights should be represented as
key/value pairs of timestamps and floating points, with the additional requirement that there be only one "measurement" per day.
Inputs
------
Users should be able to input their weight, associated with a date. Weights should be input as floating point, though choice of UI representation is yours.
In addition to just inputting weight, users should be able to change and delete measurements. You are only required to implement one unit of
measurement (pounds, kg, stones...).
Graphical Interface
-------------------
Since the widget is meant to track weight data over time, it's nice to have some method to display it.
The obvious method is a chart, which graphs the measurements over time. The visual appearance of the chart is completely up to you.
The chart should reflect the data the user has input/changed/deleted as those actions occur.
Since charting is a non-trivial application, we definitely encourage the use of a library here. Two popular charting libraries that we use are:
gRaphael - http://g.raphaeljs.com/
Highcharts JS (can be downloaded for free) - http://www.highcharts.com/
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment