Lost in the oppressive wackiness is the depressing fact glossed over in the first sentence: an ostrich, crushed by debt, prostitutes itself into slavery to Mickey Mouse for the meager potential reward of just three hundred dollars.
http://en.wikipedia.org/wiki/Wacky_Races
Male lactation
Though boys and men have nipples, many are unaware that they also have mammary glands[citation needed]
This claim was tested in an informal poll conducted on a New York City street corner. It proved that you will be beaten severely if you ask a bunch of random men whether they are aware that they have mammary glands.
http://en.wikipedia.org/wiki/Male_lactation
Terminology of homosexuality
Jizz Junkie[citation needed]
Most find this term pejorative and prefer “semen enthusiast.”
http://en.wikipedia.org/wiki/Terminology_of_homosexuality
Joanna of Castile
The early stages of Joanna and Philip’s relationship were quite passionate, and the feeling was mutual.

…

But after Hollywood and Madison Avenue shoved it down our throats for the better part of two decades, it’s slowly become just another hackneyed cliché.
http://en.wikipedia.org/wiki/Hushpuppy
The Harlem Globetrotters on Gilligan’s Island
The original script was going to be known as The Dallas Cowboys Cheerleaders on Gilligan’s Island, but was changed to have the Harlem Globetrotters star instead.[citation needed]
The pillow fight scenes suffered immensely from the change.
http://en.wikipedia.org/wiki/The_Harlem_Globetrotters_on_Gilligan’s_Island
Da Vinci’s Notebook
Enormous Penis is often wrongly assumed to be a Frank Zappa song.
When it is, in fact, one of John Philip Sousa’s most underrated works.
http://en.wikipedia.org/wiki/Da_Vinci’s_Notebook
Punxsutawney Phil
During the rest of the year, Phil lives in the town library with his “wife” Phyllis.

…

The quotes indicate the sinful, never legally sanctioned (but oft-consummated) nature of Phil and Phyllis’s sham marriage.
http://en.wikipedia.org/wiki/Punxsutawney_Phil
Lew Zealand
His thrown fish are unique in that they return to him once thrown.
Something Katherine Hepburn’s thrown fish could never quite get the hang of.
http://en.wikipedia.org/wiki/Lew_Zealand
Animal Fancy
One theory for the term “fan”, for one who supports a sports team or any public figure, is that it is likewise derived from this use of “fancy”. Other theories exist, however, including the idea that fan is short for fanatic.
Consider too, the expression, “Well, fancy that.”
Are you still considering it? We didn’t tell you that you could stop.
http://en.wikipedia.org/wiki/Animal_fancy
Teenage Mutant Ninja Turtles III: The Manhattan Project
Despite the fact that the cover art features the Turtles fighting a Triceraton, no Triceratons appear in the game.

You can read more about game theory at http://en.wikipedia.org/wiki/Game_theory.
Appendix A. Call for Submissions
The case studies in this book were written by students at Olin College, and edited by Lisa Downey and Allen Downey. They were reviewed by a program committee of faculty at Olin College who chose the ones that met the criteria of interest and quality. I am grateful to the program committee and the students.
I invite readers to submit additional case studies. Reports that meet the criteria will be published in an online supplement to this book, and the best of them will be included in future print editions.
The criteria are the following:
The case study should be relevant to complexity. For an overview of possible topics, see http://en.wikipedia.org/wiki/Complexity and http://en.wikipedia.org/wiki/Complex_systems.

…

One interesting kind is the Erdős-Rényi model, denoted , which generates graphs with n nodes, where the probability is p that there is an edge between any two nodes. See http://en.wikipedia.org/wiki/Erdos-Renyi_model.
Example 2-4.
Create a file named RandomGraph.py, and define a class named RandomGraph that inherits from Graph and provides a method named add_random_edges that takes a probability p as a parameter and, starting with an edgeless graph, adds edges at random so that the probability is p that there is an edge between any two nodes.
Connected Graphs
A graph is connected if there is a path from every node to every other node. See http://en.wikipedia.org/wiki/Connectivity_(graph_theory).
There is a simple algorithm to check whether a graph is connected. Start at any vertex and conduct a search (usually a breadth-first-search or BFS), marking all the vertices you can reach.

…

This transition is sometimes called a “phase change” as an analogy with physical systems that change state at some critical value of temperature. See http://en.wikipedia.org/wiki/Phase_transition.
Example 2-6.
One of the properties that displays this kind of transition is connectedness. For a given size n, there is a critical value, , such that a random graph is unlikely to be connected if and very likely to be connected if .
Write a program that tests this result by generating random graphs for values of n and p, and then computing the fraction of the values that are connected.
How does the abruptness of the transition depend on n?
You can download my solution from http://thinkcomplex.com/RandomGraph.py.
* * *
[3] Much of this biography follows http://en.wikipedia.org/wiki/Paul_Erdos.
Iterators
If you have read the documentation of Python dictionaries, you might have noticed the methods iterkeys, itervalues, and iteritems.

We can determine the steady state based on end of day close prices.
Far into the distant future or in theory infinite time, the state of our Markov chain system will not change anymore. This is also called a steady state (http://en.wikipedia.org/wiki/Steady_state). The stochastic matrix (http://en.wikipedia.org/wiki/Stochastic_matrix) A, which contains the state transition probabilities, and when applied to the steady state, will yield the same state x. The mathematical notation for this will be as follows:
Another way to look at this is as the eigenvector (http://en.wikipedia.org/wiki/Eigenvalues_and_eigenvectors) for eigenvalue 1.
How to do it...
Now we need to obtain the data.
Obtain one year of data.One way we can do this is with Matplotlib (refer to the Installing Matplotlib recipe in Chapter 1, Winding Along with IPython, if necessary).

…

The Fibonacci series is a sequence of integers starting with zero, where each number is the sum of the previous two; except, of course, the first two numbers zero and one.
For more information, read the Wikipedia article about Fibonacci numbers at http://en.wikipedia.org/wiki/Fibonacci_number .
This recipe uses a formula based on the golden ratio, which is an irrational number with special properties comparable to pi. It we will use the sqrt, log, arange, astype, and sum functions.
How to do it...
The first thing to do is calculate the golden ratio (http://en.wikipedia.org/wiki/Golden_ratio), also called the golden section or golden mean.
Calculate the golden ratio.We will be using the sqrt function to calculate the square root of five:
phi = (1 + numpy.sqrt(5))/2 print "Phi", phi
This prints the golden mean:
Phi 1.61803398875
Find the index below four million.Next in the recipe, we need to find the index of the Fibonacci number below four million.

…

arange
Creates an array with a specified range.
astype
Converts array elements to a specified data type.
sum
Calculates the sum of array elements.
See also
The Indexing with booleans recipe in Chapter 2, Advanced Indexing and Array Concepts
Finding prime factors
Prime factors (http://en.wikipedia.org/wiki/Prime_factor) are prime numbers that divide an integer exactly without a remainder. Finding prime factors seems almost impossible to crack. However, using the right algorithm—Fermat's factorization method (http://en.wikipedia.org/wiki/Fermat%27s_factorization_method) and NumPy—it becomes very easy. The idea is to factor a number N into two numbers c and d, according to the following equation:
We can apply the factorization recursively, until we get the required prime factors.
How to do it...

See Ward Cunningham, Wiki Design Principles http://www.c2.com/cgi/wikiiWiki DesignPrinciples (as of Mar. 26, 2007, 12:00 GMT) (explaining that his goals for the first release of Wiki included designing an “organic” system in which “[t]he structure and text content of the site are open to editing and evolution,” in which “[t]he mechanisms of editing and organizing are the same as those of writing so that any writer is automatically an editor and organizer,” and in which “[a]ctivity within the site can be watched and reviewed by any other visitor to the site”). Cunningham also notes that an additional principle was that “[e]verybody can contribute; nobody has to.” Id.
84. See Meyers, supra note 82; Wikipedia, Ward Cunningham, http://en.wikipedia.org/ wiki/Ward_Cunningham (as of May 10, 2007, 13:31 GMT); Wikipedia, Wiki, http://en.wikipedia.org/wiki/WikiWiki (as of May 16, 2007, 23:11 GMT).
85. See Wikipedia, Wiki, supra note 84; Wikipedia, Wikipedia, http://en.wikipedia.org/ wiki/Wikipedia#History (as of May 16, 2007, 15:44 GMT).
86. For further discussion of commons-based peer production (including an examination of free software and Wikipedia) as an alternate economic modality, see Benkler, supra note 65, at 334—36.
87. There is evidence this is, in fact, already occurring.

…

See Wikipedia Meta-Wiki, Wikipedia, http://meta.wikimedia.org/wiki/Wikipedia (as of June 1, 2007, 08:15 GMT).
30. Wikipedia Meta-Wiki, Three-Revert Rule, http://en.wikipedia.org/wiki/Wikipedia: Three-revert_rule (as of June 1, 2007, 08:15 GMT).
31. Wikipedia policy prohibits “wheel wars”—cases in which a Wikipedia administrator repeatedly undoes the action of another—just as it prohibits edit wars. See Wikipedia, Wheel War, http://en.wikipedia.Org/wiki/Wikipedia:Wheel_war (as of May 30, 2007 at 21:40 GMT). A meta-meta-rule is that while administrators do not second-guess each others’ actions without good reason, some restrictions require persistent consensus among admins—nearly any admin may unprotect a page or remove a block.
32. See Wikipedia, Wikipedia: No Legal Threats, http://en.wikipedia.org/wiki/Wikipedia: No_legal_threats (as of May 30, 2007 at 21:41 GMT).
33. E.g., Wikipedia Meta-Wiki, Editing with Tor, http://meta.wikimedia.org/wiki/Tor (as ofJUNE 1, 2007, 08:15 GMT) (“English Wikipedia tends to block every Tor node.”).
34.

We’ve looked at the pros and cons of the ways that CoffeeScript can be
compiled and are now armed with the knowledge we need to be able to play with the examples
in the rest of this book. Finally, we dug into the coffee command to learn the most important
options and parameters we can pass to it.
Notes
1. Read-eval-print loop - http://en.wikipedia.org/wiki/Read-eval-print_loop
2. http://en.wikipedia.org/wiki/Html
3. http://en.wikipedia.org/wiki/Unobtrusive_JavaScript
4. http://en.wikipedia.org/wiki/Json
5. Touching a file means lots of different things on different operating systems, but usually
just saving the file is enough of a “touch” to trigger the -w into doing its magic.
6. https://github.com/guard/guard
7. https://github.com/TrevorBurnham/jitter
8. http://jashkenas.github.com/coffee-script/documentation/docs/command.html
2
The Basics
N
ow that we’ve covered the boring stuff, like compiling and executing your CoffeeScript, we
will start covering how to actually write it.

…

In the original outline for this book, this chapter was originally part of Chapter 2, “The Basics,”
but I felt there was so much information here that it deserved its own chapter. This chapter
could have been called “The Basics—Part 2.” I’m telling you this because, armed with the
knowledge contained within this chapter and Chapter 2, we have covered the basic building
blocks of CoffeeScript. We can now start looking at the really fun stuff.
Notes
1. http://en.wikipedia.org/wiki/Operator_(programming)
2. http://en.wikipedia.org/wiki/Conditional_(programming)
3. http://www.yaml.org/spec/1.2/spec.html
4. http://en.wikipedia.org/wiki/Ternary_operation
5. http://en.wikipedia.org/wiki/Switch_statement
63
This page intentionally left blank
4
Functions and Arguments
I
n this chapter we are going to look at one of the most essential parts of any language, the
function. Functions allow us to encapsulate reusable and discrete code blocks. Without functions our code would be one long, unreadable, and unmaintainable mess.

Obviously, you can
define as many fields as you’d like (url, content, header image, etc.), but I’m simply
collecting the title field from each page, for now.
In your newly created articleSpider.py file, write the following:
from scrapy.selector import Selector
from scrapy import Spider
from wikiSpider.items import Article
class ArticleSpider(Spider):
name="article"
allowed_domains = ["en.wikipedia.org"]
start_urls = ["http://en.wikipedia.org/wiki/Main_Page",
"http://en.wikipedia.org/wiki/Python_%28programming_language%29"]
def parse(self, response):
item = Article()
title = response.xpath('//h1/text()')[0].extract()
print("Title is: "+title)
item['title'] = title
return item
The name of this object (ArticleSpider) is different from the name of the directory
(WikiSpider), indicating that this class in particular is responsible for spidering only
through article pages, under the broader category of WikiSpider.

You should already know how to write a Python script that retrieves an arbitrary
Wikipedia page and produces a list of links on that page:
from urllib.request import urlopen
from bs4 import BeautifulSoup
html = urlopen("http://en.wikipedia.org/wiki/Kevin_Bacon")
bsObj = BeautifulSoup(html)
for link in bsObj.findAll("a"):
if 'href' in link.attrs:
print(link.attrs['href'])
If you look at the list of links produced, you’ll notice that all the articles you’d expect
are there: “Apollo 13,” “Philadelphia,” “Primetime Emmy Award,” and so on. However,
there are some things that we don’t want as well:
//wikimediafoundation.org/wiki/Privacy_policy
//en.wikipedia.org/wiki/Wikipedia:Contact_us
In fact, Wikipedia is full of sidebar, footer, and header links that appear on every
page, along with links to the category pages, talk pages, and other pages that do not
contain different articles:
/wiki/Category:Articles_with_unsourced_statements_from_April_2014
/wiki/Talk:Kevin_Bacon
Recently a friend of mine, while working on a similar Wikipedia-scraping project,
mentioned he had written a very large filtering function, with over 100 lines of code,
in order to determine whether an internal Wikipedia link was an article page or not.

We can then invoke the law of large numbers and the central limit theorem (CLT) and denote the mean of sample means as an estimate of the true population mean.
The population mean is also referred to as the expected value of the population.
The mean, as a calculated value, is often not one of the values observed in the dataset. The main drawback of using the mean is that it is very susceptible to outlier values, or if the dataset is very skewed. For additional information, please refer to these links at http://en.wikipedia.org/wiki/Sample_mean_and_sample_covariance, http://en.wikipedia.org/wiki/Law_of_large_numbers, and http://bit.ly/1bv7l4s.
The median
The median is the data value that divides the set of sorted data values into two halves. It has exactly half of the population to its left and the other half to its right. In the case when the number of values in the dataset is even, the median is the average of the two middle values.

…

A memoryless random variable exhibits the property whereby its future state depends only on relevant information about the current time and not the information from further in the past. An example of modeling a Markovian/memoryless random variable is modeling short-term stock price behavior and the idea that it follows a random walk. This leads to what is called the Efficient Market hypothesis in Finance. For more information, refer to http://en.wikipedia.org/wiki/Random_walk_hypothesis.
The PDF of the exponential distribution is given by =. The expectation and variance are given by the following expression:
For a reference, refer to the link at http://en.wikipedia.org/wiki/Exponential_distribution.
The plot of the distribution and code is given as follows:
In [15]: import scipy.stats clrs = colors.cnames x = np.linspace(0,4, 100) expo = scipy.stats.expon lambda_ = [0.5, 1, 2, 5] plt.figure(figsize=(12,4)) for l,c in zip(lambda_,clrs): plt.plot(x, expo.pdf(x, scale=1.

…

A good example in the area of retail would be Target Corporation, which has invested substantially in big data and is now able to identify potential customers by using big data to analyze people's shopping habits online; refer to a related article at http://nyti.ms/19LT8ic.
Loosely speaking, big data refers to the phenomenon wherein the amount of data exceeds the capability of the recipients of the data to process it. Here is a Wikipedia entry on big data that sums it up nicely: http://en.wikipedia.org/wiki/Big_data.
4 V's of big data
A good way to start thinking about the complexities of big data is along what are called the 4 dimensions, or 4 V's of big data. This model was first introduced as the 3V's by Gartner analyst Doug Laney in 2001. The 3V's stood for Volume, Velocity, and Variety, and the 4th V, Veracity, was added later by IBM. Gartner's official definition is as follows:
"Big data is high volume, high velocity, and/or high variety information assets that require new forms of processing to enable enhanced decision making, insight discovery and process optimization."

For a fascinating discussion of the concept of authorship in Renaissance Italy and of the Venetian Council of Ten Decree of 1545, see
Joanna Kostylo’s Commentary on the Venetian Decree of 1545 regulating author/printer relations, on the invaluable Primary Sources
in Copyright website. Professor Kostylo’s commentary is available at:
http://www.copyrighthistory.org/cgi-bin/kleioc/0010/exec/
ausgabeCom/%22i_1545%22.
See Early Music Borrowing (Honey Meconi ed. 2004); http://
en.wikipedia.org/wiki/Parody_mass.
See http://en.wikipedia.org/wiki/Josquin_des_Prez.
http://en.wikipedia.org/wiki/Paraphrase_mass.
http://en.wikipedia.org/wiki/Josquin_des_Prez.
K. 180.
For further examples and a discussion, see Charles Rosen’s article,
“Inﬂuence: Plagiarism and Inspiration,” in 19th Century Music,
Issue 2, Autumn 1980, pages 87–100.
See http://en.wikipedia.org/wiki/Mashup_%28web_application_
hybrid%29; Matthew Rimmer, Copyright Law and Mash-Ups:
A Policy Paper, Australian National University (2010); “Mashing-Up
Culture: The Rise of User-Generated Content,” Proceedings from
the COUNTER Workshop, Uppsala University, May 13–14, 2009);
James Boyle, The Public Domain, Chapter 6 (“I Got a Mashup”)
(2008, Yale University Press); Olufunmilayo Arewa, From J.C.

…

., a private industrial group run by Len Blavatnik, a Russian businessman.
266
NOTES TO PAGES 21–26
22. Hearing Before the Subcommittee on Courts and Intellectual
Property of the Committee on the Judiciary, U.S. House of
Representatives,106th Congress, 2d Session, page 120 (May 25,
2000). Serial No. 145. Available at: http://commdocs.house.gov/
committees/judiciary/hju65223.000/hju65223_0f.htm.
23. See http://en.wikipedia.org/wiki/Studio_system.
24. See http://en.wikipedia.org/wiki/Cinema_of_the_United_States#
Golden_Age_of_Hollywood.
25. 334 U.S. 131 (1948).
26. Edward Jay Epstein, The Big Picture: Money and Power in Hollywood 112 (2006, Random House). See also Schuyler Moore, The
Biz: The Basic Business, Legal and Financial Aspects of the Film
Industry (2007, 3d edition, Silman-James Press).
27. http://thehollywoodeconomist.blogspot.com.

…

Thucydides, Book Five, History of the Peloponnesian Wars, reproduced in The Landmark Thucydides: A Comprehensive Guide to
the Peloponnesian War 352 (Robert Strassler ed., The Free Press
1996). The Athenians made good on this realpolitik by killing the
Melian men, enslaving the Melian women and children, and then
repopulating it as an Athenian state. See http://en.wikipedia.org/
wiki/Melian_dialogue, and A.B., Bosworth. “The Humanitarian
Aspect of the Melian Dialogue.” The Journal of Hellenic Studies
113 (1993): 31, http://www.jstor.org/stable/632396; W. Liebeschuetz. “The Structure and Function of the Melian Dialogue.”
The Journal of Hellenic Studies 88 (1968): 75, http://www.jstor.
org/stable/628672.
47. See http://en.wikipedia.org/wiki/Melian_dialogue.
48. Available at: http://news.bbc.co.uk/2/hi/8681410. See http://www
.michaelgeist.ca/content/view/5563/125/.
49. See http://business.ﬁnancialpost.com/2011/05/30/judge-approvessettlement-in-music-royalties-class-action/.
50.

The International Monetary Fund’s Global Financial Stability Report for April 2006 stated, baldly and boldly: ‘There is growing recognition that the dispersion of credit risk by banks to a broader and more diverse set of investors, rather than warehousing such risk on their balance sheets, has helped make the banking and overall financial system more resilient.’ See Global Financial Stability Report (Washington DC: International Monetary Fund, 2006), p. 51.
8. On IKB, see http://en.wikipedia.org/wiki/IKB_Deutsche_Industriebank, on the eight Norwegian municipalities, see http://en.wikipedia.org/wiki/Terra_Securities_scandal, and on Narvik, in particular, which lost $18 million in August 2007, see http://en.wikipedia.org/wiki/Narvik.
9. Skidelsky, Keynes, p. 8, and Tom Braithwaite and Chris Tighe, ‘Patient Queues in Very British Bank Run’, Financial Times, 14 September 2007.
10. Paul McCulley invented the term ‘Shadow Banking System’ for intermediation via money-market funds, special investment vehicles (SIVs), conduits and hedge funds.

…

See Lawrence Summers, ‘Why Stagnation might Prove to be the New Normal’, 15 December 2013, Financial Times, http://www.ft.com/cms/s/2/87cb15ea-5d1a-11e3-a558-00144feabdc0.html. On Alvin Hansen, see http://en.wikipedia.org/wiki/Alvin_Hansen.
55. See http://en.wikipedia.org/wiki/Sovereign_wealth_fund#Size_of_SWFs and http://www.swfinstitute.org/fund-rankings/.
56. See Kenneth Rogoff, ‘Globalization and Global Deflation’, Paper prepared for the Federal Reserve Bank of Kansas City conference on ‘Monetary Policy and Uncertainty: Adapting to a Changing Economy’, Jackson Hole, Wyoming, 29 August 2003, https://www.imf.org/external/np/speeches/2003/082903.htm.
57. See ‘Moore’s Law’, http://en.wikipedia.org/wiki/Moore’s_law.
58. On the forces driving inequality and their consequences, see Organisation for Economic Co-operation and Development, Divided We Stand: Why Inequality Keeps Rising (Paris: OECD, 2011), Joseph Stiglitz, The Price of Inequality: How Today’s Divided Society Endangers our Future (New York and London: Norton, 2012), and Thomas Piketty, Capital in the Twenty-First Century (Cambridge, MA, and London, England, 2014).
59.

You should now see an extra sub-directory named FULL-{timestamp}, where {timestamp} is the time to the second that the full backup was created.
Click on the Restore icon.
A select box restore backup form will be shown with the dates of the backups. Select the backup just created. Click on the Restore button.
To guarantee the consistency, restart the Jenkins server.
How it works...
The backup scheduler uses the cron notation (http://en.wikipedia.org/wiki/Cron). 1 0 * * 7 means every seventh day of the week at 00:01 AM. 1 1 * * * implies that differential backup occurs once per day at 1.01 A.M. Every seventh day, the previous differentials are deleted.
Differential backups contain only files that have been modified since the last full backup. The plugin looks at the last modified date to work out which files need to be backed up. The process can sometimes go wrong if another process changes the last modified date, without actually changing the content of the files.
61 is the number of directories created with backups.

…

A fuzzer goes through a series of URLs, appends different parameters blindly, and checks the response from servers. The inputted parameters are variations of scripting commands such as<script>alert("random string");</script>. An attack vector is found if the server's response includes the unescaped version of the script.
Cross Site Scripting attacks are currently one of the more popular forms of attack (http://en.wikipedia.org/wiki/Cross-site_scripting). The attack involves injecting script fragments into the client's browser so that the script runs as if it comes from a trusted website. For example, once you have logged in to an application, it is probable that your session ID is stored in a cookie. The injected script might read the value in the cookie and then send the information to another server ready for an attempt at reuse.

…

This action not only removes the risk of running unsolicited JavaScript, but also removes some flexibility for you as the administrator of the Job. You can no longer add formatting tags, such as font.
The Mask Passwords plugin removes the password from the screen or the console, replacing each character of the password with the letter "x", thus avoiding accidental reading. You should also always keep this plugin turned on, unless you find undocumented side effects or need to debug a Job.
Cross Site Request Forgery (http://en.wikipedia.org/wiki/Cross-site_request_forgery) occurs, for example, if you accidentally visit a third-party location. A script at that location then tries to make your browser perform an action (such as delete a Job) by making your web browser visit a known URL within Jenkins. Jenkins, thinking that the browser is doing your bidding, then complies with the request. Once the nonce feature is turned on, Jenkins avoids CSRF by generating a random one-time number called a nonce that is returned as part of the request.

(San Francisco: Cengage Learning, 2011).
A Matter of Interpretation
1 For background about Gestalt psychology and its origins, see Wikipedia, s.v. “Gestalt psychology,” last modified July 6, 2014, en.wikipedia.org/wiki/Gestalt_psychology/. A summary of early Gestalt research on insight can be found in R. E. Mayer, “The Search for Insight: Grappling with Gestalt Psychology’s Unanswered Questions,” in The Nature of Insight, ed. R. J. Sternberg and J. E. Davidson (Cambridge, Mass.: MIT Press, 1995), pp. 3–32.
2 Information about the Wright brothers’ propeller design can be found here at en.wikipedia.org/wiki/Wright_brothers#cite_note-47.
Insight Is Creative
1 For a recent discussion of definitions of insight, see J. Kounios and M. Beeman, “The Cognitive Neuroscience of Insight,” Annual Review of Psychology 65 (2014): 71–93.
2 For a discussion of definitions of creativity, see J.

…

Woodworth, Experimental Psychology (New York: Henry Holt, 1938), 818.
CHAPTER 3: THE BOX
* * *
1 The origin of the phrase “Columbus’s egg” is discussed in Wikipedia, s.v. “Egg of Columbus,” last modified May 14, 2014, en.wikipedia.org/wiki/Columbus_Egg. The story may be apocryphal, or the egg trick may have been performed by the Italian architect Filippo Brunelleschi.
2 Figure 3.1 (Columbus standing an egg on its end) was taken from J. Trusler, The Works of William Hogarth: In a Series of Engravings with Descriptions, and a Comment on Their Moral Tendency (London: Jones, 1833), en.wikipedia.org/wiki/File:Columbus_egg.jpg. Figure 3.2 (Christopher Columbus’s Egg Puzzle) can be found in S. Loyd, Cyclopedia of Puzzles: en.wikibooks.org/wiki/Creativity_-_An_Overview/Thinking_outside_the_box#mediaviewer/File:Eggpuzzle.jpg.
3 An early classic study of the Nine-Dot Problem is described in N.

…

Morgan’s quote is derived from Morgan, “A Morphological Life,” Annual Review of Astronomy and Astrophysics 26 (1988): 1–9.
2 Rebecca Woodings’s story can be found here: www.washingtonpost.com/wp-dyn/content/article/2009/12/14/AR2009121402863.html.
Thoughts from the Fringe
1 The quote from William Rowan Hamilton’s letter to his son is adapted from en.wikiquote.org/wiki/William_Rowan_Hamilton. Information about Hamilton can be found at Wikipedia, s.v. “William Rowan Hamilton,” last modified July 28, 2014, en.wikipedia.org/wiki/William_Rowan_Hamilton. A relatively accessible explanation of Hamilton’s idea is given at plus.maths.org/content/curious-quaternions. The picture of the plaque commemorating Hamilton’s discovery is found at en.wikipedia.org/wiki/File:William_Rowan_Hamilton_Plaque_-_geograph.org.uk_-_347941.jpg.
The tip-of-the-tongue (TOT) phenomenon is another example of thought from the fringe. It sometimes occurs while you’re trying to remember something, usually a word. As with intuition, you can’t remember the specific word, but you know it’s there, because it feels like it’s on the tip of your tongue.

This is an expert setting. The following options are available: the internaldefault comparison algorithm based on optimized implementation of the Damerau Levenshtein similarity algorithm, damerau_levenshtein is the implementation of the Damerau Levenshtein string distance algorithm (http://en.wikipedia.org/wiki/Damerau–Levenshtein_distance), levenstein which is an implementation of Levenshtein distance (http://en.wikipedia.org/wiki/Levenshtein_distance), jarowinkler which is an implementation of the Jaro-Winkler distance algorithm (http://en.wikipedia.org/wiki/Jaro-Winkler_distance) and finally the ngram, which is an n-gram based distance algorithm.
Note
Because we've used the terms suggester during the initial examples, we decided to skip showing how to query the terms suggester and how the response would look like in this place.

…

You can read more about the n-gram smoothing models by visiting at http://en.wikipedia.org/wiki/N-gram#Smoothing_techniques and http://en.wikipedia.org/wiki/Katz's_back-off_model (which is similar to the stupid backoff model described).
Laplace
The Laplace smoothing model is also called additive smoothing. When used (in order to use it, we need to use the laplace value as its name), a constant value equal to the value of the alpha parameter (which is by default 0.5) will be added to counts to balance the weights of frequent and infrequent n-grams.
As mentioned, the Laplace smoothing model can be configured using the alpha property, which is by default set to 0.5. The usual values for this parameter are typically equal or below 1.0.
You can read more about additive smoothing at http://en.wikipedia.org/wiki/Additive_smoothing.
Linear interpolation
Linear interpolation is the last smoothing model that takes the values of the lambdas provided in the configuration and uses them to calculate weights of trigrams, bigrams and unigrams.

…

Communicating with ElasticSearch
We talked about how ElasticSearch is built, but after all, the most important part for us is how to feed it with data and how to build your queries. In order to do that ElasticSearch exposes a sophisticated API. The primary API is REST based (see http://en.wikipedia.org/wiki/Representational_state_transfer) and is easy to integrate with practically any system that can send HTTP requests.
ElasticSearch assumes that data is sent in the URL, or as the request body as JSON document (http://en.wikipedia.org/wiki/JSON). If you use Java or language based on JVM, you should look at Java API, which in addition to everything that is offered by the REST API has built-in cluster discovery.
It is worth mentioning that Java API is also used internally by the ElasticSearch itself to do all the node to node communication.

The overwhelming mass of general works on Burgundy are written from the French perspective, and the great majority of them concentrate heavily on the history of the late medieval duchy. See, for example, Henri Drouot, Histoire de Bourgogne (Paris, 1927), or Jean Richard, Histoire de Bourgogne (Paris, 1957). There is no standard study of the imperial Kingdom of Burgundy in English, and no broad survey of Burgundian history as a whole.
I
1. See www.brk.dk; also http://en.wikipedia.org/wiki/bornholm (2007). 2. See www.cimber.com (2010), www.airliners.net/aviation-forums/general_aviation/4474449 (2010). 3. http://en.wikipedia.org/wiki.bornholmsk_dialect (2011); J. D. Prince, ‘The Danish Dialect of Bornholm’, Proceedings of the American Philosophical Society, 63/2 (1924), pp. 190–207. 4. ‘Bornholmsk Folkemusik’, http://www.myspace.com/habbadam (2010). 5. J. H. Hopkins, ‘Bornholm Disease’, British Medical Journal, 1/4664 (May 1950). 6. Martin Anderson Nexo, Pelle Eroberen (1910), translated as Pelle the Conqueror (London, 1916) and turned into a film directed by Bille August in 1987. 7. http://www.iau.org.tw. 8.

References
The partition table name mdsos dates back to 1983 when support for partitioned media was introduced with IBM PC DOS 2.0. IBM PC DOS was a rebranded version of Microsoft MS DOS.
For more information on disk partitioning, the msdos partition table—also known as Master Boot Record (MBR), the GUID partition table, PC/BIOS, and EFI, see:
http://en.wikipedia.org/wiki/Disk_partitioning
http://en.wikipedia.org/wiki/Master_boot_record
http://en.wikipedia.org/wiki/GUID_Partition_Table
http://en.wikipedia.org/wiki/BIOS
http://en.wikipedia.org/wiki/Extensible_Firmware_Interface
Copying a partition (Become an expert)
Copying a partition can be a complex and long running operation. As there are implications to copying a partition, we discuss these along with the steps to copy a partition.
How to do it...
Select the source partition to copy:
Choose the Partition | Copy menu option to place a copy of the partition in the copy buffer.

…

Another reason is that GPT supports 128 primary partitions, whereas msdos is limited to 4 primary partitions.
Note that RAIDs that use msdos partition tables do not require this repair step because there is only one copy of the msdos partition table, which is located at the start of the disk device.
Reference information
For more information on RAIDand the GUID partition table, see http://en.wikipedia.org/wiki/RAID, http://en.wikipedia.org/wiki/GUID_Partition_Table.
Rescuing data from a lost partition (Become an expert)
If you delete or otherwise lose a partition and realize that you need some data from the partition, there is still some hope. This recipe describes the steps to attempt data rescue from a lost or deleted partition.
Getting ready
While we hope it never happens to you, if you lose a partition by accidental deletion or by some other method and you do not have a backup of your data, this recipe may help you to rescue data from your partition.

The system itself will be actually executing your application, and future developers may need to integrate your command-line apps into larger systems of automation (similar to how our database backup script integrates mysqldump). In the next chapter, we’ll talk about how to make your apps interoperate with the system and with other applications.
Footnotes
[19] http://en.wikipedia.org/wiki/Principle_of_least_astonishment
[20] http://en.wikipedia.org/wiki/Nroff
[21] http://defunkt.io/gem-man/
[22] http://rtomayko.github.com/ronn/
[23] The Wikipedia entry for the UNIX man system (http://en.wikipedia.org/wiki/Man_page#Manual_sections) has a good overview of the other sections if you are interested.
[24] http://daringfireball.net/projects/markdown/
[25] http://rtomayko.github.com/ronn/ronn-format.7.html
[26] Savvy users can alias man to be gem man -s, which tells gem-man to use the system manual for any command it doesn’t know, thus providing one unified interface to the system manual and the manual of installed Ruby command-line apps.

For an amazingly insightful analysis of the effects of increased communication and decreased energy cost across everything from living cells to civilizations, see Robert Wright, Nonzero (New York: Pantheon 2000).
7. Amazon Web Services (AWS), accessed November 25, 2014, http://aws.amazon.com.
8. W. B. Yeats, “The Second Coming,” 1919, http://en.wikipedia.org/wiki/The_Second_Coming_(poem).
3. ROBOTIC PICKPOCKETS
1. At least, that’s the way I remember it. Dave may have a different recollection, especially in light of the fact that Raiders wasn’t released until 1981.
2. David Elliot Shaw, “Evolution of the NON-VON Supercomputer,” Columbia University Computer Science Technical Reports, 1983, http://hdl.handle.net/10022/AC:P:11591.
3. http://en.wikipedia.org/wiki/MapReduce, last modified December 31, 2014.
4. James Aley, “Wall Street’s King Quant David Shaw’s Secret Formulas Pile Up Money: Now He Wants a Piece of the Net,” Fortune, February 5, 1996 http://archive.fortune.com/magazines/fortune/fortune_archive/1996/02/05/207353/index.htm.
5.

…

These figures are almost identical to present-day Mozambique (http://feedthefuture.gov/sites/default/files/country/strategies/files/ftf_factsheet_mozambique_oct2012.pdf, accessed November 29, 2014) and Uganda (http://www.farmafrica.org/us/uganda/uganda, accessed November 29, 2014). Income data is from the World DataBank, “GNI per Capita, PPP (Current International $)” table, accessed November 29, 2014, http://databank.worldbank.org/data/views/reports/tableview.aspx#.
4. For example, Robert Reich (http://en.wikipedia.org/wiki/Robert_Reich, last modified December 31, 2014); Paul Krugman (http://en.wikipedia.org/wiki/Paul_Krugman, last modified December 12, 2014); and the recent influential book by Thomas Piketty, Capital in the Twenty-first Century (Cambridge, Mass.: Belknap, 2014).
5. This analogy relies primarily on income data from the U.S. Census (http://www.census.gov/hhes/www/income/data/historical/families/index.html, last modified September 16, 2014).
6.

id=28
[53] http://www.bbc.co.uk/programmes/b03wpf59
[54] http://www.bbc.co.uk/programmes/b03wpf59
[55] http://www.reddit.com/r/manna
[56] http://en.wikipedia.org/wiki/Alaska_Permanent_Fund
[57] http://thinkprogress.org/economy/2014/04/11/3425609/walmart-prices-food-stamps/
[58] http://marshallbrain.com/manna1.htm
[59] http://dictionary.reference.com/browse/evil
[60] http://chimpanzeefacts.net/are-chimpanzees-endangered.html
[67] http://en.wikipedia.org/wiki/Korean_Demilitarized_Zone#Nature_reserve
[68] http://en.wikipedia.org/wiki/Mind_uploading
[69] http://en.wikipedia.org/wiki/List_of_United_States_cities_by_population_density
[70] http://www.msnbc.msn.com/id/36769422/ns/technology_and_science-space/t/hawking-aliens-may-pose-risks-earth/#.T2YyfBEge5I
[71] http://en.wikipedia.org/wiki/Drake_equation
[72] http://en.wikipedia.org/wiki/Superluminal_communication
[73] http://data.bls.gov/timeseries/CES0000000001
Manna - Two Visions of Humanity's Future
The book "Manna - Two Views of Humanity's Future" is a novella originally published on MarshallBrain.com in 2003. It is a fictional work that contains two different predictions for how the world might look after robots and automation have taken over all of the jobs that humans perform today.
For more information:
http://en.wikipedia.org/wiki/Manna_(novel)
http://www.amazon.com/Manna-Two-Visions-Humanitys-Future-ebook/dp/B007HQH67U
http://marshallbrain.com/manna1.htm
http://www.goodreads.com/book/show/7902912-manna
http://www.reddit.com/r/Manna
Manna - Chapter 1
Depending on how you want to think about it, it was funny or inevitable or symbolic that the robotic takeover did not start at MIT, NASA, Microsoft or Ford.

Just as we continued to update automobile safety regulations in ways that were unforeseen during the invention moment, we will continue to update the regulatory requirements around the blockchain over the lifetime of its evolution.
NOTES
1. A term popularized in Clayton Christensen’s book (The Innovator’s Dilemma) suggesting that successful companies can put too much emphasis on customers’ current needs, and fail to adopt new technology or business models, https://en.wikipedia.org/wiki/The_Innovator%27s_Dilemma. List of U.S. executive branch czars, https://en.wikipedia.org/wiki/List_of_U.S._executive_branch_czars.
2. Source: Author’s sample survey of market leaders, April 2016.
3. Java, https://en.wikipedia.org/wiki/Java_%28programming_language%29.
4. IDC Study, http://www.infoq.com/news/2014/01/IDC-software-developers.
5. These are popular programming languages.
6. https://cryptoconsortium.org/
4
BLOCKCHAIN IN FINANCIAL SERVICES
“The worst place to develop a new business model is from within your existing business model.”

…

Leslie Lamport, Robert Shostak, and Marshall Pease, The Byzantine Generals Problem. http://research.microsoft.com/en-us/um/people/lamport/pubs/byz.pdf.
6. IT Does not Matter, https://hbr.org/2003/05/it-doesnt-matter.
7. PayPal website, https://www.paypal.com/webapps/mpp/about.
8. Personal communication with Vitalik Buterin, February 2016.
9. Byzantine fault tolerance, https://en.wikipedia.org/wiki/Byzantine_fault_tolerance.
10. Proof-of-stake, https://en.wikipedia.org/wiki/Proof-of-stake.
2
HOW BLOCKCHAIN TRUST INFILTRATES
“I cannot understand why people are frightened of new ideas. I’m frightened of the old ones.”
–JOHN CAGE
REACHING CONSENSUS is at the heart of a blockchain’s operations. But the blockchain does it in a decentralized way that breaks the old paradigm of centralized consensus, when one central database used to rule transaction validity.

…

A blockchain implementation will have a number of new architectural and functional components that need to work in harmony.
Companies will need to decide what implementation approaches to choose, based on their own competencies and choice of external partnerships.
You should not just see the Blockchain as a problem-solving technology. Rather, it is a technology that lets you innovate and target new opportunities.
NOTES
1. Ira Magaziner, https://en.wikipedia.org/wiki/Ira_Magaziner.
2. “List of U.S. executive branch czars,” https://en.wikipedia.org/wiki/List_of_U.S._executive_branch_czars.
3. MaidSafe, http://maidsafe.net/.
7
DECENTRALIZATION AS THE WAY FORWARD
“All things are difficult before they’re easy.”
–THOMAS FULLER
A DECENTRALIZED TECHNOLOGY (the blockchain) will telegraph a decentralized world.
If we thought the blockchain’s destiny was just to infiltrate enterprise systems and replace intermediaries, think again.

Two examples relevant for this paper are the pages on network motifs and
hierachical clustering; at the time of writing, these pages are not necessarily inaccurate but they are
not comprehensive or authoritative. It is clear from an examination of the edit history of these pages
that they have not received much attention from Wikipedia contributors.
1
Fatally Flawed: Refuting the Recent Study on Encyclopedic Accuracy by the Journal Nature, http:
//corporate.britannica.com/britannica_nature_response.pdf
2
See Wikipedia articles at:http://en.wikipedia.org/wiki/Wikipedia:Featured_
articles.
3
http://en.wikipedia.org/wiki/Wikipedia:Version_1.0_Editorial_Team/
Assessment
1
In this paper we present some preliminary work exploring the hypothesis that the effectiveness of
the collaboration in Wikipedia is revealed to some extent in the edit graph – the two-mode graph
of articles and contributors to those articles. We have extracted edit graphs for nine sections of
Wikipedia (see Table 1) and characterized each of these graphs in terms of network motif profiles.

…

Each dataset constitutes a target graph for GraphGrep and the 134 network
motifs are used as the query graphs. When using GraphGrep for network motif counting care
must be taken to handle graph automorphisms. For instance, GraphGrep returns six when both
the target and query graphs are simple triangles. To correct for this, each count is divided by the
number of automorphisms of the query graphs.
4
http://en.wikipedia.org/wiki/List_of_sociologists
http://en.wikipedia.org/wiki/Premier_League
5
http://github.com/ChrisSalij/PageAnalyzer
Footballers
Sociologists
Chelsea
Everton
West Ham Utd.
French
British
German
American
Italian
18th Century
Nodes
161
160
203
370
374
308
1,092
82
480
Pages
33
30
45
74
62
55
235
11
83
Users
128
130
158
296
312
253
857
71
397
Edges
941
959
1,330
1,275
734
1,009
3,393
130
1,710
Table 1: The nine Wikipedia datasets.
3
AP-Edges
682
625
786
1,133
720
897
3,242
126
1,598
PP-Edges
259
334
544
142
14
112
151
4
112
Chelsea
West Ham United
Everton
American
British
Born in 18 century
Italian
French
German
Italian
French
British
Born.in.18.century
American
Everton
West.Ham.United
Chelsea
German
Figure 1: A clustering of the nine network motif profiles based on correlation.
3.2
Normalization of Network Motif Profiles
The number of network motif instances in a graph depends on the size and the density of the graphs.

Virginia Shiller has always supported our work, and for years has been asked for her judgment: this
idea, up or down, as she has also generously contributed ideas of her
own. And we also want to thank our administrative assistants Bonnie Blake, Carol Copeland, Shanti Karunaratne, and Patricia Medina,
who helped us carve out time for our writing endeavors.
ACKNOWLEDGMENTS
Akerlof.indb 179
179
6/19/15 10:24 AM
Akerlof.indb 180
6/19/15 10:24 AM
b i b l i o g r a p hy
“200 West Street.” Wikipedia. Accessed October 22, 2014. http://en.wikipedia
.org/wiki/200_West_Street.
Abramson, John. Overdosed America: The Broken Promise of American Medi­
cine. 3rd ed. New York: Harper Perennial, 2008.
Adrian, Tobias, and Hyun Song Shin. “Liquidity and Leverage.” Journal of
Financial Intermediation 19, no. 3 (July 2010): 418–37.
Agarwal, Sumit, John C. Driscoll, Xavier Gabaix, and David Laibson. “The
Age of Reason: Financial Decisions over the Life Cycle and Implications
for Regulation.”

We have found that continuous data processing with strong guarantees, as provided by Workflow, performs and scales well on distributed cluster infrastructure, routinely produces results that users can rely upon, and is a stable and reliable system for the Site Reliability Engineering team to manage and maintain.
1
Wikipedia: Extract, transform, load, http://en.wikipedia.org/wiki/Extract,_transform,_load
2
Wikipedia: Big data, http://en.wikipedia.org/wiki/Big_data
3
Jeff Dean’s lecture on “Software Engineering Advice from Building Large-Scale Distributed Systems” is an excellent resource: [Dea07].
4
Wikipedia: System Prevalence, http://en.wikipedia.org/wiki/System_Prevalence
5
The “model-view-controller” pattern is an analogy for distributed systems that was very loosely borrowed from Smalltalk, which was originally used to describe the design structure of graphical user interfaces [Fow08].
6
Wikipedia: Model-view-controller, http://en.wikipedia.org/wiki/Model%E2%80%93view%E2%80%93controller
Chapter 26. Data Integrity: What You Read Is What You Wrote
Written by Raymond Blum and Rhandeev Singh
Edited by Betsy Beyer
What is “data integrity”?

…

You can then switch from planning recovery to planning prevention, with the aim of achieving the holy grail of all the data, all the time. Achieve this goal, and you can sleep on the beach on that well-deserved vacation.
1
Atomicity, Consistency, Isolation, Durability; see https://en.wikipedia.org/wiki/ACID. SQL databases such as MySQL and PostgreSQL strive to achieve these properties.
2
Basically Available, Soft state, Eventual consistency; see https://en.wikipedia.org/wiki/Eventual_consistency. BASE systems, like Bigtable and Megastore, are often also described as “NoSQL.”
3
For further reading on ACID and BASE APIs, see [Gol14] and [Bai13].
4
Binary Large Object; see https://en.wikipedia.org/wiki/Binary_large_object.
5
See https://en.wikipedia.org/wiki/Zero-day_(computing).
6
Clay tablets are the oldest known examples of writing. For a broader discussion of preserving data for the long haul, see [Con96].
7
Upon reading this advice, one might ask: since you have to offer an API on top of the datastore to implement soft deletion, why stop at soft deletion, when you could offer many other features that protect against accidental data deletion by users?

…

In essence, Google has adapted known reliability principles that were in many cases developed and honed in other industries to create its own unique reliability culture, one that addresses a complicated equation that balances scale, complexity, and velocity with high reliability.
1
E911 (Enhanced 911): Emergency response line in the US that leverages location data.
2
Electrocardiogram readings: https://en.wikipedia.org/wiki/Electrocardiography.
3
https://en.wikipedia.org/wiki/Safety_integrity_level
4
https://en.wikipedia.org/wiki/Corrective_and_preventive_action
5
https://en.wikipedia.org/wiki/Competent_authority
6
http://ehstoday.com/safety/nsc-2013-oneill-exemplifies-safety-leadership.
7
See “FACTS, Section B” for the discussion of Knight and Power Peg software in [Sec13].
8
“Regulators blame computer algorithm for stock market ‘flash crash’,” Computerworld, http://www.computerworld.com/article/2516076/financial-it/regulators-blame-computer-algorithm-for-stock-market—flash-crash-.html.

language=en
[cccxxxviii] http://motherboard.vice.com/read/sleep-tech-will-widen-the-gap-between-the-rich-and-the-poor
[cccxxxix] Covered in detail in my previous book, “Surviving AI”.
[cccxl] https://en.wikipedia.org/wiki/Sex_and_drugs_and_rock_and_roll
[cccxli] I am that terrible old cliché: a socialist student whose left-wing views did not long survive contact with the world of work. As a trainee BBC journalist writing about Central and Eastern Europe long before the Berlin Wall fell, I soon realised how fortunate I was to have grown up in the capitalist West. I didn’t expect to be heading back in the other direction in later life.
[cccxlii] https://edge.org/conversation/john_markoff-the-next-wave
[cccxliii] http://uk.pcmag.com/robotics-automation-products/34778/news/will-a-robot-revolution-lead-to-mass-unemployment
[cccxliv] https://en.wikipedia.org/wiki/Milgram_experiment
[cccxlv] http://www.prisonexp.org/
[cccxlvi] http://fourhourworkweek.com/2014/08/29/kevin-kelly/
[cccxlvii] https://www.edge.org/conversation/kevin_kelly-the-technium
[cccxlviii] http://history.hanover.edu/courses/excerpts/165acton.html
[cccxlix] http://mercatus.org/sites/default/files/Brito_BitcoinPrimer.pdf
[cccl] http://www.dugcampbell.com/byzantine-generals-problem/
[cccli] http://www.economistinsights.com/technology-innovation/analysis/money-no-middleman/tab/1
[ccclii] : The Machine Intelligence Research Institute (MIRI) in Northern California, The Future of Humanity Institute (FHI) and the Centre for the Study of Existential Risk (CSER) in England’s Oxford and Cambridge respectively, and the Future of Life Institute (FLI) in Massachussetts.

…

The physicist and science fiction author Vernor Vinge argued in 1993 that artificial intelligence and other technologies would cause a singularity in human affairs within 30 years. This idea was picked up and popularised by the inventor and futurist Ray Kurzweil, who believes that computers will overtake humans in general intelligence in 1929, and a singularity will arrive in 2045. https://en.wikipedia.org/wiki/Technological_singularity
[v] The event horizon of a black hole is the point beyond which events cannot affect an outside observer, or in other words, the point of no return. The gravitational pull has become so great as to make escape impossible, even for light.
[vi] http://fivethirtyeight.com/features/universal-basic-income/?utm_content=buffer71a7e&utm_medium=social&utm_source=plus.google.com&utm_campaign=buffer
[vii] At the end of this video: http://bit.ly/1MtEqNb
[viii] https://www.minnpost.com/macro-micro-minnesota/2012/02/history-lessons-understanding-decline-manufacturing
[ix] http://blogs.rmg.co.uk/longitude/2014/07/30/guest-post-pirate-map/
[x] https://www.weforum.org/pages/the-fourth-industrial-revolution-by-klaus-schwab
[xi] http://www.ers.usda.gov/media/259572/eib3_1_.pdf.

…

utm_content=buffer71a7e&utm_medium=social&utm_source=plus.google.com&utm_campaign=buffer
[vii] At the end of this video: http://bit.ly/1MtEqNb
[viii] https://www.minnpost.com/macro-micro-minnesota/2012/02/history-lessons-understanding-decline-manufacturing
[ix] http://blogs.rmg.co.uk/longitude/2014/07/30/guest-post-pirate-map/
[x] https://www.weforum.org/pages/the-fourth-industrial-revolution-by-klaus-schwab
[xi] http://www.ers.usda.gov/media/259572/eib3_1_.pdf. Employment in agriculture declined in absolute terms as well, from 11.7m in 1900 to 6.0m in 1960. http://www.nber.org/chapters/c1567.pdf
[xii] www.ons.gov.cuk/ons/rel/census/2011-census-analysis/170-years-of-industry/170-years-of-industrial-changeponent.html
[xiii] http://www.americanequestrian.com/pdf/us-equine-demographics.pdf
[xiv] https://en.wikipedia.org/wiki/Automation#cite_note-7
[xv] M. A. Laughton, D. J. Warne (ed), Electrical Engineer's Reference book
[xvi] http://www.oleantimesherald.com/news/did-you-know-gas-pump-shut-off-valve-was-invented/article_c7a00da2-b3eb-54e1-9c8d-ee36483a7e33.html
[xvii] Radio frequency Identification tags. They can take various forms – for instance, some have inbuilt power sources, while others are powered by interacting with nearby magnetic fields, or the radio waves which interrogate them.

In Sweden, the FRA Law authorizes the Swedish government to tap all voice and Internet traffic that crosses its borders—without a warrant. It was met with fierce protests across the political spectrum (http://en.wikipedia.org/wiki/FRA_law). British privacy laws are a complex and complicated set of regulations that face serious challenges resulting from how people use platforms that rely on big data, such as Twitter (http://www.huffingtonpost.com/2011/05/23/uk-privacy-law-thrown-int_n_865416.html). The number of closed-circuit television cameras (CCTV) in London is estimated to be almost two million (http://en.wikipedia.org/wiki/Closed-circuit_television). And it is well known that the Chinese government heavily regulates Internet traffic (http://en.wikipedia.org/wiki/Internet_censorship_in_the_People%27s_Republic_of_China).
Just a few examples from only three countries show the wide variety of values at play in how technology in general, and big data in particular, are utilized and managed.

…

At risk are the very benefits of big data innovation itself. In late 2011 and early 2012, the Stop Online Piracy Act (SOPA) put before Congress was met with fierce resistance from a wide variety of industries, organizations, and individuals. The primary reason was the belief that the provisions of the proposed law would severely constrain innovation in the future using technical tools such as big data (http://en.wikipedia.org/wiki/Stop_Online_Piracy_Act).
Part of the debate centered around the belief that the members of Congress supporting the bill were either misinformed by interested parties about how the technology worked and how innovation was made possible, or they were just simply unaware of the realities of how Internet and big data technologies worked in the first place. In either case, SOPA represents a classic example of how a lack of transparent and explicit discourse about how a critical piece of our economy and society works had the potential to significantly limit our collective ability to benefit from those tools.

…

Victims of abuse or people who suffer from the same disease can share their experiences and gain an invaluable sense of connection and community through the use of ostensibly anonymous online identities.
These perspectives, however, motivate the question: have we lost or gained control over our ability to manage how the world perceives us?
In 1993, the New Yorker famously published a cartoon with canines at the keyboard whose caption read: “On the Internet, nobody knows you’re a dog” (http://en.wikipedia.org/wiki/On_the_Internet,_nobody_knows_you%27re_a_dog). At the time, this was funny because it was true. Today, however, in the age of prevalent big data, it is not only possible for people to know that you’re a dog, but also what breed you are, your favorite snacks, your lineage, and whether you’ve ever won any awards at a dog show.
In those instances where an individual intentionally keeps any information about their identity private, at least one ethical question arises: what right do others have to make it public?

Each table is isolated from one another and the related data may be retrievable, thanks to the relations established by the foreign keys! The data normalization techniques are a set of rules used to allow proper scattering of the data across the tables so that the related tables are easily fetched and redundancy is kept to a minimum.
Tip
Please, refer to http://en.wikipedia.org/wiki/Database_normalization for an overview of database normalization.
For an overview of the normal forms, please refer to the following links:
http://en.wikipedia.org/wiki/First_normal_form
http://en.wikipedia.org/wiki/Second_normal_form
http://en.wikipedia.org/wiki/Third_normal_form
We may now proceed!
Hands on
Let's begin by installing the library into our environment and trying out a few examples:
pip install sqlalchemy
On to our first example! Let's create a simple employee database for a company (maybe yours?)

…

Writing and consulting languages are vendor-specific, and you may have to give up on ACID too in a tradeoff for speed, lots of speed!
You have probably guessed it already! This chapter is all about the M layer of MVC, that is, how to store and access your data in a transparent way with Flask! We'll look at the examples of how to use query and write to both the database types, and when to choose which one to use.
Tip
ACID is the acronym for atomicity, consistency, isolation, and durability. Refer to http://en.wikipedia.org/wiki/ACID for a cozy definition and overview.
SQLAlchemy
SQLAlchemy is an amazing library for working with relational databases. It was made by the Pocoo Team, the same folks that brought you Flask, and is considered "The Facto" Python SQL library. It works with SQLite, Postgres, MySQL, Oracle, and all SQL databases, which comes with compatible drivers.
SQLite describes itself as a self-contained, serverless, zero-configuration, and transactional SQL database engine (https://sqlite.org/about.html).

…

:
from sqlalchemy import create_engine db = create_engine('sqlite:///employees.sqlite') # echo output to console db.echo = True conn = db.connect() conn.execute(""" CREATE TABLE employee ( id INTEGER PRIMARY KEY, name STRING(100) NOT NULL, birthday DATE NOT NULL )""") conn.execute("INSERT INTO employee VALUES (NULL, 'marcos mango', date('1990-09-06') );") conn.execute("INSERT INTO employee VALUES (NULL, 'rosie rinn', date('1980-09-06') );") conn.execute("INSERT INTO employee VALUES (NULL, 'mannie moon', date('1970-07-06') );") for row in conn.execute("SELECT * FROM employee"): print row # give connection back to the connection pool conn.close()
The preceding example is pretty simple. We create a SQLAlchemy engine, grab a connection from the connection pool (engine handles that for you) and then we execute the SQL command to create a table, insert a few rows and query to see whether everything occurred as expected.
Tip
Visit http://en.wikipedia.org/wiki/Connection_pool for the connection pool pattern overview. (This is important, really!)
In our insertion, we provided the value NULL to the primary key id. Be aware that SQLite will not populate the primary key with NULL; instead, it will ignore the NULL value and set the column with a new, unique, across the table integer. That's SQLite- specific behavior. Oracle, for example, would require you to insert a sequence's next value explicitly in order to set a new unique column value for the primary key.

You have seen Clojure’s expressive syntax, learned about Clojure’s approach to Lisp, and seen how easy it is to call Java code from Clojure.
You have Clojure running in your own environment, and you have written short programs at the REPL to demonstrate functional programming and the reference model for dealing with state. Now it is time to explore the entire language.
Footnotes
[8] Software Estimation: Demystifying the Black Art [McC06] is a great read and makes the case that smaller is cheaper.
[9] http://en.wikipedia.org/wiki/Homoiconicity
[10] http://www.paulgraham.com/icad.html
[11] http://www.oracle.com/technetwork/java/javase/downloads/index.html
[12] http://github.com/technomancy/leiningen
[13] http://github.com/technomancy/leiningen
[14] pst is available only in Clojure 1.3.0 and greater.
[15] Creating a new REPL will prevent name collisions between your previous work and the sample code functions of the same name.

All operations are performed by sending messages to objects.
All user-defined types are objects.
Scala supports all these qualities and uses a pure object-oriented model similar to that of Smalltalk[4] (a pure object-oriented language created by Alan Kay around 1980), where every value is an object, and every operation is a message send. Here’s a simple expression:
4 “Smalltalk,” Wikipedia, http://en.wikipedia.org/wiki/Smalltalk.
1 + 2
In Scala this expression is interpreted as 1.+(2) by the Scala compiler. That means you’re invoking a + operation on an integer object (in this case, 1) by passing 2 as a parameter. Scala treats operator names like ordinary identifiers. An identifier in Scala is either a sequence of letters and digits starting with a letter or a sequence of operator characters. In addition to +, it’s possible to define methods like <=, -, or *.

…

The basic Actor architecture relies on a shared-nothing policy and is lightweight in nature. It’s not analogous to a Java thread; it’s more like an event object that gets scheduled and executed by a thread. The Scala Actor model is a better way to handle concurrency issues. Its shared-nothing architecture and asynchronous message-passing techniques make it an easy alternative to existing thread-based solutions.
9 “Actor model,” Wikipedia, http://en.wikipedia.org/wiki/Actor_model.
History of the Actor model The Actor model was first proposed by Carl Hewitt in 1973 in his paper “A Universal Modular ACTOR Formalism for Artificial Intelligence” and was later on improved by Gul Agha (“ACTORS: A Model of Concurrent Computation in Distributed Systems”).
Erlang was the first programming language to implement the Actor model. Erlang is a general-purpose concurrent programming language with dynamic typing.

…

Instead, Scala supports something called singleton objects. A singleton object allows you to restrict the instantiation of a class to one object.[5] Implementing a singleton pattern in Scala is as simple as the following:
4 “Cutting out Static,” Gilad Bracha blog, Room 101, Feb. 17, 2008, http://gbracha.blogspot.com/2008/02/cutting-out-static.html.
5 “Singleton pattern,” Wikipedia, http://en.wikipedia.org/wiki/Singleton_pattern.
object RichConsole { def p(x: Any) = println(x) }
Here RichConsole is a singleton object. The object declaration is similar to a class declaration except instead of class you’re using the object keyword. To invoke the new p method, you have to prefix it with the class name, as you’d invoke static methods in Java or C#:
scala> :l RichConsole.scala Loading RichConsole.scala... defined module RichConsole scala> RichConsole.p("rich console") rich console
You can import and use all the members of the RichConsole object as follows:
scala> import RichConsole._ import RichConsole._ scala> p("this is cool") this is cool
The DB object introduced in listing 3.2 is nothing but a factory to create DB instances representing a database in MongoDB:
object DB { def apply(underlying: MongDB) = new DB(underlying) }
What’s interesting here is that when you use a DB object as a factory, you’re calling it as if it’s a function, DB(underlying.getDB(name)), whereas you’d expect something like DB.apply(underlying.getDB(name)).

Note that DNS propagation can take several hours, so if you want to work with your domain name right away, you can edit your local hosts file to have the domain name point to the right IP locally. This change enables you to use your domain name instead of the IP as you configure your self-hosted blog even before the DNS records have become visible to the world. On *nix systems this is usually located at /etc/hosts. For Windows, consult the Wikipedia page at http://en.wikipedia.org/wiki/Hosts_(file).
In your hosts file, you should include a line that looks like this:
​174.122.8.30 yoursitename.com​
Replace the fictitious IP and domain name with your real ones. If you don’t know the IP of your server, you should check the emails your hosting company sent you when you registered with them, because it’s usually located there. Logging into your hosting account will also typically provide you with this information.

See also [[WP:Namespace#Pseudo-namespaces]], [[WP:Shortcuts]].
2. Also sometimes used as an abbreviation for WikiProject (see also WPP).
Notes
PROLOGUE
1. I purposefully avoid providing citations to these discussions to protect the
subjects.
2. For ease of reference, all citations to the English Wikipedia are presented in a
shortened format. For example, [[WP:Size_comparisons]] can be found at https://
en.wikipedia.org/wiki/WP:Size_comparisons (or https://en.wikipedia.org/wiki/
Wikipedia:Size_comparisons, because “WP” is a shortcut to “Wikipedia”). Double
square brackets are characteristic of the markup code of wiki technology, often used
by people to collaborate in creating and modifying content on the web. They allow easy
visual differentiation of this type of citation.
I n t ro d u c t io n
1. The ethnographic study discussed in this book took place in 2006–2012, when I
was particularly active on the Polish Wikipedia (where I was elected an administrator
and a bureaucrat—roles are described in more detail in Chapter 2) and the English
Wikipedia, which both serve as the basis of the analysis.

…

Ostrom’s principles related to smaller communities, and it can be assumed that
Wikipedia is a pioneer in addressing many of the social organization problems of scale and
that not all principles of open-collaboration communities may be fully applicable to it.
C h a p t er 5
1. Essjay’s original talk page no longer exists, but this post has been archived at
http://www.wikipedia-watch.org/essjay.html.
2. This post is archived at http://en.wikipedia.org/w/index.php?title=User_talk:Ess
jay&oldid=112480415#Slashdot.
3. This post is archived at http://en.wikipedia.org/w/index.php?title=User_
talk:Essjay&oldid=112480415.
No t e s t o C h a p t er 6 2 3 3
C h a p t er 6
1. For a useful taxonomy of contributions to Wikimedia projects, see
“Research:Contribution Taxonomy Project,” 2012.
2. I wrote these words two days after I was appointed one of seven members of
the FDC, and I was later elected chair.

In 2012, Greenberg looked at the fast growth of R/GA to over one thousand and decided to split it up into teams of 150 each and add new services, from product design to strategic consulting; Nike+, http://judgeseyesonly.com/nikeplus.html, accessed September 13, 2012.
134 So R/GA designed a website: personal interview with Greenberg; http://judgeseyesonly.com/nikeplus_video.html.
135 There are many different kinds of games: personal interview with Katie Salen, June 6, 2011, New York City; Katie Salen and Eric Zimmerman, Rules of Play: Game Design Fundamentals (Boston: MIT Press, 2004), 80–83.
136 Friedrich Froebel: One of the legends of product design, Tucker Viemeister first presented this connection between progressive education and design and creativity at a DMI conference that I cochaired with David Butler, the design director of Coca-Cola. It was eye-opening, and I asked him to present it to my class, which he did, in the spring of 2011. He’s the only designer I know who was named after a car, the Tucker, which his father designed. http://www.friedrichfroebel.com/, accessed October 20, 2012.
136 the progressive education movement expanded: http://en.wikipedia.org/wiki/Montessori_education, accessed September 13, 2012; http://www.montessori-ami.org, accessed September 13, 2012; http://en.wikipedia.org/wiki/History_of_Wal dorf_schools, accessed September 13, 2012.
136 In 2007, Katie Salen: interview with Katie Salen, June 6, 2011.
136 received a MacArthur Foundation grant: http://www.instituteofplay.org/about, accessed September 13, 2012.
137 Salen puts on a weeklong summer: interview with Katie Salen, June 6, 2011, Institute of Play, http://www.instituteofplay.org/work/
projects/mobile-quest, accessed September 13, 2012.
137 Perhaps that is why 72 percent: Video Game Voters, http://videogamevoters.org/pages/top_10_gamer_facts/, accessed September 13, 2012.
137 StarCraft II: John Gaudiosi, “Major League Gaming Wraps Record-Breaking 2011 Season with Over $600,000 in Cash and Prizes,” GamerLive.TV, November 21, 2011, accessed September 13, 2012, http://www.gamerlive.tv/article/major-league-gaming-wraps-record-breaking
-2011-season-over-600000-cash-and-prizes; Gunnar Technology Eyewear, http://www.gunnars.com/events/gunnar-mlg-providence-national-championships/, accessed September 13, 2012.
138 Re-Mission is a game: Re-Mission website, http://www.re-mission.net/, accessed September 13, 2012.
138 The game was created by HopeLab: “About HopeLab,” http://www.hopelab.org/about-us/, accessed September 13, 2012.
138 According to a study conducted: Pamela M.

That may be especially apropos, given the symbol’s original suggestion of a godlike nature of physicians, and the tradition of paternalism that the AMA, along with many physicians, inherited from the ancient world.
FIGURE 2.2: Evolution of the caduceus symbol in medicine and its adoption by the American Medical Association. Sources: (left and middle) “Caduceus,” Wikipedia, accessed August 13, 2014, http://en.wikipedia.org/wiki/Caduceus; and (right) “History of AMA Ethics,” American Medical Association, accessed August 13, 2014, http://www.ama-assn.org/ama.
The American Medical Association
The American Medical Asssociation was founded in 1847, and for more than 160 years since, says its website, the AMA’s Code of Medical Ethics has been the “authoritative ethics guide for practicing physicians.”25 Authoritative it has been.

…

This is the first chapter of the “My” section of the book; each one is about different components of your information. Later in the book we’ll get to the transformative implications of having and owning your GIS data.
FIGURE 5.1: Differences in our ability to map an infectious disease epidemic. Sources: (left) “1854 Broad Street Cholera Outbreak,” Wikipedia, accessed August 13, 2014, http://en.wikipedia.org/wiki/1854_Broad_Street_cholera_outbreak; and (right) J. L. Gardy et al., “Whole-Genome Sequencing and Social-Network Analysis of a Tuberculosis Outbreak,” New England Journal of Medicine 364 (2011): 730–739.
The human GIS comprises multiple layers of demographic, physiologic, anatomic, biologic, and environmental data (Figure 5.2) about a particular individual.5 This is a rich, multi-scale, mosaic of a human being, which can be used to define one’s medical essence; when fully amassed and integrated, it is what a digitized person looks like, at least for the sake of how medical care can be rendered.

Slow connections cause timeouts when loading pages, so your program has to fail gracefully and move on, keeping a history of what you were and were not able to save so that you can make a second (or third or fourth) pass to get more data. However, it is sometimes a fun challenge to reverse-engineer a website and figure out how they do things under the hood, notice common design approaches, and end up with some interesting data to work with in the end.
* * *
[5] http://en.wikipedia.org/wiki/No_Child_Left_Behind_Act
[6] http://www.crummy.com/software/BeautifulSoup/
[7] https://github.com/bolinfest/chickenfoot/
Chapter 6. Detecting Liars and the Confused in Contradictory Online Reviews
Jacob Perkins
Did you know that people lie for their own selfish reasons? Even if this is totally obvious to you, you may be surprised at how blatant this practice has become online, to the point where some people will explain their reasons for lying immediately after doing so.

…

Until then, you may be able to make do with files.
I hope that you have been able to extract lessons from my experience. My aim with this chapter has been to provide a different view on how to structure a data mining project. You have not found the universal truth here. Hopefully, what you have found is a series of useful tools that you can apply bits of in future projects. Thank you for reading. Kia kaha.
* * *
[59] http://en.wikipedia.org/wiki/Parkinson%27s_Law_of_Triviality
[60] http://code.google.com/p/protobuf/
[61] http://thrift.apache.org/
Chapter 13. Crouching Table, Hidden Network
Bobby Norton
“You were enlightened?”
“No. I didn’t feel the bliss of enlightenment. Instead… I was surrounded by an endless sorrow.”
—Yu Shu Lien describing the effects of bad data (…or something similar…) to Li Mu Bai in Crouching Tiger, Hidden Dragon
Data is good to the extent that it can be quickly analyzed to reveal valuable information.

If you send a browser to http://dbpedia.org/snorql/, you’ll see a form where you can enter a query and select the format of the results you want to see, as shown in Figure 1-2. For our experiments, we’ll stick with “Browse” as our result format.
Figure 1-2. DBpedia’s SNORQL web form
I want DBpedia to give me a list of albums produced by the hip-hop producer Timbaland and the artists who made those albums. If Wikipedia has a page for Some Topic at http://en.wikipedia.org/wiki/Some_Topic, the DBpedia URI to represent that resource is usually http://dbpedia.org/resource/Some_Topic, so after finding the Wikipedia page for the producer at http://en.wikipedia.org/wiki/Timbaland, I sent a browser to http://dbpedia.org/resource/Timbaland, found plenty of information (although it was redirected to http://dbpedia.org/page/Timbaland, because when a browser asks for the information, DBpedia redirects it to the HTML version of the data), and knew that this was the right URI to represent him in queries.

Evaluating that list data structure is what defines the function.
* * *
[6] Clojure is by no means the only homoiconic language, nor is homoiconicity a new concept. Other homoiconic languages include all other Lisps, all sorts of machine language (and therefore arguably Assembly language as well), Postscript, XSLT and XQuery, Prolog, R, Factor, Io, and more.
[7] The natural language parse tree was mostly lifted from http://en.wikipedia.org/wiki/Parse_tree.
The Reader
Although Clojure’s compilation and evaluation machinery operates exclusively on Clojure data structures, the practice of programming has not yet progressed beyond storing code as plain text. Thus, a way is needed to produce those data structures from textual code. This task falls to the Clojure reader.
The operation of the reader is completely defined by a single function, read, which reads text content from a character stream[8] and returns the next data structure encoded in the stream’s content.

…

In Clojure, functional programming means:
A preference for working with immutable values; this includes:
The use of immutable data structures that satisfy simple abstractions, rather than mutable bags of state
The treatment of functions as values themselves, enabling higher-order functions
A preference for declarative processing of data over imperative control structures and iteration
The natural incremental composition of functions, higher-order functions, and immutable data structures in order to solve complex problems by working with higher-level (or, right-level) abstractions
These are all part of the foundation for many of the more advanced features of Clojure that you may have heard of—in particular, Clojure’s fantastic support for concurrency, parallelism, and more generally, providing defined semantics for the management of identities and changing state, which we’ll cover separately in Chapter 4.
* * *
[35] After you’ve internalized what we provide here, you may find the Wikipedia entry for functional programming to be a surprisingly good springboard for diving deeper into a variety of related topics: http://en.wikipedia.org/wiki/Functional_programming.
[36] Note that it is possible to use functional programming principles even in languages—like Java—that do little to encourage (and sometimes actively discourage) FP styles. This is made much easier if you have some quality persistent data structures and implementations of FP fundamentals like those provided by the Google Guava (https://code.google.com/p/guava-libraries/) or Functional Java (http://functionaljava.org) libraries.

…

[45] In Chapter 12, we provide examples of how Clojure’s facilities make many familiar object-oriented patterns unnecessary or invisible.
[46] Perhaps you recall the confusion and uncertainty that existed around double-checked locking some years ago—eventually resolved, but with much complexity and the help of a new JVM memory model: http://www.cs.umd.edu/~pugh/java/memoryModel/DoubleCheckedLocking.html.
[47] A.k.a. Heisenbugs, https://en.wikipedia.org/wiki/Heisenbug.
First-Class and Higher-Order Functions
Despite the great variability about what “functional programming” means in different languages, one requirement is consistent: functions must themselves be values, so that they may be treated like any other data, accepted as arguments and returned as results by other functions.
Functions as data permits a means of abstraction that a language without first-class functions lacks.

perspectives to come from the Voyagers that would follow: Amateur astronomer and planetary image processor Ted Stryk has compiled a nice collection of Pioneer 11 “greatest hits” images of Saturn online at strykfoto.org/pioneersaturn.htm.
perhaps some other complex hydrocarbons: This and other early pioneering planetary spectroscopic discoveries were made by the Dutch-American astronomer Gerard P. Kuiper, who is widely regarded as one of the founding fathers of modern planetary science. There’s a nice Wikipedia biography of Kuiper online at en.wikipedia.org/wiki/Gerard_Kuiper.
could have led to the formation of life on Earth: Wikipedia’s entry on the Miller-Urey experiments at en.wikipedia.org/wiki/Miller-Urey_experiment is a great starting point for learning more about these famous early efforts at understanding the possible origins of life on Earth and other habitable worlds.
Voyager’s cameras were blind to the surface itself: Uncovering those secrets, including discovering the hoped-for seas of ethane and methane, would have to wait more than twenty-five years, when the Cassini Saturn orbiter, armed with cloud-penetrating radar inspired by Voyager’s discoveries, would finally map the fascinating geology and hydrology of Titan and when the ESA Huygens probe would get near-surface images just before landing.

…

only slightly above the plane of the planets: See heavens-above.com/SolarEscape.aspx.
modern-day spacecraft forensics: For more details, see The Planetary Society’s director of projects Bruce Betts’s April 19, 2012, blog post “Pioneer Anomaly Solved!” at planetary.org/blogs/bruce-betts/3459.html.
just under four light-years away: For information about Voyager 1’s predicted encounter with Gliese 445, see en.wikipedia.org/wiki/Gliese_445, and for information about Voyager 2’s predicted encounter with Ross 248, see en.wikipedia.org/wiki/Ross_248.
“redirect the spacecraft as closely as possible . . .”: Carl Sagan, et al., Murmurs of Earth, pages 235–36.
evidence of planets around other nearby stars: The Extrasolar Planets Encyclopedia, online at exoplanet.eu/catalog, contains lists, plots, and links to the now more than 1,800 planets discovered around nearby stars that are (mostly) like our sun, via a variety of ground-based and space-based methods.

…

some in Congress have asked (really): For an example, see NASA historian Stephen J. Garber’s article “Searching for Good Science: The Cancellation of NASA’s SETI Program,” Journal of British Interplanetary Society 52 (1999): 3–12 (online at history.nasa.gov/garber.pdf).
Why should American taxpayers support NASA?: Wikipedia has a fairly comprehensive entry on the history of the NASA budget, with links to more information, at en.wikipedia.org/wiki/Budget_of_NASA.
inspiration is priceless during tough times: Watch and read Neil deGrasse Tyson’s passionate 2012 testimony to the US Senate’s Commerce, Science, and Transportation Committee on Neil’s own website, at haydenplanetarium.org/tyson/read/2012/03/07/past-present-and-future-of-nasa-us-senate-testimony.
complications of a stroke, passed away in late 2005: A nice “In Memoriam” piece written by several of Ed Danielson’s professional colleagues can be found in the planetary science journal Icarus 194 (2008): 399–400 (online at dx.doi.org/10.1016/j.icarus.2007.12.007).

.§
* Vineet Nayar, Employees First, Customers Second: Turning Conventional Management Upside Down (Boston: Harvard Business Press, 2010); see also Gary Hamel, The Future of Management (Boston: Harvard Business School Press, 2007).
† Nayar, Employees First, Customers Second.
§ HCL Technologies, Annual Report (US GAAP), 2005–2006; and Wikipedia, s.v. “HCL Technologies,” last modified June 24, 2012, http://en.wikipedia.org/wiki/HCL_Technologies.
A Journey Worth Taking
Building a conscious business is a challenging but wonderfully rewarding and meaningful undertaking, whether such a business is created from scratch or is the outcome of a transformation. We recognize that many leaders have become weary of change. It seems there is a new set of buzzwords to deal with every few years—from total quality management to the reengineering of business processes to Six Sigma and numerous others.

We will also continue our discussions with industry experts about what is happening, what might happen, and what needs to happen to bring about the vision of the Internet of Things.
1 Erik Brynjolfsson and Andrew McAfee, Race Against the Machine: How the Digital Revolution Is Accelerating Innovation, Driving Productivity, and Irreversibly Transforming Employment and the Economy (Lexington, MA: Digital Frontier Press, 2011), p.297.
2 Nokia, Machine-to-Machine: Let Your Machines Talk (2004). http://www.m2mpremier.com/uploadFiles/m2m-white-paper-v4.pdf.
3 The observation that the number of transistors on integrated circuits doubles approximately every two years. (Source: http://en.wikipedia.org/wiki/Moore%27s_law.)
4 Motorola, Aspira Intelligence Everywhere (1999).
5 Mark Weiser, “The Computer for the 21st Century,” Scientific American, Special Issue: Communications, Computers, and Networks, September 1991.
6 Glen Allmendinger and Ralph Lombreglia, “Four Strategies for the Age of Smart Services,” Harvard Business Review, October 2005.
7 Ericsson, More Than 50 Billion Connected Devices (February 2011). http://www.ericsson.com/res/docs/whitepapers/wp-50-billions.pdf.
8 W.

…

OBD is an automotive term referring to a vehicle’s self-diagnostic and reporting capability. OBD systems give the vehicle owner or a repair technician access to information for various vehicle subsystems. Modern OBD implementations use a standardized digital communications port to provide real-time data, in addition to a standardized series of diagnostic trouble codes, or DTCs, which allow one to identify and remedy malfunctions within the vehicle. (Source: http://en.wikipedia.org/wiki/OBD-II#OBD-II.)
Chapter 3
THE FUTURE OF THE SILENT INTELLIGENCE
Business is going to change more in the next ten years than it has in the last fifty.
~ Bill Gates
We made a point in chapter 1 that the exponential growth of the Internet of Things is going to have a profound effect on our lives over the next five to ten years. If we are correct, the quote above that opens Bill Gates’s book Business @ the Speed of Thought: Succeeding in the Digital Economy,15 written over a decade ago, seems to be more relevant today than ever.

…

Also Garry Kasparov, “The Chess Master and the Computer,” New York Review of Books, February 11, 2010. http://www.nybooks.com/articles/archives/2010/feb/11/the-chess-master-and-the-computer/.
17 Second Life is an online virtual world developed by Linden Lab. It was launched on June 23, 2003. A number of free client programs, or Viewers, enable Second Life users to interact with one another through avatars (also called Residents). (Source: http://en.wikipedia.org/wiki/Second_Life.)
18 Peer-to-peer car-sharing services like Getaround, JustShareIt, and others are in operation. We don’t know if they’ll be successful, but this type of service would not be possible without M2M.
19 After this interview and just before this book was published, BodyMedia was acquired by Jawbone.
Chapter 4
CORE APPLICATION DOMAINS
Any sufficiently advanced technology is indistinguishable from magic

All quotations from the Wikipedia site are available via http://
en.wikipedia.org/wiki/Main_Page.
252 / Notes to Pages 140–50
6. http://en.wikipedia.org/wiki/Wikipedia:Replies_to_common_
objections.
7. See http://en.wikipedia.org/wiki/Image:Stop_hand.png.
8. See http://en.wikipedia.org/wiki/Category: NPOV_disputes.
9. Taken from http://www.lessig.org/blog/archives/003012.shtml.
10. See “A Wiki For Your Thoughts” (June 17, 2005), available at
http://www.latimes.com/news/printedition/opinion/la-edwiki17jun17,1,1789326.story.
11. See Where is the Wikitorial? (undated), available at http://
www.latimes.com/news/opinion/editorials/la-wiki-splash,0,
1349109.story.
12. For the full story, and the final version, see http://en.wikipedia.
org/w/index.php?title=Wikipedia:Improve_this_article_about_
Wikipedia&direction=next&oldid=23806738.
13.

…

See James Surowiecki, The Wisdom of Crowds: Why the Many
Are Smarter Than the Few and How Collective Wisdom Shapes
Business, Economies, Societies, and Nations (New York:
Doubleday, 2004).
2. John Zajc, “This Week in SABR” (Society for American
Baseball Research, Cleveland, Ohio), Oct. 9, 2004 (Results of
playoff prediction survey), available at http://www.sabr.org/
sabr.cfm?a=cms,c,1123,3,212.
3. The story is told in “Kasparov Against the World,” http://
en.wikipedia.org/wiki/Kasparov_versus_The_World.
4. See Cass R. Sunstein et al., “Assessing Punitive Damages,” Yale
Law Journal 107 (1998): 2095–99 (showing that small groups
often reflect judgments of community as whole, at least when
their judgments are made on a bounded scale).
5. See Sergey Brin and Lawrence Page, “The Anatomy of a LargeScale Hypertextual Web Search Engine,” Computer Networks &
ISDN System 30 (1998): 107–10, available at http://dbpubs
.stanford.edu:8090/pub/1998–8.
6.

7 The actual equations were: ‘the rate of change of x with respect to time equals the constant a multiplied by (y–z); the rate of change of y with respect to time equals x multiplied by (b–z) minus y; the rate of change of z with respect to time equals (x multiplied by y) minus (c multiplied by z).’
8 I use chapter and section references for Marx, rather than page numbers, since his work is now freely accessible via the Internet from the site www.marxists.org/archive/marx/.
9 The two equations are linked, because workers’ wage demands depend on the rate of employment, while investment – which determines the rate of growth – depends on income distribution (a higher workers’ share means lower profits, and hence lower investment).
10 For more details, see the Wikipedia entries en.wikipedia.org/wiki/Functional_flow_block_diagram, en.wikipedia.org/wiki/Transfer_function, http://en.wikipedia.org/wiki/State_space_(controls) and en.wikipedia.org/wiki/Systems_engineering.
Chapter 10
1 he became Fed chairman in February 2006, having briefly served as chairman of the president’s Council of economic advisers before that.
2 more strictly, a market demand curve can have any shape that can be described by a polynomial equation. This rules out a curve that returns two or more prices for the same quantity, but allows curves that return the same price for many different quantities.
3 keynes lumped what we today term neoclassical economists with those we today call the classical economists.

…

See desai (1981) and kaldor (1982) for critiques of the monetarist period.
32 See www.ukagriculture.com/production_cycles/pigs_production_cycle.cfm.
33 None of these made it through to the version of rational expectations that was incorporated into models of the macroeconomy.
34 ‘ergodic’ is a frequently misunderstood term, especially within economics. It is properly defined by the Wiktionary (en.wiktionary.org/wiki/ergodic), and the Wikipedia entry on ergodic Theory (en.wikipedia.org/wiki/ergodic_theory) makes the important point that ‘For the special class of ergodic systems, the time average is the same for almost all initial points: statistically speaking, the system that evolves for a long time “forgets” its initial state.’ This is not the case for complex or chaotic models, which show ‘sensitive dependence on initial conditions’ (see en.wikipedia.org/wiki/Butterfly_effect and en.wikipedia.org/wiki/Chaos_theory).
35 I can think of no more apt term to describe the group that led the campaign to make macroeconomics a branch of neoclassical microeconomics. Certainly the neoclassical attitude to researchers who refused to use ‘rational expectations’ in their models approached the old mafia cliché of ‘an offer you can’t refuse’: ‘assume rational expectations, or your paper won’t get published in a leading journal.’
36 This is based on the belief that output would be higher (and prices lower) under competition than under monopoly, which I showed to be false in Chapter 4.
37 a rule of thumb that asserts that the central bank can control inflation by increasing real interest rates roughly twice as much as any increase in inflation.

…

To regard someone who has worked only one hour in a week as employed is simply absurd – at least fifteen hours of work at the minimum wage are needed to be paid even the equivalent of unemployment benefits.
Similar distortions apply in other countries. The USA, for example, ceases counting someone as unemployed if they have been out of work for more than a year – a change in definition introduced in 1994 (see en.wikipedia.org/wiki/Unemployment#
United_States_Bureau_of_Labor_Statistics and en.wikipedia.org/wiki/Current_Population
_Survey#Employment_classification for more details). Abuses of statistics like this have prompted private citizens to record what official statistics ignore. The opinion-polling organization Roy Morgan Research (www.roymorgan.com.au/) now publishes its own survey of Australian unemployment, which it puts at 7.9 percent versus the recorded figure of 5.5 percent (the not-seasonally-adjusted figure as of January 2011).

Practically
speaking, this means that for a very large graph, you either need to wait a very long
time to get an exact answer to the problem of finding cliques, or you need to be willing
to settle for an approximate solution. The implementation that NetworkX offers should
work fine on commodity hardware for graphs containing high-hundreds to low-thousands of nodes (possibly even higher) before the time required to compute cliques
becomes unbearable.
See Also
http://networkx.lanl.gov/reference/generated/networkx.algorithms.clique.find_cliques
.html, http://en.wikipedia.org/wiki/Clique_problem
1.19 Analyzing the Authors of Tweets that Appear in Search
Results
Problem
You want to analyze user profile information as it relates to the authors of tweets that
appear in search results.
Solution
Use the /search resource to fetch search results, and then extract the from_user field
from each search result object to look up profile information by screen name using
either the /users/show or /users/lookup resources.

Africa
15 Indonesia Australia
16 Turkey Mexico
17 Iran Taiwan
18 Australia Iran
19 Taiwan Turkey
20 Netherlands Saudi Arabia
Sources: BP Statistical Review of World Energy 2009, http://www.bp.com/liveassets/bp_internet/globalbp/globalbp_uk_english/reports_and_publications/statistical_energy_review_2008/STAGING/local_assets/2009_downloads/renewables_section_2009.pdf; Central Intelligence Agency, World Factbook (data retrieved via Wikipedia, http://en.wikipedia.org/wiki/List_of_countries_by_GDP_(PPP).
From Pearl Street to EveryGenerator.com: A Story of Rising Power Density and Falling Costs
Electricity and electricity generation have become so commonplace that we forget just how cheap electricity has become. But a comparison of the hardware used by Edison with today’s generators brings the enormous improvements made over the past century into focus.

…

., http://www.howstuffworks.com/horsepower.htm/printable.
4 Joule invented the British Thermal Unit (Btu).
5 One joule is the amount of energy needed to move an object with a force of 1 newton (N) over a distance of 1 meter (m). The newton is a unit of force named after Isaac Newton. One watt is equal to 1 joule per second (1 W = 1 J/s). Americans are well acquainted with the watt from buying lightbulbs, hair dryers, and various other appliances.
6 Wikipedia, “Joule,” http://en.wikipedia.org/wiki/Joule.
7 Richard A. Muller, Physics for Future Presidents: The Science Behind the Headlines (New York: W. W. Norton, 2008), 72.
8 Renewableenergyworld.com, “US Geothermal Capacity Could Top 10 GW,” October 2, 2009, http://www.renewableenergyworld.com/rea/news/article/2009/10/us-geothermal-capacity-could-top-10-gw.
9 Arnulf Grübler, “Transitions in Energy Use,” Encyclopedia of Earth, 2008, http://www.eoearth.org/article/Energy_transitions, 163.
10 Energy-density metrics for area are uncommon.
11 John Pearley Huffman, “Generations,” May 8, 2003, http://www.edmunds.com/insideline/do/Features/articleId=93327#3.
12 “2010 Ford Fusion Review,” n.d., http://www.edmunds.com/ford/fusion/2010/review.html.
13 Here’s the math.

Of course, we’ll see that having many regions come in
handy with a more complex interface, but that’s for later…
Now, instead of displaying a simple message in the console, we instantiate a new view when our
application has started and use our pre-defined region to display it. You’ll now understand how
region definitions work (line 16): the key on the left is what we call our region within our Marionette
application, while the value on the right is a jQuery selector present in our page. In other words, by
declaring a region with mainRegion: "#main-region", we’re saying that calling
²¹http://en.wikipedia.org/wiki/Separation_of_concerns
²²https://developer.mozilla.org/en/docs/JavaScript/Guide/Working_with_objects
Download from Wow! eBook <www.wowebook.com>
Displaying a Static View
9
ContactManager.mainRegion.show(staticView);
means “put the contents of staticView inside the element corresponding to the jQuery selector
#main-region”.
With our latest modifications, our index.html now looks like this:
index.html
1
2
3
4
5
6
7
8
<!

…

Refer to the full index.html included below if you’re
unsure where this code gets inserted.
You’ll notice that we’ve got some special <%= %> tags in there. These serve the same purpose as
in many templating languages (ERB in Rails, PHP, JSP, etc.): they allow the templating engine to
interpret them and include the resulting output within the rendered result. By default, Marionette
²⁷http://en.wikipedia.org/wiki/Model%E2%80%93view%E2%80%93controller
²⁸http://backbonejs.org/#Model
Download from Wow! eBook <www.wowebook.com>
Displaying a Model
16
uses Underscore’s templating engine²⁹ where <%= %> means output will be displayed, and <% %>
tags which allow arbitrary javascript to be executed (such as an if condition). Since the model
is serialized and passed on to the view template, writing <%= firstName %> means the model’s
firstName attribute will be displayed.

He
also claimed that this would be a tough “fact” for the Environmentalists to
compete with, retorting “Explain that, Al Gore!”
It was great TV, but created problems for Wikipedia. So many people
responded to Colbert’s rallying cry that Wikipedia locked the article on
Elephants to protect it from further vandalism.
<h p://en.wikipedia.org/wiki/Wikipedia:Wikipedia_Signpost/2006-0807/Wikiality> Furthermore, Wikipedia banned the user Stephencolbert for
using an unveriﬁed celebrity name (a violation of Wikipedia’s terms of use
<en.wikipedia.org/wiki/User:Stephencolbert>.
53
Colbert and his viewers’ edits were perceived as mere vandalism that was
disrespectful of the social contract that the rest of Wikipedia adhered to,
thus subverting the underlying fabric of the community. Yet they were
following the social contract provided by their leader and his initial edit.

…

As a pie ce of cutle ry or kitche nware , a fork is a tool
consisting of a handle with se ve ral narrow tine s (usually two,
thre e or four) on one e nd. The fork, as an e ating ute nsil, has
be e n a fe ature primarily of the We st.
<en.wikipedia.org/wiki/Fork>
2. (so ware ) Whe n a pie ce of so ware or othe r work is split
into two branche s or variations of de ve lopme nt. In the past,
forking has implie d a division of ide ology and a split of the
proje ct. With the adve nt of distribute d ve rsion control,
forking and me rging be come s a le ss pre cipitous, divisive
action.
<en.wikipedia.org/wiki/Fork_%28so ware_development%29>
The disruptive force of forking is greater in an environment whose default is
to maintain code in centralized, collaboratively maintained repositories such
as Subversion. Entry and exit in the project implicate both a division of
participants and the need to erect new infrastructural support.

…

However, it is conceivable, if fanciful, that
control of the means of production could nurture a feeling of autonomy that
empowers further action outside of the market.
Autonomous individuals and communities
Glossary: Autonomy
Autonomy is a conce pt found in moral, political, and bioe thical
philosophy. Within the se conte xts it re fe rs to the capacity of a
rational individual to make an informe d, un-coe rce d de cision. In
moral and political philosophy, autonomy is o e n use d as the basis
for de te rmining moral re sponsibility for one 's actions.
<en.wikipedia.org/wiki/Autonomy> The work of late twe ntie th-ce ntury
thinke rs and fe minist scholars proble matize s the notion that an
individual subje ct could e ithe r pre ce de all social formations or could
possibly make rational de cisions. Inste ad the body is se e n as a site
in which all manne r of social force s are made manife st, articulate d
in physiological, psychological and biological ways.

An R-Tree is a graph-like index that
describes bounded boxes around geographies.5 Using such a structure we can describe
overlapping hierarchies of locations. For example, we can represent the fact that London
is in the UK, and that the postal code SW11 1BD is in Battersea, which is a district in
London, which is in south-eastern England, which in turn is in Great Britain. And
because UK postal codes are fine-grained, we can use that boundary to target people
with somewhat similar tastes.
5. http://en.wikipedia.org/wiki/R-tree
22
|
Chapter 2: Options for Storing Connected Data
Such pattern matching queries are extremely difficult to write in SQL,
and laborious to write against aggregate stores, and in both cases they
tend to perform very poorly. Graph databases, on the other hand, are
optimized for precisely these types of traversals and pattern matching
queries, providing in many cases millisecond responses; moreover,
most graph databases provide a query language suited to expressing
graph constructs and graph queries—in the next chapter, we’ll look at
Cypher, which is a pattern matching language tuned to the way we tend
to describe graphs using diagrams.

…

Continuing with our example use case, let’s assume that we can update the graph from
our regular network monitoring tools, thereby providing us with a near real-time view
of the state of the network 6. When a user reports a problem, we can limit the physical
6. With a large physical network, we might use Complex Event Processing to process streams of low-level
network events, updating the graph only when the CEP solution raises a significant domain event. See: http://
en.wikipedia.org/wiki/Complex_event_processing
36
|
Chapter 3: Data Modeling with Graphs
fault-finding to problematic network elements between the user and the application and
the application and its dependencies. In our graph we can find the faulty equipment
with the following query:
START user=node:users(id = 'User 3')
MATCH (user)-[*1..5]-(asset)
WHERE asset.status! = 'down'
RETURN DISTINCT asset
The MATCH clause here describes a variable length path between one and five relationships
long.

…

Because of the schema-free nature of graph
databases, geospatial data can reside in the database beside other kinds of data—social
network data, for example—allowing for complex multidimensional querying across
several domains.3
Geospatial applications of graph databases are particularly relevant in the areas of tel‐
ecommunications, logistics, travel, timetabling and route planning.
Master Data Management
Master data is data that is critical to the operation of a business, but which itself is nontransactional. Master data includes data concerning users, customers, products, sup‐
pliers, departments, geographies, sites, cost centers and business units. In large organ‐
2. See http://en.wikipedia.org/wiki/R-tree
3. Neo4j Spatial is an open source library of utilities that implement spatial indexes and expose Neo4j data to
geotools. See https://github.com/neo4j/spatial
96
|
Chapter 5: Graphs in the Real World
isations, this data is often held in many different places, with lots of overlap and redun‐
dancy, in many different formats, and with varying degrees of quality and means of
access.

Msg 105, Level 15, State 1, Server PUMA\SQLEXPRESS, Line 3 Unclosed quotation mark after the character string ', 1058997333) '. (1 row affected) (1 row affected)
Notice that one of the films, Harry Potter and the Sorcerer's Stone, includes an apostrophe that has caused an error. We'll fix that in the next section. First, look at the equivalent Linux commands for sending data from a web page to MySQL (be sure to replace GO with a semicolon [;] in gross.xsl before you try to run this):
$ wget -O source.htm http://en.wikipedia.org/wiki/List_of_highest-grossing_ films --23:17:49-- http://en.wikipedia.org/wiki/List_of_highest-grossing_films => \Qsource.htm' Resolving en.wikipedia.org... 145.97.39.155 Connecting to en.wikipedia.org|145.97.39.155|:80... connected. HTTP request sent, awaiting response... 200 OK Length: unspecified [text/html] [ <=> ] 34,831 27.48K/s 23:17:50 (27.41 KB/s) - \Qsource.htm' saved [34831] $ xsltproc -o gross.sql gross.xsl source.htm $ mysql -u scott -ptiger dbname -e 'source gross.sql' ERROR 1064 (42000) at line 30 in file: 'gross.sql': You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 's Stone', 1058997333); INSERT INTO film VALUES ( 'Star ' at line 2
The preceding example uses the wget command to copy the web page to the filesystem and uses xsltproc to process the stylesheet (notice that the parameters are reversed compared to msxsl).

…

If you are processing several pages with the same structure you can reuse the sheet, but if the source format changes you will have to change the sheet to accommodate it.
6.1.2. The Input Document
To extract data from an XHTML document you might need to use a little trial and error. You need to look at the raw HTML from the target page and identify the tag or tags that contain the data you are looking for.
Look at the HTML from Wikipedia; this section is part of a much larger document (http://en.wikipedia.org/wiki/List_of_highest-grossing_films):
<table class="wikitable"> <caption><b>List of highest-grossing films (adjusted)</b></caption> <tr> <th>Rank</th> <th>Movie name</th> <th>Worldwide Gross</th> </tr> <tr> <td>1</td> <td><i><a href="/wiki/Gone_with_the_Wind_%28film%29" title="Gone with the Wind (film)">Gone With the Wind</a></i> (<a href="/wiki/1939" title="1939">1939</a>)</td> <td>$2,699,710,936</td> </tr> <tr> <td>2</td> <td><i><a href="/wiki/Snow_White_and_the_Seven_Dwarfs_%281937_film%29" title="Snow White and the Seven Dwarfs (1937 film)">Snow White and the Seven Dwarfs</a></i> (<a href="/wiki/1937" title="1937">1937</a>)</td> <td>$2,425,862,786</td> </tr>
You must identify enough of the surrounding structure to uniquely identify the text that you need.

…

Most other systems require a semicolon in place of the word GO.
6.1.4. Running the Hack
The XSLT processor will take a page directly from the Web, and you can store the results in the file gross.sql before loading it into SQL Server. In this example, the stylesheet, gross.xsl, is in the current directory, but it can be in any directory or even in a remote URL. You can run the hack from a Windows command prompt as follows:
C:>msxsl http://en.wikipedia.org/wiki/List_of_highest-grossing_films gross.xsl -o gross.sql C:>sqlcmd -E -S(local)\SQLExpress -d dbname 1> CREATE TABLE film (title VARCHAR(256), gross BIGINT) 2> GO 1> QUIT C:>sqlcmd -E -S(local)\SQLExpress -d dbname -i gross.sql (1 row affected) (1 row affected) (1 row affected) (1 row affected) (1 row affected) (1 row affected) (1 row affected) Msg 102, Level 15, State 1, Server PUMA\SQLEXPRESS, Line 3 Incorrect syntax near 's'.

They are “mainly white … married, older than 45, more conservative than the general population, and likely to be more wealthy and have more education” (“Tea Party movement,” Wikipedia, http://en.wikipedia.org/wiki/Tea_Party_movement, accessed January 12, 2012). Sixty-two percent of Tea Partiers call themselves conservative Republicans (Skocpol and Williamson, Tea Party, 27–28).
9 “Grassroots activists, roving billionaire advocates, and right-wing media purveyors—these three forces, together, create the Tea Party and give it the ongoing clout to buffet and redirect the Republican Party” (Skocpol and Williamson, Tea Party, 13).
10 Skocpol and Williamson, Tea Party, 12.
11 Glenn H. Reynolds, “Tea Parties: Real Grassroots,” New York Post, April 13, 2009; http://www.nypost.com/p/news/opinion/opedcolumnists/item_kjS1kZbRyFntcyNhDJFlSK, accessed January 13, 2012.
12 “Occupy Wall Street,” Wikipedia, http://en.wikipedia.org/wiki/Occupy_Wall_Street, accessed January 12, 2012.
13 Skocpol and Williamson, Tea Party, 32.
14 Pew Research Center, “Frustration with Congress Could Hurt Republican Incumbents” (December 15, 2011), 11.
15 Indeed, as I’ve traveled across the country to see these different groups, each of them has its own character.

If you send a browser to http://dbpedia.org/snorql/, you’ll see a form where you can enter a query and select the format of the results you want to see, as shown in Figure 1-2. For our experiments, we’ll stick with “Browse” as our result format.
I want DBpedia to give me a list of albums produced by the hip-hop producer Timbaland and the artists who made those albums. If Wikipedia has a page for “Some Topic” at http://en.wikipedia.org/wiki/Some_Topic, the DBpedia URI to represent that resource is usually http://dbpedia.org/resource/Some_Topic. So, after finding the Wikipedia page for the producer at http://en.wikipedia.org/wiki/Timbaland, I sent a browser to http://dbpedia.org/resource/Timbaland. I found plenty of data there, so I knew that this was the right URI to represent him in queries. (The browser was actually redirected to http://dbpedia.org/page/Timbaland, because when a browser asks for the information, DBpedia redirects it to the HTML version of the data.)

Notes
1 For the quote, famous in geek circles, go to “The Science in Science Fiction,” Talk of the Nation, November 30, 1999, http://www.npr.org/templates/story/story.php?storyId=1067220.
2 A. J. Jacobs, The Year of Living Biblically (New York: Simon & Schuster, 2007).
3 The full list of commandments in the Old Testament can be found at http://en.wikipedia.org/wiki/613_commandments.
4 Jody Thompson and Cari Ressler proposed a concept called ROWE, or Results Only Work Environment, at Best Buy, and they consult with companies on the concept (see http://en.wikipedia.org/wiki/ROWE). However, ROWE was never mentioned once at Automattic.
5 See Alex Williams, “Working Alone, Together,” New York Times, May 3, 2013, http://www.nytimes.com/2013/05/05/fashion/solo-workers-bond-at-shared-workspaces.html?_r=0 for background. For a directory of spaces around the world, see http://wiki.coworking.com/w/page/29303049/Directory.
6 Tracy Kidder, The Soul of a New Machine (New York: Back Bay Books, 2000), 63.
7 Valve Handbook for New Employees (Bellevue, WA: Valve Corporation, 2012), http://www.valvesoftware.com/company/Valve_Handbook_LowRes.pdf.
8 Franz Kafka, The Trial (New York: Oxford University Press, 2000).

…

It felt great to stand in front of the company as a team and show what we'd put together. There were plenty of questions about Hovercards and how they'd work in different situations. Most of what I remember are the notable oohs and aahs as we did our demonstration, sounds I hadn't heard about software I'd worked on with a team of people for far too long.
Notes
1 A good overview of the history of fire teams is at http://en.wikipedia.org/wiki/Fireteam.
2 David McCullough, The Great Bridge (New York: Simon & Schuster, 1983), 381.
Chapter 8
The Future of Work, Part 1
Books about the future of work make the same mistake: they fail to look back at the history of work or, more precisely, the history of books about the future of work and how wrong they were. Few visions of the future come true, as we're very bad at predicting much of anything.

…

Notes
1 Jane Jacobs, The Death and Life of Great American Cities (New York: Vintage, 1992; originally published 1961). The theory was developed by James Q. Wilson and George L. Kelling, “Broken Windows,” Atlantic Monthly (March 1982).
2 Just as a broken leg will take more time to fix than a scratch, a simple incoming-versus-fix chart discounts possibly important details such as the scope of each issue.
3 A good summary of the problems with evaluating programming work based on lines of code is at http://en.wikipedia.org/wiki/Source_lines_of_code#Disadvantages.
Chapter 11
Real Artists Ship
In September 1983, the Apple Macintosh project was far behind schedule. The team was burning out but still had significant work left to do. Steve Jobs, CEO of Apple and visionary leader of the project, walked by the team's main hallway and wrote on a nearby easel what would become one of his best-known sayings: “Real Artists Ship.”

Third, it violates the Single Responsibility Principle7 (SRP) because there is more than one reason for it to change. Fourth, it violates the Open Closed Principle8 (OCP) because it must change whenever new types are added. But possibly the worst problem with this function is that there are an unlimited number of other functions that will have the same structure. For example we could have
7. a. http://en.wikipedia.org/wiki/Single_responsibility_principle
b. http://www.objectmentor.com/resources/articles/srp.pdf
8. a. http://en.wikipedia.org/wiki/Open/closed_principle
b. http://www.objectmentor.com/resources/articles/ocp.pdf
isPayday(Employee e, Date date),
or
deliverPay(Employee e, Money pay),
or a host of others. All of which would have the same deleterious structure.
The solution to this problem (see Listing 3-5) is to bury the switch statement in the basement of an ABSTRACT FACTORY,9 and never let anyone see it.

…

The Law of Demeter
There is a well-known heuristic called the Law of Demeter2 that says a module should not know about the innards of the objects it manipulates. As we saw in the last section, objects hide their data and expose operations. This means that an object should not expose its internal structure through accessors because to do so is to expose, rather than to hide, its internal structure.
2. http://en.wikipedia.org/wiki/Law_of_Demeter
More precisely, the Law of Demeter says that a method f of a class C should only call the methods of these:
• C
• An object created by f
• An object passed as an argument to f
• An object held in an instance variable of C
The method should not invoke methods on objects that are returned by any of the allowed functions. In other words, talk to friends, not to strangers.

.‡ Lint and compiler warnings are two
examples of static analysis. Static analysis can be used to find style issues, but the main reason
to use it is to find subtle problems. Often these problems can occur in uncommon situations,
such as error conditions (i.e., the worst possible time to make a bad situation worse).
# http://pypi.python.org/pypi/fusil/
* http://svn.python.org/view?view=rev&revision=64775
† http://en.wikipedia.org/wiki/Static_code_analysis
‡ http://en.wikipedia.org/wiki/Code_review
BEAUTIFUL IS BETTER THAN UGLY
125
For example, static analysis can find invalid memory uses or memory leaks in error-handling
code. Very often, the problems it finds can lead to crashes in conditions that rarely happen or
that are hard to reproduce. By contrast, dynamic analysis is good for finding problems in code
that already has test cases. Static analysis is a nice complement and finds problems in code that
isn’t executed.

…

When calling a C function from Python, Python wraps the arguments in a tuple. The C function
then needs to parse this tuple into C-native ints and chars that it can operate on. To make this
easier, we provide a function called PyArg_ParseTuple()† that operates a lot like the C scanf()‡
function. One example call looks like the following:
§ http://en.wikipedia.org/wiki/Unix_utilities
‖ http://docs.python.org/extending/index.html
# http://pychecker.sourceforge.net/
* http://www.logilab.org/857
† http://docs.python.org/c-api/arg.html
‡ http://en.wikipedia.org/wiki/Scanf
126
CHAPTER NINE
static PyObject *string_replace(PyStringObject *self, PyObject *args) {
Py_ssize_t count = -1;
PyObject *from, *to;
if (!PyArg_ParseTuple(args, "OO|n:replace", &from, &to, &count))
return NULL;
...
}
If from, to, or count has a different type than the format string claims, PyArg_ParseTuple could
write garbage to memory and cause a crash or, worse, a security vulnerability.

…

I will either manually correlate database interactions that I can
control in the frontend with the actual code or use a script to pull out all the database calls
and inspect that. SQL injection is a problem that has a known solution: parameterized SQL
and/or diligent escaping so code inspection is a quick and efficient way of identifying this
type of problem.
Appropriate permissions
Can a user of a certain permission class do what they should be able to do? And only what
they should be able to do?
* http://en.wikipedia.org/wiki/Cross-site_scripting
† http://en.wikipedia.org/wiki/SQL_injection
236
CHAPTER SEVENTEEN
Information leakage
Can a user access/view/modify information they should not be able to access? Consider a
multitenant system with Coke and Pepsi as two of your clients. Clearly, Coke should not
be able to see Pepsi’s information, and vice versa.
L: Languages
The next letter and layer of testing that is done centers around Languages.

# More specifically, Chambers described the Cyclopaedia as “Containing the Definitions of the Terms, and Accounts of the Things Signify’d Thereby, in the Several Arts, both Liberal and Mechanical, and the Several Sciences, Human and Divine: the Figures, Kinds, Properties, Productions, Preparations, and Uses, of Things Natural and Artificial; the Rise, Progress, and State of Things Ecclesiastical, Civil, Military, and Commercial: with the Several Systems, Sects, Opinions, etc; among Philosophers, Divines, Mathematicians, Physicians, Antiquaries, Criticks, etc.: The Whole Intended as a Course of Ancient and Modern Learning.” ARTFL Project, “Chambers’ Cyclopaedia,” accessed February 7, 2017, https://artfl-project.uchicago.edu/content/chambers-cyclopaedia.
** “Verifiable accuracy” became part of the “five pillars” intended to guide the Wikipedia community. Wikipedia, “Wikipedia:Five Pillars,” last modified February 6, 2017, at 10:52, https://en.wikipedia.org/wiki/Wikipedia:Five_pillars.
†† Larry Sanger left the Wikipedia community in the early years of the twenty-first century over differences about its governance. He came to feel that it was harmfully antiauthoritarian. Larry Sanger [timothy, pseud.], “The Early History of Nupedia and Wikipedia, Part II,” Slashdot, April 19, 2005, https://slashdot.org/story/05/04/19/1746205/the-early-history-of-nupedia-and-wikipedia-part-ii.
‡‡ Wikipedians are not paid for their contributions and are mostly anonymous, so fame is of limited power as an incentive.

Make the cycle stop.
The best time to plant a tree is twenty years ago.
The second-best time is now.
African proverb
Notes
Preface
1. For details of the Battle of Adowa see http://en.wikipedia.org/wiki/BattleofAdowa.
Introduction
1. The 2001 Labour Party Conference was held in the City of Brighton and Hove.
1. The Myth of Aid
1. Various UNAIDS reports on the global AIDS epidemic.
2. Freedom House: http://www.freedomhouse.org; and International Institute for Democracy and Electoral Assistance: http://www.idea.int/.
3. http://en.wikipedia.org/wiki/JSESecuritiesExchange; http://en.wikipedia.org/wiki/ZimbabweStockExchange.
4. In terms of Price/Earnings (essentially a measure of how much value investors predict in the future of African companies), African P/Es, at 15 times, have been roughly commensurate with the emerging economies’ (Brazil, Russia, India and China) average of 19 times.
5.

…

Studies on the impact of democracy on economic growth are cautious in their conclusions and suggest no direct link per se between democracy and development.
10. Interview with Rwanda’s President Kagame, Time, September 2007, at http://www.time.com/time/magazine/article/0,9171,1666064,00.html.
11. From Brenthurst Foundation July 2007 Discussion Paper: ‘Speech by His Excellency President Paul Kagame’.
3. Aid Is Not Working
1. Details of the 1885 Berlin Conference: http://en.wikipedia.org/wiki/BerlinConference.
2. ‘Institutions that provide dependable property rights, manage conflict, maintain law and order, and align economic incentives with social costs and benefits are the foundation of long-term growth. The quality of institutions is key: good institutions are those that provide public offcials with the incentives to provide market-fostering public goods at least cost in terms of corruption and rent seeking.

Drug companies claim that they use the extra money for research, but in fact they spend far more on marketing than on research. Dean Baker, “Reducing Waste with an Efficient Medicare Prescription Drug Benefit,” Center for Economic and Policy Research Issue Brief, Washington, DC, January 2013, http://www.cepr.net/documents/publica-tions/medicare-drug-2012-12.pdf.
11. For an explanation of fractional reserve banking, see “Fractional reserve banking,” Wikipedia, http://en.wikipedia.org/wiki/Fractional_reserve_banking.
12. For data on financial-industry profits, see Sameer Khatiwada, “Did the financial sector profit at the expense of the rest of the economy? Evidence from the United States,” Discussion paper 206, International Institute for Labour Studies, Geneva, Switzerland, 2010, figure 1, p. 2, http://www.ilo.org/wcmsp5/groups/public/---dgreports/---inst/documents/publication/wcms_192804.pdf.

…

Social Security and Medicare Boards of Trustees, A Summary of the 2013 Annual Reports, http://www.ssa.gov/oact/trsum/; US Department of Labor, Employment and Training Administration, Financial Data Handbookfor 2012, http://workforcesecurity.doleta.gov/unemploy/hb394/hndbkrpt.asp.
3. When applied to nature, co-owned wealth user fees can be thought of as value subtracted fees—that is, compensation for harm done. They both internalize and discourage externalities, a benefit that value added taxes don’t provide.
4 “European Union value added tax,” Wikipedia, http://en.wikipedia.org/wiki/European_Union_value_added_tax. Philippe van Parijs calculates that an EU-wide dividend of about $3,250 per year would require an increase in EU VAT rates of about 20 percent. Social European Journal, July 3, 2013, http://www.social-europe.eu/author/philippe-van-parijs.
5. CLEAR Act text, http://www.cantwell.senate.gov/issues/Leg_Text.pdf.
6. Robert Pollin and James Heintz, Transaction Costs, Trading Elasticities, and the Revenue Potential of Financial Transaction Taxes for the United States, Political Economy Research Institute (Amherst, MA: University of Massachusetts/Amherst, 2011), http://www.peri.umass.edu/fileadmin/pdf/research_brief/PERI_FTT_Research_Brief.pdf.

Jan Krikke, “The Most Popular Operating System in the World,” Linux Insider, October 3, 2003, http://www.linuxinsider.com/story/31855.html.
29. “Asking the Project Leader: Where's TRON Headed in the Future?” 1996, http://tronweb.super-nova.co.jp/sakamurainterview_tw42.html. Images of TRON diagrams can be found most easily on Wikipedia, but are also on this book's companion website, thestack.org. See http://tronweb.super-nova.co.jp/tronlogo.html; http://tronweb.super-nova.co.jp/homepage.html; and http://en.wikipedia.org/wiki/TRON_Project.
30. As discussed, the four-layer TCP/IP “won,” but for purposes of explication, the open systems interconnection (OSI) seven-layer model provides a more detailed profile. As indicated, the OSI model is a standardized subdivision of component zones and functions of information networks into logical discrete layers, each of which provides specific “services” to the layer just beneath in the stack and receives services from the layer just above it.

…

New York University economist Paul Romer is a leading advocate for the vision.
6. See this discussion of Gelernter's influence on the conceptual development of the Cloud: David Gelernter, John Markoff, and Clay Shirky, “Lord of the Cloud,” Edge, April 29, 2009, http://edge.org/conversation/lord-of-the-cloud. For a sense of Gelernter's political conservatism, see http://www.nationalreview.com/author/david-gelernter.
7. See http://en.wikipedia.org/wiki/Unix_time.
8. Sun Microsystems’ old tagline, “the network is the computer” has been realized, especially if the definition of network is expanded to include both the physical computing network and the network of users providing content and feedback.
9. See Stu Woo, “Welcome to Amazon Town,” Wall Street Journal, December 20, 2011, http://online.wsj.com/articles/SB10001424052970204058404577108821485438232.
10.

…

See the white paper studies by Cisco: “The Zettabyte Era: Trends and Analysis,” June 10, 2014, http://www.cisco.com/c/en/us/solutions/collateral/service-provider/visual-networking-index-vni/VNI_Hyperconnectivity_WP.pdf, and “Cisco Global Cloud Index: Forecast and Methodology, 2013–2018” http://www.cisco.com/c/en/us/solutions/collateral/service-provider/global-cloud-index-gci/Cloud_Index_White_Paper.pdf.
27. For a basic definition and explanation, see http://en.wikipedia.org/wiki/Polarization-division_multiplexing.
28. See Eric Price and David P. Woodruff, “Applications of the Shannon-Hartley Theorem to Data Streams and Sparse Recovery,” 2012, retrieved from IBM Watson researcher site May 8, 2015, http://researcher.watson.ibm.com/researcher/files/us-dpwoodru/pw12.pdf.
29. For the OptIPuter project, for example, each major component could be on a different continent, but they all work together as if it were a single self-contained machine.

When we’re writing code we want people to be able to
reuse in other projects, we make a library and choose which modules
we want to expose. Where software libraries are code arranged in a
manner so that they can be reused by the compiler in the building
of other libraries and programs, executables are applications that the
operating system will run directly.
If you’d like to read further on this, here are a few links.
1.
https://en.wikipedia.org/wiki/Static_library
2.
https://en.wikipedia.org/wiki/Executable
Editing the Cabal ﬁle
Let’s get back to editing that cabal ﬁle a bit. Ours is named hellohaskell.cabal and is in the top level directory of the project.
Right now, your cabal ﬁle should look something like :
-- Initial hello-haskell.cabal generated by cabal init.
-- For further documentation,
-- see http://haskell.org/cabal/users-guide/
name:
version:
1
2
3
4
5
hello-haskell
0.1.0.0
lens library Github repository https://github.com/ekmett/lens
Haddock website https://www.haskell.org/haddock/
Hackage guidelines https://wiki.haskell.org/Package_versioning_policy
Pipes hackage page http://hackage.haskell.org/package/pipes
Pandoc github repository https://github.com/jgm/pandoc/
CHAPTER 13.

…

The idea is to take a template of
phrases, ﬁll them in with blindly selected categories of words, and see
if saying the ﬁnal version is amusing.
Using an example from the Wikipedia article on Mad Libs:
"___________! he said ______ as he jumped into his car
exclamation
adverb
____ and drove off with his _________ wife."
noun
adjective
We can make this into a function, like the following:
1
https://en.wikipedia.org/wiki/Mad_Libs
CHAPTER 15. MONOID, SEMIGROUP
580
import Data.Monoid
type
type
type
type
type
Verb = String
Adjective = String
Adverb = String
Noun = String
Exclamation = String
madlibbin' :: Exclamation
-> Adverb
-> Noun
-> Adjective
-> String
madlibbin' e adv noun adj =
e <> "! he said " <>
adv <> " as he jumped into his car " <>
noun <> " and drove off with this " <>
adj <> " wife."
Now you’re going to refactor this code a bit!

…

This is sometimes disambiguated by being
referred to as abstract algebra.
c) A third and ﬁnal way algebra is used is to refer to a vector
space over a ﬁeld with a multiplication.
When Haskellers refer to algebras, they’re usually talking about a
somewhat informal notion of operations over a type and its laws,
such as with semigroups, monoids, groups, semirings, and rings.
15.16
Follow-up resources
1. Algebraic structure; Simple English Wikipedia;
https://simple.wikipedia.org/wiki/Algebraic_structure
2. Algebraic structure; English Wikipedia
https://en.wikipedia.org/wiki/Algebraic_structure
Chapter 16
Functor
Lifting is the ”cheat mode” of
type tetris.
Michael Neale
599
CHAPTER 16. FUNCTOR
16.1
600
Functor
In the last chapter on Monoid, we saw what it means to talk about an
algebra and turn that into a typeclass. This chapter and the two that
follow, on Applicative and Monad, will be on a similar topic. Each of
these algebras is more powerful than the last, but the general concept
here will remain the same: we abstract out a common pattern, make
certain it follows some laws, give it an awesome name, and wonder
how we ever lived without it.

Clay Shirky wrote about Christopher Alexander’s “A City Is Not a Tree” in the Many to Many blog on April 26, 2004, at http://many.corante.com/archives/2004/04/26/a_
city_is_not_a_tree.php. Alexander’s article was originally published in Architectural Forum, April–May 1965. It is available online at http://www.arquitetura.ufmg.br/rcesar/alex/_city
index.cfm.
The story of Donn Denman and the cancellation of MacBasic is at Folklore.org, at http://www.folklore.org/StoryView.py?project=Macintosh& story=MacBasic.txt.
Wikipedia defines Foobar at http://en.wikipedia.org/wiki/Foo_bar, and fubar at http://en.wikipedia.org/wiki/FUBAR.
“because people read these names”: Ward Cunningham’s talk at the OOPSLA Conference, October 2004, Vancouver, B.C.
Alec Flett first posted his parody of Hungarian notation on a Mozilla newsgroup in 1999. He repeated it in a blog posting from June 14, 2004, at http://www.flett.org/archives/2004/06/14/16.34.17/
index.htm.
Joel Spolsky traced the forking of Hungarian notation in “Making Wrong Code Look Wrong,” May 11, 2005, at http://www.joelonsoftware.com/articles/Wrong.htm.

…

“Three years” represents the time I spent observing the Chandler project from January 2003 through December 2005. “4,732 bugs” is the number of bugs entered into the Chandler Bugzilla database on the date I completed writing the manuscript for this book; the number has since climbed.
CHAPTER O
SOFTWARE TIME
The game Sumer (also known as Hamurabi or Hammurabi) is documented in Wikipedia at http://en.wikipedia.org/wiki/Hamurabi. Full Basic code for the game can be found in David H. Ahl, ed., BASIC Computer Games (Creative Computing, 1978).
Salon’s content management software is documented in an article in the online magazine Design Interact at http://www.designinteract.com/features_d/salon/index.htm. Chad Dickerson wrote about it in his InfoWorld blog at http://weblog.infoworld.com/dickerson/000170.htm.

…

Bill Gates’s comments on the GPL as Pac-Man were widely reported in 2001, for instance on CNET News.com at http://news.com.com/2100-1001-268667.htm.
Torvalds’s “Just a hobby” quotation is from his 1991 message announcing the Linux project to the comp.os.minix newsgroup. It is archived many places online, e.g. at http://www.linux.org/people/linus_post.htm.
“that purists call GNU-Linux”: a good account of this issue is in Wikipedia at http://en.wikipedia.org/wiki/GNU/Linux_naming_
controversy. The “Free speech” vs. “Free beer” argument is outlined at http://www.gnu.org/ philosophy/free-sw.htm.
All quotations from “The Cathedral and the Bazaar” may be found in the online version at http://www.catb.org/~esr/writings/cathedral-bazaar/cathedral-bazaar/index.htm.
Apache market share is tracked by the Netcraft survey at http://news.netcraft.com/archives/web_server_
survey.htm.

Why?
○ Consider the sequence of words: Buffalo buffalo Buffalo buffalo buffalo buffalo
Buffalo buffalo. This is a grammatically correct sentence, as explained at http://en
.wikipedia.org/wiki/Buffalo_buffalo_Buffalo_buffalo_buffalo_buffalo_Buffalo_buf
falo. Consider the tree diagram presented on this Wikipedia page, and write down
a suitable grammar. Normalize case to lowercase, to simulate the problem that a
listener has when hearing this sentence. Can you find other parses for this sentence?
How does the number of parse trees grow as the sentence gets longer? (More examples of these sentences can be found at http://en.wikipedia.org/wiki/List_of_ho
mophonous_phrases.)
◑ You can modify the grammar in the recursive descent parser demo by selecting
Edit Grammar in the Edit menu. Change the first expansion production, namely
8.9 Exercises | 323
NP -> Det N PP, to NP -> NP PP.

The loose structure of Toolbox files makes it hard for us to do much more with them
at this stage. XML provides a powerful way to process this kind of corpus, and we will
return to this topic in Chapter 11.
The Rotokas language is spoken on the island of Bougainville, Papua
New Guinea. This lexicon was contributed to NLTK by Stuart Robinson. Rotokas is notable for having an inventory of just 12 phonemes
(contrastive sounds); see http://en.wikipedia.org/wiki/Rotokas_language
2.5 WordNet
WordNet is a semantically oriented dictionary of English, similar to a traditional thesaurus but with a richer structure. NLTK includes the English WordNet, with 155,287
words and 117,659 synonym sets. We’ll begin by looking at synonyms and how they
are accessed in WordNet.
Senses and Synonyms
Consider the sentence in (1a). If we replace the word motorcar in (1a) with automobile, to get (1b), the meaning of the sentence stays pretty much the same:
(1)
a.

Getting Started with Pyparsing
6
Best Practice: Start with a BNF
Before just diving in and writing a bunch of stream-of-consciousness Python
code to represent your grammar, take a moment to put down on paper a
description of the problem. Having this will:
•
Help clarify your thoughts on the problem
•
Guide your parser design
•
Give you a checklist of things to do as you implement your parser
•
Help you know when you are done
Fortunately, in developing parsers, there is a simple notation to use to describe
the layout for a parser called Backus-Naur Form (BNF). You can find good
examples of BNF at http://en.wikipedia.org/wiki/backus-naur_form. It is
not vital that you be absolutely rigorous in your BNF notation; just get a clear
idea ahead of time of what your grammar needs to include.
For the BNFs we write in this book, we'll just use this abbreviated notation:
•
::= means "is defined as"
•
+ means "1 or more"
•
* means "0 or more"
•
items enclosed in []are optional
•
succession of items means that matching tokens must occur in sequence
•
| means either item may occur
Use the Grammar to Parse the Input Text
In early versions of pyparsing, this step was limited to using the parseString method, as in:
assignmentTokens = assignmentExpr.parseString("pi=3.14159")
to retrieve the matching tokens as parsed from the input text.

…

Here is a sample S-expression describing
an authentication certificate:
(certificate
(issuer
(name
(public-key
rsa-with-md5
(e |NFGq/E3wh9f4rJIQVXhS|)
(n |d738/4ghP9rFZ0gAIYZ5q9y6iskDJwASi5rEQpEQq8ZyMZeIZzIAR2I5iGE=|))
aid-committee))
(subject
(ref
(public-key
rsa-with-md5
(e |NFGq/E3wh9f4rJIQVXhS|)
(n |d738/4ghP9rFZ0gAIYZ5q9y6iskDJwASi5rEQpEQq8ZyMZeIZzIAR2I5iGE=|))
tom
mother))
(not-after "1998-01-01_09:00:00")
(tag
(spend (account "12345678") (* numeric range "1" "1000"))))
The attraction of S-expressions is that they consist purely of lists of basic character
or numeric strings, with structure represented using nested parentheses.
The languages Lisp and Scheme use S-expressions as their actual program syntax.
Here is a factorial function written in Common Lisp:
(defun factorial (x)
(if (zerop x) 1
(* x (factorial (- x 1)))))
The online Wikipedia article (http://en.wikipedia.org/wiki/s-expression) has
more background and additional links for further information on S-expressions.
In computer science classes, it is common to assign as homework the development
of an S-expression parser. Doing so with pyparsing is actually a fairly straightforward task. This is also our first case of a recursive grammar, in which some
expressions can be written in terms of other expressions of the same type.

FRBSF Economic Letter 2005-05, March 11, 2005, www.frbsf.org/publications/economics/letter/2005/el2005-05.pdf.
For the chart on the U.S. health care system, I drew from R. Glenn Hubbard and Peter Navarro, Seeds of Destruction: Why the Path to Economic Ruin Runs Through Washington, and How to Reclaim American Prosperity, FT Press: Upper Saddle River, NJ, 2010, p. 177.
For one look at life expectancy figures, see http://en.wikipedia.org/wiki/List_of_countries_by_life_expectancy. There are differing measures of life expectancy, but it is well established that quite a few poorer countries do as well, or just about as well, as the United States.
On the difficulties of measuring the value of health care spending, see Robin Hanson, “Showing that You Care: The Evolution of Health Altruism,” Medical Hypotheses, 2008, 70, 4, pp. 724-742, www.overcomingbias.com/2008/03/showing-that-yo.html.

…

Hanushek and Alfred A. Lindseth, Schoolhouses, Courthouses, and Statehouses: Solving the Funding-Achievement Puzzle in America’s Public Schools, Princeton: Princeton University Press, 2009. That same book, on p.298, offers the statistic on U.S. educational spending as a percentage of GDP and the comparison with Iceland.
In 2006, government spending at all levels was 36.1 percent of U.S. GDP; http://en.wikipedia.org/wiki/Government_spending. I am using a pre-crisis number to adjust for the fall in GDP from the financial crisis; in that sense, this number is an approximate one and thus a more conservative estimate than what a completely current calculation would yield.
For one example of Michael Mandel’s writings, see “Official GDP, Productivity Stats Tell a Different Story of U.S. Economy,” Seeking Alpha, May 10, 2010, http://seekingalpha.com/article/204083-official-gdpproductivity-stats-tell-a-different-story-of-u-s-economy.

page=0%2C0
93 Duke Nukem Forever was never finished: Clive Thompson, ‘Learn to let go’, Wired, January 2010, http://www.wired.com/magazine/2009/12/fail_duke_nukem/all/1
93 Gamers have been eagerly awaiting Elite 4: ‘Frontier reveals Elite 4’, http://uk.pc.ign.com/articles/092/092218p1.html
93 The plane took a quarter of a century to enter service: measuring time from original government specification. Sources: http://en.wikipedia.org/wiki/F-22_Raptor; Ben Rich & Leo Janos, Skunk Works (New York: Sphere, 1994), p. 350; Samuel H. Williamson, ‘Six ways to compute the relative value of a U.S. dollar amount, 1790 to present’, MeasuringWorth, 2009, http://www.mea-suringworth.com/uscompare/
93 You will discover that by the year 2000: The Hudson Institute, The Year 2000: A Framework for Speculation on the Next 33 Years, Herman Kahn & Anthony J.

…

Economy, http://online.wsj.com/article/SB10001424052748703344704574610350092009062.html
104 ‘Firms are reluctant to risk their money’: McKinstry, Spitfire, pp. 34–5.
105 There is an inconvenient tale behind this: I have drawn much of this account from Dava Sobel’s Longitude (London: Fourth Estate, 1996).
106 Compared with the typical wage of the day: Officer, ‘Purchasing power of British pounds’, cited above, n. 10.
107 In 1810 Nicolas Appert: http://en.wikipedia.org/wiki/Nicolas_Appert
107 Ultimately the Académie began to turn down: Maurice Crosland, ‘From prizes to grants in the support of scientific research in France in the nineteenth century: The Montyon legacy’, Minerva, 17(3) (1979), pp. 355–80, and Robin Hanson, ‘Patterns of patronage: why grants won over prizes in science’, University of California, Berkeley, working paper 1998, http://hanson.gmu.edu/whygrant.pdf
108 Innovation prizes were firmly supplanted: Hanson, ‘Patterns of patronage’.
109 The prize was eventually awarded in September 2009: a follow-up prize was announced and then cancelled following a lawsuit over privacy.

Page 68 The photo of the cave, entitled “Lechuguilla Cave Pearlsian Gulf,” comes from Wikipedia and was uploaded by Beyond Science, https://en.wikipedia.org/wiki/Lechuguilla_Cave#/media/File:Lechuguilla_Cave_Pearlsian_Gulf.jpg, accessed August 7, 2015.
Page 72: Photo of Sir William Osler. Medical archives of the Johns Hopkins Hospital. Used with permission.
Page 73: Caricature of Sir William Osler. Medical archives of the Johns Hopkins Hospital. Used with permission.
Page 74: My Osler residency team. Medical archives of the Johns Hopkins Hospital. Used with permission.
Page 96–100: Examples of the Bills of Mortality. Courtesy of Jay Walker, the Walker Library of the History of Human Imagination. Used with permission.
Page 106: The illustration of the mitochondria comes from Wikipedia, https://en.wikipedia.org/wiki/File:Mitochondrion_structure.svg.
Page 110: The illustration of new reproductive techniques is an adaptation of a similar illustration featured in the article.

…

Wikimedia Commons, http://upload.wikimedia.org/wikipedia/en/5/59/Dr_Metchnikoff_in_his_Laboratory.jpg.
Page 35: Caricature of Metchnikoff. Reprinted with permission of the Institut Pasteur—Musée Pasteur.
Page 39: “End of History” illustration. Courtesy of author.
Page 42: The Hydra image comes from Wikimedia Commons, http://upload.wikimedia.org/wikipedia/commons/5/51/Hydra_magnipapillata.jpg.
Page 44: The killifish image comes from Wikimedia Commons, http://en.wikipedia.org/wiki/Nothobranchius_furzeri#/media/File:Nothobranchius_furzeri_GRZ_thumb.
Page 46: Quantification of biological aging graphic. Duke University School and Medicine and the National Academy of Sciences. Used with permission.
Page 50: Tumor sequencing results (lung cancer). Courtesy of Foundation Medicine, Inc.
Page 51: Paraffin blocks. Courtesy of the National Surgical Adjuvant Breast and Bowel Project (NSABP), the oldest and largest breast and colorectal cancer research group in the world.

…

Adapted from the Wall Street Journal, March 17, 2015. Courtesy of author.
Pages 130–132: Charts and Figures from the Task Force Report on Noncommunicable Diseases, copyright 2015 by the Council on Foreign Relations. Reprinted with permission. The data source is Institute for Health Metrics and Evaluation, Global Burden of Disease Study 2013.
Page 161: Cartoon of Jenner’s inoculations. Public Domain. Wikipedia, http://en.wikipedia.org/wiki/File:The_cow_pock.jpg.
Page 189: Physical activity and life expectancy. Data from S. C. Moore et al., “Leisure Time Physical Activity of Moderate to Vigorous Intensity and Mortality: A Large Pooled Cohort Analysis,” PLOS Medicine 9, no. 11 (2012): E1001335. Graphic courtesy of author and based on similar graphic in paper. National Cancer Institute and the Public Library of Sciences. Used with permission.

The world’s arbiter of truth: “Wikipedia: List of Hoaxes on Wikipedia,” accessed January 13, 2014, http://en.wikipedia.org/wiki/Wikipedia:List_of_hoaxes_on_Wikipedia.
Four years later, I asked: “Who is Erica Feldman . . . ?,” snapshot from January 6, 2014, via Google’s cache, http://webcache.googleusercontent.com/search?q=cache:Q77Wj1JfErsJ:wiki.answers.com/Q/Who_is_erica_feldman_the_one_that_invented_the_hair_straightnener+&cd=1&hl=en&ct=clnk&gl=ca&client=firefox-a.
There are even hoaxes about hoaxes: “List of Fictitious People,” Wikipedia.com, accessed January 15, 2014, http://en.wikipedia.org/w/index.php?title=List_of_fictitious_people&diff=211003619&oldid=205705808.
I see there are currently: “Wikipedia:Statistics,” Wikipedia, accessed January 17, 2014, http://en.wikipedia.org/wiki/Wikipedia:Statistics.
Printing Wikipedia in a book: “Wikipedia:Size in Volumes,” Wikipedia, accessed January 17, 2014, http://en.wikipedia.org/wiki/Wikipedia:Size_in_volumes.

Adam Smith was professor of moral philosophy at Glasgow University and is supposed to have fallen into a tanning pit while focusing on a conversation with a friend about economics. Author Isaac Asimov claimed, almost certainly apocryphally, that Gauss was interrupted in the middle of solving a mathematics problem to be told his wife was dying. “Tell her to wait a moment ’til I am done” was his reply. See http://en.wikipedia.org/wiki/Adam_Smith and http://en.wikipedia.org/wiki/Carl_Friedrich_Gauss.
7. Babylonian Talmud, Shabbos 31a.
8. En.Wikipedia.org/wiki/Adam_Smith.
9. Pitt speech on introducing his budget, February 17, 1792, quoted in John Kenneth Galbraith, A History of Economics (Hamish Hamilton, 1987), 61.
10. Adam Smith, The Wealth of Nations (Oxford University Press, 2008), bk 1, chap 2.
11. Smith claimed that 240 times the number of pins could be created in this way than by an artisan working alone.
12.

…

Coase might also have noted that in making this bimodal distinction, economists were separating away those parts of the economy (what they called public goods) where economic models do not predict at all well, thus leaving economic models to cover “private goods.” They chose this route rather than noting that transaction costs in all goods complicated the economic models they were using.
32. Coase, The Firm, the Market, and the Law, 15.
33. Andrew Scott, private interview for this book, October 2014.
34. En.wikipedia.org/wiki/There_are_known_knowns.
35. Some economists, notably Frank Knight at the University of Chicago, have written extensively about the dichotomy between predictable risk and uncertainty, which cannot be calculated. But many continue to focus only on risk.
36. Nassim Nicholas Taleb, The Black Swan: The Impact of the Highly Improbable (Random House, 2010), xxxix.
37. Andrew G. Haldane, “Tails of the Unexpected,” speech given at University of Edinburgh, June 8–9, 2012, p. 20, http://www.bankofengland.co.uk/publications/Documents/speeches/2012/speech582.pdf.
38.

In contrast to the default scorer, which counts the frequency of query terms in each fragment, BM25 is a state-of-the-art tf-idf scoring function for calculating the similarity between a document or fragment and a query.[3] The BM25 scorer gives a natural boost to fragments containing terms that occur less frequently in the index. We see evidence of this in the results for the second document where rain stands out because it’s a less frequent term in the index than blue or fireball, so it’s given more weight by BM25 scoring.
3 The mathematics behind BM25 are beyond the scope of this book, so we’ll refer you to the Wikipedia page for BM25; see http://en.wikipedia.org/wiki/Okapi_BM25.
The primary drawback of PostingsHighlighter is that it requires accurate term offsets to be set on terms during indexing. Let’s use the Solr Analysis form we worked with in chapter 6 to see how term offsets are calculated during text analysis. Figure 9.8 shows term offsets calculated during analysis of the example sighting we’ve been working with throughout this chapter.

…

One way to think about distance between two terms is by considering how many changes you have to make to one of the terms to change it to the other term. For example, the distance between atmosphear and atmosphere is 2: one change to remove the a and another to add an e on the end. A well-known algorithm for calculating the string distance between two terms is the Levenshtein distance;[2] setting distanceMeasure to internal uses the Levenshtein distance algorithm.
2 “Levenshtein distance,” http://en.wikipedia.org/wiki/Levenshtein_distance.
The accuracy parameter is a floating value between 0 and 1 that determines how accurate the suggestions need to be. The higher the number, the more accurate the suggestions will be, but you will also have more misses, cases for which no suggestions are available. If you set accuracy too low, Solr will generate more suggestions but they may not always make sense to your users.

…

Once you’ve finished your Solr development (or downloaded the most recent official release to use out of the box), you’ll be ready to build Solr and deploy it to a production environment, which is covered in the following section.
12.2. Deploying Solr
Solr builds into a standard Java web application archive (WAR file), which means it can be deployed in any modern servlet container. If you are unfamiliar with how WAR files integrate into Java servlet containers to power web applications, you can check out http://en.wikipedia.org/wiki/WAR_file_format_(Sun) for a quick introduction. When you launch the example Solr application (using start.jar as we have throughout the book), an embedded version of Jetty, a Java servlet container, is launched to run the solr.war file, though many users choose to deploy Solr into Apache Tomcat or other servlet containers. If you’re writing another Java application, it’s also possible to add direct code references to the Solr libraries and embed Solr within your application.

It isn’t a formal protocol the way that HTTP is. It is more of a conceptual framework for using HTTP as a basis for easy access to data. While REST implementations may differ, they all strive for simplicity. Android’s content provider API formalizes REST-like operations into an API and is designed in the spirit of REST’s simplicity. You can find more information on REST on Wikipedia: http://en.wikipedia.org/wiki/REST.
Content provider components are the heart of the Android content model: by providing a ContentProvider, your application can share data with other applications and manage the data model of an application. A companion class, ContentResolver, enables other components in an Android system to find content providers. You will find content providers throughout the platform, used both in the operating system and in applications from other developers.

…

Database Transactions
Database transactions make sequences of SQL statements atomic: either all statements succeed or none of them have any effect on the database. This can be important, for instance, if your app encounters an unfortunate occurrence such as a system crash. A transaction will guarantee that if the device fails partway through a given sequence of operations, none of the operations will affect the database. In database jargon, SQLite transactions support the widely recited ACID transaction properties: http://en.wikipedia.org/wiki/ACID.
With SQLite, every database operation that modifies a database runs in its own database transaction, which means a developer can be assured that all values of an insert will be written if the statement succeeds at all. You can also explicitly start and end a transaction so that it encompasses multiple statements. For a given transaction, SQLite does not modify the database until all statements in the transaction have completed successfully.

…

Finally, let’s delete a record using its ID:
sqlite> DELETE FROM video WHERE _id = 1; sqlite> SELECT _id, description FROM videos; 2|Epic Fail Bicycle 3|Epic Fail Wagon 4|Epic Fail Sidewalk 5|Epic Fail Motorcycle
SQL and the Database-Centric Data Model for Android Applications
Now that you have some basic SQL programming knowledge, we can start thinking about how to put it to use in an Android application. Our goal is to create robust applications based on the popular Model-View-Controller (MVC) pattern that underlies well-written UI programs, specifically in a way that works well for Android. Wikipedia has background information on MVC at http://en.wikipedia.org/wiki/Model_view_controller.
One fundamental difference between mobile phone apps and desktop apps is how they handle persistence. Traditional desktop-based applications—word processors, text editors, drawing programs, presentation programs, and so on—often use a document-centric form of the MVC pattern. They open a document, read it into memory, and turn it into objects in memory that form the data model.

It isn’t a formal protocol the way that HTTP is. It is more of a conceptual framework for using HTTP as a basis for easy access to data. While REST implementations may differ, they all strive for simplicity. Android’s content provider API formalizes REST-like operations into an API and is designed in the spirit of REST’s simplicity. You can find more information on REST on Wikipedia: http://en.wikipedia.org/wiki/REST.
Content provider components are the heart of the Android content model: by providing a ContentProvider, your application can share data with other applications and manage the data model of an application. A companion class, ContentResolver, enables other components in an Android system to find content providers. You will find content providers throughout the platform, used both in the operating system and in applications from other developers.

…

Database Transactions
Database transactions make sequences of SQL statements atomic: either all statements succeed or none of them have any effect on the database. This can be important, for instance, if your app encounters an unfortunate occurrence such as a system crash. A transaction will guarantee that if the device fails partway through a given sequence of operations, none of the operations will affect the database. In database jargon, SQLite transactions support the widely recited ACID transaction properties: http://en.wikipedia.org/wiki/ACID.
With SQLite, every database operation that modifies a database runs in its own database transaction, which means a developer can be assured that all values of an insert will be written if the statement succeeds at all. You can also explicitly start and end a transaction so that it encompasses multiple statements. For a given transaction, SQLite does not modify the database until all statements in the transaction have completed successfully.

…

Finally, let’s delete a record using its ID:
sqlite> DELETE FROM video WHERE _id = 1; sqlite> SELECT _id, description FROM videos; 2|Epic Fail Bicycle 3|Epic Fail Wagon 4|Epic Fail Sidewalk 5|Epic Fail Motorcycle
SQL and the Database-Centric Data Model for Android Applications
Now that you have some basic SQL programming knowledge, we can start thinking about how to put it to use in an Android application. Our goal is to create robust applications based on the popular Model-View-Controller (MVC) pattern that underlies well-written UI programs, specifically in a way that works well for Android. Wikipedia has background information on MVC at http://en.wikipedia.org/wiki/Model_view_controller.
One fundamental difference between mobile phone apps and desktop apps is how they handle persistence. Traditional desktop-based applications—word processors, text editors, drawing programs, presentation programs, and so on—often use a document-centric form of the MVC pattern. They open a document, read it into memory, and turn it into objects in memory that form the data model.

Such
a media type can be associated with a file via an HTTP header:
Content-Type: application/ecmascript;version=6
It can also be associated via the type attribute of the <script> element (whose default value² is
text/javascript):
<script type="application/ecmascript;version=6">
···
</script>
This specifies the version out of band, externally to the actual content. Another option is to specify
the version inside the content (in-band). For example, by starting a file with the following line:
¹http://en.wikipedia.org/wiki/Internet_media_type
²http://www.w3.org/TR/html5/scripting-1.html#attr-script-type
13
One JavaScript: avoiding versioning in ECMAScript 6
14
use version 6;
Both ways of tagging are problematic: out-of-band versions are brittle and can get lost, in-band
versions add clutter to code.
A more fundamental issue is that allowing multiple versions per code base effectively forks a
language into sub-languages that have to be maintained in parallel.

…

.
• You can split code into multiple modules and it will continue to work (as long as you don’t
try to change the values of imports).
17.3.5 Support for cyclic dependencies
Two modules A and B are cyclically dependent⁵ on each other if both A (possibly indirectly/transitively) imports B and B imports A. If possible, cyclic dependencies should be avoided, they lead to
A and B being tightly coupled – they can only be used and evolved together.
Why support cyclic dependencies, then? Occasionally, you can’t get around them, which is why
support for them is an important feature. A later section has more information.
Let’s see how CommonJS and ECMAScript 6 handle cyclic dependencies.
⁵http://en.wikipedia.org/wiki/Circular_dependency
253
Modules
17.3.5.1 Cyclic dependencies in CommonJS
The following CommonJS code correctly handles two modules a and b cyclically depending on each
other.
//------ a.js -----var b = require('b');
function foo() {
b.bar();
}
exports.foo = foo;
//------ b.js -----var a = require('a'); // (i)
function bar() {
if (Math.random()) {
a.foo(); // (ii)
}
}
exports.bar = bar;
If module a is imported first then, in line i, module b gets a’s exports object before the exports
are added to it.

A simple blood test by your doctor can verify the levels of many essential nutrients—always consult with your MD before making any major changes to your diet or supplement intake.
4 For more on the neurophysiology of the brain, check out Kluge: The Haphazard Construction of the Human Mind by Gary F. Marcus (Faber & Faber, 2008).
5 http://macfreedom.com.
6 http://www.proginosko.com/leechblock.html.
7 http://www.timessquarenyc.org/facts/PedestrianCounts.html.
8 http://en.wikipedia.org/wiki/Austrian_business_cycle_theory.
9 http://en.wikipedia.org/wiki/Tulip_mania.
10 http://en.wikipedia.org/wiki/Dot-com_bubble.
11 http://en.wikipedia.org/wiki/United_States_housing_bubble.
CHAPTER 8: WORKING WITH YOURSELF
1 http://www.pomodorotechnique.com/.
2 http://www.pnas.org/content/103/31/11778.abstract.
3 http://www.ingentaconnect.com/content/hfes/hf/2006/00000048/00000002/art00014.
4 http://www.paulgraham.com/makersschedule.html.
5 http://crashcourse.personalmba.com.
6 Personally, I work with the folks at Timesvr.com—they’re skilled, fast, friendly, and cost effective.
7 http://davidseah.com/pceo/etp.
8 http://govleaders.org/powell.htm.
9 For a complete look at my personal productivity system, visit http://book.personalmba.com/bonus-training/.
10 http://www.markforster.net/autofocus-system/.
11 For an example of how I do this, visit http://book.personalmba.com/bonus-training/.

…

CHAPTER 2 : VALUE CREATION
1 For an example of how I do this, visit http://book.personalmba.com/bonus-training/.
2 A legally binding contract or promise not to share information about a business or business idea with others.
3 Louviere called the approach “MaxDiff ” testing: http://en.wikipedia.org/wiki/MaxDiff.
4 For an example of how to conduct Relative Importance Testing for your business idea, visit http://book.personalmba.com/bonus-training/.
5 http://www.kifaru.net/radio.htm.
6 http://www.youtube.com/user/miguelcaballerousa.
CHAPTER 4: SALES
1 http://www.petradiamonds.com/im/press_display.php?Id=2010/26feb10.
2 You can find the formulas at http://en.wikipedia.org/wiki/Discounted_cash_flow.
CHAPTER 5: VALUE DELIVERY
1 For an example of how I do this, visit http://book.personalmba.com/bonus-training/.
2 Before the advent of the printing press, bibles were copied and illuminated (decorated and illustrated) by cloistered monks, who spent years working on a single copy.
3 http://www.kk.org/thetechnium/archives/2008/01/better_than_fre.php.
4 We’ll discuss Toyota’s recall woes later in “The Paradox of Automation.”
5 “Inside the Box,” Wired, March 2010.

The index was first published in 1957 and includes 500 leading
companies.
Moving Average: A moving
average series can be calculated for
any time series, but is most often
applied to market prices. Moving
averages are used to smooth out
short-term fluctuations, thus
highlighting potentially longerterm trends.
A Vulcan mind-meld allows
the sharing of thoughts,
experiences, memories,
and knowledge with another
individual—via touch.
Average True Range: http://en.wikipedia.org/wiki/Average_True_
Range (look this one up if you don’t know it!).
There’s no earthly way of knowing,
Which direction we are going,
There’s no knowing where we’re rowing,
Or which way the rivers flowing,
Is it raining?
Is it snowing?
Is a hurricane a-blowing?
Not a speck of light is showing,
So the danger must be growing,
Are the fires of hell a-glowing?
Is the grisly reaper mowing?
Yes, the danger must be growing,
Cause the rowers keep on rowing,
And they’re certainly not showing,
Any signs that they are slowing!

See also Robert Capps, “The 50 Best Robots Ever,” Wired 14.01 (2006), http://www.wired.com/wired/archive/14.01/robots.html?pg=2&topic=robots&topic_set=.
45 the field of modern chemistry J. Boone Bartholomees Jr., “The Heirs of Archimedes: Science and the Art of War through the Age of Enlightenment,” Parameters 35, no. 4 (2005): 136.
46 “to see what would happen” “Charles Babbage,” Wikipedia, April 20, 2007 (cited April 20, 2007); available at http://en.wikipedia.org/wiki/Charles_Babbage.
46 “I called an official” Robert Finkelstein, “Military Robotics: Malignant Machines or the Path to Peace,” paper presented at the Military Robotics Conference, Institute for Defense and Government Advancement, Washington, DC, April 10-12, 2006.
47 the Germans protected their coast Steven M. Shaker and Alan R. Wise, War Without Men : Robot on the Future Battlefield (Washington, DC: Pergamon Brassey’s International Defense Publishers Inc., 1988).
48 load them up with twenty-two thousand pounds of Torpex Anthony J.

Licensed to tracy
moore <nordick.an@gmail.com>
www.it-ebooks.info
Introducing PostGIS
9
You’ll be hard pressed to find the following features in other spatial databases:
 Functions to work with GeoJSON and Keyhole Markup Language (KML), allow-
ing web applications to talk directly to PostGIS without the need for additional
serializing schemes or translations
 Comprehensive geometry-processing functions that go far beyond basic geometric operations, including functions for fixing invalid geometries and for
simplifying and deconstructing geometries
 Built-in 3D and topology support
 Over 150 seamless operations for working with vectors and rasters in tandem, as
well as for converting between the two families
GeoJSON and KML data formats
Geographic JavaScript Object Notation (GeoJSON; http://geojson.org) and Keyhole
Markup Language (KML; http://en.wikipedia.org/wiki/Keyhole_Markup_Language)
are two of the most popular vector formats used by web-mapping applications:
 GeoJSON is an extension of JSON that’s used for representing JavaScript
objects. It adds to the JSON standard support for geographic objects.
 KML is an XML format developed by Keyhole (which was purchased by
Google), first used in Google’s mapping products and later supported by various mapping APIs.

…

Recall from basic geometry (or common sense) the minimum number of points needed to form an area? Three—a triangle. The mathematical underpinning of TINs is based on triangulating key peak and valley point locations of a
surface to form non-overlapping connected area pockets. The most common form of
Licensed to tracy
moore <nordick.an@gmail.com>
www.it-ebooks.info
43
Geometry
triangulation used in GIS is Delaunay triangulation (explained on Wikipedia: http://
en.wikipedia.org/wiki/Delaunay_triangulation).
PostGIS 2.1 specifically added a powerful ST_DelaunayTriangles function to
convert a “well-behaved” polygon collection into a TIN. But one shortcoming of
ST_DelaunayTriangles is that it can’t convert polyhedral surfaces to TINs. For that
conversion, you need to use ST_Tesselate, which is packaged with SFCGAL and will
convert polygon collections as well.
PostGIS 2.0 added many new functions specifically for use with polyhedral surfaces
and TINS; go to http://postgis.net/docs/PostGIS_Special_Functions_Index.html
#PostGIS_TypeFunctionMatrix to find the full list.

…

It seemed to display the first geometry column of a table.
uDig can’t handle heterogeneous geometry columns. It allowed us to pick a column with mixed subtypes, but it was never able to display it.
Although uDig allows you to write queries, uDig doesn’t understand SQL. Instead,
you have to resort to a more obscure web query standard called Common Query Language (CQL).
CQL As of version 1.2, CQL renamed itself Contextual Query Language. You
can learn more about CQL on Wikipedia at http://en.wikipedia.org/wiki/
Contextual_Query_Language.
Licensed to tracy
moore <nordick.an@gmail.com>
www.it-ebooks.info
134
5.4.2
CHAPTER 5
Using PostGIS on the desktop
Connecting to PostGIS
uDig has the easiest interface for connecting to PostGIS. Choose Layer > Add from the
menu, and PostGIS appears as a data source (shown at the left in figure 5.13).
Figure 5.13
Adding database connections in uDig
You can alternatively use the GeoTools built into uDig to connect.

Joel Waldfogel, “Copyright Protection, Technological Change, and the Quality of New Products: Evidence from Recorded Music Since Napster,” Working Paper (National Bureau of Economic Research, October 2011), http://www.nber.org/papers/w17503.
2. Albert Gore, The Future: Six Drivers of Global Change (New York: Random House, 2013), p. 45.
3. The English Wikipedia has over 2.5 billion words, which is over fifty times as many as Encyclopaedia Britannica. “Wikipedia: Size Comparisons,” Wikipedia, the Free Encyclopedia, July 4, 2013, http://en.wikipedia.org/w/index.php?title=Wikipedia:Size_comparisons&oldid=562880212 (accessed August 17, 2013).
4. Actually, 90 percent of apps on smartphones are now free. Alex Cocotas, “Nine Out Of Ten Apps On Apple’s App Store Are Free,” Business Insider, July 19, 2013, http://www.businessinsider.com/nine-out-of-10-apps-are-free-2013-7#ixzz2cojAAOCy (accessed August 17, 2013).
5. Cannibalization of SMS services by free over-the-top (OTT) service is estimated to cost telephone companies over $30 billion in 2013, according to the analyst group Ovum.

The effects of different values on the box-sizingproperty
Please note that although I only discuss the width property in all of these examples, the exact same rules apply to an element’s height property. (You may also note that this works in exactly the same way as a browser that is put into “quirks” mode.)
Note
If you’re a younger developer you may not remember “quirks” mode. It’s a system that emulates the incorrect way that Internet Explorer 5.5 used to lay out web pages; you can read more about it on Wikipedia (http://en.wikipedia.org/wiki/Quirks_mode).
I use the box-sizing property in a few examples throughout this book, so if the effects (and benefits) aren’t immediately apparent right now, they should become clearer as you work through the rest of the chapters.
Browser-Specific Prefixes
In the previous section, I briefly discussed using browser-specific prefixes on the box-sizing property. As CSS3 is still in a state of change and revision, you’ll see these mentioned a lot throughout the rest of this book, so I’ll take some time to talk about these in more detail.

…

In this example, I don’t have to use an extra rule—without it, I would have to use something like this:
p abbr { border-bottom: 6px double black; } p:last-child abbr { border-bottom-color: white; }
Although this may not seem like a big savings, it means I can update the parent element color and not have to worry about setting the color on any relevant children. On a large site with many different color combinations, you can see that currentColor would be extremely handy.
The currentColor value is currently implemented in Firefox, WebKit, and Opera, and is planned for inclusion in IE9.
* * *
[4] This image is taken from Wikimedia (http://en.wikipedia.org/wiki/File:HSL_color_solid_cylinder_alpha_lowgamma.png) and is published under a Creative Commons Attribution license.
Matching the Operating System’s Appearance
In CSS2, you could use colors from different aspects of your operating system to give websites a more “native” appearance. You could, for instance, match the background color of a button element on a web page with that of a button element on your system by using the following code:
button { background-color: ButtonFace; }
This functionality has been deprecated in CSS3 and has been replaced by the appearance property, which is introduced in the Basic User Interface Module.

…

Mozilla has suggested the specification be modified to support their proposed change, as the current spec means only pixel values can be used for matrix transformations. This is the key difference among the different browsers’ implementations. In the examples in the rest of this chapter I’ll use unitless values, because they are more common.
If you want to skew an element, well, this is where it becomes a lot more complex—here’s where I need to introduce the trigonometric functions. You can read a full explanation of these functions on Wikipedia (http://en.wikipedia.org/wiki/Trigonometric_functions#Sine.2C_cosine_and_tangent), but here’s a quick and dirty summary: The trigonometric functions are ratio values used to calculate angles in a triangle.
The first trigonometric function I’ll use is tan (tangent), which is required to skew an element along the x- or y-axis. Referring to the original matrix syntax, the x-axis is supplied as a value to b and the y as a value to c.

In the developing world: Katty Kay and Claire Shipman, “Fixing the Economy Is Women’s Work,” Washington Post, July 12, 2009, http://www.washingtonpost.com/wp-dyn/content/article/2009/07/10/AR2009071002358.html.
According to the World Bank: “Women, Business and the Law,” World Bank Group, http://wbl.worldbank.org/data.
The world’s largest Muslim-majority: “List of Islands of Indonesia,” Wikipedia, http://en.wikipedia.org/wiki/List_of_islands_of_Indonesia.
This culture extends to government: Yenni Kwok, “Indonesia’s Elections Feature Plenty of Women, But Respect in Short Supply,” Time, April 8, 2014, http://time.com/53191/indonesias-election-features-plenty-of-women-but-respect-in-short-supply/.
In factories they were given: “The Lives of Rural and Urban Chinese Women under State Capitalism,” Mount Holyoke College, https://www.mtholyoke.edu/~jejackso/Women%20Under%20Mao.htm.

Another useful law of matrix algebra is that the transpose of a product of two matrices is
the product of the transposes in reverse order:
AB = B A
(I.2.1)
A similar change of ordering is necessary when we take the inverse of a product of two
square matrices – see below.
I.2.2.3
Singular Matrices
The unit or identity matrix I is a special square matrix with 1s along the main diagonal and
0s everywhere else. For instance, the 4 × 4 identity matrix is
⎛
⎞
1
0
0
0
⎜0
1
0
0⎟
⎟
I=⎜
⎝0
0
1
0⎠
0
0
0
1
4
See http://en.wikipedia.org for more information. For instance, the associative law is ABC = ABC. Thus, to multiply three
matrices together, we can do the products in either order, provided we do not change the order of the matrices in the product.
Essential Linear Algebra for Finance
41
It acts like the number 1 in ordinary algebra, i.e. AI = A and IA = A.
The inverse of a square matrix A is denoted by A−1 . It has the property that AA−1 =
−1
A A = I, where I is the n × n identity matrix.

…

One such add-in, developed by Leonardo Volpi of the Foxes team, Italy, has
plenty of matrix functions including eigenvector and eigenvalue routines, Cholesky decomposition, covariance and correlation and so forth. It has been used for the examples in this
book where Excel cannot perform the exercise without an add-in.7
6
7
For more details on this and other eigenvalue algorithms, see http://en.wikipedia.org/wiki/Eigenvalue_algorithm.
This add-in should be loaded just like any other Excel add-in: under ‘Tools’ select ‘Add-Ins’ and then browse to locate the add-in
as you have placed it on your machine. Having added this in once, you should not need to do so again.
54
Quantitative Methods in Finance
Example I.2.10: Using an Excel add-in to ﬁnd eigenvectors and eigenvalues
Find the eigenvalues and eigenvectors of the correlation matrix
⎛
⎞
1
05
02
1
03 ⎠
C = ⎝ 05
02
03
1
Solution The power iteration method has been used for this example.

…

In the spreadsheet for this example we use the add-in command MLU to obtain
the matrices
⎛
⎞
⎛
⎞
1
0
0
0
2
2
2
−3
⎜ 05
⎜
1
0
0⎟
−2
7
−05 ⎟
⎟ U = ⎜0
⎟
L=⎜
⎝ 0
⎠
⎝
−05
1
0
0
0
65
775 ⎠
05
−05
038
1
0
0
0
−073
and then we verify the relationship (I.2.33).
We cannot always guarantee the existence of an LU decomposition for a square matrix, but
there are various alternatives that may be used. For instance, any square matrix will have an
LU decomposition if we permute of the rows or columns of L and U. Further details can be
found on: http://en.wikipedia.org/wiki/LU_decomposition.
I.2.6
PRINCIPAL COMPONENT ANALYSIS
Principal component analysis is based on the spectral decomposition of a covariance matrix
or a correlation matrix. That is, we use the relationship
A = WW
where A is either a covariance matrix or the corresponding correlation matrix. If PCA is
performed on a correlation matrix then the results will only be influenced by the correlations
of returns, but if the input to PCA is a covariance matrix then the results will be influenced by
the volatility of the returns as well as the correlations of returns.

In 2012, the figure was 306 per cent in Ireland, 230 per cent in Portugal and 104 per cent in Britain.
67 http://ftalphaville.ft.com/2010/11/08/397221/the-likely-cost-of-irelands-bank-bailout/ GNP figure in 2012 is €127 billion: https://namawinelake.wordpress.com/2012/12/16/irelands-gnp-and-gdp-in-2012/
68 See in particular pages 72-75 of Aftershock: Reshaping the World After the Crisis, Little, Brown: 2010.
69 Ibid, page 74
70 See http://online.wsj.com/article/SB123371182830346215.html and http://blogs.ft.com/maverecon/2009/01/the-good-bank-solution/
71 Philippe Legrain, Aftershock: Reshaping the World After the Crisis, Little, Brown: 2010, page 75.
72 http://en.wikipedia.org/wiki/List_of_bank_failures_in_the_United_States_(2008–present). Checked on 18 May 2013
73 http://uk.reuters.com/article/2013/02/01/uk-dutch-finance-cbank-idUKBRE9100A420130201
74 http://www.ft.com/cms/s/0/645b24e6-adbc-11e2-82b8-00144feabdc0.html
75 http://www.eba.europa.eu/-/eba-publishes-results-of-the-basel-iii-monitoring-exercise-as-of-end-2012 Around a third of the 170 banks surveyed by the EBA failed to meet the very weak Basel target of a 3-per-cent equity buffer, with a combined capital shortfall of €133 billion.

…

Code: nasq_ki
102 Mancur Olson, The Rise and Decline of Nations, Yale: 1984
103 http://www.ft.com/cms/s/0/b31dd248-d785-11e2-a26a-00144feab7de.html
104 At the European Summit in The Hague in 1969, the heads of state and government of the European Community agreed to prepare a plan for economic and monetary union. The Werner Report was drawn up by a working group chaired by Pierre Werner, Luxembourg’s prime minister and minister for finances, and presented in October 1970. http://en.wikipedia.org/wiki/Werner_Plan
105 If the debt-to-GDP ratio exceeded the 60 per cent limit, it should at least have "sufficiently diminished and must be approaching the reference value at a satisfactory pace".
106 More precisely, ten-year government bond yields close to the EU average.
107 The no-bailout clause was initially in the 1993 Maastricht Treaty and later in the 2009 Lisbon Treaty that encompasses and amends the Maastricht Treaty.

…

The Bank of England could buy the bonds of the new British Investment Bank, simultaneously providing more effective monetary stimulus and improving businesses’ access to credit, as Adam Posen, a former member of the Bank of England’s monetary policy committee, has advocated.
441 The government has already published a National Infrastructure Plan, but has so far done little actual investment. https://www.gov.uk/government/uploads/system/uploads/attachment_data/file/209279/PU1524_IUK_new_template.pdf
442 Kevin Cahill, Who Owns the World: The Hidden Facts Behind Landownership, Mainstream, 2006
443 http://en.wikipedia.org/wiki/List_of_elected_hereditary_peers_under_the_House_of_Lords_Act_1999
444 Simon Tilford, "Why British prosperity is hobbled by a rigged land market", Centre for European Reform, 13 February 2013 http://centreforeuropeanreform.blogspot.co.uk/2013/02/why-british-prosperity-is-hobbled-by.html
445 Idem
446 Idem
447 Idem
448 http://www.economist.com/news/finance-and-economics/21592646-monetary-policy-may-call-end-house-price-party-castles-made-sand
449 Idem
450 http://www.theguardian.com/commentisfree/2013/sep/25/merkel-germany-europe-tortoise-us-china
451 http://www.ft.com/cms/s/0/4f975822-1405-11e3-9289-00144feabdc0.html
452 http://www.economist.com/node/21552567
453 Eurostat, gross domestic product at market prices, volume, index 2005 =100.

., “Immune Neglect: A Source of Durability Bias in Affective Forecasting,” Journal of Personality and Social Psychology 75(3) (1998): 617. For misforecasting in consumer contexts, see V. M. Patrick, D. J. MacInnis, and C. W. Park, “Not as Happy as I Thought I’d Be? Affective Misforecasting and Product Evaluations,” Journal of Consumer Research 33(4) (2007): 479–89. For a more reader-friendly version, see https://en.wikipedia.org/wiki/Affective_forecasting.
we . . . give . . . negative events from . . . past a positive spin: See A. Keinan and R. Kivetz, “Productivity Orientation and the Consumption of Collectable Experiences,” Journal of Consumer Research 37(6) (2011): 935–50.
It is precisely because: For findings on how women are less willing to have another child during childbirth, but change their mind later, see J.

…

Norton, 2012), and J. M. Schwartz, and S. Begley, The Mind and the Brain (New York: Springer Science and Business Media, 2009).
100,000 students on January 1, 2016: Projection based on expected growth in number of enrolled learners in the course.
the world’s most popular MOOC: Coursera is an initiative of Stanford University to democratize education. You can learn more about it by going to: https://en.wikipedia.org/wiki/Coursera.
top-ten list of Coursera courses: In terms of number of “active learners” (which refers to the number of students who have watched at least one lecture).
class-central.com: See https://www.class-central.com/provider/coursera?sort=rating-up. As of October 27, 2015, the course ranked #4 of all Coursera courses offered up until that point.
I regularly get e-mails from students: You can read many of the reviews for the course by going to www.class-central.com/mooc/2860/coursera-a-life-of-happiness-and-fulfillment#course-all-reviews.

…

the field of positive psychology: For more on the origins and objectives of positive psychology, see M. E. Seligman, T. A. Steen, N. Park, and C. Peterson, “Positive Psychology Progress: Empirical Validation of Interventions,” American Psychologist 60(5) (2005): 410–21, and S. L. Gable and J. Haidt, “What (and Why) Is Positive Psychology?” Review of General Psychology 9(2) (2005): 103–10. For a more user-friendly version, see https://en.wikipedia.org/wiki/Positive_psychology.
the tendency to find closure or meaning: Work by Pennebaker and others suggests that the attempt to find meaning and closure for events, even negative ones, helps improve happiness levels. See J. W. Pennebaker, “Putting Stress into Words: Health, Linguistic, and Therapeutic Implications,” Behaviour Research and Therapy 31(6) (1993): 539–48. For related research, see J.

It’s incredibly easy to sign up—you use your Facebook account—and your landing page is great because Pinterest suggests people for you to follow and fills your page with lovely images that you care about.
Here’s a tip to help ensure you experience what new users experience: when you hit feature complete and again when you hit code complete, make sure you delete all your data and accounts and start from scratch.
* * *
[3] http://en.wikipedia.org/wiki/Uncertainty_principle
Chapter 6. How to Measure Greatness
YOU CAN FREQUENTLY ASSESS the quality of a team by the quality of their metrics. Metrics are the lifeblood of a team lead because everything in your job is a negotiation, and metrics provide a rational foundation for discussion. If you don’t back up your statements with metrics, you’ll sound like Animal the Muppet. You also need metrics because you are constantly making judgment calls, and good data creates good (or at least defensible) judgment.

…

Let’s all get together with the boss and get on the same page.
We’re having a good time. We made these fun demos!
Sounds good. (…and go talk to senior management. There’s no point in asking a team that’s happily playing catch to win the World Series unless that’s actually the stated goal.)
Thank God you’re here.
You’re welcome. What did the last person do that helped you so much?
* * *
[4] http://en.wikipedia.org/wiki/MacArthur_Maze
Chapter 9. How to Build Great, Shippable Technology
IF YOU WANT TO ship a great product quickly, you must be able to ask insightful questions, provide good directional guidance, and make smart technical decisions about what you must build now and what you can build later. You must also be able to evaluate and hire engineering managers. Therefore, you must understand your technology at least as well as you understand the oil in your car.

…

Just as we discussed having the answer service and the decider service return results independently, you too should ask if there are parts of the system that can be decoupled. For example, if you can load the advertising separately, such that those systems can function fully independently, you’ll have a much more resilient system, and users will be able to complete their primary task even if the advertising system is broken.
* * *
[5] http://en.wikipedia.org/wiki/Moore%27s_law
Chapter 10. How to Be a Great Shipping Communicator
IF YOU ARE TRYING to ship software, you almost certainly have a ton of information to disseminate, statuses to gather, checkups to perform, and other details to sweat. You’re going to need to send a lot of email and run a lot of meetings. That’s the bad news, but it’s why they pay you. The good news is that it’s not hard to be great at either one, if you have a little technique.

A striking bit of data from the Cleveland Clinic’s experience . . . James Merlino, Service Fanatics: How to Build Superior Patient Experience the Cleveland Clinic Way (McGraw Hill Education, 2015).
CHAPTER SIX
The F-4 Phantom fighter jet . . . See http://web.archive.org/web/20110604105623/http://www.boeing.com/defense-space/military/f4/firsts.htm. Also http://en.wikipedia.org/wiki/McDonnell_Douglas_F-4_Phantom_II, which directs to various statistical sources.
Their top-of-the-line plane, the MiG-21 . . . See http://en.wikipedia.org/wiki/Mikoyan-Gurevich_MiG-21.
In the first few years of the Vietnam War . . . Description of the history and operations of the Navy Fighter Weapons School, and later quotations from “Mugs” McKeown, are from “‘You Fight Like You Train’ and TOP GUN Crews Train Hard,” Armed Forces Journal International, May 1974, pp. 25–26, 34.

…

CHAPTER SEVEN
Paul Azinger had two problems . . . Azinger tells the story of captaining the 2008 U.S. Ryder Cup team in Cracking the Code (Looking Glass Books, 2010), which he cowrote with Ron Braund, a clinical therapist who helped him devise his strategy.
They had lost five of the six previous tournaments . . . Data on Ryder Cup history and players are from www.rydercup.com and http://en.wikipedia.org/wiki/Ryder_Cup.
His doctors had ordered him not to play . . . Reported in Hank Haney, The Big Miss: My Years Coaching Tiger Woods (Three Rivers Press, 2012).
“No grand idea was ever born in a conference . . .” http://classiclit.about.com/od/fitzgeraldfsco/a/F-Scott-Fitzgerald-Quotes_2.htm.
Or as the great ad man David Ogilvy put it . . . Reported in Kenneth Roman, The King of Madison Avenue: David Ogilvy and the Making of Modern Advertising (Palgrave Macmillan, 2009).

Curtis Karnow, “The Application of Traditional Tort Theory to Embodied Machine Intelligence,” paper presented at the Robotics and Law Conference, Center for Internet and Society, Stanford Law School, April 2013. Also see the blog of the Artificial Intelligence and Robotics Committee of the American Bar Association, http://apps.americanbar.org/dch/committee.cfm?com=ST248008.
The certification approach for software on life-critical systems: See, for example, DO-178B, the software certification standard required by the FAA: http://en.wikipedia.org/wiki/DO-178B.
define levels of automation in cars: Erik Stayton, “Driverless Dreams: Narratives, Ideologies, and the Shape of the Automated Car,” Thesis, Massachusetts Institute of Technology, 2015.
“Navy Drones with a Mind of Their Own”: James Paduano, et al., “TALOS: An Unmanned Cargo Delivery System for Rotorcraft Landing to Unprepared Sites.” Submitted to American Helicopter Society 2015 Annual Forum, May 2015.

Peter Coy, “FAQ: Reinhart, Rogoff, and the Excel Error That Changed History,” Bloomberg Business website, April 18, 2013, http://www.bloomberg.com/
bw/articles/2013‑04‑18/­faq-​­reinhart-​­rogoff-​­and-​­the-​­excel-​­error-​­that-​­changed
-​­history.
29. “Wikipedia: About,” Wikipedia, accessed June 13, 2015, https://en.wikipedia
.org/wiki/Wikipedia:About.
30. That said, even when the data does come from a trusted media source, you
should at least recognize the fact that a few large media conglomerates are
responsible for much of the news and entertainment you consume on a daily
basis, which could have a significant effect on what you see and hear.
31. “Ten Things You May Not Know About Wikipedia,” Wikipedia, accessed June
13, 2015, https://en.wikipedia.org/wiki/Wikipedia:Ten_things_you_may_not
_know_about_Wikipedia#You_can.27t_actually_change_anything_in_Wikipedia
.E2.80.A6.
32. “Food Product Dating,” United States Department of Agriculture website,
accessed June 16, 2015, http://www.fsis.usda.gov/wps/portal/fsis/topics/­food
-​­safety-​­education/­g et-​­answers/­f ood-​­safety-​­fact-​­sheets/­f ood-​­labeling/­f ood
-​­product-​­dating/­food-​­product-​­dating.
33.

…

Wisegeek website, accessed August 11,
2015, http://www.wisegeek.com/­what-​­does-​­cherry-​­picking-​­mean.htm.
9. Edward J. Fox and Stephen J. Hoch, “­Cherry-​­Picking,” Journal of Marketing 69,
no. 1 (2005): 46–62.
10. John Allen Paulos, “Why Do We Believe That Catastrophes Come in Threes?,”
ABC News website, July 5, 2009, http://abcnews.go.com/Technology/Whos
Counting/story?id=7988416.
11. “2009: Deaths,” Wikipedia website, accessed April 25, 2015, http://en.wikipedia.org/
wiki/2009#Deaths. And no, we don’t recommend Wikipedia as a primary source.
12. And, in case you’re wondering, the three teams that won game one and
went on to win the World Series were the ’87 Twins, ’84 Tigers, and the ’80
Phillies. “1988 World ­Series-​­Game 1‑Bottom of the 9th,” Dailymotion
website, accessed April 25, 2015, http://www.dailymotion.com/video/­xd2fhk_1988
-​­world-​­series-​­game‑1‑­bottom-​­of_sport.
13.

The New Yorker, January 25, 2013. http://www.newyorker.com/online/blogs/books/2013/01/what-nate-silver-gets-wrong.html.
Information about David Heinemeier Hansson comes from the following websites:
• David Heinemeier Hanson. http://david.heinemeierhansson.com/.
• Lindberg, Oliver. “The Secrets Behind 37signals’ Success.” TechRadar, September 6, 2010. http://www.techradar.com/us/news/internet/the-secrets-behind-37signals-success-712499.
• “OAK Racing.” Wikipedia. http://en.wikipedia.org/wiki/OAK_Racing.
For more on John Doerr’s deals: “John Doerr.” Forbes. http://www.forbes.com/profile/john-doerr/.
The $3.3 billion net worth of John Doerr was retrieved from the following Forbes.com profile page on April 10, 2014: http://www.forbes.com/profile/john-doerr/.
“We are in the early throes of a Great Restructuring” and “Our technologies are racing ahead”: from page 9 of Brynjolfsson, Erik, and Andrew McAfee.

…

“I’ll choose my targets with care”: Ibid., 14.
A Psychological Argument for Depth
For more on the experience sampling method, read the original article here:
Larson, Reed, and Mihaly Csikszentmihalyi. “The Experience Sampling Method.” New Directions for Methodology of Social & Behavioral Science. 15 (1983): 41-56.
You can also find a short summary of the technique at Wikipedia: http://en.wikipedia.org/wiki/Experience_sampling_method.
“The best moments usually occur”: from page 3 of Csikszentmihalyi, Flow.
“Ironically, jobs are actually easier to enjoy”: Ibid., 162.
“jobs should be redesigned”: Ibid., 157.
A Philosophical Argument for Depth
“The world used to be”: from page xi of Dreyfus, Hubert, and Sean Dorrance Kelly. All Things Shining: Reading the Western Classics to Find Meaning in a Secular Age.

…

Richard Koch’s 1998 book, The 80/20 Principle (New York: Crown, 1998), seems to have helped reintroduce the idea to a business market. Tim Ferriss’s 2007 mega-seller, The 4-Hour Workweek (New York: Crown, 2007), popularized it further, especially among the technology entrepreneur community. The Wikipedia page on the Pareto principle has a good summary of various places where this general idea applies (I drew many of my examples from here): http://en.wikipedia.org/wiki/Pareto_principle.
Quit Social Media
“Everything’s more exciting when it’s a party” and general information on Ryan Nicodemus’s “packing party”: “Day 3: Packing Party.” The Minimalists. http://www.theminimalists.com/21days/day3/.
Average number of Twitter followers statistic comes from: “Average Twitter User Is an American Woman with an iPhone and 208 Followers.” Telegraph, October 11, 2012. http://www.telegraph.co.uk/technology/news/9601327/Average-Twitter-user-is-an-an-American-woman-with-an-iPhone-and-208-followers.html.

Photo by David Levinson.
134 It has been suggested that Daimler Benz subsidizes Car2Go in the US, using Smart Fortwo vehicles because it gives them credit on the Corporate Average Fuel Economy (CAFE) standards regulating automakers average fleet fuel economy.
135 Boies, Adam (2016) Electrification and Alternative Fuels (Chapter 6) in Levinson, David; Boies, Adam; Cao, Jason; Fan, Yingling. (2016). The Transportation Futures Project: Planning for Technology Change. Center for Transportation Studies, University of Minnesota. Retrieved from the University of Minnesota Digital Conservancy, http://hdl.handle.net/11299/177640.
136 The standard for EV charging in North America is SAE J1772 https://en.wikipedia.org/wiki/SAE_J1772. The standards for fast chargers (superchargers) are still more up in the air. The Tesla Supercharger is not compatible with others e.g. See Kane, Mark (2013) "DC Quick Charging Battle Just Beginning: CHAdeMO Vs. SAE Combo Vs. Tesla Supercharger" InsideEVs http://insideevs.com/dc-quick-charging-battle-just-beginning-chademo-vs-sae-combo-vs-tesla-supercharger/
137 Battery swap was first proposed in 1900 by L.R.

…

Source US Census Statistical Abstract http://www.census.gov/prod/2/gen/96statab/app4.pdf and US Federal Highway Administration: Highway Statistics http://www.fhwa.dot.gov/policyinformation/statistics/2012/vmt422c.cfm
223 See: http://www.strongtowns.org/journal/2015/3/2/transportations-missing-middle
224 See taxonomy of modes at: http://transportationist.org/category/transportation/
225 Car seats that fit your children is another factor of personal space that favors ownership.
226 List of metros, see: http://en.wikipedia.org/wiki/List_of_metro_systems
227 Like anything, different surveys with different assumptions produce different transit mode shares. For a comparison see Polzin, S. E., & Chu, X. (2005). A closer look at public transportation mode share trends. Journal of Transportation and Statistics, 8(3), 41-53. Current numbers are reported by the US Bureau of Transportation Statistics, National Transportation Statistics, Table 1-41 "Principal Means of Transportation to Work" http://www.rita.dot.gov/bts/sites/rita.dot.gov.bts/files/publications/national_transportation_statistics/html/table_01_41.html
228 Expenditure data from 1995 to 2009 can be found US Bureau of Transportation Statistics, National Transportation Statistics, Table 3-35 "Transportation Expenditures by Mode and Level of Government from Own Funds, Fiscal Year" http://www.rita.dot.gov/bts/sites/rita.dot.gov.bts/files/publications/national_transportation_statistics/html/table_03_35.html
229 Other simple traffic engineering tools to make on-road transit move faster include location of stops so that vehicles stay in the lane (admittedly blocking cars), but board via all doors simultaneously, with all passengers having prepaid or paying on-board electronically, thereby greatly speeding boarding times (most time is lost in payment).

See also the History Channel, “Sandhogs”: http://www.thehistorychannel.co.uk/shows/tunnellers/episode-guide.html.
123 tunnel-boring machines: http://www.nyc.gov/html/dep/pdf/tbmfactsheet.pdf. See also Sewell Chan, “Tunnelers Hit Something Big: A Milestone,” New York Times, August 10, 2006.
123 corruption plagued the Board of Water Supply: Grann, “City of Water.” This was confirmed to me by a source who asked not to be identified.
123 $4 billion to the new tunnel: Chan, “Tunnelers Hit Something Big.”
124 the world had 18 “megacities”: Wikipedia: http://en.wikipedia.org/wiki/Megacity.
124 In 2007, 336 cities worldwide: Ibid., and Thomas Brinkhof, “The Principal Agglomerations of the World,” www.citypopulation.de.
124 in 2008, for the first time in history: UN Population Fund (UNFPA): State of World Population 2007: http://www.unfpa.org/swp/2007/english/introduction.html.
124 As of 2010, China alone had 43 cities: Christina Larson, “Chicago on the Yangtze,” Foreign Policy, September/October 2010.
125 Bruce Rolen: “As supplies dry up, growers pass on farming and sell water,” US Water News Online, February 2008.
125 Perth, Australia: Patrick Barta, “Amid Water Shortage, Australia Looks to the Sea,” Wall Street Journal, March 11, 2008.
125 America’s total water use: Susan S.

Strong force: Fundamental force, responsible for binding quarks and antiquarks to make hadrons, and gripping protons and neutrons in atomic nuclei; described by QCD theory.
SU2, SU3, and U1: SU2 is an example of the “special unitary group” of 2 × 2
unitary matrices (i.e., the sum of their diagonal members is zero—“traceless”—and their determinant is one). SU3 analogously involves 3 × 3 matrices. See “special unitary group” at http://en.wikipedia.org/wiki/Special
_unitary_group. For U1, see http://en.wikipedia.org/wiki/Unitary_group.
For simple examples of matrices, see pages 112 and 114 of The New Cosmic
Onion by Frank Close.
SUSY (supersymmetry): Theory uniting fermions and bosons, where every
known particle is partnered by a (yet to be discovered) particle whose spin
differs from it by one-half.
Symmetry: If a theory or process does not change when certain operations are
performed on it, then we say that it possesses a symmetry with respect to
those operations.

…

Polyakov, e-mail to the author, September 17, 2010.
21. A. Migdal and A. Polyakov, November 1965, English version published
in Soviet Physics, vol. 24, p. 91 (1967). Their paper makes no mention of Higgs
or the others in this chapter.
22. G. Guralnik, e-mail to the author, November 16, 2010. Gilbert’s paper
is D. G. Boulware and W. Gilbert, Physical Review, vol. 126, p. 1563 (1962).
23. Guralnik’s memoir is available at http://en.wikipedia.org/wiki/Higgs
_mechanism and Gerald S. Guralnik, “The History of the Guralnik, Hagen,
and Kibble Development of the Theory of Spontaneous Symmetry Breaking
and Gauge Particles,” International Journal of Modern Physics, vol. A24, p. 2601
(2009). Quotes are from this and the letter to the CERN Courier, December 8
2008, http://cerncourier.com/cws/article/cern/36683.
24. G. Guralnik, e-mail to the author, November 16, 2010.
25.

…

Llewellyn Smith, interview by the author, March 11, 2010.
21. Llewellyn Smith, Nature, vol. 448, p. 281 (2007).
22. Llewellyn Smith, interview by the author, March 11, 2010.
23. Llewellyn Smith, Nature, vol. 448, p. 281 (2007).
24. Llewellyn Smith, interview by the author, March 11, 2010.
chapter 
1. Technicolor theory blossomed in the mid-1970s. For a description and
list of references, see http://en.wikipedia.org/wiki/Technicolor_(physics).
2. I am using Higgs Boson as shorthand for whatever manifestation(s) of
the ﬁeld nature may present to us.
3. As an electron accelerator. In the 1970s SLAC provided beams for
SPEAR, which broke new ground in the ﬁeld of electron-positron annihilation,
notably with the discovery of charm and of the tau lepton. In the 1990s its
very high-energy electron-positron collisions enabled study of the Z 0.
4.

ora: Simulating Search Engines with Lynx
The Lynx browser is a free, open source, text-mode browser that sees web pages like search engine crawlers do; that is, it sees only the textual portion of the page. A Lynx viewer is a web-based service designed to view web pages using the Lynx browser. Lynx notation is largely self-explanatory, but note that Lynx indicates a link by using a bracket around the number of the link on the page; for example, [2] signifies the second link on a page. For more information on Lynx see http://en.wikipedia.org/wiki/Lynx_(web_browser) and http://www.yellowpipe.com/yis/tools/ (includes a Lynx viewer).
As a comparison to the earlier view, the HTML for the old home page began like this:
<HTML> <HEAD> <TITLE>Dr. Ken Cirka, DMD</TITLE> <LINK REL="StyleSheet" HREF="/style.css" TYPE="text/css"> <meta name="Description" content="Five star service in dental care is abundant in Dr. Cirka's cosmetic and general dentistry office in Center City Philadelphia

…

Although this may improve speed and remove some bottlenecks in parallel requests, the impact on servers is yet to be fully understood. Given the likely changes in simultaneous request restrictions, developers should proceed with caution.
Given the previous discussion of utilizing additional domains to increase image request parallelization, you might be tempted to use the same trick here, but it will not work. You see, Ajax falls under the security policy known as the Same-Origin Policy (http://en.wikipedia.org/wiki/Same_origin_policy), which limits you to making requests from the same domain name that served the page.
There is currently no way around the two-requests-at-a-time limit to a single fully qualified domain name when making a standard XHR request. Of course, if you use a script tag communication mechanism, you won't have this problem, but as you are no longer using an XHR, you won't have as much control over the request and response.

…

This turns on the following styles:
/* Dynamically enabled classes (artz_tabbox_init) */ .artz .artz-tb .tabs h3, .artz .artz-tb .tabs .tab {display:none;} .artz .artz-tb .tabs .on, .artz .dtabs {display: inline;}
So, if you do not have JavaScript, the artz class never gets applied, and thus these styles never get applied. The beauty of this technique is that all of the CSS stays in the CSS, and JavaScript toggles accessibility and applies the artz class that controls visibility. The following code does that trick:
tb.parentNode.className+=' artz'; tb.className+=' artz';
For a working example and other accessible progressive enhancement techniques, see http://www.artzstudio.com/artz/ and http://en.wikipedia.org/wiki/Progressive_enhancement.
Load JavaScript on demand (remote procedure calls)
A common Ajax pattern is to load resources on demand as they are needed. You can do the same using only JavaScript without the need for Ajax. Using the DOM you can create a script element and append it to the head element, like this:
function include_js(file) { if(document.getElementByTagName) { var html_doc = document.getElementsByTagName('head')[0]; var js = document.createElement('script'); js.setAttribute('src', file); js.setAttribute('type', 'text/javascript'); html_doc.appendChild(js); js.onreadystatechange = function ( ) { // for IE if (js.readyState == 'complete') { alert('JS onreadystate fired'); // return true; } } js.onload = function ( ) { // for non-IE alert('JS onload fired'); // return true; } return false; } else alert('getElementsByTagName not supported'); } ...

Maslow’s hierarchy of needs is another concept without basis from the psychology domain.1
The same goes for Bloom’s Taxonomy in the area of learning.2
The Three Laws of Robotics is a pure science fiction creation from Isaac
Asimov.3
In the area of Web searching, there is no theoretical grounding for the informational-navigational-transactional categories [33]. In each of these areas,
however, the paradigms caught on and shaped future thought, practice, and
research.
â•‡ http://en.wikipedia.org/wiki/Maslow’s_hierarchy_of_needs
â•‡ http://en.wikipedia.org/wiki/Bloom’s_Taxonomy
3
â•‡ http://en.wikipedia.org/wiki/Three_Laws_of_Robotics
1
2
So, what could account for this widely accepted model not accurately describing
actual consumer behavior?
One possible explanation is the principle of least effort [10].
Built on information-processing theory [21, 22], the buying funnel is a rational
process that assumes potential consumers act rationally and expend resources to
find the optimal solution.

…

., filthy words) are seven English words that the
American comedian George Carlin used in a 1972 monologue, “Seven Words You
Can’t Say on Television.”
The seven words became symbolic of both the U.S. government regulation of the
national airwaves and efforts to limit lurid content during family television-viewing
time, illustrating the impact and varied meaning that these terms can have.
http://en.wikipedia.org/wiki/Seven_dirty_words
A quick note on terminology: A keyphrase is a set of one or more keywords that
an advertiser selects to trigger an ad. The ad is triggered when a searcher enters a
query that matches the keyphrase. A query is a set of one or more terms (a.k.a., keyterms) submitted by a searcher to a search engine.
So, we are talking about the same concept, except from different perspectives, as
shown Table 3.1.

Examples:
1 becomes “1st”.
2 becomes “2nd”.
3 becomes “3rd”.
254 becomes “254th”.
You can pass in either an integer or a string representation of an integer.
Markup Filters
The package django.contrib.markup includes a handful of Django template filters, each of which implements a common markup languages:
textile: Implements Textile (http://en.wikipedia.org/wiki/Textile_%28markup_language%29)
markdown: Implements Markdown (http://en.wikipedia.org/wiki/Markdown)
restructuredtext: Implements ReStructured Text (http://en.wikipedia.org/wiki/ReStructuredText)
In each case, the filter expects formatted markup as a string and returns a string representing the marked-up text. For example, the textile filter converts text that is marked up in Textile format to HTML:
{% load markup %} {{ object.content|textile }}
To activate these filters, add 'django.contrib.markup' to your INSTALLED_APPS setting.

…

(This happens because CsrfMiddleware uses a regular expression to add the csrfmiddlewaretoken field to your HTML before the page is sent to the client, and the regular expression sometimes cannot handle wacky HTML.) If you suspect this might be happening, just view the source in your Web browser to see whether csrfmiddlewaretoken was inserted into your <form>.
For more CSRF information and examples, visit http://en.wikipedia.org/wiki/CSRF
Humanizing Data
The package django.contrib.humanize holds a set of Django template filters useful for adding a “human touch” to data. To activate these filters, add 'django.contrib.humanize' to your INSTALLED_APPS. Once you’ve done that, use {% load humanize %} in a template, and you’ll have access to the filters described in the following sections.
apnumber
For numbers 1 through 9, this filter returns the number spelled out.

In addition to his notable career as a computer programmer, Ward is a capable
electrical engineer who enjoys building weekend projects at home to share with the
local Dorkbot group in Portland, Oregon.
Steven Osborn: So Ward, have you always had this natural curiosity for
inventing things?
Ward Cunningham: Yeah, absolutely. I tell people I’m a child of the Sputnik
era. The Sputnik era was when kids that showed any interest in math and
science or technology were really encouraged, even if that interest was a little
1
en.wikipedia.org/wiki/Software_design_pattern
en.wikipedia.org/wiki/Extreme_programming
2
178
Chapter 14 | Ward Cunningham: Inventor, Wiki
dangerous—playing with electricity, high voltages, throwing sparks, things like
that. I would discourage my children from doing those things, but my parents
didn’t discourage me. I have an older brother who was really the kind of mad
scientist personality in high school. He had friends that formed a network
where they’d hear about things and do experiments, and I was the younger
brother tagging along.

…

The boards
have very focused reasons for them, and I really like those. Every now and
then I see weird things on the silk screen and want to know more. There
was one that was a time-travel controller. I would have liked to hear the story
behind that. I don’t know what it is.
Osborn: Did it have a flux capacitor?6
Laen: A big flux capacitor.
Osborn: Was it surface-mount or through a hole?
5
www.wayneandlayne.com
http://en.wikipedia.org/wiki/DeLorean_time_machine#Flux_capacitor
6
Makers at Work
Laen: It was 1980s tech, so it was through a hole.
Osborn: Oh, that’s good. At least they kept it real.
Laen: I see a lot of people make different effects pedals, like guitar effects
pedals. I think that’s very cool. There’s a DJ in Ontario who made this custom
all-in-one MIDI effects project. It was the biggest board I’ve had in the order
so far.

…

Lesnet: I discourage people overall from trying to do a garage manufacturing
line because running a pick-and-place machine is a whole industry unto itself.
Being an engineer and running a pick-and-place machine are two different jobs.
What you end up doing is getting into the pick-and-place business if you buy
one. Suddenly, you spend six months learning how to use the machine, how to
5
http://en.wikipedia.org/wiki/Maneki-neko
273
274
Chapter 20 | Ian Lesnet: Slashdot Troll, Dangerous Prototypes
calibrate it, how to care for it, how to get usable results out of it. Then you’re
not designing hardware anymore. You’re running a pick-and-place machine.
I know a lot of people who have bought machines and spent six months getting them up and running and then still have to use a contract manufacturer
because the yield is so poor.

Much of the discussion of the DMCA is drawn from the Electronic Frontier Foundation (2003).
14. Ibid., at http://www.eff.org/IP/DMCA/20030102 dmca unintended consequences.
html (accessed February 24, 2008).
15. Ibid.
16. At http://en.wikipedia.org/wiki/Grokster on August 20, 2007. As Wikipedia’s content is often modified, this exact text may not be there at a later date.
17. U.S. Supreme Court in Metro-Goldwyn-Mayer Studios Inc. v. Grokster, Ltd. , June 27, 2005. Page varies by source. Available onlines at http://w2.eff.org/IP/P2P/MGM
v Grokster/04-480.pdf (accessed February 24, 2008).
18. From Mark Cuban’s blog, at http://www.blogmaverick.com/entry/
1234000230037801/ (accessed February 23, 2007).
19. At http://en.wikipedia.org/wiki/Grokster, on August 20, 2007.
20. Boynton (2004).
21. Senator Fritz Hollings’s Consumer Broadband and Digital Television Promotion Act, S. 2048.

…

He named it the “steam carriage” and was legally barred from developing it by Boulton and Watt’s successful addition of the high-pressure engine to their patent, though Boulton and Watt never spent a cent to develop it. For the details of this story, readers should see the Web site Cotton Times, at http://www.cottontimes.co.uk/ (accessed February 23, 2008), or Carnegie (1905), pp. 140–1. The “William Murdoch” entry in Wikipedia, at http://en.wikipedia.org/
wiki/William Murdoch (accessed February 23, 2008), provides a good summary.
More generally, various researchers directly connect Murdoch to Trevithick, who is now considered the official inventor (in 1802) of the high-pressure engine. Quite plainly, the evidence suggests that Boulton and Watt’s patent retarded development of the high-pressure steam engine, and thus economic development, by about sixteen years.
6.

…

Apart from Dutfield (2003), see also Seckelmann (2001) for additional details about the German patent system at the end of the nineteenth century, and Arora, Landau, and Rosenberg (1998) for various historical studies on the growth of the chemical industry.
12. Again, Dutfield (2003), especially Chapters 4 and 5, is our main source of information. Zorina Kahn’s online history of patent laws, at http://eh.net/encyclopedia/
article/khan.patents, provides a useful and easy-to-access summary of the main facts.
13. Quoted [as of February 24, 2008] in http://en.wikipedia.org/wiki/Community patent, on the basis of various media sources, such as http://www.eupolitix.com/
EN/News/200702/7be97fa5-3cb6-403f-aadf-103ad99a9950.htm.
14. To begin learning about the history of the dye industry and the crucial, if not necessarily positive, role patents played in it, see Morris and Travis (1992) and the plenty of references therein. For why patents and monopoly did not allow La Fuchsine to thrive, see Van den Belt (1992).

And we are deeply indebted to the whole crew at our publisher, Basic Books, including Sandra Beris, Michele Jacob, and most particularly Tim Sullivan, the book’s editor, whose skills, imagination, and sly sense of humor made him truly a pleasure to work with—and made this a far better book than it would have otherwise been.
Finally, we’d like to thank the people profiled in this book who were so generous with their time: Jack Hidary, Joi Ito, Tara Lemmey, Ellen Levy, and Yossi Vardi.
Notes
Introduction
1 The term “soul surfer” is used to “describe a talented surfer who surfs for the sheer pleasure of surfing,” Wikipedia, “Soul Surfer,” http://en.wikipedia.org/wiki/Soul_Surfer.
2 For more about this billboard, see “What Makes You So Special? With over 1 Million People in the World Able to Do Your Job, Altium Acts to Help More,” Reuters, April 20, 2009, http://www.reuters.com/article/pressRelease/idUS180975+20-Apr-2009+MW20090420.
3 Jeff Mull, “Clear to Land: Dusty Payne Wins Kustom Air Strike and $50,000,” Surfer magazine, April 2009, http://www.surfermag.com/features/onlineexclusives/dusty_payne_wins_kustom_air_strike_and_50000/.
4 Creative talent is increasingly flocking to creative cities.

…

Chapter 2
1 See Joshua Davis, “Secret Geek A-Team Hacks Back, Defends Worldwide Web,” Wired, November 24, 2008.
2 This account is drawn from conversations and e-mail exchanges with Joi Ito and other people who were involved in this effort to support the protest movement’s freedom of expression.
3 Dunbar fixed his number at approximately 150 people, but field studies performed by anthropologists H. Russell Bernard and Peter Killworth put the number at 290, roughly double Dunbar’s estimate. See Wikipedia article at http://en.wikipedia.org/wiki/Dunbar’s_number#Alternative_numbers.
4 This widely cited quote can be found in many places, including Charles G. Sieloff, “‘If Only HP Knew What HP Knows’: The Roots of Knowledge Management at Hewlett-Packard,” Journal of Knowledge Management 3, no. 1 (1999): 47-53.
5 “Performance fabrics weave together both business elements (e.g., techniques for building shared meaning and trust) and technology elements (e.g., architectures and technology tools) to simplify, strengthen, and amplify relationships among relevant stakeholders across enterprises, thereby enhancing the potential for productive collaboration across a large number of specialized entities.”

…

Chapter 6
1 Details about Shai Agassi’s early days at SAP and his later work at Better Place are drawn in part from Daniel Roth, “Driven: Shai Agassi’s Audacious Plan to Put Electric Cars on the Road,” Wired, August 18, 2008.
2 Trailing his hand in the wave was the spontaneous innovation made by Laird Hamilton while surfing a “death-defying” wave in Teahupoo, Tahiti, in August 2000. See Wikipedia entry for Laird Hamilton, http://en.wikipedia.org/wiki/Laird_Hamilton.
3 See Shai Agassi, “I LOVE Open Source—Really!” SAP Network Blogs, November 11, 2005, https://www.sdn.sap.com/irj/scn/weblogs?blog=/pub/wlg/1700.
4 See John Hagel III, John Seely Brown, and Lang Davison, The 2009 Shift Index: Measuring the Forces of Long-Term Change (San Jose, Calif.: Deloitte Development, June 2009).
5 See Daniel Pink, Free Agent Nation (New York: Warner Books, 2001).
6 Tara Lemmey, interview with the authors, July 10, 2009.
7 Note that what we’re advocating here flips “strategic HR” on its head.

This argument has been made most forcefully by Donald Green and Ian Shapiro, who argue that when “everything from conscious calculation to ‘cultural inertia’ may be squared with some variant of rational choice theory … our disagreement becomes merely semantic, and rational choice theory is nothing but an ever-expanding tent in which to house every plausible proposition advanced by anthropology, sociology, or social psychology.” (Green and Shapiro, 2005, p. 76).
CHAPTER 3: THE WISDOM (AND MADNESS) OF CROWDS
1. See Riding (2005) for the statistic about visitors. See http://en.wikipedia.org/wiki/Mona_Lisa for other entertaining details about the Mona Lisa.
2. See Clark (1973, p. 150).
3. See Sassoon (2001).
4. See Tucker (1999) for the full article on Harry Potter. See (Nielsen 2009) for details of their Facebook analysis. See Barnes (2009) for the story on movies.
5. For the story about changes in consumer behavior postrecession, see Goodman (2009). Bruce Mayhew (1980) and Frank Dobbin (1994) have both made a similar argument about circular reasoning.
6.

…

In early 2010, the market capitalization of Google was around $160B, but it has fluctuated as high as $220B. See Makridakis, Hogarth, and Gaba (2009a) and Taleb (2007) for lengthier descriptions of these and other missed predictions. See Lowenstein (2000) for the full story of Long-Term Capital Management.
6. Newton’s quote is taken from Janiak (2004, p. 41).
7. The Laplace quote is taken from http://en.wikipedia.org/wiki/Laplace’s-demon.
8. Lumping all processes into two coarse categories is a vast oversimplification of reality, as the “complexity” of a process is not a sufficiently well understood property to be assigned anything like a single number. It’s also a somewhat arbitrary one, as there’s no clear definition of when a process is complex enough to be called complex. In an elegant essay, Warren Weaver, then vice president of the Rockefeller Foundation, differentiated between what he called disorganized and organized complexity (Weaver 1958), where the former correspond to systems of very large numbers of independent entities, like molecules in a gas.

…

In particular, Leonard Lodish and colleagues conducted a series of advertising experiments, mostly in the early 1990s using split cable TV (Abraham and Lodish 1990; Lodish et al. 1995a; Lodish et al. 1995b; and Hu et al. 2007). Also see Bertrand et al. (2010) for an example of a direct-mail advertising experiment. Curiously, however, the practice of routinely including control groups in advertising campaigns, for TV, word-of-mouth, and even brand advertising, never caught on, and these days it is mostly overlooked in favor of statistical models, often called “marketing mix models” (http://en.wikipedia.org/wiki/Marketing_mix_modeling).
19. See, for example, a recent Harvard Business School article by the president and CEO of comScore (Abraham 2008). Curiously, the author was one of Lodish’s colleagues who worked on the split-cable TV experiments.
20. User anonymity was maintained throughout the experiment by using a third-party service to match Yahoo! and retailer IDs without disclosing individual identities to the researchers.

Special thanks to MIT president Paul Gray, who supported me far beyond what I deserved and taught me that MIT has viscosity. You get things done as long as you keep pushing.
14 Locke and Latham, “New Directions in Goal-Setting Theory.”
15 It was my dear friend Gregg Maryniak who first introduced me to this story. As it has been fundamental to my success, a deep debt of gratitude is owed.
16 Wikipedia does a great job with the history of “stone soup,” see http://en.wikipedia.org/wiki/Stone_Soup. Also see Marcia Brown, Stone Soup (New York: Aladdin Picture Books), 1997.
17 AI with Hagel.
18 John Hagel, “Pursuing Passion,” Edge Perspectives with John Hagel, November 14, 2009, http://edgeperspectives.typepad.com/edge_perspectives/2009/11/pursuing-passion.html.
19 Gregory Berns, “In Hard Times, Fear Can Impair Decision Making,” New York Times, December 6, 2008.
Chapter Six: Billionaire Wisdom: Thinking at Scale
1 Elon Musk, “The Rocket Scientist Model for Iron Man,” Time, http://content.time.com/time/video/player/0,32068,81836143001_1987904,00.html.
2 Unless otherwise noted, historical details and Musk quotes come from a series of AIs between 2012 and 2014.
3 AI, XPRIZE Adventure Trip, February 2013.
4 Thomas Owen, “Tesla’s Elon Musk: ‘I Ran Out of Cash,’ ” VentureBeat, May 2010, http://venturebeat.com/2010/05/27/elon-musk-personal-finances/.
5 Andrew Sorkin, Dealbook: “Elon Musk, of PayPal and Tesla Fame, Is Broke,” New York Times, June 2010, http://dealbook.nytimes.com/2010/06/22/sorkin-elon-musk-of-paypal-and-tesla-fame-is-broke/?

…

Chapter Nine: Building Communities
1 Clay Shirky, “How cognitive surplus will change the world,” TED, June 2010, https://www.ted.com/talks/clay_shirky_how_cognitive_surplus_will_change_the_world.
2 The term MTP was first described by Salim Ismail in his recent book Exponential Organizations: Why new organizations are ten times better, faster, cheaper than yours (and what to do about it) to describe a unique, powerful, and simple statement of your mission. Google’s MTP is to “Organize the world’s information.” TED’s MTP is “ideas worth spreading.”
3 This is sometimes called Joy’s Law, http://en.wikipedia.org/wiki/Joy’s_Law_(management).
4 For DIY drones, see Chris Anderson, “How I Accidentally Kickstarted the Domestic Drone Boom,” Wired, June 22, 2012, http://www.wired.com/2012/06/ff_drones. For Local Motors, localmotors.com.
5 AI with Gina Bianchini, 2014.
6 Joshua Klein, Reputation Economics: Why Who You Know Is Worth More Than What You Have (New York: Palgrave Macmillan Trade, 2013).
7 All Klein quotes come from an AI with Joshua Klein, 2014.
8 AI with Bianchini.
9 James Glanz, “What Else Lurks Out There?

Ptak describes Erhard as “an avid participant in the ordoliberal mainstream,” Ptak, “Neoliberalism,” 115. Friedrich describes him as “the spokesman for the creed of the neo-liberals in German and European politics.” Freidrich, American Political Science Review 49, 2 (1955): 510.
29. I thank Josef Hien for the details on this important transition period.
30. See the description of the Wirtschaftwunder at http://en.wikipedia.org/wiki/Wirtschaftswunder.
31. Allen, “Underdevelopment,” 271. The fact that all of this was made possible by an astonishingly favorable macroeconomic context—the Bretton Woods international monetary system and American acceptance of an undervalued Deutschmark given Germany’s strategic position in the Cold War—should also be acknowledged. It seldom is, however, especially among German policy makers.
32.

…

Adam Tooze, The Wages of Destruction: The Making and Breaking of the Nazi Economy (New York: Penguin Books, 2006).
56. John Maynard Keynes, “The United States and the Keynes Plan,” New Republic, July 29, 1940, quoted in Bill Janeway, Doing Capitalism in the Innovation Economy (Cambridge: Cambridge University Press, 2012), 254.
57. “From Those Wonderful Folks That Brought You Pearl Harbor” is the title of a book that inspired the TV show Mad Men. See http://en.wikipedia.org/wiki/Jerry_Della_Femina. I use it here not to be funny but because it’s fundamentally accurate. Austerity empowered the Japanese military, and so it brought the world Pearl Harbor.
58. Jonathan Kirshner, Appeasing the Bankers: Financial Caution on the Road to War (Princeton, NJ: Princeton University Press 2007), 62.
59. Yuji Kuronuma, “Showa Depression: A Prescription for ‘Once in a Century’ Crisis.”

Page 136: Wikipedia deletion and restoration Martin Wattenberg and Fernanda B. Viégas’s work on visualizing the history of Wikipedia edits, “History Flow,” is at www.research.ibm.com/visual/projects/history_flow/.
Page 138: Seigenthaler and essjay controversies The Wikipedia articles on the controversy surrounding the John Seigenthaler entry (en.wikipedia.org/wiki/John_Seigenthaler_Sr._Wikipedia_biography_controversy ) and essjay’s faked credentials (en.wikipedia.org/wiki/Essjay_controversy) are surprisingly good, given that one might expect Wikipedians to pull their punches. Nicholas Carr is also worth reading on this subject; Carr, writing at roughtype.com, is the most insightful and incisive of Wikipedia’s critics. One of his posts worth reading on the essjay controversy is “Wikipedia’s credentialism crisis” (www.roughtype.com/archives/2007/03/wikipedias_cred.php) and
Page 140: Ise Shrine Howard Mansfield first noted the linking of the Ise Shrine’s method of construction with its failure to win historic designation from UNESCO in The Same Ax, Twice: Restoration and Renewal in a Throwaway Age, University Press of New England (2000).

…

Page 18: a plausible promise Eric Raymond’s seminal 1997 essay on open source software, “The Cathedral and the Bazaar,” is at catb.org/~esr/writings/cathedral-bazaar/ . Raymond’s writings on software and other topics are at www.catb.org/~esr/writings/ .
Page 22: Within the Context of No Context, George W. S. Trow, Atlantic Monthly Press (1997).
CHAPTER 2: SHARING ANCHORS COMMUNITY
Page 25: Birthday Paradox Wikipedia contains a good general guide to the Birthday Paradox, at en.wikipedia.org/wiki/Birthday_paradox. (As always, Wikipedia also contains links at the bottom of the article to additional materials on the subject.) An alternate formulation of the same math is expressed as “Metcalfe’s law.” Robert Metcalfe, inventor of a core networking technology called Ethernet, proposed that “the value of a network rises with the square of its members,” which is to say that when you double the size of a network, its value quadruples, because so many new links become possible.

Greer, “Individual Training of Flying Personnel,” in The Army Air Forces in World War II, vol. 6: Men and Planes, ed. Wesley F. Craven and James L. Cate (Chicago: University of Chicago Press, 1955), http://www.ibiblio.org/hyperwar/AAF/VI/AAF-VI-17.html.
12.BT-13 Valiant specifications from “Vultee BT-13A Valiant,” Combat Air Museum (Forbes Field, Kansas), www.combatairmuseum.org/aircraft/vultee.html.
13.Barksdale Field history from Barksdale Air Force Base website at Wikipedia, http://en.wikipedia.org/wiki/Barksdale_Air_Force_Base#Origins; twin-engine aircraft procurement during 1940–1941 from “Army Air Forces Statistical Digest (World War II),” US Air Force, June 1947 (hereafter “USAAF Statistical Digest”).
14.Kane graduation date from Kane Oral Interview.
15.Christmas crew gathering recounted by U-701 survivor Gerhard Schwendel to Günther Degen.
16.U-701 movements from the U-boat’s Kriegstagebüch (daily war diary) from July 16, 1941, through February 9, 1942 (hereafter “U-701 KTB 1”); crew size from “Report of Interrogation of Survivors of U-701 Sunk by U.S.

…

Roosevelt’s Navy, 293–299; Knox and Roosevelt reactions from Bertram Hulen, “Our Stand Clear, Officials Insist,” New York Times, November 2, 1941; Associated Press, “Knox Assails Acts That Pass ‘Piracy,’” New York Times, November 2, 1941.
7.American leaders feared Japan attack in Far East from Ronald H. Spector, Eagle Against the Sun: The American War with Japan (New York: Vintage Books, 1985), 96; B-Dienst message from “German Navy Reports of Intercepted Radio Messages,” NARA RG 457, cited in Gannon, Drumbeat, xv; B-Dienst telegram stuns Hitler from Blair, Hitler’s U-boat War, 1:435; Oshima and Ribbentrop talks from “Hiroshi Oshima,” Wikipedia, www.en.wikipedia.org/wiki/Hiroshi_Oshima.
8.Raeder and Dönitz urge unrestricted U-boat campaign from Blair, Hitler’s U-boat War, 1:360; also Abbazia, Mr. Roosevelt’s Navy, 230; Führerprinzip from Heinrich Winkler with Alexander Sager, Germany: The Long Road West: 1933–1990 (New York: Oxford University Press, 2007), 37.
9.Jodl repeated Hitler’s comment on Japan and the United States to his interrogators at Nuremberg in 1945 and details of the Rainbow Five leak both cited in Thomas Fleming, “The Big Leak,” American Heritage 38, no. 8 (December 1987).
10.Hitler meets with military commanders in Fleming, “The Big Leak”; Roosevelt radio address on December 9, 1941, from Mount Holyoke College World War II archive at https://www.mtholyoke.edu/acad/intrel/WorldWar2/radio.htm; Hitler’s December 11 Reichstag speech from “Germany’s Declaration of War Against the United States,” Institute for Historical Review, www.ihr.org/jhr/v08/v08p389_Hitler.html; Hitler takes over army command from Fleming, “The Big Leak.”
11.Details of HMS Duke of York arrival in Norfolk from “Telegram: Prime Minister Churchill to President Roosevelt,” in “The Conference at Washington, 1941–42” (hereafter “Arcadia Proceedings”), in US State Department, Foreign Relations of the United States, posted at the University of Wisconsin Digital Collections at http://digicoll.library.wisc.edu/cgi-bin/FRUS/FRUS-idx?

…

Roosevelt’s Navy, 230; Führerprinzip from Heinrich Winkler with Alexander Sager, Germany: The Long Road West: 1933–1990 (New York: Oxford University Press, 2007), 37.
9.Jodl repeated Hitler’s comment on Japan and the United States to his interrogators at Nuremberg in 1945 and details of the Rainbow Five leak both cited in Thomas Fleming, “The Big Leak,” American Heritage 38, no. 8 (December 1987).
10.Hitler meets with military commanders in Fleming, “The Big Leak”; Roosevelt radio address on December 9, 1941, from Mount Holyoke College World War II archive at https://www.mtholyoke.edu/acad/intrel/WorldWar2/radio.htm; Hitler’s December 11 Reichstag speech from “Germany’s Declaration of War Against the United States,” Institute for Historical Review, www.ihr.org/jhr/v08/v08p389_Hitler.html; Hitler takes over army command from Fleming, “The Big Leak.”
11.Details of HMS Duke of York arrival in Norfolk from “Telegram: Prime Minister Churchill to President Roosevelt,” in “The Conference at Washington, 1941–42” (hereafter “Arcadia Proceedings”), in US State Department, Foreign Relations of the United States, posted at the University of Wisconsin Digital Collections at http://digicoll.library.wisc.edu/cgi-bin/FRUS/FRUS-idx?id=FRUS.FRUS194143; HMS Duke of York history from “HMS Duke of York,” Wikipedia, www.en.wikipedia.org/wiki/HMS_Duke_of_York_(17).
12.FDR-Churchill first meeting and impressions from Jon Meacham, Franklin and Winston: An Intimate Portrait of an Epic Friendship (New York: Random House Trade Paperbacks, 2004), 4–5; evolution of relationship from Meacham, Franklin and Winston, 47; details of Arcadia Conference from Arcadia Proceedings, Buell, Master of Sea Power, 162–171, and Blair, Hitler’s U-boat War, 1:445–447; Japanese attacks in Far East from Polmar and Allen, World War II, 11–13.
13.Churchill remarks on shipping crisis and FDR expansion of shipbuilding from Blair, Hitler’s U-boat War, 1:446–447; Troopship convoy to leave New York on January 15, 1942, from Arcadia Proceedings, January 11, 1942, 190–193; Churchill on “greatest importance” of prompt arrival of troops from notes by Lt.