Friday, April 29, 2016

Review: Matterhorn

My standard for Vietnam War books is The Things They Carried, by Tim O'Brien. But Matterhorn might very well replace that. Matterhorn is the name of a firebase during the Vietnam war, and the novel follows the travails of Bravo company, amongst which is one Lieutenant Mellas, a college educated Marine Corps officer who for idealistic reasons, opted not to go for deferment and ended up in the infantry instead.

One by one, you get to know other members of the company, officers, NCOs, machine-gunners and yes, the guy who's only got a few weeks left to go on his tour and is dreaming of going back to the girlfriend he left behind in Thailand. The story is good, with Bravo company getting screwed over by senior military officers who're trying to make themselves look good at the expense of the men they command.

If you're wondering why a Vietnam War novel might be relevant to a software engineer, I think this short passage might change your mind:
“You know why we’re really strung out in this fucking death canyon?” Mellas didn’t know, so he just grunted. “Because Fitch doesn’t know how to play the fucking game. That’s why. He’s a good combat leader. I’d literally follow him to my death. But he’s not a good company commander in this kind of war. He got on Simpson’s bad side because he got his picture in the paper too often and never gave Simpson credit, which by the way he doesn’t deserve, but that’s the point. The smart guy gives the guy with the power the credit, whether he deserves it or not. That way the smart guy is dangling something the boss wants. So the smart guy now has power over the boss.” (Loc. 3841-47)
Over and over again, the novel doesn't flinch from the power politics that are played at high levels in a corporation (and in this case, the Marine Corps is just as functional or dysfunctional as any large corporation). At one point, Bravo company is tasked with digging trenches and building bunkers to defend a hill --- only to be told to abandon it to prepare for another assault elsewhere in Vietnam. Whereupon the North Vietnamese Army (NVA) promptly take over those defenses and Bravo company is then tasked with assaulting the very defenses they had built from a disadvantageous position. The poor Google engineers who built the very first version of Google Drive were similarly told to abandon it, only to have to launch again after Dropbox proved that the market existed and is pretty lucrative must have felt very similar to the marines in Bravo company. In fact, just as some of the high performing officers were unfairly blamed by their commanding officers for incompetence, I myself heard a Senior Staff Engineer at Google blame the former tech lead for Google Drive for failure to push against the killing of the project.

There's a passage where Mellas thinks about the Colonel in charge of the operation:
Mellas would probably have said that Blakely didn’t have what it takes, but Mellas would have been wrong. Blakely would have performed a lower-level job just as well as he performed his current job—competently, not perfectly, but well enough to get the work done and stay out of trouble. He’d make the same sorts of small mistakes, but they’d have a smaller effect. Instead of sending a company out without food, he might place a machine gun at a disadvantage. But the Marines under him would make up for mistakes like that. They’d fight well with the imperfect machine-gun layout. The casualties would be slightly higher, with slightly fewer enemy dead, but the statistics of perfection never show up in any reporting system. A victory is reported with the casualties it takes to secure that victory, not the casualties it would have taken if the machine gun had been better placed. There was nothing sinister in this. Blakely himself would not be aware that he’d positioned the machine gun poorly. He’d feel bad about his casualties for a while. But reflecting on why or for what wasn’t something Blakely did. Right now the problem before him was to engage the enemy and get the body count as high as possible. He wanted to do a good job, as any decent person would, and now he’d finally figured out a way to do so. He might actually get to use the entire battalion in a battle all at one time, an invaluable experience for a career officer.  (Loc. 6174-84)
That's the reality of management in a big organization, and an inherent limitation in the data-driven management techniques used today. Suboptimal code (or machine gun placement) sure as heck matters to the marines who get killed because of it (and to the engineers who have to maintain or work-around the problems), but it's not visible at all in the aggregate level to senior management. As a result, incompetent managers with serious political skills get promoted far more frequently than competent managers who lack such skills. In a high quality organization (like the Marine Corps or Google), the rank-and-file who get hired (or enlisted) are so good that they can make even incompetent managers look great. In fact, in certain circumstances, high casualties, constant war-rooms, and constant enemy engagement can make such managers look like stars, even though a better manager could have avoided all of the above. (And no, I have no idea whether the Marine Corps or Google's rank and file are really that far above average nowadays, but back when I was at Google, the average engineer was really really good, and in many cases much better than the average manager)

I'm at risk at this point of making this novel sound like a treatise in office politics, self-promotion, and lessons in how to make yourself (and your boss) look good rather than a great novel.  Let me try to disabuse you of that. It's a great novel. It's got great characters, a transparent prose style, an interesting plot and setting. It explains why the North Vietnamese beat the Americans despite the latter's overwhelming technology advantage: the terrain and weather negated most of the advantages the Marines had over their enemies, and organizational dysfunction took care of the rest.

But at this point, the novel has won so many awards and accolades (it took 30 years to write and publish!) that anything I can say about the conventional aspects of the novel can be (and probably has been) better said elsewhere by professional reviewers. The novel delivers everything a novel should deliver, and provides lessons and entertainment in spades. I paid $2 during a Kindle sale for it, but knowing what I know now would not hesitate to pay full freight. Buy it, read it, and enjoy the heck out of it. And as you do read it, the management/political lessons it provides might turn out be really useful in your career. That makes this book highly recommended.

Thursday, April 28, 2016

Review: Beyond the Tiger Mom

Most parenting books are a joke, especially ones like Beyond the Tiger Mom. They ignore statistics, don't examine best practices from research, and are written pretty badly, never taking a paragraph to say something when 10 pages from a chapter would do.

I picked up Beyond the Tiger Mom because it was written by a woman (Maya Thiagarajan) who'd moved with her family from the USA to Singapore. She was an English major, of Indian descent, and also a school teacher, which gave her an insider's perspective on both educational systems. Singapore's an interesting case, since I have personal knowledge of the system from having been educated within it. From a global perspective, Singapore's educational system competes successfully with the best schools anywhere. One of the board members of an elite private school was telling me that the school he sat on the board on had the largest number of perfect scores on an economics test in the US, and was globally only second to "some school in Singapore." I immediately guessed it was Raffles Junior College my alma mater), and he confirmed it.

The issue with the Singaporean system for teaching math (or almost any other subject, for that matter), is that it's extremely exam and test focused. This is great for producing awesome scores, and you really can't argue with the results. What it's not so good at is producing motivated students who can reason their way to a novel solution. Thiagarajan acknowledges this in the book, but also points out that in aggregate, the Singaporean approach produces more students who are more capable than US:
East Asian countries with standardized exam systems tend to benefit students at the bottom of the economic ladder. In his provocative book Re-Evaluating Education in Japan and Korea: Demystifying Stereotypes, Professor Hyunjoon Park of the University of Pennsylvania uses PISA and TIMSS results to show that the bottom students in Japan and Korea 31 perform very well on these tests compared to low performers in other nations. While the top students in America are on par with the top students in Korea and Japan, the bottom students in America are far behind the bottom students in Korea and Japan. Similarly, I am repeatedly amazed that every child on the island of Singapore, whether rich or poor, is required to take the extremely rigorous and conceptual PSLE math exam. (Kindle Loc. 1503-10)
 To some extent, math at the primary school level is fairly straightforward: you can pretty much memorize the multiplication table, learn the algorithms, and then do well on the exams. At the higher levels where there's a need to understand the concepts is where the exam-focused approach falls apart, though in recent years Singapore has improved dramatically with the introduction of word based math problems, where the student is expected to translate a real-world problem into math and then solve the problem that way.

The real issue with Singaporean-style education comes from reading. Thiagarajan observes that Singaporean-style English education pretty much ignores reading for pleasure:
“The problem with Chinese kids is that they don’t think about reading books at all. Books are to be studied for exams, but the concept of reading for pleasure hasn’t really taken off in Asia.” (Loc. 1053-54)
To some extent this is endemic in American culture as well, since the statistics are that the average American reads about 1 book a year after leaving college. But the tradition of Dad reading to kids before bed-time is embedded deeply into American culture, while there's no such tradition in Asian culture. (And it was very rare to see a Singaporean adult reading while waiting for the bus at bus stops --- while if you board an American domestic flight you'll see Kindles pretty much everywhere)

 Thiagarajan also points out that pretty much no Singaporean students ever get unstructured outdoor play time, leading to the highest myopia rates in the world:
When I first arrived in Singapore, I was simultaneously impressed and perplexed by the number of sparkling swimming pools and well-manicured public parks and playgrounds in the city. These spaces are beautiful, making this little island feel like a resort, a paradise for children. Nonetheless, these spaces are often empty, particularly during the week; if there are children splashing or running about, they tend to be children who attend international schools— “expat kids.” Where are all the local Singaporean children? There’s an easy answer to this question: they are at tuition. Or they are at home studying. Or they are in special classes, learning to develop additional talents and skills. (Loc. 1664-70)
Of course, the tropics are notoriously un-fun for outdoor activities. I definitely didn't ever see the point in hiking or camping until I arrived in the US.

All this portrays a relentlessly competitive society, with an eye on practical achievements.
Chinese teacher I interviewed told me, “every Chinese mom’s worst nightmare is that her child will decide to be an artist.” (Loc. 2651-52)
In other words, a lot like the San Francisco Bay Area, where competitive parenting is the primary sport most parents engage in. The book's an entertaining read, and it has lots of pages where Thiagarajan gives you tips on parenting (not that she has any research or special expertise to provide). It's recommended but for entertainment value, rather than for her recommendations on how your child can be better cultivated. And boy am I glad I left Singapore, and I'm not unhappy that my 2 sons have a chance to enjoy a little bit more childhood than I did.

Wednesday, April 27, 2016

Review: The Grace of Kings

I'm a huge fan of Ken Liu's short stories. The guy's pretty much managed to win an award with every story he published, and deservedly so. I was nervous, however, about him writing a novel, and a fantasy novel at that. So I checked The Grace of Kings out of the library instead of rushing to buy it.

The prose style of The Grace of Kings is that of Romance of the Three Kingdoms. The characters are larger than life in much the same fashion, but with more fantastical/mechanical devices, including airships, submarines, and battle-kites. It's fun reading, evocative of that ancient Chinese novel but telling its own story. The characters don't really develop as such, but rather, do what the plot demands of them. As a result, brothers betray each other, wives play political games that they later regret, and generals commit egregious tactical blunders for no particular reason.

While it's not a waste of time to read it, I suspect I'll be checking out the next volume (yes, it's book 1 of a trilogy) out of the library rather than rushing to buy and read it.

Tuesday, April 26, 2016

Review: Sapiens - A Brief History

Knowing that I was heading off for Japan, I picked up a couple of books during an Amazon digital sale. Sapiens: A Brief History of Humankind was one of them. It's an extremely readable book and covers human pre-history, the development of agriculture, and the rise of technological society.

The grand themes of the book are a lot of fun, and the book is written in a compellingly readable manner, such that even when it was covering material I'd already read elsewhere, I didn't feel put upon going over it again. For instance, on the idea of memes:
People easily understand that ‘primitives’ cement their social order by believing in ghosts and spirits, and gathering each full moon to dance together around the campfire. What we fail to appreciate is that our modern institutions function on exactly the same basis. Take for example the world of business corporations. Modern business-people and lawyers are, in fact, powerful sorcerers. The principal difference between them and tribal shamans is that modern lawyers tell far stranger tales. (Kindle Loc. 473-77)
 Along the way, Harari manages to dispel such myths about the agricultural revolution:
The body of Homo sapiens had not evolved for such tasks. It was adapted to climbing apple trees and running after gazelles, not to clearing rocks and carrying water buckets. Human spines, knees, necks and arches paid the price. Studies of ancient skeletons indicate that the transition to agriculture brought about a plethora of ailments, such as slipped discs, arthritis and hernias. Moreover, the new agricultural tasks demanded so much time that people were forced to settle permanently next to their wheat fields. This completely changed their way of life. We did not domesticate wheat. It domesticated us. The word ‘domesticate’ comes from the Latin domus, which means ‘house’. Who’s the one living in a house? Not the wheat. It’s the Sapiens.  (Kindle Loc. 1289-94)
The agricultural revolution was basically a trap: by making wheat, rice, or other staples more productive, the descendants of foragers were fooled into settling next to the fields, producing more children (a success for their genes) but dooming them into a life of toil and ill-health compared to the easy lives the foragers had.

Harari points out that mass extinctions are also not something recent:
Don’t believe tree-huggers who claim that our ancestors lived in harmony with nature. Long before the Industrial Revolution, Homo sapiens held the record among all organisms for driving the most plant and animal species to their extinctions. We have the dubious distinction of being the deadliest species in the annals of biology. (Kindle Loc. 1213)
Once Harari gets to civilization, the history is more serious but no less interesting. He points out that monotheism isn't necessarily more sophisticated than polytheism or dualism:
So, monotheism explains order, but is mystified by evil. Dualism explains evil, but is puzzled by order. There is one logical way of solving the riddle: to argue that there is a single omnipotent God who created the entire universe – and He’s evil. But nobody in history has had the stomach for such a belief. (Loc.3417-19)
He points out that the rise of science and enlightenment in recent centuries has been a break from the past in terms of the acknowledgement of ignorance. Prior to modern science, human cultures have always thought that all that was knowable or worth knowing was already known. You didn't ask how old the earth was by consulting empirical sources --- you read the bible carefully to try to figure it out. In traditional human cultures (much as is described in the Lord of the Rings), the past was always better, ancient traditions had all the answers, and questions that were not answered by tradition weren't worth asking. It is the breaking of this tradition that held the secret to scientific progress.

All in all, the book's very much worth reading and very entertaining. Recommended.

Monday, April 11, 2016

Review: Amplitude (PS4)

I backed Amplitude (PS4) as a kickstarter project despite having no prior experience with the PS2 game. I guess the Harmonix name on the sticker sucked me in. Like all music/rhythm game, this is a game where the story doesn't matter, even in campaign mode.

You essentially fly a space ship with notes flying towards you. Each song is represented by a series of tracks, and you get to pick which track's rhythm you'd like to work on. Each track only has 3 notes (left, middle, right), and those are played using the face buttons on the controller (square, triangle, circle). Pushing those buttons at the right time, fires the space ship's blaster at the note and it finishes. Complete a measure successfully and the track goes away, and you can use the directional buttons or joystick to move to another track. The last face button (cross) activates various special abilities which you unlock as you successfully play a measure.

As far as music games go it's very abstract. It's an entertaining diversion, but by far my biggest problem is that the songs aren't very memorable. Or at least, I didn't feel that any of them were interesting: it all sounded like random techno pop to me, which made it less than motivational for me to consider playing it through on a harder difficulty.

I can see how this game could have been considered ground-breaking back before Guitar Hero and Rock Band, and it's nice to be able to just use the controller instead of a special device. I'm afraid I got way more out of Resogun than this. Not recommended.

Friday, April 08, 2016

Review: The Rise and Fall of the British Empire

There's something extraordinary about the British Empire. If you look at a world map, and visit England, you can't help but wonder how such a tiny nation with such seemingly gentle people built an empire where the sun never set. Even now, there's an argument to be made that the sun still has not set on all British territories.

The Rise and Fall of the British Empire is a great courses audio book about this history, and it covers roughly the events from the 1600s to the post world war 2 era. It is an astounding 18 hours long, and is extremely detailed. Let's see if I can summarize the salient points:

  • The British Empire was more or less accidentally created, not by intention, but by the founding of various companies which were given charter to exploit trade with various territories. These companies ended up dominating India, Africa, and various other territories, but had no desire to actually rule people, and so eventually the job of ruling was given over to the country itself.
  • That meant that the Empire was actually built very cheaply, and the early conquests were made primarily through technological superiority, not through hard-fought battles.
  • The corollary to this is that England could never rule any part of continental Europe, and never had any pretensions about doing so. Ironically, this meant that a single-minded focus on the Royal Navy served both as defense and as an extension of the empire's reach.
  • Early on in the history of the Royal Navy, an execution of a British sea captain for not engaging with the enemy when the opportunity arose, led to a culture within the Royal Navy of being aggressive in its actions. This led to a positive feedback loop culminating in the Royal Navy's dominance of the waters.
  • Unlike many other empires, the British Empire learned its lessons from the American Revolution, which led to a self-rule amongst its white colonies and eventual independence of countries like Canada, New Zealand, and Australia.
  • The African, Indian, and Asian colonies, however, agitated for independence after World War 2, and the British were in a hurry to get rid of them as well. Not only was the public sentiment against retaining the empire, they were also costing the empire money which the public wanted to put into Britain's welfare state. These hurried exits rarely turned out well in Africa, where Botswana's the only one that has had a continuous democracy. South Africa itself had a terrible history with apartheid, while the rest of the former British colonies became ruled by dictatorships.
  • The British empire was the first (and only) country to abolish slavery without a (civil war) like in the US. It abandoned slavery even though it had a strong monetary incentive to continue with the institution, and used its navy to blockade slave shipments across the Atlantic. The British continue to be very proud of this, justifiably so.
  • The British was over-stretched by World War 2, and quickly had to be second place to the Americans by the end of the war, taking orders from the American government rather than dictating the terms of engagement. In particular, Roosevelt determined that Americans should not fight to help Britain maintain its empire.
As you can see, a study of the British Empire quickly turns into a history of the USA, Canada, Australia, New Zealand, India, Malaysia, Singapore and even parts of China. It's a monumental undertaking and I think Prof. Alitt did a great job. The only weakness I can find is that I wish he'd organized the themes better, rather than the whole audio book being a chronological narration of events.

Regardless, however, this is a massive info dump, and contains many titbits that I wasn't aware of before, including details of Mahatma Ghandi's life and the Indian independence movement. I recommend it, but after coming from the science-oriented courses, it does feel a bit of a slog and I'm glad I chose to be a computer scientist instead of a historian.

Wednesday, April 06, 2016

Review: The Sculptor

The Sculptor is Scott McCloud's graphic novel about art, young love, and a deal with death. The protagonist is David Smith, who has a meeting with Death at a depressed time of his life: he's lost his family, his girlfriend, his supporting patron, and the money required to acquire more raw material to sculpt. Death grants him a gift which could potentially make him the greatest sculptor of all time, in exchange for giving him only 200 days to live.

The story can't possibly be that simple, of course, and the course of his life soon takes a turn and he meets someone truly special. Along the way we discover the true nature of David Smith's successes and failures: he's not a people person, speaks his mind too quickly and too loudly, makes assumptions about people that are unwarranted out of ignorance, and is a very flawed human being. What I liked abou McCloud's depiction of Smith is that he gets you this nuanced view of Smith indirectly, slowly unveiling it. You understand his strengths, his will, and his devotion to his art as well.

As a story, McCloud steadfastly ignores all the possibilities for a typical Hollywood ending, and the logic of the tale remains consistent all the way to the end. It's very well done, and every time I think I have McCloud's story worked out, he surprises me with a "twist" that nevertheless makes sense in the context of the story.

The artwork of the novel is simplistic in style, though not simple. McCloud clearly understands the medium he works in and makes great use of it.

Unfortunately, the limitations of the graphic novel also has me thinking that in many ways, this story could have been told better as a movie. In the pre-CGI days, I think it would have been true that The Sculptor would be too expensive to be told as a comic book, but that's no longer true. It is true, however, that telling it as a graphic novel ensures that McCloud controls every aspect of the story, including the visual presentation, but all through reading the novel I thought it could be done just as well (with appropriate actors and directors, of course) as a film.

In any case, I can recommend the novel. It's short (2 hours reading time), explores interesting themes, and is executed competently. I'm glad I picked it up.