April 11, 2017

Beware the Index Fund

As Toshiba seems poised for a fall, it seems like it is time to pay attention to size. A nice article in Bloomerg today highlights a systemic risk in worldwide megacorporations. For years, management, investment bankers, and investors have benefitted from encouraging an M&A boom. I like to play the game Acquire with my kids, and so they can tell you that management loves acquisition because of all the bonuses. Bankers love mergers because they generate lucrative fees. And investors will pay a premium for merged companies because they have less overhead, better access to capital, and better pricing power.

But giant companies are horrible places to work: when there are five layers of management separating the work-doers from the deciders, everybody starts triple-guessing their boss's boss's double-guessing. Having the best of intentions, employees spend their efforts making plans for the pre-meeting before the planning meeting about the big meeting, and everybody's IQ is wasted on palace intrigue.

Asia has this problem in a special way. It has been popular for Asian governments to encourage megacorporations as instruments of state policy, and this has resulted in the phenomenon of the giant zombie companies in Asia.

And this brings us to the biggest financial risk in the world today: the massive slow-moving failure of China's state-owned enterprises. These companies make up 30% of the the world's largest economy and include all the country's biggest oil, electricity, construction, telecom, automotive, and shipbuilding companies. The government is afraid to let them fail, so they are insulated from ordinary market pressures, and historically rife with corruption.

Chinese SOEs are notoriously inefficient, and the problem has been getting worse. When global trade stalled in the wake of the 2008 global financial collapse, China picked up much of the slack by artificially pumping up production and buy building up massive amounts of debt in SOEs: estimates are that 90% of China's GDP growth post-2008 comes from these SOEs. Unfortunately, smart industrial policy is dumb business: nobody's buying what SOEs are making.

It is easy to point at China and see how bad their megacorporations are. But coming back to the U.S., it seems to me that it's time to scrutinize our own assumptions about size. When you buy an index fund, you are trusting companies in proportion to their size: the S&P 500 index is mostly 50 megacorporations, including several "beauties" such as Comcast, Exxon, and Verizon that resemble SOEs in the way they make money by manipulating government regulations. What happens to our index funds when the zombies fall, political and financial fashions change, and it is no longer desirable to be large?

Beware the market-cap-weighted index fund.

Posted by David at 10:05 AM | Comments (0)

March 25, 2017

Does Watching Fox News Kill You?

A note to forward to your uncle when you urge him to cut it out with the Fox News habit: watching Fox News might kill you.

Here's the evidence. Starting around 2000, Fox News began dominating cable news viewership with a sensationalist formula that targeted non-college-educated middle-class non-latino white viewers. Today, the NYT points out that even as conservative Republicans dominate political power in the U.S., Fox retains its uniquely apocalyptic tone, depicting the world as a relentlessly dark and dangerous place. Nobody delivers negative news more consistently than Fox.

The other meme circulating today is the remarkable finding that, since 2000, there has been a unprecedented rise in death among non-college-educated middle-class non-latino whites, driven by an explosion of suicides, alcoholism, and drug addiction. Researchers are puzzled why this phenomenon seems to affect this narrow community only.

What happened? The dominant theory is that this community has faced a sudden collapse in employment opportunities. But globalization and automation are equal-opportunity employment threats that affect blacks and latinos even more severely than whites. Job losses also do not explain why the phenomenon would begin at the height of the internet boom years with low unemployment across the economy. Why are suicides narrowly rising among this white population, and why suddenly starting in 1998? Did this group face some new specific public health danger that started at that time?

Of course they did. It is well-known that hours of TV watching is linked to depression. But more specifically, a study by Johnston and Davey found a direct link between negative-news-watching and mental health: consuming negative news stories makes you exaggerate the importance of your own personal problems, including problems completely unrelated to the news. This cognitive distortion, called catastrophizing, is linked to anxiety, depression, and - especially in those who suffer chronic pain - suicidal thoughts.

So here's the theory. Watching too much negative news when you are suffering pain can make you oversensitive to your pain (and maybe over-consume pain medication), and it can also make you suicidal. Black and Latino and college-educated populations (and whites before the launch of Fox in 1996) are inoculated from this mental health problem because they do simply not watch Fox. Unemployment alone does not explain the death rate, because it is not getting hurt and losing your job, but after that, sitting at home consuming a regular diet of Fox News, that leads you to catastrophize your personal pain. It is the combination of bad circumstances and bad news that drives you to despair, alcoholism, opioids, and suicide.

So when you get sick and are stuck at home, out of work, you should turn on Netflix and watch a fun movie to cheer yourself a bit. And knock it off with the Fox - that stuff can kill you.

Graph at the top: USW is mortality rates of non-college-educated non-latino whites in the U.S. Graph at the bottom: comparative viewership of Fox News versus other cable news outlets.

Posted by David at 10:16 AM | Comments (3)

January 30, 2017

Our National Identity

Some Democratic operatives are delighted about the crowds flocking to airports and are imagining ever-bigger crowds as a list of favorite liberal policies are threatened by Trump.

If you put other issues on the same level as immigration, you are blind to the real battle being fought. The Democratic leadership does not seem to understand that the issue of immigration is special, because the battle is fundamentally one about national identity.

We are a nation of immigrants.

Trump is all about attacking this identity: his orders say that this nation belongs only to the whitefolk who list their ancestry on Census forms as "American." Identity is special. People will suffer tariffs, corruption, crumbling schools, pollution, and sickness without a fight; but people are enraged when you attack who they are.

Posted by David at 08:17 PM | Comments (0)

Outrage is Not Enough

Dear Senator Warren,

My wife and I are your constituents: we are technology and healthcare professionals who are ethnically Chinese and whose families immigrated to the U.S. in the 20th century. Our families came to the United States because of its democratic values, because of its constitutional protections against oppression, and because of its culture of inclusiveness and opportunity for all. We have enjoyed the education here, and we have built a productive, happy life, improving the health of our neighbors and creating inventions for the world.

In recent days, we have been alarmed at the speed at which constitutional protections for our minority neighbors have been stripped without reason. Officers of the Department of Homeland Security have not only carried out Trump's unconstitutional travel orders, but they have ignored court orders staying airport detentions. We are strong supporters of legal defenses and are contributing to their efforts, but the legal system, we fear, provides little protection when the law-enforcement branch of the government does not respect the rule of law. Law, in the end, is a form of customary behavior, and history has shown how easily the basic customs of society can be cast aside when those who wield power simply ignore the law. We must recognize it as a grave crisis of government.

Under the new American system being built by Trump, we can see that legal protections for minorities will be stripped, and that minorities will face economic, institutionalized, and cultural discrimination. We can see that our immigrant friends and neighbors will be imprisoned, interrogated, and deported. We see our government engaging in the kind of oppressive treatment that our parents and grandparents fled when coming to America.

There have been many reports of various people expressing “grave concern” and even “outrage.” Expressing outrage is not enough: we must stop this before opposition becomes impossible. We implore you to help find a way to organize and harness these concerns into an effective response that goes beyond outrage. We do not want our daily efforts, our tax dollars, and our standing as Americans going to support violations of the constitution. What else can we do to stop this catastrophe?

David Bau and Heidi Yeh
U.S. citizens and residents of Massachusetts

Posted by David at 07:47 AM | Comments (0)

December 07, 2016

A Warning From 1937

During these days of rising Trumpism, it is instructive to go back to 1937 and ask an ordinary German citizen why they joined the National Socialism party. We can do this because Milton Mayer did. Here is an answer from Heinrich Hildebrandt, a schoolteacher who recalled his experience when joining the Party in 1937, given in an interview shortly after World War II. His words cut to a deep, difficult truth: the Nazi party drew its strength from the power of social acceptance.

There were good things, great things in the [Nazi] system [although] the system itself was evil...

Perhaps I should make it singular rather than plural. The good thing. For the first time in my life, I was really the peer of men who, in the Kaiser time and in the Weimar time, had always belonged to classes lower or higher than my own, men whom one had always looked down upon or up to, but never at. In the Labor Front - I represented the teachers' association - I came to know such people first hand, to know their lives and to have them know mine.

Even in America - perhaps; I have never been there - I suspect that a teacher who talks about 'the common people' has never known one, really known one, not even if he himself came from among them, as I, with an Army officer as a father, did not. National Socialism broke down that separation, that class distinction. Democracy - such democracy as we had had - didn't do it and is not doing it now.

In 2016 we are a lifetime away, but people are the same, and I think this is a core appeal of Trumpism today. Trump is the blue-collar white-trash billionaire who brings together a group of common people and sees them, really sees them, as peers. His racism, shoot-from-the-hip thinking, crude language. conspiracy theories and lack of intellectual rigor - these are all forms of commonfolk thinking, and Trump accepts them, adopts them, and meets them as equal to him - really equal.

It is also a mirror image of the political failure of the current Democratic party. We Obama/Clinton Democrats are a mix of Harvard policy wonkishness, MIT scientific rigor and Wellesley political correctness. While the Democratic party wants to think that it works in the best interests of the common man, it does so with sterile academic arguments that are incomprehensible to and uncomprehending of regular folks. Democratic policies are for your own good because experts say they are. The delivery is paternalistic instead of a meeting of equals.

People are ordinary, not elite. And there is huge power in the feeling of acceptance, membership, and treatment as true equals that Trump's approach can bring. Of course that does not mean that it is ultimately good for the world.

This is the warning from 1937 that we should all heed.

Posted by David at 02:03 AM | Comments (0)

November 18, 2016


The media has started to use the word 'nativist' to represent a common point of view within the Trump administration. I do not think this word is appropriate. I makes it sound like the incoming administration is very pro-native-American, which conjures images of expanding rights for the Cherokee nation.

The word is not accurate. The media is just too afraid to call it what it is.

The correct word is 'racist'.

Posted by David at 02:26 PM | Comments (1)

November 09, 2016

A Demon-Haunted World

America, welcome to the Demon-Haunted world: we have arrived at the moment Carl Sagan foretold 20 years ago.

I have a foreboding of an America in my children's or grandchildren's time — when the United States is a service and information economy; when nearly all the manufacturing industries have slipped away to other countries; when awesome technological powers are in the hands of a very few, and no one representing the public interest can even grasp the issues; when the people have lost the ability to set their own agendas or knowledgeably question those in authority; when, clutching our crystals and nervously consulting our horoscopes, our critical faculties in decline, unable to distinguish between what feels good and what's true, we slide, almost without noticing, back into superstition and darkness.

A Demon-Haunted World was written in 1997. Time to take notice.

Posted by David at 10:28 AM | Comments (1)

October 20, 2016

By the People, For the People

Our presidential debates have turned into a reality-TV shouting match, which should not be surprising given the background of the Republican candidate. Here is an antidote to the vitriol, and a reminder of what self-governance is all about. Please volunteer, organize, contribute, and vote.

Posted by David at 01:41 PM | Comments (0)

October 08, 2016

Integrity in Government

More than half of GOP insiders believe the Trump campaign can weather his misogyny and racism, which speaks volumes about the vision that Republicans have for government. For them, the racist vote is a path to power, principles be damned. And it clarifies how the GOP is destroying our democracy. Moderate Republicans such as Kelly Ayotte have started to disavow Trump, but the fact remains: a 2016 vote for any Republican is unconscionable. A vote for a Republican of any stripe feeds the destructive cynicism that created Trump.

In contrast, efforts by Russian spies to leak the most damaging emails from the Clinton offices actually reveal how squeaky-clean the Democrats are. At Goldman Sachs she was critical of banks behavior leading up to 2008; she supports free trade if it benefits labor and environment. And her emails reveal her close consultation with Elizabeth Warren on economic policy. Clinton in private is even better than I had assumed: she is a tireless coalition-builder who talks to both bankers and progressives and keeps her eye on the ball. Let's give her a Congress that isn't poisoned with cynicism.

Please join me in donating to as many Democratic congressional candidates as you can afford. This year I am donating more money than I have ever donated before, and I hope you join me. Senate candidates like the wonderful Governor Maggie Hassan need support, but even more, the highest impact can be had by donating to smaller Congressional races. House races can be surprisingly small-money affairs, and even just a few well-placed donations could help flip a seat.

Can your one donation move the needle? For non-incumbents in congressional races, it can. Consider that in an average congressional district, flipping about 3000 votes swings the election by 1%. Good candidates who start off unknown can earn several votes per dollar of outreach, because yard signs, door-knocking, local events, and advertisements can dramatically improve name recognition. So with one $2700 donation, you can easily move the outcome by a percent.

Can we flip Congress to the party that demands integrity in government? As stewards of the fragile American democratic experiment, it is our solemn duty to try.

Donate to these candidates to flip Congress:

MI-07: Gretchen Driskell - Pro-infrastructure pro-education state representative. Has $1m vs $1m opposing pro-gun pro-war partisan nut Tim Walberg.

NY-23: John Plumb - Navy veteran, representing Corning, Has $556,393 vs $1.1m opposing NRA candidate Tom Reed.

VA-05: Jane Dittmar - Moderate businesswoman and county supervisor. Has $282k vs $54k opposing anti-immigrant Tom Garrett for open seat.

PA-16: Christina Hartman - Civic activist from Lancaster County. Has $205k vs $203k opposing Republican nut Lloyd Smucker.

CO-03: Gail Schwartz - State senator advocating environment and education. Has $549k vs $986k opposing banking deregulator Scott Tipton.

CA-49: Doug Applegate - Military vet in San Diego. Has $135k vs $3.7m. 45.5% vs 50.5% opposing partisan nutjob Darrell Issa. Issa is the wealthiest member of congress, and a real asshole. Surprisingly, in his heavily republican district, Applegate is polling even, so a donation here could swing the district and also help change the tenor in Congress.

CA-21: Emilio Huerta - Representing agricultural workers in one of the poorest districts in the country, with majority latino demographics that should not vote for the party of Trump; yet Huerta is an underdog. He is a labor lawyer who won a contested democratic primary. Has $57k vs $1.3m and opposes oil-industry-supported David Valadao.

FL-07: Stephanie Murphy - Vietnamese-American Banker/Consultant/Defense specialist representing central Florida including Orlando. Has $154k vs $750k opposing anti-immigrant partisan John Mica. Constituents dislike Mica but do not know Murphy: in polling she is statistically tied with Mica despite having only 30% name recognition in the district (vs Mica's 60%), so a donation here could win the race.

CA-25: Bryan Caforio - Young lawyer advocating for the middle class, energetic campaigner. Has $137k vs $650k, opposing anti-tax pro-gun Steven Knight.

IN-09: Shelli Yoder - Former Miss Indiana and business school lecturer competing for an open seat. In a statistical tie, has $504k vs $612k opposing super-rich tennessean out-of-towner Christian Conservative Trey Hollingsworth.

CA-10: Michael Eggman - Small bee farmer representing small business in one of the poorest agricultural districts in the country. Has $461k vs $2.5m. 27.6% vs 47.7% opposing anti-tax Jeff Denham. It’s a rematch: Denham beat him with 56% of the vote in 2014.

AZ-02: Matt Heinz - Gay doctor, state representative for Gabby Gifford’s seat. Has $290k vs $2m opposing Raytheon money recipient Martha McSally.

Posted by David at 10:26 AM | Comments (0)

June 17, 2016

Thinking Slow

For decades, high speed trading has been sucking the blood out of the world's capital markets, and the answer has been clear for some time: find some way to force transactions to move more slowly.

So today's approval of IEX as an exchange is a big deal. How much do you have to slow down trades to get a fair deal? IEX has found that 350 microseconds is enough! Less than 1/100 of the time of an eyeblink for a human, that's enough time for a photon to travel about 60 miles. For computers, that is apparently slow enough to make high-speed arbitrage completely untenable.


Posted by David at 10:01 PM | Comments (1)

May 01, 2016

Whose Country?

When Trump said today "we can't allow China to rape our country," it reminds me of my conversations with folks on an airplane to Tennessee a few weeks ago, which is deep Trump territory.

No matter how often I reminded my airplane seatmates that I grew up in New York, I am an American citizen, I work for an American company, I went to school in America, I do not speak Chinese, that my family has been in America for more than 100 years, that my family served in the U.S. army, that I do not like China or the way their government is run, it did not matter.

I look Chinese. So the Trump supporters kept referring to China as "your country," telling me how terrible "your country" was (meaning China) and telling me what they thought of "your people" and "your leaders". Watch the pronouns "us" and "them" when you chat with a Trump supporter: they can't help it. It doesn't matter how American I am. I am "them." I am the bad guy.

The Trump supporters proudly reminded me they do not believe anything in "the media." They also did not believe anything I would say unless I happened to agree with them. That conversation was frightening in so many ways.

How to Mobilize a Mob

I hate how dishonest and corrupt the Chinese government is, and I hate the direction China is bringing the world: they have built an economy on exploitation, pollution, poor safety, and lack of ethics, and they have gotten the world to follow suit. But when Trump talks about China "raping" the U.S., he is not making the same economic argument I make when I criticize China. He is using racist code to mobilize the mob against the Chinaman. He is turning his supporters violently against me. Because of the way I look.

My father is a Massachusetts Republican and just returned from the GOP caucus where delegates get picked. He says the depth and strength of the feeling of support for Trump should not be underestimated. All these white guys think Trump is very interesting, that his language is just colorful. They think it will be great for him to "tell it like it is," and that it's "time for a change." They are incredibly defensive if you criticize Trump.

But they are wrong. Trump's game is not honesty and it is not change: his game is conflict.

First he went after Mexicans. Then the Muslims. Now he has started on the Chinese.

Who is Raping This Week?

If you are a wealthy white male BMW-driving Catholic highly-educated engineer living in the suburbs, you might not understand the problem. But make no mistake: Trump is not on your side. Trump only operates by turning people against each other, which means that eventually it will be your turn to be the minority.

There is something about you that the mob does not like. It might be your religion, your job title, your education, your weight, your bank account, your travels, your child's condition, or something your parents did. You won't anticipate it because your offense has nothing to do with who you really are. But Trump's skill is to find that reason that you are the "other." When he comes after you, it will be too late for you to speak up. The mob will already see you as the enemy, and nothing you say will matter. I experienced that in Tennessee.

This is how the Cultural Revolution played out. This is now Nazi Germany worked. We remember the Nazi's rounding up the Jews, but a mob under the spell of a despot will round up anybody they find disgusting: professors; landowners; church-goers; the infirm; the elderly; the Polish; the leaders; the unemployed; the writers; or the people who seem too sympathetic to all those disgusting people. Being white does not make you safe: it just means that you are not first.

Please do not support this monster.

Posted by David at 11:43 PM | Comments (1)

September 17, 2015

Starting at MIT

A couple decades ago I never finished a CS PhD at Cornell (really, I barely got off the starting block - I left with a masters soon after passing quals). So I've decided to go back to school. This September, I'm starting work on a CS PhD at MIT. It's been almost 20 years since I've taken any classes, and computer science has gone through several sea changes in the intervening years.

I am taking two classes at MIT this term: 6.858 and 6.869. That is, a systems security class, and a vision deep-learning class.

I've devoted the last few years of my life to the idea that it's important to teach people how to program and that the key is to learn how to program intentionally, to understand how to make things with software.

But the takeaway from security and deep learning so far seem to be (1) even if you do your best to make things intentionally, they can be defeated (we're learning a whole spectrum of security exploits); and (2) there are ways to build systems without detailed intention that outperform intentionally designed systems (deep learning is winning).

In this new world, how to people put together software on purpose? How are we supposed to improve, collaborate on, and evaluate what we're doing?

Anyway, it's very fun to go back to school. Lots of interesting stuff going on to learn.

Here is my academic homepage at MIT.

Posted by David at 03:50 PM | Comments (0)

September 06, 2015

When to Sell

I guess a good time to sell is when I start writing blog posts about the stock market, down about 8% since I posted.

I do think that the big problems haven't in China haven't hit yet, though: a pile of (difficult to discern) bad debt related to government influence over the banking system's investment in state-owned enterprises.

There is an overhang of bad investments in China which is on a scale which perhaps the world has never seen before. Entire ghost cities in plain view. When will the bad debt behind these projects unwind?

Posted by David at 01:00 PM | Comments (0)

August 12, 2015

One-Off Depreciation

On vacation in Greece, reading about the big economy that is even more screwed up than here: China. It is interesting to read about how the yuan depreciation is related to markets as far and wide as copper and corn.

Here is the most interesting reading for the day, a discussion of the Chinese copper carry trade written a couple months ago.

The copper carry-trade is a mechanism that western banks use extend loans to Chinese companies at high Chinese interest rates, while denominating the loans in dollars instead of yuan. It is a way of circumventing Chinese currency controls and make a pile of money for very little risk.

Did you know that China holds about 40% of the global copper stock in warehouses, due to this banking trick? That number doesn't include ongoing consumption, by the way. All this copper is held as collateral for financial transactions that circumvent Chinese currency controls, supplying foreign capital to Chinese business, making up about 31% of the short-term capital in China.

The carry trade has only been possible because the Chinese government has pegged the yuan to the dollar. Suddenly today the game has changed: a rapidly dropping yuan means the copper carry-trade is no longer a guaranteed money-winner.

From the carry-trader's point of view, the yuan drop looks like an attack.

"It is a lot of leverage and we may be just at the beginning of the unwind.... The PBOC can transfer the pressure offshore, they are saying you guys, foreign demons, have to foot the bill."

It is doubtful that China really has it in for London commodities traders, however. The real concern, from the point of view of China, appears to be a weak banking system plagued by nonperforming loans to government-run enterprises. From the other article:

... It actually gets directly to one the puzzles of Chinese monetary policy. That is, if Chinese banks are flush with cash as the PBOC claims and loan demand is low, why does the PBOC continue to release cash into the system via reserve rate cuts rather than cut interest rates when even the best SOE is facing real interest rates of approximately 10%? This would seem to have a much larger impact on the economy...

There appears to be a couple of reasons. First, China is still heavily dependent on capital inflows to finance its continued development.... The PBOC appears to be making the tradeoff of trying to continue to attract capital by keeping interest rate high even if that risks choking off businesses with absurdly high real interest rates...

Second, despite all public pronouncements to the contrary, this implies that banks are weaker than is believed... Given the PBOC and government mandate to buy up low yielding government bonds and continue lending to LGFV whether they are paying or have any prospect of paying, banks already appear weaker than public pronouncements. Slowing the capital inflow or giving reason for capital to flow out could really create problems for China's major banks.

So basically, China has been pumping cash from its huge foreign reserves to prop up the yuan and keep domestic interest rates high, to attract foreign capital and prop up its weak banks.

But Chinese investors have been using the opportunity to move money out of China. And rather than shoring up Chinese banks, the high interest rates enable the copper carry trade that siphons Chinese reserves into copper holdings by western banks. The declining foreign reserves in China are a measure of the drain of yuan-denominated capital from its economy, and the high cost of borrowed yuan is making it hard to do real business in China.

Now that China has let is currency drop, it seems to be giving up on private capital: no more copper carry trade, no more foreign capital, and no more holding the line against capital flight. The shift would seem to goose China's real economy at the expense of its bankers. But it is not clear if the strategy will work, because it will also rob China of its major source of capital. China is in a pickle because it doesn't have a very healthy internal banking system. It depends on the strength of foreign banks. We can now see if capital flight with a declining yuan "could really create problems for China's major banks," and if this is a situation that will cause real problems for the Chinese economy.

In the next couple days we will see how China responds to an estimated $1.1 trillion of US denominated carry-trade debt being sucked out of the country. How quickly will the capital take flight?

Yesterday, China promised that the 2% devaluation was a "one-off depreciation" only. But they lied, and they repeated it again today. How many times can China repeat its "one-off" currency devaluation before causing a bit of panic? One estimate is that the dollar peg has resulted in a 16% overvaluation in the yuan, and that China will have to depreciate more than that amount if it wants a cheap currency that will bring back the pricing advantage it saw a few years ago.

Posted by David at 08:38 AM | Comments (0)

July 29, 2015

Confidence Games

This month I have been re-balancing my retirement savings, but it is a sobering exercise.

If we have money to save, where do we put it today? Let us review the major asset classes.

You get the distinct feeling that the wealthy-powerful class in Asia, Europe, and North America have steered capital into their own pockets for so long now that there is a huge imbalance in the distribution of capital in the world.

  1. Every asset class globally is experiencing a bubble simultaneously.
  2. So much capital has been idled that real economic activity is being starved.

So... if we have money to save, it seems like this situation is of our own making. What the heck are we doing to ourselves?

Where would you invest today?

Posted by David at 06:32 AM | Comments (1)

October 17, 2014

Making a $400 Linux Laptop

At some point, every programmer should learn how to use the Unix command-line.

So I started teaching Piper a bit about how to use a command line shell this week. We installed crouton on her Chromebook, and we used it to look at a couple files and build little shell script. That continuing adventure is a story for another time.

But crouton was the surprise for me. I immediately fell in love it. The Linux-on-chromebook setup was so great that a few days later, I made another one. It's an amazing deal: for about $400, I got a lightweight linux box with 4GB RAM, 128G SSD mostly empty, 8 hours of battery, and a touchscreen! Here is what I bought:

The new C720P with 4GB ram, but the cheap configuration with a 16G SSD

MyDigitalSSD SC2 Super Cache 2 42mm SATA III 6G M.2 NGFF M2 SSD Solid State Drive (128GB)

It was a terrific little project, very easy. The basic idea is to follow the SSD upgrade instructions here

There are only a couple gotchas. One is at the start: you want to begin by burning a recovery image on a USB stick, which should just take a couple minutes. But the instructions above say to use the URL "chrome://imageburner" to make this, and it doesn't actually work on the c720p (it runs, but then it hangs). Instead, go to the Chrome App store and search for the Chromebook Recovery Utility. That will make a recovery image quickly.

Then you're ready to upgrade the disk! Piper and I unscrewed the laptop and followed the instructions here - it was a great chance for us to take a look at all the innards of the computer, and it was a very easy upgrade.

The only other gotcha is that he M2 SSD card doesn't go in either way: there is a "right" and a "left" - one side with four gold connectors and the other side with five. The big brand-name sticker on the new SSD we got was on the opposite side as the old one, which confused us; it just needed to be flipped upside-down, sticker down.

Then we reassembled and rebooted the computer, stuck in the recovery USB drive, and then followed this page's advice on how to enable developer mode. In short: ESC-F3 and Power. Then control-D, and then wait. Apparently converting the huge 128G SSD to developer mode, takes a little while; but there is an ASCII art progress bar at the top of the screen.

Finally, we downloaded crouton from goo.gl/fd3zc, and then we used ctrl-alt-T to bring up a crosh tab; entered shell; then ran the crouton script to install a command-line-only debian.

It's terrifically functional - I used it to build a current build of node.js and some other things. It's not terribly secure, because anybody who can log into the machine can get root access. But for student work, it's great!

Posted by David at 08:27 PM | Comments (0)

October 03, 2014

Teaching About Data

How do you teach beginning programmers about data in the internet age?

  • Teach the kids how to learn on their own: for example, can you find and use technical data sources using Google? Self-teaching is a key hallmark of successful students.
  • Teach using real-world mainstream idioms: Javascript, jQuery, HTML5. This lets kids directly apply code examples from the web. We take advantage of Pencil Code to make this easy.
  • Keep things real: it is more meaningful if we use real data to answer real-world questions!

It is a real pleasure to see students learning to learn independently this way.

Last week I taught a class about data that went very well. It was interesting enough that maybe others might want to try to do the same.

Using Google to find a Technical Article

The class started with an acronym: JSON. A lot of data on the internet is made available using a technology called JSON, so we began by searching Google for code ideas by using the query [Using JSON to get public data]. That query lead us to a few articles, including a blog post by Mark Lee....

Continue reading "Teaching About Data"
Posted by David at 12:54 PM | Comments (0)

July 10, 2014

Code Gym

At the first Google I/O Youth program this year, we used a new open-source website, the Pencil Code Gym, and it was a smashing success!

The website is a place where beginners can create open-ended creative projects in graphics, music, or interactive fiction, all using a little bit of simple code.

It is based on Pencil Code, which means that you program in CoffeeScript with the Pencil Code editor and turtle library. It comes with lots of ideas, hints, and a nice on-line reference. The students who came through to use it had a wide range of backgrounds and knowledge, with many first-time coders and also a few experienced code-jockeys.

The kids were bold and tried every project we had to offer. I was surprised by the musical talent of some of the kids (check out the projects), and I particularly enjoyed working with the deaf kids who attended - some of the deaf kids even did musical projects.

You can see the projects put together by code gym students here, at the Code Gym Stage.

Posted by David at 05:18 PM | Comments (0)

April 2017
Sun Mon Tue Wed Thu Fri Sat
2 3 4 5 6 7 8
9 10 11 12 13 14 15
16 17 18 19 20 21 22
23 24 25 26 27 28 29

Recent Entries
Beware the Index Fund
Does Watching Fox News Kill You?
Our National Identity
Outrage is Not Enough
A Warning From 1937
A Demon-Haunted World
By the People, For the People
Integrity in Government
Thinking Slow
Whose Country?
Starting at MIT
When to Sell
One-Off Depreciation
Confidence Games
Making a $400 Linux Laptop
Teaching About Data
Code Gym
Pencil Code at Worcester Technical High School
A Bad Chrome Bug
PhantomJS and Node.JS
Integration Testing in Node.js
Second Edition of Pencil Code
Learning to Program with CoffeeScript
Teaching Math Through Pencil Code
Hour of Code at Lincoln
Hour of Code at AMSA
A New Book and a Thanksgiving Wish
Pencil Code: Lesson on Angles
Pencil Code: Lesson on Lines
Pencil Code: a First Look
CoffeeScript Syntax for Kids
CSS Color Names
For Versus Repeat
Book Sample Page
Teaching Programming and Defending the Middle Class
TurtleBits at Beaver Country Day
Book Writing Progress
Lessons from Kids
Await and Defer
Ticks, Animation, and Queueing in TurtleBits
Using the TurtleBits Editor
Starting with Turtlebits
Turtle Bits
No Threshold, No Limit
Local Variable Debugging with see.js
Mapping the Earth with Complex Numbers
Conformal Map Viewer
Jobs in 1983
The Problem With China
Omega Improved
Made In America Again
Avoiding Selectors for Beginners
Turtle Graphics Fern with jQuery
Learning To Program with jQuery
Python Templating with @stringfunction
PUT and DELETE in call.jsonlib.com
Party like it's 1789
Using goo.gl with jsonlib
Simple Cross-Domain Javascript HTTP with call.jsonlib.com
Dabbler Under Version Control
Snowpocalypse Hits Boston
Heidi's Sudoku Hintpad
Social Responsibility in Tech
The First Permanent Language
A New Framework For Finance
Box2D Web
Lincoln School Construction
Stuck Pixel Utility
Fixing the Deficit
Cancelled Discover Card
Tic Toe Tac
Toe Tac Tic
Tutorial: Root Finder
Wiki Javascript at dabbler.org
What SAT Stands For
Computer Club
Tutorial: Cannon Game
Tutorial: Pascal's Triangle
Tutorial: Custom Poem
Tutorial: Concentration
Tutorial: Histogram
Tutorial: Maze Maker
Tutorial: Tic Tac Toe
Tutorial: Mastermind
Tutorial: Polygon Drawing
Tutorial: Caesar Cipher
Tutorial: Guess My Number
Tutorial: Ten Followers
Tutorial: Fifteen Puzzle
Handheld Glasses-Free 3D
Making a Time Machine
The Next Grand Deception
There is Brilliance in this Language
Minimum Hint Sudoku Hunt
Collected Hacks
Python pi.py Spigot
Older Writing