Week 7
Comments on 7 Languages in 7 Weeks
Clojure
Clojure is list processing that runs on java virtual machine. It is a functional language with data structures such as lists, maps, and vectors. Lists are ordered collection of elements. Lists are used for code. Vectors are ordered collection of elements as well. Vectors are used for data and optimized for random access. Sets are unordered collection of elements. Maps are key-value pairs.
We can define functions by using defn and def for defining data. We also have the ability to access any portion of an argument as a parameter. Anonymous functions allow you to create unnamed functions.
Day two covers sequences, macros, and protocols and records. A sequence is an abstraction that wraps around collections. To test a sequence you use the predicate function. In day two, we are also introduced to lazy evaluation. This allows us to make and efficiently work with infinite sequences.
Day thee focused on concurrency. It supports the concept of software transactional memory. Also discussed in this section are atoms, refs, and agents. All three are wrapped pieces of data. In a reference, you cannot change a reference outside of a transaction. On the other hand, Atoms allow you to change outside the context of a transaction. Finally, an agent will block until a value is available. Data can be mutated asynchronously using functions.
Comments on The Human Factor by Kim Vicente
This problem is occurring because two entities are working separately instead of together. There is the mechanical entity that engineers a product without taking the human into consideration. And the human entity that forgets that machines are an important part of human activity.
I think too often, a product is created for its function and not taking into consideration that a human needs to easily be able to use that product. Sometimes I think about Microsoft Office in this way. Office has a great suite of products, but there are always a lot of buttons to press, none that are intuitive to select. The functions are there. The usability is not.
I thought that by reporting near-misses in the hospital was great. A 90% reduction in medical mistakes in a hospital is great news!