Homework for Jed's lecture on CoffeeScript
In order to understand how CoffeeScript fits into the web development space, its important to understand what need it solves. We'll do that by comparing solutions to a relatively simple programming problem in two languages you already know (I think).
-
solve the problem in Ruby (you need MiniTest installed
gem install minitest
)- in an imperative/procedural fashion
- in a functional fashion (hint: use the
Eunumerable
module) - in an object oriented fashion
-
solve the problem in JavaScript
- to the best of your ability without dependencies
- with Underscore as a utility library
Yes, you may work in groups. No the homework is not graded, but you won't get much out of the lecture if you have not done this prep and that would be a waste of time for me and you. If you work with others, be sure you understand the language decisions made.
Come to the lecture 9/19 ready to discuss the following questions.
- What solution in Ruby do you like best? Why?
- Are there patterns from your Ruby solutions that lend themselves to JavaScript solutions?
- Are there conveniences in Ruby you wish you had in JavaScript? Why?
Open a github issue. I'll gladly answer any questions.
Both problems take from exercism.io but problems in that application are served rather than picked so this just uses a problem that is solved in roughly equal terms in several languages.