Practical Object-Oriented Design in Ruby

Object-oriented design (OOD) requires that you shift from thinking of the world as a collection of predefined procedures to modeling the world as a series of messages that pass between objects.

Object-oriented design is about managing dependencies. It is a set of coding techniques that arrange dependencies such that objects can tolerate change.

If lack of a feature will force you out of business today it doesn’t matter how much it will cost to deal with the code tomorrow; you must do the best you can in the time you have. Making this kind of design compromise is like borrowing time from the future and is known as taking on technical debt. This is a loan that will eventually need to be repaid, quite likely with interest.

Data Structures and Algorithms with JavaScript

Chapter 2. Arrays
Explanation of arrays and their manipulation. Array .sort() works lexigraphically. reduce(), map(), filter() functions.

Chapter 3. Lists
Enumerating a list. Nothing really interesting.

Chapter 4. Stacks
A last-in first-out (LIFO) list.

Chapter 5. Queues
A first-in first-out (FIFO) list. Radix sort

Chapter 10. Binary trees
Tree is made up of a set of nodes connected by edges. Binary trees restrict the number of child nodes to no more than two. Binary search trees (BST) are those in which data with lesser values are stored in left nodes and greater values in right nodes, provides for efficient searches. Finding minimum, maximum value and specific value. Removing nodes from BST.

Chapter 11. Graphs and Graph Algorithms
Introduction of vertices and edges. Adjacency list VS adjacency matrix for storing graph structure.
Visiting every vertex using depth-first and breadth-first. Finding the shortest path using both algorithms. Topological sorting of the graph.

Pro JavaScript for Web Apps – crossroads

Apress has an awesome book that covers KnockoutJS: Pro JavaScript for Web Apps.

You will get stuck on Chapter 4, when using the latest latest version of crossroads, hasher and signals because setting the context of hasher to be crossroads doesn’t seem to work anymore:

     hasher.initialized.add(crossroads.parse, crossroads);
     hasher.changed.add(crossroads.parse, crossroads);

     crossroads.addRoute("select/{item}", function (item) {

The code works with the version of libraries included in the book’s downloadable source code, but if you do a latest git pull of all 3 libraries you need to change the code as per the example as given in the Hasher GitHub readme

crossroads.addRoute("select/{item}", function (item) {
function handleChanges(newHash, oldHash) {

Also, the crossroads routes must be set up before the hasher.init(). Otherwize the hasher initialized callback will have no routes to execute.
Otherwise, the book is great! Bunch of people in the office want to borrow it once I am done with it:)