Mocking Eye

'Tis all in vain?

Mirrorshades

| Comments

Finally reading Bruce Sterling’s cyberpunk short story collection Mirrorshades. It’s commonly referred to as the definitive collection of what was then a movement and is now more of a distinct sub-genre. I was expecting to read a collection of hyper stylized and at times outdated stories, akin to how much of William Gibson’s Sprawl trilogy reads now (they’re still awesome, but are clearly an artifact of their times, while a lot of good SF from the same era manages to escape that fate). To my delight I got something much fresher. Covering a nice swathe of the movement, it gives a pretty comprehensive and non-stereotypical example of the style and the themes of cyberpunk. There’s still a lot of arguing about whether everything in it is cyberpunk (for example Gibson’s Gernsback Continuum, which still reads fresh) but I think it manages to capture the feelings of cyberpunk with a nuance and scope I wasn’t really expecting.

Solving a Major Problem – Bras

| Comments

I like learning about other people’s problems. I particular like learning about problems from people who have different problems than mine and one of the most common and persistent of those is the issue of bras. Many women told me about it and complaints were near universal and came from all quarters. I’ve specifically asked a lot of women about their experiences with bras to better understand and also did research on the state of the art of design, engineering and manufacturing of bras. This is something that affects women with breasts of all sizes–it isn’t restricted to women with big breasts. I realized recently that although I’d love to work on this problem, without some help I can’t do it. I’m not a domain expert in several of the fields required, though I’ve gone into some depth on the subject, so writing about it would perhaps inspire someone to either join me or take it up on their own.

An important note: It is common amongst engineers and programmers to wade into a new domain with a savior complex, “we’ll fix this for you with our fresh perspective!”. On a slightly different slant, a lot of women have experience mansplaining. I’m trying very explicitly to not be doing either of these. I’d like this to be an overview of what I’ve discovered and what I think is a good solution. I’m not swooping from above magically delivering bra salvation to the helpless female masses. I just haven’t seen these ideas put together before and thought folks might be interested. Just wanted this to be clear.

The Problem

Bras are required to perform these core functions:

  1. Mold the breasts into the a shape desired by the wearer (usually dictated by changing fashions, but on occasion alternative ones are desired)
  2. Reflect the look desired by the wearer when viewed without clothing (this would sometimes be “more attractive” and others, such as with sport bras, less so).
  3. Provide support and comfort allow for a wider range of vigorous activities than some women can easily accomplish without. This includes eliminating chafing.

In order to perform #1 and #2 bras are form-fitting so as to not be prominent under clothing. Form-fitting is best achieved with stretchy fabrics, which would make either #3 or #2 hard (sports bras for example sacrifice #2). Underwires were introduced to be able to transfer most of the difficult task of providing support to rigid elements made of plastic or metal. If a form-fitting item is not stretchy it will always be uncomfortable if it is not custom made. This is the core reason bras are so uncomfortable. It’s the only clothing item of this sort I can think of that is commonly worn. Imagine briefs made from dress shirt fabric. That is not a pleasant thought.

Bra sizing is terrible. The cup size of a 32C and a 34C is of a different size even though it’s designated as C. The way most companies design bras these days is that they a group of women that they used to measure and now usually perform 3D laser scans on called the model pool. Using the model pool they derive their band size to cup size function. This means that the particular function varies from manufacturer to manufacturer. So not only are the sizes themselves inconsistent between manufacturers the steps are also different since the sizing function would vary by their particular pool and how they segmented it. On top of this there are the core issues of breast asymmetry and placement: The vast majority of women’s breasts are asymmetrical and the distance between the breasts varies a lot. These are not taken into account in the sizing and adjustment for them is minimal if available at all.

So, bras are uncomfortable and under the current model can’t possibly be made comfortable. A less egregious but annoying aspect of the bra industry is that they subtly imply but never state that the bras might affect breast sagging (the technical term for which is ptosis). Repeated studies by the industry have shown this to not be the case (breasts will sag with age regardless of bra wear), so they never claim it outright but merely hint. Additionally, there are medical effects such as back pain and problems with the lymph nodes that result from imperfect fit.

This is a problem that ranks highly on both the scales of pain and persistence. This is a daily issue that causes many women a lot of suffering. It’s a big deal.

The Solution

We must be able to create a custom bra for each woman. My proposed method involves performing a 3D scan of the breasts from which a custom pattern is derived.

The state of 3D scanning as evidenced by products such as the Kinect or the Leap is such that large and slow laser scanning equipment is no longer necessary. Small units can be built and placed inside changing rooms in existing stores or perhaps in some sort of booth.

Fundamentally, a bra is an item that applies certain force vectors to from a source shape to a target shape. Current design techniques in the industry treat the breasts as liquids filling a form. The form is anchored to a body and they perform simulations not very different from those involved in other structures such as bridges to ensure forces dissipate in optimal ways throughout the bra and through the body. This sort of analysis would still be necessary, but with a 3D scan of the breasts we can create an accurate model of the breasts. So one woman might need additional support in a particular angle while another who may share her exact band and cup size would not, merely due to the differences in shape and volume which are now available!

Advances in textile manufacturing also provide potentially interesting elements. Better weaving machines are able to construct fabrics with custom 3D structures so that things like the fabric’s elasticity can vary throughout without varying the amounts of a different material. Manufacturing supply chains, and custom orders are increasingly more common, easy and cheap. We get the additional advantage of being able to respond to changing fashions in both the desired target shape and appearance more easily than traditional approaches.

So to get something like this done, one would need to be good at 3D scanning, the math required to do the tensor math for the breast shaping, the math for turning those force vectors into a pattern, the math and engineering required to optimize the patterns and the necessary textile manufacturing instructions, and the business connections to get the manufacturing done well and cheaply.

A custom bra is necessary. There’s just no other way to fulfill all 3 core tasks. I’d love for someone to tackle this. Please do contact me with any thoughts you might have on this, it’s more important than it might seem.

Edit: I really have been researching this fairly deeply for over a year, this is just meant to be a an introduction, so pardon the lack of nuance and depth. Happy to discuss any specific aspects further if anyone’s interested!

New Job!

| Comments

Just thought I might make it a point to mention I recently joined the engineering team at Comprehend, a fellow Y Combinator company. We make analytics software targeting pharmaceutical companies in an industry that’s filled with balkanized solutions. Helping tackle the byzantine challenges involved in clinical trials should be interesting!

As usual, I must add that my opinions and comments and do not represent my employer in any way shape or form.

Reading Everything Stdin in a Bash Script

| Comments

In trying to get a collectd instance to send me alerts, I found out that I didn’t know how to just read everything that might be piped into a bash script via standard input. You can read line by line easily using the read command. Just looping over it seemed pretty horrendous to me until I discovered an elegant way to do it that’s perhaps canonical, but doesn’t seem to pop up via quick googling:

1
2
3
4
5
#!/bin/bash

VALUE=$(cat)

echo "$VALUE"

That’s it! $(cat) is a shorthand for $(cat /dev/stdin), so presumably you can use this to read from stderr by pointing it at /dev/stderr.

Happy piping!

Migrated From Posterous to Octopress

| Comments

I’ve migrated the blog from Posterous to Octopress. Posterous was alright, but syntax highlighting was a bit annoying, and gist embedding is ugly. Plus I just wanted a little bit more control. At the same time I didn’t want the various security and management headaches that basically every dynamic CMS brings with it.

I used the alternative posterous importer provided by Jekyll–their default one doesn’t preserve the permalinks. Before running it you should fix a bug: s/post\.media[2]/post.media/. Then you can run it with ruby posterous.rb USERNAME PASSWORD API_TOKEN. Presto!

Piping Ls Through Less With Colors on Mac OS X

| Comments

The following command will do the trick:

CLICOLOR_FORCE=1 ls -G|less -R

Or just add this to your .bash_profile file to have ls always display in color and less always able to consume color codes:

alias ls='CLICOLOR_FORCE=1 ls -G'
alias less='less -R'

This has been tested on 10.6.8 and should be valid for subsequent versions as well. Just a tad annoying since ls on Mac OS X behaves a bit differently than the standard linux one (i.e. no --color option).

The Pebble and Ubiquitous Computing

| Comments

In case you haven’t heard, the Pebble is a watch with an eInk screen that tethers to your phone over bluetooth. It’s being funded via Kickstarter in what I believe is their biggest project to date (over $10 million). The company making it is Allerta, a fellow YC company that previously made a watch that only tethered to Blackberries (and had a fatal flaw: only a single button). Needless to say, I’m a backer, and thus am slated to receive one when they ship.

As you can see from the Kickstarter page, a lot of the proposals involve using it as a very convenient information display, so that you can keep your phone in your pocket. That’s great, but yesterday I realized that the accelerometer inside the Pebble takes it to the next level:

Everything is a touch surface. Gestures don’t have to be a wizardly waving of your arms—though you can certainly do that, it will be certainly less awkward than waving your phone around—they can be as discreet as a sequences of taps.

Objects that have no sensors in them can become touch-enabled. You can have tactile equivalents of QR codes: just print a number, and have people tap it out on a virtual phone grid to trigger.

You could Draw Something in a sandbox. And really, generally allow user-arranged interfaces, here’s a scenario: the watch displays the image of a particular control (a button, a slider, a knob) you tap somewhere on a surface (let’s say you’re holding a pen and it’s a piece of paper). Now the system knows that’s where you dropped that control, and it shows you the next one. So you could arrange your own Draw Something interface, a mild vibration from the built-in motor can indicate you’re passing over an active control with its image showing on the watch’s screen, in case you forgot to note it. Then you can just go ahead and draw, tapping on the controls to activate them. You can also just drop “buttons” around yourself: you sit down at the office, and you drop a “go to speakerphone” button on your arm rest. When you get a phone call, you just tap it to pick up, instead of either pulling out your phone, having to reach your arm up to your bluetooth headset, or even using your other arm to press a button on the watch.

The world around you is now your configurable, editable control panel.

Tactile interactions are still incredibly valuable, but we’ve come to associate them with information poor systems. The Pebble allows us to combine information-rich environment with physical interaction once again. 

Bump all the things!

(and when the Google Glasses come out… ubicomp heaven)

A Brief Interlude - Client Attitudes

| Comments

Americans are often surprised at the extent to which “the customer is always right” isn’t a valued precept in Europe. It is a common aspect of American culture that a certain level of service and courtesy is due, and that the customer is doing the business a favor by being a patron. Certainly a high quality of service is respected throughout Europe, but the same sense of deep entitlement is mostly lacking.

But perhaps it’s merely redirected: Europeans expect more of their governments both in terms of the services provided and in terms of the responsiveness to their needs. Very much the sort of feelings that Americans have about businesses, but not nearly as much about their governments.

As someone who on occasion identifies as an anarcho-capitalist, this makes a lot of sense to me. Governments are just service providers, insurance companies on a grand scale that assume the moral right to extract their premium payments from you whether you’re interested in their particular products or not. So I perceive a continuum between business and government, mostly on the axis of forced participation (what’s in the middle? various levels of oligarchic monopolies, state-sponsored enterprises and so forth. Businesses do use some coercion, the perfect entity on the least-force side of this spectrum would forgo advertising for example).

Most metrics have been pointing at greater social and economic mobility in Europe vs. the US for at least the last decade. Quality of life metrics have been solidly on Europe’s side for even longer. It seems the cause is not the rift in political ideology–everyone’s a populist at the ballot box–nor the difference in approaching ethical and legal matters, but rather the difference in expectations of customer service. 

The US has an incredibly successful and useful myth of the individual freedoms that abound here. However having freedoms of great magnitude possible is not the same as freedoms commonly accorded. Same for opportunity. This myth however is incredibly useful, it’s *why* you have such great opportunity here. Although it is not the case now–and hasn’t been the case for many times in history–that people can rise with greater ease here than elsewhere, those who do rise have a chance to rise much higher exactly because of the collective beliefs in opportunity and freedom. Sounds a like the lottery.

Skill and smarts can often beat the house, but let’s return to the previous metaphor. I think people in the US have been getting complacent about the crappy customer service they’ve been getting. We expect the smiles and greetings, but we’ve forgotten how to complain. And sure, movements like Occupy are that unruly couple you’re trying not to make eye contact with who are tearing the shift manager a new one, but you silently agree that this place has gone downhill. 

Ask to speak to the manager.

 

Interlude? Between what and what? Well, the next part of my series on global food security is on its way! Boy howdy! And if you don’t find agriculture as fascinating as I do, you should probably stop eating.

Can We Feed Everyone on the Planet? — Global Food Security Part 1

| Comments

This is the first of a series that will contain some of my thoughts on global food security and other related global thread factors. This post is a fairly hasty introduction to something I’ve been doing research on for some time.

Our planet is overpopulated. Teeming masses of humanity are multiplying at an unsustainable rate. Beyond war and disease, one of our most basic existential needs—food—is unsatisfied*: 925 million people are perpetually hungry, and up to 2 billion are intermittently food insecure1. You need to care about this because although food insecurity doesn’t lead clearly to a true existential risk (that’s where humanity gets wiped out), it is a major factor in societal collapse. This last affliction is one we’re still in danger of despite our advances in technology, and especially with the tight integration of the global economy, it may not be as easy to maintain high functioning pockets.

So, how can we feed everyone on the planet? In this first part I will use some rough calculations to look at whether this is even possible, or if we’re wide off the mark.

In order to find out if we can feed everyone I’ve adopted this simplified approach: find out how much food we produce, figure out a way to estimate its caloric content, and divide by the rough yearly caloric need per person. I found out the numbers for global food production are not very easy to come by and the ones I found estimated it in dollar value. However, I was able to dig up the global cereal production in tonnes. Cereals are the staple food in the vast majority of the world, and can be used to estimate the rough scale of our global food production. In later parts of the series I will attempt to produce more accurate estimates of our food production. One of the main problems with using cereals here is that in much of Africa—one of the parts of the world most afflicted with food insecurity—Cassava is the major staple. Unfortunately, Cassava is quite nutritionally poor and its widespread use is one of the things I’ll address in later posts. There’s another important problem with cereal (and is a major area I will also address later): 35-40% of cereal production goes to animal feed, rather than human consumption.

So here’s the the calculation intended to see if we’re even in the ballpark of feeding everyone:

Total global production of cereals, in tonnes (2007)2   KCal per tonne of cereal3   KCal required per year per person   People we can feed per year
( 2,349,874,000 × 3,000,000 ) ÷ 912,500 = 7,725,613,150.68

Well, looks like we’re just about there, as far as calories from cereals go! Does that mean we can rest safe? Well, obviously we can’t, or there wouldn’t be hungry people in the world. In subsequent posts I’m going to cover a many of the major issues preventing global food security and discuss methods to overcome them. A serious directed effort is necessary to reasonably guarantee food security to almost everyone human being in the world, but it’s much easier than it seems at first. Here are some of the topics I’ll address:

  • Post-harvest loss and food waste
  • Why couldn’t the Green Revolution keep up?
  • Genetically modified organisms and agribusiness
  • Food insecurity and societal collapse
  • Demographics and food security

Notes:
*  I’m ignoring water for now because the issues with the lack of water are more clearly infrastructural as opposed to related to a true global scarcity.
  This is my own rough estimate of 2,500 kcal * 365 days.

References:

  1. Food Security - Wikipedia 
  2. Agricultural Production: Cereals, total production - World Resources Institute 
  3. World Food Supply - GRIDA Arendal 

How to Translate Chinese and Japanese Characters

| Comments

I’m in an Iron Blogger “competition” and per the rules I have to update the blog once a week. I’ve been a bit lax, so I’ve dug this up from my collection of articles I wrote for my now famously vaporware newsletter (vol 2 will come and the meek shall inherit). Enjoy!

The Chinese character cai, meaning 'to pickí, with its 'rootí, the original, semantic (meaning-bearing) graph on the right, colored red; and its later-added, redundant semantic determinative (which also happens to serve as its dictionary classifier, or section header (b˘shou) on the left in black. Both portions have been called the 'radicalí (although nowadays generally the left side), leading to confusion.Hanzi Smatter1 is great, but sometimes you don’t want to rely on a random blog to translate your friends’ crappy tattoos. Or maybe you wanna know what that anime’s title REALLY means. Wonder no more! For a history lesson as well as a lot of information I’m just going to skip that could be important for translating larger texts (such as reading direction), there are links at the bottom of this section. For simplicity’s sake I’m going to refer to all these characters as Hanzi2 (Kanji3 being the Japanese pronunciation of the same characters). There are also a lot of nuances to the radicals, their ordering, and non-radical elements of these characters that I’m gonna ignore for the same of simplicity.

The key to being able to decipher these characters is understanding how they are constructed. Although some look quite complex and monolithic, all Hanzi are constructed from building blocks called radicals4. Each radical consists of a particular number of strokes required to draw it and Chinese dictionaries are usually ordered by the increasing number of strokes (there are several other orderings, including ones based on semantic categorization, a tradition descended from the ancient Chinese dictionary the Erya). Computerized radical-based dictionaries offer significantly faster lookups, because you can drill-down to the characters you mean quite quickly.

  1. Go to http://www.cojak.org. There are other Hanzi/Kanji dictionaries out there, but that one’s decent and pretty
  2. Try and identify a simple “monolithic” structure within the character, and count its number of strokes. Until you become more familiar with the radicals you may miscount, though thankfuly the dictionary’s interface lets you just find the radical that looks most similar. The location of the radical within the character varies, it’s meant to represent the core “semantic” aspect of the word, but that isn’t universally true.
  3. Click on that radical!
  4. Now you will be presented with choices of embellishments upon that radical, again ordered by number of strokes. Your character should be amongst the list.
  5. Now you will see the definition of that character. Below you may see a list of words that begin with that character, but are made up of multiple ones. If the character you are trying to translate is within a longer text, see if the adjacent characters don’t match those in the list, because words can be made up of multiple characters
  6. Voila! With a little bit of pattern recognition, you’ve now got the tools to be translating most Hanzi without much difficulty.

Almost underwhelming isn’t it? Unfamiliar things can often seem daunting, especially foreign languages and writing systems. Even a little bit of knowledge, however, can go a long way towards demistifying large swathes of territory! One weekend I was waiting for a train at the Mountain View Caltrain station, when an elderly Chinese couple began speaking at me in animated Mandarin and gesturing at the ticket machine. I tried to help them buy tickets, but they waved me away. I don’t speak any Chinese, but I am familiar with various cultural elements such as Laozi5 (a.k.a Lao-Tzu, etc.) father of Taoism whose name simply means “old master”. As the woman spoke to me, I noticed the word “lao” coming up multiple times. I asked “lao?”, to which she nodded vigorously and repeated “lao! lao!”. So, I helped them get the Senior-priced tickets on the machine and they left happily.

Without resorting to universal hand gestures, the cross-linguistic issues were resolved! The important thing is to always try and apply even tiny bits of pattern recognition, you never know when it will be quite helpful.

Notes & References:
1 Hanzi Smatter
2 Hanzi - Wikipedia
3 Kanji - Wikipedia
4 Radical (Chinese Character) - Wikipedia
5 Laozi - Wikipedia