## June 8, 2018

R Code

Glue is great for creating long strings of sql code. For example, imagine tables are stored in individual year-month files. Here is how we can use R to access these tables with a single query instead of writing out by hand every year-month combination.

library(tidyverse)
## ── Attaching packages ────────────────────────────────── tidyverse 1.2.1 ──
## ✔ ggplot2 3.0.0.9000     ✔ purrr   0.2.4
## ✔ tibble  1.4.2          ✔ dplyr   0.7.4
## ✔ tidyr   0.7.2          ✔ stringr 1.3.0
## ✔ readr   1.1.1          ✔ forcats 0.2.0
## ── Conflicts ───────────────────────────────────── tidyverse_conflicts() ──
## ✖ dplyr::lag()    masks stats::lag()
# create vector of year-month combos
yearmon <- expand.grid(year = 15:19, month = 1:12) %>%
mutate(ym = paste0(year,month)) %>%
arrange(ym)

yearmon <- yearmon$ym # glue together statements from each one query <- glue::glue("sel id, date, value from table_{yearmon}") query <- glue::collapse(query, sep = "\n UNION ALL \n", last = "") Reading A Feast for Crows and A World of Ice and Fire ## September, 2018 Starting new job at Bank of America in consumer analytics ## August 7, 2018 Just published an updated Weather Compare Shiny app. Things I learned: • You can achieve a lot through CSS — if you know where to apply it • Viridis looks really cool • Pick a color theme and stick to it. Don’t try to reinvent the wheel. I’ll be solarized from now on. • Plotly and ggPlot don’t always play along I also found this cool reference for tools to spice up your shiny apps. ## April 9, 2018 Reticulate for R-Python workflow in R Studio! Reading Onto the final book of LOTR ## April 5, 2018 See Tim Roughgarden’s Coursera course on Algorithms for more. The Master Method is a general tool for analysis of the run time of divide and conquer algorithms. The general form of the master method is: $T(n) \leq a T(n/b) + O(n^d)$ Here the parameters are: • $$a$$ is the number of recursive calls • $$b$$ is the factor by which input shrinks until recursion is called • $$d$$ is the exponent on the combine step The relationship between these three parameters result in three different run times: • if $$a=b^d$$, then $$O(n^d \space log \space n)$$ • if $$a<b^d$$, then $$O(n^d)$$ • if $$a>b^d$$, then $$O(n^{log_b a})$$ Mergesort, for example, has the form of $$T(n)=2 T(n/2)+O(n^1)$$, which gives us a run time of $$O(n \space log \space n)$$. ## April 2, 2018 Conditional expectation tells us that $E(Y \vert X=x) = \sum_{i=1}^k y_i \text{Pr}(Y=y_i \vert X = x)$ In words, the expected value of Y given a particular value of X is equal to the sum of the probabilities of each value of Y when X=x. Let’s say X takes two values, 2 and 3, and Y takes on many values from 0-100. For conditional expectation, we want to know what the expected value of Y when X=2. To do this we would just sum all the values of y multiplied by their probabilities whenever X=2. The Law of Iterated Expectations tells us that $E[Y] = \sum_{i=1}^l E(Y \vert X = x) Pr(x=x_i)$ $E[Y] = E[E[Y \vert X]]$ Essentially, the law of iterated expectations asks, what if we took a conditional probability of Y on X but then did it for every value of X. If you do this, you are essentially just taking the expectation of Y because you are going over the entire Y space. Covariance can be written as: $\sigma_{X,Y} = \sum_{i=1}^k \sum_{j=1}^l (x_j - \mu_X)(y_i - \mu_Y) Pr(X=x_j,Y=y_i)$ ## March 27, 2018 New Constructs was taught in BAV for the first time with great success! Very engaging discussion and a great way to close out BAV. ## March 13, 2018 I downloaded exercise files from Lynda for a course in efficient python programming. I wanted to preserve the original files, so I made two copies of the files in different folders. The problem is that I needed to change the name of all the files en masse to distinguish them from the original files. I modified some code I found online and used the following in the command line: for file in *.ipynb; do echo mv "$file" "${file/begin./kt.}"; done The files were named xx_begin.pynb. The above code renames all of these files by replacing the “begin” part with “kt”. A few points • for file in *.ipynb creates a for loop that goes through each file ending in .ipynb (where each file name is saved to the variable file). • ; mark line breaks • do and done demarcate the commands that are to be done in bash • echo will read out what is happening in the loop • mv is what will use to rename the files. If a location is not specified, mv will simply rename the file where it is • $file is used to access the current file name in the for loop

• /begin./kt./ is a parameter expansion that searches the file name for begin and replaces it with kt

## March 5, 2018

Economist Why Oil Price is so High

Hedge Fund Delusion that Grips Pension Fund Managers

Edge Computing

LOTR Just finished the first half of the Two Towers.

## February 28, 2018

Finished Airgas case C-D; still waiting for approval

## February 26, 2018

An article that represents many months of my life cleaning and managing data: Are Buybacks Really Shortchanging Investment?

## February 12, 2018

The case on New Constructs is submitted!

## January 20, 2017

Check out the Weather Comparison App! Still some formatting issues, bits of missing data, and need for better documentation.

## January 15, 2017

Weather Data is a R library for importing weather data from the NOAA. Will be interesting to see how detailed and expansive the data is. Goal is to build a shiny app that facilitates weather comparisons between cities.

## January 14, 2017

The Vikings won in miraculous fashion. When Diggs took off down the sideline, I initially thought he was an idiot and was going to get tackled with no time left. But then he kept going and the rest is history.

## January 9, 2017

Plotly has a very cool webiste for demoing there dash platform for interactive graphics.

Hobbit: Decided to have a complete picture so I need to read the Hobbit first. Interesting to note how much Tolkien developed the world the next 20 years after publication. The Elvenking is not even given a name.

## January 6, 2017

infer is a tidy way of doing inferential statistics. Still early but, with modelr, would be very efficient.

## January 5, 2017

I have been binge listening to the podcast ‘80s All Over’ while shoveling snow. It is a month by month recounting of the theatrical releases in US for the 1980s. A lot of interesting movies that seemed to have been lost to time.

Cold is incredible. Running low on oil.

## January 4, 2017

Left Hand of Darkness: Just finished this “classic” that won both the Hugo and Nebula awards. I found the telling somewhat and the prose unimpressive. The gender politics was somehow both challenging and oddly traditional. Despite being told repeatedly that the characters are all androgynous black people, the characters are written like flabby old white men.

Lord of the Rings: Beginning to reread LOTR after my first read through in 2002. I began by reading the Prologue and the Appendices. It’s amazing that almost every detail of the making of the books and the movies has been documented so thoroughly. Also, apparently Gandalf is pronounced Gandalv??

Big snow day here in Watertown. Received 18 inches of snow. Sharp cold coming in soon.

## December 6, 2017

The Orthagonality Thesis from Nick Bostrom supposes that any level of intelligence is capable of having any goal, i.e., super-intelligence does not mean super morality. An example is a super-intelligent paperclip maker that resolves to make the largest number of paperclips possible (and destroying the universe in the process).

## December 5, 2017

Research Project idea: This analysis from Brookings and this are very similar in showing the value add of certain universities. The process is relatively simple: collect data, run regression, see difference between median salary actually observed and what the regression expects, then rank into percentiles. Could expand into a shiny dashboard.

## December 4, 2017

Marriage in China: some families are paying years of salary in the form of bridal payments. Also, Germany saves 10% of pay but Chinese households save 38%!

Data Science Design Manual: I just started reading this book and it seems like a pretty great foundation for data science.

This page shows how to use acf and pacf plots to identify the numbers of AR/MA terms in an ARIMA model.

R for Data Science is a nice little book by Hadley on using R for foundational data science work. Not a math/stats book, just a book on R.

## December 3, 2017

modelr is an early attempt at trying to apply elegant pipes to model building.

Idea: Tangled Hierarchies of Buddhist Literature: Buddhist literature as self-aware; reading itself when we’re away?

## November 27, 2017

What the Buddha Thought by Richard Gombrich: Argues in the opening chapters that karma is the great leap of faith you have to take to understand Buddhism and cannot be ignored.

## November 25, 2017

British Discovery of Buddhism: This book concerns the early British mappings of “Buddhism.” I think this is a critical fact that most have a hard time accepting: there was singular idea of Buddhism as a pan-Asian civilizational religion that was delivered wholesale to Europeans. It was a idea that was crafted over decades of discovery and interaction. The implication being that practitioners of Buddhism probably had wildly divergent ideas of what Buddhism was that what western scholars had crafted.

## November 22, 2017

Ascent of Money: Relistening to the Ascent of Money by Niall Ferguson. The two most interesting narratives from the book is the rise of the Rothschilds. The Rothschilds were textile traders in continental Europe who opened up shop in England before the Napoleonic era. To continue their business under Napoleon’s protectionist continental system, the Rothschilds became adept at smuggling gold into Europe. Needing to fund their armies in Portugal, Britain turned to the Rothschilds to delivered gold.

## November 16, 2017

Stata 15: new version of Stata includes dynamic documentations. This is nice but woefully underpowered compared to R Markdown.

The tidyverse package reprex allows for quick creation of reproducible examples when asking for help

Structural Equation Modeling allows for measuring dependencies between independent variables in regression. Much of this field was made possible by Stata releasing easy to use SEM.

## November 3, 2017

The Storm Before the Storm: An interesting story about Marius: to demonstrate his vivacity despite his age, Marius exercised strenuously on the Campus Martius. Everyone laughed at him. Not to long after this, Marius had to flee Sulla on foot through swamps and over water, so his survival was due in large part to this exercise. While fleeing, Marius told the few people brave enough to accompany him the story of how he discovered a nest of seven eagles as a child — thus prophesying his eventual return to Rome to claim his seventh consulship

## October 24, 2017

Millennium: Until 1434, Europeans thought that Cape Bojador along the coast of the Sahara was impassable. By 1522, they had completed a circumnavigation of the world.

Economist, Oct 21, 2017

• Should the revised charter refer to “Xi Jinping Thought”, then Mr Xi will become an ideologue on a par with Mao. The party has a hierarchy of words describing systems of ideas, with “thought” (sixiang) nearly at the top, “theory” (lilun) in the middle and “view” or “perspective” (guan) at the bottom

• Five outliers - Chesapeake Energy, Netflix, Nextera Energy, Tesla and Uber - have collectively lost $100bn in the past decade • Chesapeake Energy, a fracking firm at the heart of America’s shale revolution, has lost at least$1bn of free cashflow a year for an incredible 14 years in a row

• Netflix amortises the cost of content over periods of up to five years, so reports an accounting profit even as it bleeds cash.

• Saudi Aramco has 15 times more reserves of oil and gas than ExxonMobil, its biggest private competitor, higher production, fewer employees and lower costs per barrel.

• IMF study says higher taxes can lower inequality without lowering economic growth; optimal high tax rate is 44%

• AlphaGo Zero has an ELO of 5000; the best human players are ~3500

## October 20, 2017

Aberfan Disaster: Over 160 were killed in England in 1966 when a pile of coal spilled onto a village.

## October 19, 2017

Millennium: The Black Death came to Norway via a ghost ship; The Black Death killed 45% of the England in 7 months over 1348—an annualized mortality rate of 77%; a low estimate is that 1/3 of Europe died during the initial phases of the plague.

Speaking of the end of the world, here is a list of near misses: list of air bursts

Chain of Thought - Power Law: Power Law -> Pareto Principle -> Fat Tailed Distribution

## October 17, 2017

Millennium: Pious Folk Count of Anjou not really pious forced to build monasteries and go to Jerusalem

## October 5, 2017

Would like to host R Markdown Notebooks and Jupyter Notebooks separately from the main blog so that the interactive bits can be rendered properly. I should be able to replicate this and this. The only trick will be getting it to work with the Pelican framework.

Economist, October 2

• Under Margaret Thatcher the Conservatives were more popular than Labour among 18- to 24-year-olds

• Structural unemployability due to automation; labor force participation rate has increased in Britain possibly due to better benefits for parents

• Pollution from ships is causing more lightning in Mallaca straits and other places

• If today’s asset prices have been propped up by loose monetary policy, tightening could cause a big correction; bizarre that inflation has not increased (I think due to lagging wages); part of problem is graying population and risk aversion after the crisis is prompting more saving

• In most rich world countries, women are paid 98 cents to the dollar as a man for the same job

• Gerrymandering: in Wisconsin in 2012, Republicans won 48% of the vote but got 60% of the seats; later with 52% of the vote they got 98% of the seats; efficiency gap

• Despite what 538 says, there is evidence that gun laws work

• CAPE a measure of how much willing to pay for profits; average since 1881 is 17, today it is 30; credit spreads are narrowing — huge demand for risky bonds; China’s entry into the world market introduced many thrifty savers — Ben Bernanke; companies don’t need as much capital (more intangibles) yet still make profits—result is more cash; low interest rates mean low discount rates which mean higher future earnings which mean high prices; some argue that interest rates are no longer a good guide to the economy—Philips curve no longer holds; but tendency to save is starting to fade—older people mean more spending in retirement; some argue stock markets are irrelevant bc not IPOs, more important are banks and credit markets

• Chinese now love Chiang Kai Shek because he wanted a reunified China

• BJP grandee said voiding of high-denomination bills was a bold step but “suicide too is a bold step”

## October 4, 2017

Napoleon: A Life: I’ve heard that the Siege of Petersburg in the American Civl War was first modern battle due to its extensive use of artillery and trench warfare. However, the Battle of Eylau during the Napoleonic wars may be an even earlier example due to its use of artillery and overall brutality. The French Marshall Ney commented, “What a massacre! And without a result.”

## September 28, 2017

When interpreting regression results it is valuable to remember that the ceteris peribus interpretation is due to the coefficients being partial derivatives. A derivative is simply defined as

$\frac{\Delta y}{\Delta x} = \frac{f(x_0 + \Delta x) - f(x_0)}{\Delta x}$

In words, if $$y=f(x)$$ the change in y ($$\Delta y$$) per change in x ($$\Delta x$$) is how much how much a function changes ($$f(x_0 + \Delta x) - f(x_0)$$) given a change in x ($$\Delta x$$). Hence we get the standard derivative notation:

$\frac{dy}{dx} \equiv f'(x) \equiv \lim_{\Delta x \rightarrow 0} \frac{\Delta y}{\Delta x}$

In both simple and multiple regression, we interpret $$\beta$$s in similar ways: a unit change in $$x$$ results in a $$\beta$$ amount of change in $$y$$. But how can we ignore other coefficients in multiple regression? Because they are partial derivatives where one variable is held constant while the other is allowed to vary. For example, the derivative of $$f(x,y)$$ while holding $$x$$ constant can be written as

$f_x'(y) = \frac{\partial f(x,y)}{\partial x}$

Napoleon: A Life: punishment should be infrequent but severe; “truth is so precious she should be surrounded by a bodyguard of lies”

Philosopher’s Toolkit: Richard Dawkins’ “selfish gene” is an example of a failed intuition pump—doesn’t mean at all what people think it does (he is referring to how genes optimize locally instead of globally for the organism)

## September 22, 2017

Napoleon: A Life: notorious micromanager; emo youth—wrote excessively Romantic letters on suicide and his 1st wife Josephine; lived frugally when younger—only ate once a day; more concerned by mulberry nursery than revolution; “We have them now”

Petrozavodsk Phenomenon: an unusual and unexplained atmospheric phenomenon. Never heard of this until recently

Pythagorean Expectation: way of computing expected wins. Pro football uses exponent of 2.67, Redditor says this doesn’t make sense due to VC Dimension issues. Some more on VC dimensions.

IgNobel Award Winner: Elisabeth Oberzaucher and Karl Grammer, for trying to use mathematical techniques to determine whether and how Moulay Ismael the Bloodthirsty, the Sharifian Emperor of Morocco, managed, during the years from 1697 through 1727, to father 888 children

## September 21, 2017

L1 norm for accuracy—less bias; L2 norm gives parsimony—less variance <|||> New favorite military title: 1st Sea Lord <|||> Ada Lovelace thought of using punch cards after being inspired by weaving loom <|||> 37% optimal stopping problems and Secretary problem

Jeremy Bentham referred to natural rights as “nonsense on stilts”—similar sentiment from other Enlightenment thinkers <|||> John Adams thought the idea that “all mean are created equal” was absurd

Strassen’s Subcubic Matrix Multiplication Algorithm: a divide-conquer-combine strategy that is completely non-obvious but hugely important because it saves on recursive calls.

## July 7, 2017

• Urth of the New Sun: finished; what a strange book. I’m not sure I have any idea what happened. The language was certainly not as floral as previous books in the series, but the actions and significance were incredibly obscure. Most of the time I had no idea what was happening. That being said, I can totally see this being the next big HBO show to fill in after Game of Thrones.
• Illuminatus: half way through; what a strange and hilarious book. One of the funniest I’ve ever read. Hail Eris!
• The Lost World: almost done; what a strange combination of under-developed writing and thought provoking monologues. It definitely feels like Crichton really wasn’t into the dino-terror part and just wanted to talk about evolution and extinction. Also interesting how much the movie deviates from the book since Crichton had to rush the book out before the next movie.

Having a newborn means you can’t sleep but you’re too tired to work. So what do you do? Bing watch:

• Spaced: Absolutely hilarious. Edgar Wright’s first big project is one of the funniest TV shows I’ve seen.
• Star Trek: The Next Generation: First season, not so great. Interesting to see that Rob Bowman (who directed many classic X-Files episodes) directed a lot of the first two seasons.
• Logan: I thought it was great if not a little too comically violent for the tone it was going for. But it is a fitting send off and one that certainly respects the characters.
• BvS:DoJ: The beginning of this movie is hilarious. A man standing in an office watching the entire city get destroyed around gets a call from his boss telling him he should leave the building. Why does someone need to tell you that! The world is clearly ending!
• MST3K: I think the new MST3K is superior to old one. I said it.
• Hacksaw Ridge: Hugo Weaving could have won an Oscar for his performance but his accent is out of control.

• Innovators: finished; actually pretty epic in scope and detail. One of the big takeaways was how different the internet could have been (e.g., anonymity could have been banned).
• Misbehaving: almost finished; a history of behavioral economics from Richard Thaler’s point of view. As someone who works in academia, it is interesting to see how fraught the advancement of new field is.
• Revisionist History: a new podcast by Malcolm Gladwell — pretty good! The topics are quite eclectic which suits me just fine!

## July 6, 2017

Super Valuation of Amazon: All you need to know about Amazon’s current price is this: “Never before has a company been worth so much for so long while making so little money: 92% of its value is due to profits expected after 2020.” For Amazon to justify it’s current price, it would have to become the most profitable company of all time. Is it possible?

The biggest hurdle for Amazon will be regulatory not economic. As the Economist continually points out, current regulations regarding monopolies and the like are outdated for times when custom data and smart algorithms can competitively set prices that normally would only appear under monopolies. Eventually regulations will catch up and Amazon as we know it might become multiple Amazon-lets.

Vix is the implied premium of insuring options against volatility in the markets. Over the past few months, Vix has been surprisingly low—and some fear it is the calm before the storm. This complacency prior to disaster seems to quantify an old trend of saying “the business cycle has been tamed—no more recessions” right before a financial crisis. Speaking of which…

Cape Fear: Right before the financial crisis of 2007, Ben Bernanke assured everyone that the looming housing crisis would be contained. We know how that ended. Ten years on and we’ve now just reached the same CAPE (cyclically adjusted price to earnings) ratio that we had in May 2007. Does this mean that equities are valued to high? The Shiller 10-year PE suggests that were about 10 percentage points above the historically observed median. However, if realized returns are a bad predictor of future returns, then how much should we trust these signals of another recession?

Akzovism: Shades of Airgas with an somewhat beleaguered industrial company rebuffing multiple takeovers and then being assailed by activists. The interesting turn here is the unique corporate governance structure wherein a foundation appoints board members thus negating attempts to vote in new slate of sympathetic directors.

Toshiba Delisting: Seemingly every month another titanic Japanese company begins to die off. Toshiba is under threat of delisting, Sharp is in trouble, and Takata just sold itself. But does this mean that Shinzo Abe’s economic reforms are failing, or is the greater accountability a sign of its success?

## July 5, 2017

I recently wrote some code that can take a Stata dataset and produce a table with means and number of observations by variable and time series. The code is essentially agnostic to the data so long as all variables are wanted in the table and are numeric.

In early June, Apple held its annual developer conference were it announced a new lineup of computers. The price drop in MacBooks makes the Pro more reasonable, but the lack of 32gb RAM is unforgivable (some of us like loading huge datasets in R!). The touchbar is pretty cool, but I am not willing to pay the premium that it added to the price when it was first announced in 2016. The new iMac Pro, on the other hand, looks ridiculous, but I’m not really sure who it is for outside of Premiere Pro users.

## July 4, 2017

A newish feature to RStudio are addins. These addins add a bit of convenient functionality to RStudio. For example, the base examples include an addin that can easily prettify R code.

A few other useful addins I have found:

If you have devtools installed in R then you can run the following code to install all of the above packages:

install_github("rstudio/addinexamples", type = "source")
install_github("BAAQMD/copydat")
install.packages('ggedit')
install_github("lorenzwalthert/strcode")
install_github("seasmith/AlignAssign")
install.packages("citr")

## July 3, 2017

Any English speaking society that would think a name like “Praise-God Barebone” is a good name, is probably a little strange. The most innovative aspect of the Puritans (of which Praise-God was a member) was their ability to be strange and old-fashioned at the same time (after all, anyone can be new and strange). The Puritans were obsessed with keeping things the way they were. As David Hackett Fischer points out in Albion’s Seed,

“In the early records of the Bay Colony, the adjectives ‘new’ and ‘novel were pejorative terms.’ In 1639, for example, a special ‘day of humiliation’ was called in Massachusetts on account of ‘novelties, oppression, atheism, exesse, superfluity, idleness, contempt of authority…’”

The first thing most readers would zero-in on is the ‘day of humiliation.’ But Fischer focuses on something else: he notes that novelty is first in the list—even ahead of atheism. It seems odd to us in our ever-innovating, fast-paced society that even the most conservative person would prefer no change at all. Fischer suggests that part of their desire to keep things the way they were (are?) was to preserve a memory of their lost home in England. You have to remember that the Puritans were upper-middle class merchants with deep roots in East Anglia who were forced to flee Europe after being branded as ‘fanatics.’ This could also explain why colonial Virginians (a slightly less fanatical population) also considered words like ‘innovation,’ ‘novelty,’ and ‘modern’ to be pejorative terms. Ironically they to were forced to flee to the new world after the Puritans briefly took control of England under Oliver Cromwell.

You might be thinking, wouldn’t a strange name like “Praise-God” be novel? And you would be right—I don’t think anyone who wasn’t a Puritan ever had that name. The Puritans, however, could justify this “new” name because of how it was derived. A common naming convention for the Puritans was to simply open the Bible at random and point to a word. So in a sense there is nothing new at all about—God chose the name, at random, from the book he wrote several hundred years ago.

On a broader note, I wonder how much of the progression of our knowledge of earth’s history has also impacted our view of innovation. Until very recently (the 19th c. in fact), the idea that a species could go extinct was patently absurd. The world is as it was when God created it. If the world is (as we know now) constantly in flux, then it is no great leap to embrace the change we inevitably must experience.

## July 2, 2017

An ancient Greek adage states: “a fox knows many things, but a hedgehog knows one important thing.” With no additional context, the adage simply bifurcates styles of epistemology without ascribing an upper-hand to either condition. Recently, however, I’ve seen the phrase used to describe winners and losers in the race for better, data-based predictions.

Philip Tetlock has centered his research on assessing and improving forecasts and makes clear his preference for foxes. His book Superforecasters, for example, details everyday people who consistently make better predictions than most experts regarding a wide range of world events. One reason for their success is their nearly obsessive collection of eclectic knowledge, making them “supernewsjunkies”. The core idea being that a critical quantity of information quanta can reveal patterns not recognized by large, over-arching narratives.

If you were to predict the future of oil prices, for example, would an intimate knowledge of OPEC’s history be all you need for accuracy? Or would you need to know how China’s aging population might affect aggregate demand for oil? Or what the median waterline on shipping vessels across the Pacific might reveal about global oil usage? What about CFOs who successfully hedge shale companies, keeping them afloat during a glut of oil? Many small details might give you an insight missed by the standard narrative.

Tetlock is not alone. Nate Silver in his book The Signal and the Noise also espouses a fox-outlook. His noted website 538 subtly alludes to this with its fox logo.

## July 1, 2017

I have no data yet. It is a capital mistake to theorise before one has data. Insensibly one begins to twist facts to suit theories, instead of theories to suit facts.

—Arthur Conan Doyle

## March 15, 2017

• Book of the New Sun by Gene Wolfe: COMPLETE. What a strange book. In many ways it’s like reading the Bible - bizarre random things happening with no explanation or followup. But overall, well written and the narration device of the man with a perfect memory who also subtly deceives the reader is fun.
• Urth of the New Sun by Gene Wolfe: I need answers. So I begin the fifth book. The first chapter is quite funny with Severian on a spaceship (given how the series began this is quite an unusual turn) and nonchalantly jumping into the blackness of space.

• Arrival was pretty good, but I probably had too high of expectations. I’m not entirely sure where they got the Sanskrit word for “war” from. I didn’t find any “war” related words related to cows in Apte. Personally, I would have gone with युद्धा.

• Innovators by Walter Isaacson: I never knew Lord Byron’s life was so scandalous…

I love Rocksmith. This week I’m playing some E♭ standard tuning songs:

• “Danger Zone” by Kenny Loggins
• “Pride and Joy” by Stevie Ray Vaughn
• “My Name is Jonas” by Weezer

## March 14, 2017

From the February 25th Edition

The Sanctity of Trade Statistics: A proposal to remove re-exports from official figures would inflate the trade deficit and bolster the current administrations case for tougher trade relations. The Economist comments, “the new administration seems prone to using statistics as a drunk uses a lamppost – for support rather than illumination.”

From the March 4th Edition

China and Currency Manipulation China has had its reputation as a currency manipulator longer than it has actually been a currency manipulator. This article, using their own measurements inspired by official US determinants, scores Taiwan and South Korea as greater depressors of their currencies than China. In fact, China has taken steps to strengthen the yuan to keep capital from flowing out.

## March 12, 2017

KDNuggets runs an annual survey asking “What software you used for Analytics, Data Mining, Data Science, Machine Learning projects in the past 12 months?” The 2016 results are:

1. R
2. Python
3. SQL
4. Excel
5. RapidMiner
7. Spark
8. Tableau
9. KNIME
10. scikit-learn

A few observations:

• You know data science has gone mainstream when some of the most used analytics tools are point and click interfaces. I’m not talking about Excel (general purpose utility and industry standard for decades) or Tableau (visualization tool). I’m referring to RapidMiner and KNIME (although not listed, I prefer Orange). These tools allow you to run regressions, cluster analysis, PCA, etc. without ever typing a piece of code. It is interesting to see RapidMiner so high given its steep cost and all but useless free version.

• Notice what is missing? SAS and Stata. Want to know why? They’re archaic and cost lots of money. The only reason they still exist is because of the imagined frictions of transitioning to R or Python. I’m not saying you shouldn’t know how to use either (you never know when you’ll encounter some legacy code), but they should not be your primary tools of analysis (I say this having spent my Saturday working in Stata…).

• I am amused that scikit-learn is on this list given that it is just a library for Python. How is it above pandas and numpy?

## March 11, 2017

Here There Everywhere: Quantum Computing: Just the other day I was wondering what it was like to be a US civilian just prior to the atomic bomb drop in 1945. Was there any idea that the US was working on a super weapon? What was it like to realize that your country had been secretly coordinating with the greatest minds on earth and spending billions of dollars developing an unstoppable instrument of destruction? What would be a current/future analog to this? Perhaps Russia attempts a major cyber attack on the US only to find out that America has developed a highly advanced quantum computer that not only renders the truly important parts of the US cyber infrastructure invulnerable, but also makes Russia an open book.

Timely enough, the technology quarterly for this week’s Economist focuses on quantum computers. The major take away is that progress in this field is rapidly advancing thanks to the growing and inevitable commercialization of quantum techniques. Quantum computers will soon provide more accurate location than GPS, more precise sensing abilities than anything available, unbreakable cryptography, and the ability to quickly solve problems in finance and engineering.

This last point reminds of the time saved in solving liner equations that came with the advance of analytical engines and early computers. Problems with 6+ unknowns would take weeks to solve, but advances in simple computers reduced the time to mere hours (your computer could probably do it in seconds).

From the March 11th Edition

## March 10, 2017

Reading Walter Isaacson’s Innovators, I was struck by his telling of the first-long distance phone call. In the 1910s, AT&T was facing the expiration of their patent on the basic technology underlying telephone calls. To compensate, AT&T aggressively pursued new technologies such as long-distance phone calling. Sure enough, by 1915 Alexander Graham Bell recreated his famous first phone call with Thomas A. Watson, except this time a continent separated them and not a room.

I find it compelling how different it is today: namely, that a claim on intellectual property would be allowed to expire. Mickey Mouse, for example, should have gone into the public domain in 1984. However, due to intense lobbying, Disney has been able force changes in the law so that Mickey Mouse will almost always remain in the Disney vault. What kind of innovation has Disney denied the world by not letting their rodent mascot into the public domain?

## March 9, 2017

On April 15, 1912 the RMS Titanic sank in the northern Atlantic taking the lives of approximately 1500 people. Stop anyone on the streets, and they certainly could tell you the general outlines of the disaster. But what about the sinking of the Sultana? On April 27, 1865 (April is the cruelest month), the steamboat Sultana caught fire and sank on the Mississippi river killing roughly 1700 – 200 more than the Titanic.

So why does everyone remember the Titanic and not the Sultana. One reason is timing: the Sultana sank the day after John Wilkes Booth was killed after himself assassinating President Lincoln. Another reason would be media coverage and popular interest: the Titanic catered to social elites who the media naturally gravitates towards. Add in the morality play of the ship “that even God could not sink” sinking and killing most on board, and you have the perfect storm of everlasting infamy.

Interestingly enough, this isn’t the only dyad of famous/forgotten maritime disasters. Everyone knows about the Spanish Armada – the most powerful naval force in the world dashed to pieces by the fury of a north Atlantic storm as it tried to attack England in 1588. Ultimately the loses Spain totaled 35 ships and 20,000 dead. But what about the English Armada? In the ensuing year, the English attempted a punitive expedition against Spain but met a similar fate losing 40 ships and upwards of 15,000 men.

A similar-in-magnitude pairing of remembered-and-forgotten can be found in the disastrous “kamikaze” invasion of the Mongols into Japan in the 13th century and the massive losses suffered by Roman naval forces in the second Punic war – both with high-end estimate losses of 100,000 men.

## March 8, 2017

Reasoning will never make a Man correct an ill Opinion, which by Reasoning he never acquired

—Jonathan Swift

## March 7, 2017

• Hacker’s: Heroes of the Computer Revolution by Steve Levy, completed: Listening to the coda of the book and it’s quite shocking to find out that the book was published in 1980s. The extensive time spent elaborating the Hacker Ethic of free information and anti locks and barriers is shockingly prescient.
• Great Courses: Civl Liberties and the Bill of Rights, started: I was pleased that the professor began the course by elaborating on the implications of the 14th Amendment and the gradual incorporation of the bill of rights across all levels of government (namely, state government). Most people don’t realize that, as originally written and interpreted in the Barron v Baltimore case, the bill of rights only applies to the federal government.

## March 6, 2017

• Parks and Rec: Recently I watched the episode were Ron Swanson goes on a trip to the Lagavulin distillery somewhere in the British Isles. I noticed, however, that the Lagavulin facility looked suspiciously like the Laphroaig distillery (I should know, I own several square feet of the Isle of Islay). Well, turns out there is a reason for that: Lagavulin and Laphroaig are located near each other and Lagavulin was even sued for trying to copy Laphroaig.

## March 5, 2017

Joe Dimaggio’s parents were classified as enemy aliens due to their immigration from Italy (a Axis power during WWII) and forbidden from traveling farther than a five miles from their home. It should also be noted that Dimaggio’s own Italian heritage was controversial when he started playing in the major leagues.

## March 4, 2017

From the February 11, 2017 edition

• Financial Regulation in America: The Litter of the Law: From 2010-2016, “Dodd-Frank soaked up 73m paperwork hours and $36bn in costs.” Small price to pay for the economic damage created by the financial industry in the Great Recession right? Maybe, but vengeance is not the point of the justice system and nor should it be the thrust of regulations. The idea of financial regulations is to act like the speed governor on your car. You should be able to drive to work any way you want but not at an extreme speed that would prove reckless to you or others. One proposed step in the article is to consolidate regulating agencies to lower the burden of compliance. Simplification, consolidation, and harmonization would make compliance more effective and help lower compliance costs for companies. However, if the continuing issues with IFRS-GAAP harmonization is any indication, this will probably never get done. • American Retailing: Run Ragged: Retail is not the most thrilling field of research but it is a massive component of the economy and the gradual demise of storied franchises such as Macy’s and Sears are certainly touchstones in the changing economic landscape of America. The future, it seems, is fast-fashion (Zara’s, Uniqlo, Primark, etc.) and smaller stores. • Schumpeter: Snaptrap: Now this is a thrilling topic of research: corporate governance. Snapchat’s recent IPO (looking for a$20-25bn valuation) continues the trend toward diminished shareholder rights for companies going public (particularly tech companies). For Snap, the problem is acute: shareholder’s buying into the IPO have no voting rights. Google and Facebook are similar with dual voting rights that divorces cashflow rights from voting rights. Alibaba’s attempt to follow suit in their IPO lead to them listing with the NYSE after the HKSE rejected their corporate governance structure. So why are tech companies such avid fans of these patently undemocratic structures? One argument is that tech companies, given their dependence on forecasting the future and secretive R&D efforts, are more likely to have information that the market will be incapable of adequately pricing. Tech IPOs, by this argument, need to protect their interest from uninformed market forces.

## March 3, 2017

From the February 11, 2017 edition of the Technology Quarterly

• Entertainment: The Paradox of Choice: In his book The Long Tail, Chris Anderson famously predicted that the winners in the coming digital entertainment revolution (think Netflix) would be the ones who provided the most customized, expansive, and rare collection. Essentially, whatever service could lay claim to the most hard to get titles would be the winners. This has not proven to be the case. It seems that the easier it is to get things that were once rare (I remember scouring Best Buys for any copy of Kurosawa that I can now watch on youtube for free) people more and more want the biggest names in TV and movies. The winners it seems, are those who can get stream The Force Awakens and not Rashomon. (In hindsight this seems pretty obvious.)

• Recommendation Algorithms: In statistics, we obsess over the bias-variance tradeoff. When algorithms meet people, however, the tradeoff is explore-exploit. You could simply keep recommending things you know for sure that customers like, but this runs the risk of overfitting and failing to adapt to the vacillations of human desire. However, if you loosen your parameters to achieve lower errors when switching between human states, you might under-fit and the human will reject the recommendation as not applicable to them.

• Alternative Realities: The frictions involved in AR, VR, and Haptic immersion rigs (viz., they look stupid to wear and are uncomfortable) will probably limit their adoption to only those who play video games. Hence why I think the future is still in full eye replacements.

## March 2, 2017

Here are few interesting factoids about names of places in the ancient world:

• Iberia in Roman times did not refer to the Iberian peninsula (modern day Spain and Portugal) but to a Kingdom (the first Christian kingdom in fact) centered on present day Georgia.

• The original province of Syria is approximately present day Syria. However, following the Bar Kokhba revolt, Hadrian (who really, really hated the Jews) merged Judaea into Syria to create the province Syria-Palestine. He also renamed Jerusalem Aelia Capitolina.

• The name “Germania” is of unknown origin, probably a Gaulish term appropriated by the Romans. It is appropriate then that only non-Germans call Germany “Germany” and native Germans refer to it as Deutschland. The “Deutsch” part of Deutschland is ultimately from the PIE root “teuta” meaning “people.” This root is origin of the word “Teutons” as well as the Italian word for German, “tedesco.” Wikipedia makes the interesting point of contrasting the word for “people” with the opposite word “walesc” used to indicate “foreigner.” This word has been applied to the Welsh (who call themselves Cymry) as well as Wallonia (the Belgians who recently held the EU hostage in trade negotiations) and Wallachia (the home of Dracula).

## March 1, 2017

I’m saying that at Leipzig all goods—silk, coins, shares in mines—lose their hard dull gross forms and liquefy, and give up their true nature, as ores in an alchemist’s furnace sweat mercury—and all mercury is mercury and can be freely swapped for mercury of like weight—indeed cannot be distinguished from it.

—Neal Stephenson. “Quicksilver.”

## February 7, 2017

Listening

• Hardcore History: Destroyer of Worlds: Dan Carlin’s latest podcast explores the early political machinations surrounding the use of atomic weaponry. It’s quite amazing how resolute Truman, Eisenhower, and especially Kennedy were in declining to use nuclear weapons after Hiroshima and Nagasaki despite intense pressure to do so.
• Hacker’s: Heroes of the Computer Revolution by Steve Levy, cont’d: Steve Jobs was notorious for his unwashed, shoeless, extreme vegetarian lifestyle. Yet, for all his free spirited-ness, he was the first of the computer nerds to seek out professional management of a personal computer company. The result was Apple and its nearly trillion dollar market capitalization.

• The Book of the Dying Sun by Gene Wolfe: Words I discovered: peccary, pardine, bartizan, peltast, martello, conventicle, abattoir, par-terre, citron, sardonyx, tyrian, lansquenet, casern, monomachy, sabretache, nidorous, mensal, dray, onager, champian, tholus, delectation, lianas, smilodon, freshet, specula, soubrette, columbine, coryphees, harlequinas, figurantes, pagne, pavonine, misericorde, etc., etc.

## February 6, 2017

Super Bowl

Stunning comeback or stunning collapse? An excellent article details how Falcons bumbled and the Patriots exploited a 99% chance of victory. Despite the Falcon’s mind-boggling calls down the stretch (attempting passes despite Devonta Freeman averaging 8 yards a carry and only needing to run out the clock), the story during the course of the game was how little the Falcons offense was on the field.

I would also be remiss if I didn’t point out that the Patriots almost Seahawked themselves by throwing a nearly intercepted pass from the two yard line at the end of the game.

’Member when…

Given Tom Brady’s legendary success in the NFL, much talk has been given to him as the “Greatest of All Time.” This is a fine argument, but two caveats should be noted. Is he the greatest player of all time? That is a definitive no. Red Grange, a charter member of both the college and professional football hall of fame, is undeniably the greatest of all time. Is he the greatest QB of all time? Perhaps. Outside of Peyton Manning (who might be the best QB of all time), the biggest competition Brady has is Otto Graham: in his 10 year career he went to 10 championship games and won 7 of them.

## February 5, 2017

• January 30, 1649: In one of the first great modern political revolutions, King Charles I is beheaded
• January 31, 1937: American composer Philip Glass, notable for his scores in Koyaanisqatsi and Candyman (?!?), is born
• February 1, 2003: The space shuttle Columbia disintegrated on re-entry killing all on board. I remember waking on a cold February morning at my grandparents house and seeing this on the news.
• February 2: Boris Karloff, Sid Vicious, Bertrand Russell, Gene Kelly, Donald Pleasance, and Philip Seymour-Hoffman all died (in different years)
• February 3, 1943: The SS Dorcester was sunk by a German U-boat off the coast of Greenland; many were saved by the famous Four Chaplains
• February 4, 1724: British entomologist Dru Drury is born
• February 5, 1958: The US Air Force loses a hydrogen bomb off the coast of Georgia

## February 4, 2017

From the February 4, 2017 edition

• Universal Basic: Bonfire of the Subsidies: I’m critical of UBI schemes in general because the income provided would dramatically cut the amount of welfare provided to the poorest while giving income to those who don’t need it. In India, however, such a scheme might actually prove beneficial in that it wouldn’t be “universal.” Instead, because Indian currency has very high purchasing power, it would replace at similar cost the current proliferation of welfare schemes.

• Augmented Reality: AR is very cool, but “social factors often govern the path to mass adoption, and for AR, two problems stand out.” The first problem is aesthetics in that wearing the current headsets make you look like a Neal Stephenson gargoyle. The second problem is that you might act like a Neal Stephenson gargoyle by recording everything that happens around you (never forget the “Glasshole” phenomenon).

• Alternative Religions: The Joy of Sects: I have about 13 years of formally studying religion (7 years at private Christian school, 4 years undergraduate degree in religion, 2 years at Harvard Divinity School) and my final conclusion is that religion is whatever the IRS says it is. Also, Simpsons did it!

• Gambling in Japan: Until December 2016, casino’s were illegal in Japan, but that didn’t keep the country from spending $203 billion on pachinko every year. • The Indian Economy: Rupees for Nothing: UBI would help with the nearly apocalyptic impact of Indian’s demonitization scheme in November 2016, that severely impacted the mostly cash based economy. • Asset Management: Ctrl Alt Beta: A new kind of investment fund known as “alt-beta” funds attempts to replicate the putative advantage of a hedge fund by deriving returns uncorrelated (and hopefully positive) from the market. I see these as slightly more sophisticated trading automation plans like those found on Portfolio123. ## February 2, 2017 Most stars are binary in nature, i.e., most stars have a counterpart star that orbits a mutual barycenter. So what about our sun? What if our sun had a sibling? And what if that sibling was the cause of the mass extinctions that have periodically wracked earth? Such is the speculation that gave rise to the theory of Nemesis, a proposed star, small and very dark, that orbits with our Sun and periodically smashes through the Oort cloud every 26 million years, sending armageddon levels of debris to earth. In theory, this could include the impactor that lead to the extinction of the dinosaurs (if indeed they did go extinct from the impact of an extraterrestrial object). This theory is quite engaging: it plays on our wonder at the enormity of the cosmos, the interconnectedness of time, as well as the possibility of mystery left in the universe. There is also something of the operatic in the idea of a long lost, evil twin who periodically ruins your life. Unfortunately, as cool as this theory sounds, there is little evidence to support it. Despite being small and dark, such a body would have probably been detected by now. Furthermore the periodicity of mass extinctions has been challenged. ## February 1, 2017 A firm rule must be imposed upon our nation before it destroys itself. The United States needs some theology and geometry, some taste and decency. I suspect that we are teetering on the edge of the abyss – John Kennedy Toole, A Confederacy of Dunces ## January 28, 2017 “Languages build up to reflect specializations in a way of life. Each specialization may be recognized by its words, by its assumptions and sentence structures. Look for stoppages. Specializations represent places where life is being stopped, where the movement is dammed up and frozen.” – Frank Herbert, Children of Dune ## January 27, 2017 Things that describe Kary Mullis: • Avid surfer • Denier of HIV-Aids link • Married four times • Winner of Nobel Prize • Avid user of LSD • Encountered glowing green raccoon (possibly extraterrestrial) One of these is not like the other… The work of Lenoir, NC-born Kary Mullis has had an enduring, epoch-defining influence on biology in spite of his unusual predilections and controversial views,. In particular, his Nobel-prize winning work on polymerase chain reaction (PCR) was “highly original and significant, virtually dividing biology into the two epochs of before P.C.R. and after P.C.R.” PCR is essentially a “kind of genetic photocopying, and it became the basis for all subsequent genetic science, from academic studies to police forensic work.” PCR relies on breaking done DNA and assembling a new copy of the strand with the help of heat-resistant polymerase. The end result of repeated applications are multiple copies of the original DNA strand. You can immediately see how this could be useful in forensic science: just a single hair fiber is now more than enough to produce sufficient DNA to test for comparisons to suspects. As for Kary Mullis, well… maybe his autobiography is the best source of information: Dancing Naked in the Mindfield. ## January 26, 2017 We all know Charlemagne: King of the Franks, First Holy Roman Emperor, coronated on Christmas Day in 800 CE. But what about Karl der Grosse? Or Carolus Magnus? This isn’t a mere translation issue — the equivalency of these two names points towards the fundamental similitude of Germany and France as well as the nearly universal appearance of the name “Charles.” So Germany and France hate each other (see World War II, World War I, Franco-Prussian War… you know what — just check out the wikipedia page on the French-German Enmity). The EU was essentially founded to prevent another World War between the two — they even gave the Nobel Prize to themselves for so bravely refraining from war for a few decades. With this in mind, it’s a little awkward that France and Germany are historically the same. This issue is only possible because, until 1871, Germany wasn’t even a country and was more a general cultural idea. Historically, France is a part of this idea — the Franks (France and Frankfurt, Germany) were a collection of Germanic tribes occupying the continental Europe north of the Alps. The most famous of the Franks (apologies to Pepin) is known almost exclusively by his French name Charlemagne (Char le Magne) despite that his name was actually Karl (Karl der Grosse). Add this to to wiki on “French-German Enmity.” I remember thinking that it was pretty neat when I finally realized Charlemagne’s name is quite obviously “Charles the Great.” Investigating the relation between Charles, Char, and Karl, you quickly find an expansive list of other Karl derivatives: Carolina (North Carolina is named after Charles I, King of England), Charlotte (the city is named after the queen consort of George III), Caroline, Carla, Carl, Charlene, Carol, Carolyn, and Carlos. ## January 25, 2017 R Markdown Notebooks is a new feature for RStudio that allows for independent and interactive chunk execution, quick rendering of LaTeX, and selective updating of html files (i.e., the entire page does not have to re-rendered each time). This is a very cool advancement in literate programming that takes the best features of iPython notebooks and applies it to a R development environment. My continuing notes on the Introduction to Statistical Learning showoff some of these features. • Full Markdown capabilities • The ability to reference defined variables • See plots displayed below chunks. • See Tex code rendered as you go. The following will be automatically displayed as you type. $$$\begin{split} E[(Y - \hat{Y})^2] &= E[(f(X) + \epsilon - \hat{f}(X))^2]\\ &= \underset{Reducible}{[f(X) - \hat{f}(X)]^2} + \underset{Irreducible}{Var(\epsilon)} \end{split}$$$ I highly recommend you try it out. Reading about the features is quite underwhelming compared to seeing it in action. To start a notebook you need to save a file as .Rmd and add a header like this: --- title: "Notebook Title" output: html_notebook: toc: true number_sections: true pdf_document: default --- This will produce a PDF document with a table of contents and numbered sections. ## January 24, 2017 From the January 28, 2017 edition The Multinational Company: In Retreat: Multinationals, which account for a third of the world’s stock markets, are increasingly posting anemic performance results with declining profits and plunging ROE. The cause of this fall is that the opportunities that multinationals exploited in the international market are being “massaged” away: income is rising in the third world, mismatched tax treaties are being synchronized, and local firms are becoming more sophisticated. With a current rise in anti-globalism, the future direction and scale of multinationals are in question. More articles: • Replacing Obamacare: High Risk by Name: The alternative to the ACA that Republicans are touting relies on high-risk pools. High-risk pools gather all the unhealthy people into a single tranche and charges them higher premiums, thus allowing healthier people to not subsidize the cost of less healthy people. The problem is, of course, that healthy people do end up subsidizing the unhealthy because the high-risk pools require extensive government backing which is turn funded by tax payers. • New favorite term is the Herbal Tea Party — the liberal version of the conservative Tea Party. • Trade War Scenario: Apocalypse Now: Donald Trump’s suggested 45% tariff on imported good’s from China would end up hitting the poorest the hardest because they buy the most tradable goods. Such a tariff wouldn’t be the end of the world but would be quite uncomfortable for many. • The Academy and the Marketplace: Mathematical Transformations: Speaking of globablization, a recent paper has studied the impact of the liberalization of China following Mao’s death and the disintegration of the USSR on employment and productivity of math PhDs. The findings support that unemployment increased with the large influxes of both populations. ## January 23, 2017 ’Member when… • Maybe it shouldn’t be surprising that Princeton, the first football program, claims the most national titles at 29 — none of which occurred since 1950. Just to give you an idea of how ridiculous this idea is, Princeton’s first 7 national titles were won with with a total of 11 wins. Princeton claims national titles for years 1870 and 1872 were there final record was 1-0. • Yes this is ridiculous, but remember that a mere 90 years later, the Boston Celtics were winning multiple championships in a 8-team NBA. ## January 22, 2017 Watching • Parks and Rec: The campaign of Leslie Knope, a blonde woman who is unsubstantially and viciously attacked while she runs against a wealthy, bumbling, narcissistic imbecile, is spookily prescient. Listening • X-Files-Files with Kumail Nanjiani: An interesting factoid from Chris Weitz (writer of American Pie and Rogue One) is that directors are not allowed to direct extras too much (or at all) without paying them more (I guess at some point they transcend being a mere extra and advance to featured extra who gets paid more). • Hacker’s: Heroes of the Computer Revolution by Steve Levy, cont’d: A recurring topic is the “Hacker Ethic” centering on the freedom of information and devotion to exploration. Levy breaks his history into three parts: software hackers (MIT crew), hardware hackers (guys in California building personal computers), and game hackers (a third generation were the Hacker Ethic, like the light of the First Men of Numenor, is utterly diminished). Reading • The Book of the New Sun by Gene Wolfe: My anchor of reference for this book is Hyperion given that I just finished that a few weeks ago. So far very similar in quality of prose and world building, and I highly enjoy it. I decided to make a list of words I had never heard before. For now, I’ll leave this lamp-shade: “He mispronounced quite common words: urticate, salpinx, bordereau.” ## January 21, 2017 When Lawrence understood, it was as if the math teacher had suddenly played the good part of Bach’s Fantasia and Fugue in G Minor on a pipe organ the size of the Spiral Nebula in Andromeda—the part where Uncle Johann dissects the architecture of the Universe in one merciless descending ever-mutating chord, as if his foot is thrusting through skidding layers of garbage until it finally strikes bedrock. – Neal Stephenson, Cryptonomicon His outfit is a little bizarre. I thought he was a performer of some sort when I first came in, although I tried not to imagine the nature of his act. – John Kennedy Toole, A Confederacy of Dunces ## January 20, 2017 In this classic story, the Chinese sage Zhuangzi (ca. 370 BCE) awakes from dreaming that he was a butterfly only to ask the question: am I a man dreaming of being a butterfly or am I a butterfly dreaming of being a man? Daoists, scholars, philosophers, poets, artists, and laymen alike have all been equally moved by so profound yet so simple of a question. Although the concept has been elaborated and explored numerous times (there are certainly more and less sophisticated takes on the idea), I believe Zhuangzi’s simple story has staying power due to its simultaneous depth and shallowness. The very form of the story, incredibly simple yet profound in implications, underlines the point that distinctions between deep and shallow — between anything in fact — is ultimately fruitless. ## January 19, 2017 The earliest known representation of the Yin-Yang is not from China but from the late Roman Empire (ca. 430). The Notitia Dignitatum, which “details the administrative organization of the Eastern and Western Empires,” includes a depiction of the shield carrying a Yin-Yang symbol. So does this mean China and Europe were trading ideas a millennium before the colonial period? Of course! Asia and Europe have been in contact for a long, long time. But Notitia is not the smoking gun. The current version of the Notitia is actually a Medieval copy of an ancient document — meaning that it’s about 1000 years younger than the 430 date. ## January 18, 2017 The Australian Motoring Enthusiast Party is a micro political party that remarkably won federal representation in 2013. Let’s review a few spectacular facts from this Australian news article: • The Senator representing AMEP, Ricky Muir, is a 32-year-old former timber worker • Mr. Muir only won .51% of the primary vote • Mr. Muir will make$190,000 a year — \$16,000 more than a US Senator
• The party has no clear stances on any topic outside of anti-hoon regulations (FYI: hoon refers to making crazy car modifications and/or performing dangerous maneuvers in the street.)

This is not an irrelevant incident: in 2016, “eight senators representing tiny parties… hold the balance of power [in the Australian Senate].” Nor is it isolated: in 2016, the Pirate Party won 10 seats in the Althing. Ultimately, this represents a potential pitfall of the Parlimentary system (a system that many Americans would like to try out given the current two-party deadlock in America.)

## January 17, 2017

As someone who started with Stata and R for data analysis, I’ve always wanted to try a more general use language like Python. I worked through Python the Hard Way and played around with Dataquest (whose tips helped me build this blog). However, the best way of learning I have found is writing algorithms in Python.

Two of the cooler functions I have come across are zip and pop. zip essentially allows you to iterate over two iterables simultaneously. A trivial example would be

x = [1,2,3]
y = [4,5,6]

for i,j in zip(x,y):
print(i,j)

the output would be [1,4],[2,5][3,6]. I can’t think of how much time this simple function would have saved me if it was available in Stata.

list.pop[i] is like the opposite of append: it removes the specified element from the list. This might sound simple, but it is by far the easiest way of removing something from a list that I have come across in R or Stata. My first use of pop came in writing the inversion counting algorithm. Here is a snippet (B and C are both arrays of numbers):

while B and C:
if B[0] <= C[0]:
outlist.append(B.pop(0))
else:
count += len(B)
outlist.append(C.pop(0))

This chunk of code does the following:

1. Checks if element 0 of B is less than or equal to element 0 of C
2. If it is, then it removes that element from B and places it into outlist
3. If it is not, then it increases count by the number of elements left in B (this is part of the counting inversions) and then removes that element from C and places it into outlist (the effect is two sorted arrays)

## January 15, 2017

From the January 21, 2017 edition

Buttonwood: This weeks Buttonwood column addresses one of the pitfalls of the current trend towards protectionist policies: shielding established yet failing companies from displacement by global competition. Specifically, a paper from the OECD finds that companies that owe more than they make (interest-coverage ratio of less than 1 and are over 10 years older) might be stifling growth and lowering labor productivity. These older, less profitable companies use their lobbying clout (leveraging their employment size, no doubt) to pressure their respective governments into passing protectionist policies. To be sure, however, this isn’t a Right v Left issue: Sandernistas and Corbynistas alike were clamoring for anti-globalist policies as well.

Other articles:

• Free Exchange: Tariff-eyeing Policy takes a dive into the proposed tax reforms from the current administration including a look at Paul Ryan’s proposed VAT system
• Tata’s Sons: Chandra’s Challenge gives an update on the current leadership challenges of Tata Group (Hint: the not-Tata guy is out and the Tata-guy is in)
• Cigarette Companies: Plucky Strike drops the interesting fact that smoking is on the rise in Africa and Eastern Mediterranean
• Asian-American Voters: Bulls in a China Shop explores the ramifications of Chinese-American support for Donald Trump

## January 14, 2017

NFL Conference Championship Games

• The Patriots trounced the sleep-walking Steelers (I wonder how much that early morning wake up call affected them). I guess this should have been predictable, but the Patriots really haven’t played anyone recently so I though it would be closer. That being said, the Steelers implemented one of the worst gameplans in recent history by deciding to drop everyone in coverage and only sending a few rushers.
• Similarly, the Falcons demolished Green Bay in another snooze-fest. I still think Aaron Rodgers is technically the best QB in the NFL right now, but even he can’t overcome the insane number of injuries they’ve had (particularly in the secondary.)

• Another great week of college ball. The ACC continually pumps out terrific matchups (see Florida State-Louisville). I think the storyline of the year so far is the failing of this Duke team. I know Coach K is gone, but come on this team is stacked!

’Member when…

• Remember when Kansas won 12 games in 2007? And were ranked No.2 going into the last week of the season? Kansas hasn’t won more than 12 games in the past 6 seasons combined. 2007 has and forever will be the craziest year in college football.

## January 12, 2017

Watching

• Silence: Martin Scorcese’s passion project about Jesuit priests in early-modern Japan was right in my wheel house. It was somber and slow (like a good Kurosawa film) and about a topic that I studied frequently during my time in at the Divinity School (that topic deserves it’s own post). I particularly appreciated the absence of a mustache-twirling evil Jesuit missionary priest.
• Parks and Rec: an affable comedy series that feels a little before it’s time given the current political climate.

Listening

• X-Files-Files with Kumail Nanjiani: This is a fun podcast about the X-Files with Silicon Valley star Kumail Nanjiani. It’s pretty funny and appropriately intellectual given the excellent writing of the show. Some of his guests are quite good: Darin Morgan (Flukeman, writer of the best episodes of the X-Files), Glen Morgan (frequent writer for the X-Files, Darin’s brother), Chris Weitz (writer of About a Boy and Rogue One), and Dan Harmon (Rick and Morty) to name a few. I vividly remember watching the X-Files as a kid on Friday/Sunday nights and it’s been great reliving the zeitgeist of the moment.
• Hacker’s: Heroes of the Computer Revolution by Steve Levy: This is a fun book about the history of hackers. So far I’ve finished the first part about the first hackers who grew out of the Tech Model Railroad Club at MIT. Also of note is the hacker hatred of IBM — now that famous Ridley Scott-directed Apple commercial from the 1984 Super Bowl makes a lot more sense.