Skip to content

Instantly share code, notes, and snippets.

@ignar
Last active May 8, 2017 08:32
Show Gist options
  • Save ignar/6d27972a7dd21fca641706d7d70b469a to your computer and use it in GitHub Desktop.
Save ignar/6d27972a7dd21fca641706d7d70b469a to your computer and use it in GitHub Desktop.
Programming Challenge

Scenario

You like to read the articles in your feed. The problem is there are so many entries each day and only a few of the articles are really good. In order to save time, you want to implement your personal feed reader. It should be a web-application that displays the last N entries of your favorite feed. The special thing about your reader: You can provide a whitelist and a blacklist of keywords. Entries of the feed are classified as "interesting" or "boring" based on the black/white-lists. For example, if you don't like sports, your blacklist would include "sport", "tennis" and similar keywords. If you love programming, your whitelist would include "ruby", "crystal" and others. The feed on your website should highlight "interesting" entries and grey-out "boring" entries. Both white- and blacklist can be hardcoded.

Tasks

  • Create a web-application (rails 5, sinatra, hanami, ...)
  • Choose a feed you like or that is suitable. We recommend an Atom-Feed (EXAMPLES HERE).
  • Fetch and store the feed entries periodically. "Free" choice of DB (mysql/maria, postgres, mongodb, elasticsearch, redis).
  • Display the feed entries. Design/Styling is not very important. An entry in the web-feed should show date and title and clicking on the entry open the entry URL in a new window.
  • Classify each entry based on white/blacklist and highlight them according to their classification in the web-feed.

Advanced

  • Add a like/dislike function that can be used to classify an entry by hand. Show the manual classification on the entry.
  • Classify the feed entries not by white/blacklist but by a score that is calculated based on keywords. Each keyword gets its score by how many entries with that keyword were liked/disliked.

Open Questions

There are some things that are not clearly specified. Some things are intentionally left open for you to decide. E.g. if some details of the classification/scoring are left out, please try to think for yourself what the best solution would be and write down your decision and reasoning. Of course, there can be mistakes in our description or a lack of details that are necessary in order, to begin with the tasks. In that case, just ask us. If you are unsure about anything: ask us.

Hints

  • You do not have to implement complicated text-analysis algorithms (stemming, compound word analysis, stopword filtering, term frequencies, ...)
  • Performance is not extremely important, but you should make sure that there is no obvious flaw in your code that makes your app struggle with ~100 feed entries per minute
  • Avoid gems and other libraries. Of course, you have to use some (e.g. MySQL etc), but don't get excessive.
  • Do not focus on the visuals of the feed. It is enough to clearly see the items and their details. No need for complex coloring/styling, themes or bootstrap.
  • CSS can be quick and dirty. No framework/preprocessor necessary.
  • JS should be clean. It is not necessary to set up ES6 and linting with babel etc. including babel-polyfill is fine.

Evaluation Criteria

  • Clean object-oriented code is very important
  • Your creativity in implementing the classification-function is important, as well as your reasoning

Notes

  • create repository
  • add travis ci badge
  • you can leave notes on those parts that you want to change or refactor
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment