Skip to content

Instantly share code, notes, and snippets.

@jdegoes
Last active August 29, 2015 13:58
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jdegoes/10024692 to your computer and use it in GitHub Desktop.
Save jdegoes/10024692 to your computer and use it in GitHub Desktop.
The LambdaConf 2014 Challenge

Introduction

LambdaConf has multiple tracks, so no attendee can possibly attend all sessions.

Yet, we'd like to schedule the sessions to maximize attendee happiness (for some definition of "maximum" and "happiness").

Sounds like a job for functional programming!

Your mission, should you choose to accept it, is to write a small functional program to produce an "optimal" schedule (your schedule may have any number of tracks you want -- you do not have to stick with 3 or 4).

You may choose any programming langauge you like, but you are not allowed to use mutation. You don't have to load the data from files, instead, you can embed it directly as code in your PL of choice.

Good luck!

TIP: If you complete this problem and are happy with the result, consider spending 5 minutes sharing your solution at the pre-conference dinner on Friday night!

Preferences

A subset of attendees were asked to rank conference sessions, and this data is presented below.

A rank of 1 corresponds to, "The session I want to attend more than any other session."

"A Lattice of Tightropes: Tradeoffs in Language Design", "Building Web Applications with Clojure", "Building Web Services with RedEyes & Scala", "Complexity & Reasoning in Functional Programming", "Intro to Functional Game Programming", "Learn Dependently-Typed Programming with Idris", "Learn Front-End Programming with PureScript", "Macros, Modules, and Languages in Racket", "Scala Pattern-Matching In-Depth", "Scaling Gilt: From Monolithic Rails App to Distributed Scala Micro-Services", "There's no Clusterf*ck without a Cluster", "What Can Scala Puzzlers Teach Us?"
8, 3, 9, 4, 12, 2, 6, 1, 5, 11, 10, 7
8, 3, 9, 4, 12, 2, 6, 1, 5, 11, 10, 7
4, 10, 7, 3, 12, 8, 11, 9, 1, 6, 2, 5
6, 2, 11, 5, 4, 3, 1, 7, 9, 12, 8, 10
4, 8, 10, 3, 5, 9, 12, 11, 2, 7, 6, 1
1, 11, 12, 2, 9, 3, 6, 4, 5, 7, 10, 8
4, 11, 9, 1, 3, 6, 12, 10, 5, 8, 2, 7
1, 9, 11, 3, 8, 2, 5, 6, 12, 10, 4, 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, 1, 4, 7, 11, 12, 9, 3, 6, 10
7, 9, 10, 6, 1, 8, 4, 5, 2, 12, 11, 3
5, 9, 10, 1, 3, 2, 6, 4, 7, 12, 11, 8
8, 1, 6, 4, 2, 9, 12, 5, 11, 7, 3, 10
2, 11, 6, 3, 5, 10, 8, 12, 1, 9, 7, 4
5, 7, 10, 1, 6, 8, 9, 12, 4, 11, 2, 3
3, 1, 8, 2, 7, 10, 6, 4, 12, 9, 5, 11
4, 9, 2, 3, 5, 1, 6, 8, 11, 12, 7, 10
2, 8, 6, 1, 5, 4, 11, 12, 9, 7, 3, 10
2, 3, 11, 4, 1, 8, 7, 6, 12, 10, 5, 9

Session Lengths

Some sessions are 60 minutes in length, while others are 90 minutes in length. This data is collected below.

NOTE: There were a few sessions that did not make the survey in time. You may include or exclude this, but if you include them, assume average popularity.

"Macros, Modules, and Languages in Racket", 90
"Learn Dependently-Typed Programming with Idris", 90
"Complexity & Reasoning in Functional Programming", 90
"Building Web Applications with Clojure", 90
"Learn Front-End Programming with PureScript", 90
"What Can Scala Puzzlers Teach Us?", 60
"There's no Clusterf*ck without a Cluster", 60
"A Lattice of Tightropes: Tradeoffs in Language Design", 90
"Intro to Functional Game Programming", 90
"Scaling Gilt: From Monolithic Rails App to Distributed Scala Micro-Services", 60
"Building Web Services with RedEyes & Scala", 60
"Scala Pattern-Matching In-Depth", 60
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment