Archive for May, 2013

lasercut fingerjoint enclosures; pictures & code

My last laser-cut finger-joint project (and the electronics inside) was meant to be a time machine, an emergency device, a way to bend reality. Also, it was octagonal. These aims proved to be unrealistic. I did pull off the octagonal bit, but even that was a struggle.

Less fraught projects need enclosures, too, though, and I liked the technique. You can do some super-cool stuff with lasercut materials. Like 3D printing, it removes craftsmanship as an excuse for failing to instantiate the things you imagine.

But although laser-cut construction allows for much stronger and prettier materials than 3D printing, the process of translating from two dimensions to three is trickier than you might think. There are various considerations, from the variance of the width of the source material to the width of the path burned away by the laser (“kerf”). Accounting for these things in vector graphics editing programs can be quite tedious. It’s easy to make mistakes.

The right way to do this would probably be to write a plugin for Inkscape/Illustrator. But I’m more comfortable writing Python, so that’s what I did. I wrote up a support class that facilitates the creation of finger-joints, and which handles things like kerf automatically.

The output isn’t designed to be ready-to-print. You should plan to import it to a vector editor and do subsequent work. Here, for example, is the output of a simple script I used for my latest project:

fingerjoint.py output

And here’s the EPS I constructed from it and submitted to Ponoko:

fingerjoint.py output edited

Note the difference in the corners of the larger piece, in particular. Some editing is necessary. But the results are quite nice!

Lasercut box=great success. Design/code to follow.

(ignore those laser scorch marks; I haven’t pulled the adhesive paper side off yet, but when I do and flip the sides, the outside should be relatively pristine)

I’ve published the code, and would love to see it expanded into a more general-purpose toolkit. Apologies for its hackiness/non-pythonicness. I assure you it’s much better than the first two drafts. This version does matrix math and everything!

book review: Fortune’s Formula

As I began this book, I was disappointed. I had picked it up after reading The Idea Factory, the fascinating history of Bell Labs: Fortune’s Formula was mentioned glowingly in the acknowledgements. Bell Labs employees — including my favorite, Claude Shannon — taking a road trip to Vegas to use their reality-bending powers of analysis to defeat the casinos? Sign me up.

Digging in, the danger signs began accumulating. Poundstone’s prose is workmanlike at best. There are endless asides about the backgrounds of various mobsters tied to the gambling industry. And while Shannon’s trips to Vegas (to beat blackjack and roulette, it turns out) are exciting and ingenious, the man was smart enough to quit once his intellectual curiosity had been satisfied. This is no Bringing Down the House. Vegas fades from the scene by the book’s halfway point.

But this is where Poundstone’s project becomes clear. His language loosens, his transitions from explanation to narrative become more fluid, and he starts calling people dopes. He enters his element, and embarks on the effort that excites him. Poundstone is not just fleshing out a fun Bell Labs footnote; he’s telling a story about arbitrage and the modern finance industry.

In particular, he’s telling the history of the Kelly Criterion, an asset allocation formula — aka betting system — mathematically proven to maximize returns over the long run, given reinvestment of winnings and quantified odds. The story of the Kelly Criterion is interesting enough. Its foundations are rooted in Information Theory, the field Shannon singlehandedly invented, in part through the revelation that information works by reducing uncertainty — and what is a gambler’s edge if not a reduction in uncertainty? It’s also fascinating to learn that despite its mathematical soundness, the Kelly Criterion apparently remains a subject of fierce debate, largely rejected by economists, finance experts and business schools thanks to a combination of practical, intellectual and cultural reasons (that it was invented by information theorists, not economists, doesn’t help its cause).

But this book is about more than that. Poundstone mounts an implicit but still quite damning case against the modern finance industry. It’s not just the slight seediness of mathematical concepts invented for roulette translating smoothly to Wall Street; it’s the gangsters we were introduced to in the book’s opening chapters make the trip, too, swept along by a conscious legal strategy (going legit) into a new form of gambling. By the time a young prosecutor named Rudolph Giuliani discovers he can use RICO, a law designed for the mob, to go after titans of finance, the story has become a fascinating moebius strip of money and risk. Is it a coincidence that Ed Thorp, the man who taught the world how to count cards, is also the analytic mind behind one of the first and most successful hedge funds in history?

Thorp comes out of this book looking like a singular genius, and a probably-ethical one, to boot. I’m convinced, but some suspicion is warranted — Poundstone seems to have gotten a lot of help from him in putting this book together. Still, the man’s record of returns and lack of indictments speak for themselves.

Aside from the Kelly Criterion and Wall Street’s strange bedfellows, there are two important takeaways to be had here:

First, Poundstone does a number on the Efficient Market Hypothesis. I think he treats it fairly, explaining the views of its proponents, its intellectual heritage and the debates surrounding it with nuance — like Thorp, Paul Samuelson is portrayed as a brilliant and towering figure (I’m going to have to remember this trick of his — what an amazing dick move). The random walk is explained, as are investment strategies that can succeed despite the market’s unpredictability. Fees and common investor mistakes are acknowledged, and he allows no confusion about what a typical investor should do: buy an index fund and ignore anyone who tells you they can beat the market.

Still, by the end of the book it’s very hard not to conclude that a few ubermenschen walk among us — people like Thorp — who can consistently identify systemic pricing errors and develop ingenious ways to profit from them. The history of hedge fund tactics is explained, and of course it turns out to be built on these manipulations, from the warrant-based delta hedge to junk bonds to leveraged buyouts.

Before you ask: yes, Poundstone considers the survivor-bias argument at length. But I was still convinced that these techniques have worked — at least until they’re disclosed and the market begins pricing them in. EMH proponents tend to hand-wave toward this pricing-in happening with calculus-like instantaneity, but the actual history makes it clear that the process has sometimes taken months or years.

Second, and following from this, it’s hard to read Fortune’s Formula and not conclude that finance has evolved toward (and probably past) a point of uselessness — perhaps even destructiveness. Why does our society reward this kind of work? To provide better prices, they say, so that capital can be allocated more efficiently. The problem is that the process has no finish line. Arbitrage opportunities are discovered, profited from, and cease to exist; but Manhattan remains steadily expensive. So new arbitrage opportunities must be discovered or invented, via the sorts of exotic financial instruments that we’ve heard so much about these past years. But the low-hanging fruit is gone — the margins on these deals are tiny, so they have to be amplified through incredible amounts of leverage. The complexity of the system inevitably sometimes reaches a point where interdependencies aren’t fully realized — Poundstone makes this point by narrating the epic destruction of LTCM — and things blow up.

Fortune’s Formula was published in 2006. Poundstone doesn’t even need the Great Recession to make his point.

A few caveats. I’m not a great consumer of books about finance. I haven’t even read The Big Short. It’s very possible that these insights are less novel than they seemed to me.

But this book taught me quite a bit of history, more than a few financial concepts, and changed the way I think about investing/gambling/risk. I’m tempted to reread it, even if just to make sure I got the thrust of the early chapters right (if I’d known who Ed Thorp would become, I would’ve paid a bit more attention — I had heard the name before, but didn’t make the connection).

Highly recommended.

book review: Blindsight

I’m not sure what to think of this one. Watts rattles off a ton of counterintuitive facts about human cognition, and they’re facts that I love and am fascinated by — this is what I spent my college years studying — but I can’t help but be irritated by his recitation of them.

A big part of this is his prose, which is pretentious and baroque. Three uses of “calcareous” in a single novel might not *sound* like a lot…

The mechanics of what’s going on are often difficult to track. This isn’t so much because of the alienness of the ideas on offer, like in Quantum Thief. It’s more that the language obscures what’s going on. It’s quite a contrast from Rendezvous with Rama, another first-contact-with-a-questionably-populated-alien-craft story. The action is overwritten, and hard to track.

Watts also gives himself too much credit for the quality of the ideas he’s offering. The motley crew of savants that he offers seem not-that-abnormal, to be honest. The idea that a mediating “jargonaut” is necessary to translate their bizarre utterances into baseline-human comprehensible intelligence seems implausible (even with some minor hand-waving about this being an edited account). His characterizations are fairly thin, too — in light of this, giving one character multiple personalities seems like a particularly poor decision.

The biggest problem may be how overeager he is to get to his ideas. There’s a distinct refusal to self-edit — the closing notes of the book mention that his other sci-fi series, Rifters is available in unabridged form on his website, and indicates some kind of disagreement with the publisher about the shorter form the printed edition took. Hmm. One can’t help but wonder if the ideas about the singularity, empathy, Searle’s Chinese Room, qualia zombies, evolution and vampires (sigh) should have been pared down, at least slightly (at the very least the vampires should have been tossed).

Still, I have to admit that the book picks up in its final third. Watts proves to have been building toward something, and it’s coherent and interesting. I’m not a huge fan of the consciousness-denying hypotheses that I associate with Dan Dennett and that Watts attributes to Thomas Metzinger. But they’re presented mostly coherently (though consciousness is given seriously short shrift by Watts, particularly its likely role in organizing concepts so as to make technology possible). I’m more of a mystic, or at least sufficiently guilt-riddled as to want to embrace panpsychism. But I will admit that he’s making an interesting argument, even if it is cobbled together from a truly wild hodge-podge of quite-tentative research and misstatements about electromagnetism.

A ton of people that I know love this book, and a ton more are intrigued by these philosophical questions. If you’re less bugged by the writing than I am, you might really like it. For me it was just okay, though it earns points for its ambition.

book review: The Hitchhiker’s Guide to the Galaxy

I just reread this thing for the who-knows-how-many-th time. It’s still quite funny! But it’s interesting to read it as an adult:

  • The humor is a little harder to take than it used to be, having now been exposed to long years of amiable nerds gracelessly aping the Monty Python sensibility. Douglas Adams books are clearly another transmission vector for this tendency to tediously parrot (though Adams’ own execution, while inarguably derivative, is fluid and hilarious).
  • It’s quite nihilistic, thought mirthfully so. I suspect this had a big influence on my own comedic preferences.
  • It’s also pretty libertarian in its perspective, particularly the passage with the ruler of the universe (though I suppose that’s in the next book).
  • It’s thin! Adams wasn’t kidding about stopping mid-stream.
  • Ben’s right that The Restaurant at the End of the Universe is less satisfying, largely thanks to its repetition of jokes. I think things get quite a bit better further along, though, particularly in Adams’ treatment of the Golgafrinchans, which is considerably more humane than the uniformly acid tone of the first book.
  • Last thought: Adams is of course mostly a humorist, but he’s underrated as a stylist. Magrathea is spooky and lonely. The primeval earth is calming and lovely. England is small and homey. This talent really shines through in his nonfiction book Last Chance to See, incidentally, which I recommend highly.

book review: The Idea Factory

A really lovely history of Bell Labs and its incredible impact on the world. Gertner does a fantastic job of synthesizing existing historical accounts, while also unearthing his own wholly original findings through interviews and dives into the AT&T archives.

I found the book particularly interesting since my job is all about managing technical staff who are trying to identify worthwhile problems and new ways of looking at them. I don’t mean to compare our modest efforts to those of the people who invented the transistor, of course. But it was reassuring to have many of my engineer’s intuitions about what makes for successful research environments — adequate resources, plenty of freedom, good people, a focus on the questions themselves and a healthy tension between theory and application — validated by the management theories captured in this book.

It’s clear that Gertner has favorites among the cast of characters orbiting Bell Labs, but that’s okay; so do I. His charming and moving account of Claude Shannon is particularly affecting, I thought. And it’s hard to read this and not emerge a John Pierce fan. The treatment of Bill Shockley, by contrast, is relentlessly negative, though Gertner makes a strong case for this being wholly deserved.

My only other window into the Bell system is Tim Wu’s book, which is notably unmentioned here, despite being published more than a year earlier than The Idea Factory. I assume this has something to do with publication lead times, something to do with Wu’s book being an analysis that rehashes the same histories Gertner mined, and something to do with its less charitable perspective on AT&T and its monopolistic activities. Still, an interesting omission.

Anyway, this is highly recommended for anyone inspired by digital technology or information theory. I think this will finally nudge me into reading the Gleick book (as well as Fortune’s Formula, about Shannon’s efforts to beat Vegas and the stock market — that one, in particular sounds fantastic to me).

book review: The Left Hand of Darkness

Beautifully written; this makes me want to read more Le Guin.

I wasn’t bowled over by the ideas on offer. In part this is probably because this book is an innovator; others have used sci-fi to examine gender in more radical ways since, which makes this feel slightly tame.

But I suspect that my reaction is also in part because I’m a man. The signature implication of Gethenian physiology is that things in their culture aren’t gendered. This mostly registered to me as bland ambiguity, but I can imagine that might have to do with my own gender being the default for so many things in my own culture (witness even Le Guin employing “he” as the pronoun used for ungendered characters).

But though I might have a blind spot when it comes to the novelty of the setting, I feel pretty confident in saying the plot is thin. It’s driven largely by politics, but those politics are presented through a veil of intentionally alien concepts (shifgrethor, for example) that prevent the reader from feeling excited, Wolf Hall-style, even when very little is actually happening.

Inscrutable political shuffling then gives way to some heroic questing, but with an extremely spare cast of characters. That’s fine for a Jack London story, but I’m not sure it works here — particularly since Le Guin shies away from making us uncomfortable with the Ai/Estraven dynamic’s final destination.

Basically: needed more kemmering.

book review: The Windup Girl

Really interesting, and wins points for bothering with characterizations. I’m not sure how much sense it makes, though. In this world both food calories and fossil fuels have become massively more expensive (due to engineered plagues and depletion/climate change, respectively). But this leads to more of the energy economy being driven by food calories? Mastodons are not an efficient energy storage mechanism! Where are the solar panels and nukes and wind turbines and tidal power?

Aside from that I have three main complaints. First, the book’s climax feels disjointed and loses the winning human scale of earlier action — the characters who’ve been built up in earlier phases are left on the sidelines while the action moves through redshirts and cipherlike Thai generals. Second, the sexual exploitation of Emiko is porny in an unfortunate way. And third, Gibbons seems underutilized to the point where he’s mostly just a Dr. Moreau throwaway.

The setting is pretty cool, though, and the neocolonial stakes are extreme and awesome. This is like Atwood’s dystopic genomic imagination but played out through believable institutions.

book reviews incoming

I sort of fell off from my commitment to cross-post them here. Partly this is that I’ve slowed down; partly it’s that I’ve been reading a bunch of semi-trash thanks to being committed to two different sci-fi book clubs. Nevertheless, time to clear out the queue.

Project Glass is scary enough to deserve some respect

People seem ready to hate Google Glass!

Yesterday there was the Tumblr White Men Wearing Google Glass. This is not only slightly mystifying — a Google image search for “Google Glass” returns what seems like a pretty diverse collection of testers and models — but, speaking as a white man who aspires to wearing Google Glass (at least briefly), hard not to take a little bit personally. In fairness to the Tumblr’s author, Robert Scoble is a faintly ridiculous person, and adding “screaming” and “in the shower” certainly does not yield a net improvement in gravitas. This is, arguably, another fitful effort to delineate a gendered subtext to Glass, a project started when Sergey Brin stupidly described smartphone use as “emasculating” during a TED sales pitch. (I think the most plausible reading is that he intended the word to mean “disempowering” rather than “womanly”, but the charitableness of your reading may reasonably differ.)

This isn’t the only place where people are picking sides between Team Glass and Team Glass Is Stupid And Bad. Earlier today Wired published a truly awful essay by Marcus Wohlson predicting Glass’s failure for different (though still Scoble-related!) reasons. It begins by erecting a geek/nerd continuum best left to Joss Whedon fan boards, goes on to a question-begging explanation of Segway’s lack of success, and concludes by belittling Glass’s lack of coolness — as if coolness was an objective quality rather than something constructed collectively by people like the author himself. It’s a bit mind-boggling that anyone could so thoroughly fail to see the arbitrary nature of culture. (The best reply to the Wired piece is probably this great post by Bianca Bosker discussing the history of eyeglass adoption. But for a shortcut, the next time you see a world leader wearing a business suit, reflect on whether Europeans just happened to come up with the objectively awesomest formal attire.)

Watching people declare their tribal loyalties is fascinating and wearying. It’s not surprising behavior, exactly: this product launch is a big, SEO-worthy cultural event, and one wouldn’t want to be caught un-jaded. Certainly I don’t: I’ve cheerfully presented from a slide deck making dumb Dragonball Z jokes at Glass’s expense.

Nor should consumer tribalism be surprising to anyone who’s read John Gruber’s ongoing project to construct a theodicy of Apple, or anyone who has spoken to a teenager for thirty seconds. For people who don’t enjoy getting angry about sports or religion or nationalism or politics, consumer gadgets seem to fill the void.

Still, in this case I can’t help being irked by these reactions. I tend to emotionally align against new tech products (“that’s dumb/it’s been done”), so this might seem hypocritical.

But don’t you have to respect the ambition of Glass? This is the most daring project I’ve seen in ages. Not just automation of an existing system of transport/food delivery/coupons. Not a privatized homage to NASA triumphs of decades past.

Consider what a persistent connection to the network means. Already I find myself giving up on learning certain classes of information — why would I need to remember a friend’s address or a bus schedule or a business’s hours? Those parts of my mind now exist in my phone, and sure, the retrieval times are poor, but the integrity and capacity are excellent. Narrowing the latency of that interface further would be a profound change.

And that’s to say nothing of the implications of persistent enmeshment in the conversations and status competitions of social media. You can take your strange, geographyless social universe with you on the go! On your head (if not yet in it)! You will be fully in one place even less often than you are now. If Twitter is like telepathy, Google Glass strives to be like astral projection*.

I suspect that humans’ individual nervous and collective social systems aren’t currently capable of dealing with this. Either Glass will flop or we will. For what it’s worth, I think the former is pretty likely (battery or input bandwidth are where I’d place my bets) and, failing that, the latter is all but certain. But I don’t really know. I am certain, though, that Glass is a wildly ambitious transhumanist project, a crazed conceptual art piece being executed on a massive scale with, mystifyingly, real engineering and industrial muscle behind it.

I have no idea if it’ll succeed; I have no idea if I want it to succeed. But carping about its coolness is like complaining about the case color of the first A-bomb. To hell with that. Even the privacy argument about Glass strikes me as shallow.

The question is: what does Glass and its successors aim to turn us into? Is it something we want to become, or can become? And if it’s to fail, can it please, please be for reasons more profound than fashion or lack of 4G?

* ask me about my Doctor Strange-themed trend piece pitch!

UPDATE: This is also dumb!