Listen

Description

Chapter 5 (Part 2) - Bend Or Break

A weekly podcast about programming, development, and design through the lens of amazing books, chapter-by-chapter.

Tip 40: Design Using Services

Tip 41: Always Design for Concurrency

Tip 42: Separate Views from Models


The view is an interpretation of the model. It doesn't need to be graphical. The controller is more of a coordination mechanism, and doesn't have to be related to any sort of input device.


Tip 43: Use Blackboards to Coordinate Workflow

JP: Use blackboards to coordinate disparate facts and agents, while maintaining independence and isolation among participants

John: The blackboard style of programming removes the need for so many interfaces, making for a more elegant and consistent system.

John: "Feed" concept

Picks

Seriously... just look how cool this is.

defmodule MyList do
def flatten([ [sub_head | sub_tail] | tail]) do
flatten(sub_head) ++ flatten(sub_tail) ++ flatten(tail)
end

def flatten([ head | tail]) do
flatten(head) ++ flatten(tail)
end

def flatten([]), do: []

def flatten(head), do: [head]
end

IO.inspect MyList.flatten [ 1, [ 2, 3, [ 4 ] ], 5, [ [ [ [ 6 ] ] ] ] ]
# [1, 2, 3, 4, 5, 6]