This blog is no longer being updated. You're looking for Cooking with Charles.

Wednesday, May 30, 2012

Personal Identification

Identity is so crucially important to our society that it's surprising we haven't come up with a better way to handle it. Current systems are awkward while existing technology could offer a dramatic increase in security and cleanliness.

Let's start with computers. Each person has usernames and passwords -- sometimes dozens of each. Usernames must be unique to the user. Passwords must be gibberish according to whatever standards the website chooses to require (mix of capital and lowercase letters, must have numbers, must/must not have special characters). Security is decreased if the same passwords are used on multiple websites, and some mandate that passwords be changed periodically.

Some websites (Facebook, for example) conveniently allow you to use your email address as a username in order to decrease by one the number of strings you need to remember. The browser can do some of the work as well by remembering information. But these just mitigate a few problems in a system which fits our needs in the most basic way possible.

Because passwords can so easily be forgotten the system necessarily includes a way for people to prove their identities through "security questions" and social security numbers. Unfortunately those questions rely on information which isn't really a secret -- with a little knowledge about someone even their social security number can often be guessed.

Humans are uniquely identified in enough natural ways that we shouldn't need to rely on artificial means such as usernames and passwords. Voice patterns, signature dynamics, fingerprints, and retinal blood flow patterns are all unique identifiers but even a photograph of your face will get very close to unique identification. Some of these can be forged (for example your voice can be recorded) but a combination of several identifiers quickly becomes harder to hack than a text password.

Furthermore, it is increasingly common to see webcams and microphones built right in to monitors, laptops, phones, and tablets. If you're online, odds are that the device you're using has all the hardware it needs to verify your identity. Analysis of a voice is easy enough, as is taking a picture of a face or an eye. Signature dynamics could certainly be captured on a touch screen (and note that smartphones and tablets are a rapidly growing share of the computing market). And fingerprint scanners can already be built into laptops or even USB sticks.

You may be concerned that this essentially amounts to using the same login information everywhere -- one sketchy website and suddenly your bank accounts are empty. There are several ways around this problem.

One solution is to have a different phrase for each website. Since your voice is the identifier this does not need to be a secret (that is, forgettable) password; to log in to Google you could say "Google." This means that even if your voice is lifted by www.stealmycash.com, they haven't got enough information to log in anywhere else. This only works to a certain extent, though, as with enough samples they can interpolate your entire voice (as was done for the hologram Tupac).

The more secure option is to have verification done by a central authority, something like an OpenID.  Rather than logging in with each website individually, you hit the "Log in with Google" button and let Google, which you trust, handle the verification.

Of course there's no way to make it completely foolproof -- identity theft will always exist -- but to me it seems that the entire premise of a login could be significantly more convenient and intuitive without losing security.

Real life presents a similar situation. Just about everything you carry on your person serves the same purpose. Your drivers license, passport, credit cards, bus pass, and even keys have no function other than to explain who you are in a very specialized way. Replacing all of these with visual, auditory, or fingerprint identification is perhaps unrealistic, at least in the foreseeable future. Airports and other large establishments certainly have the resources to implement fingerprint or voice recognition software but mom and pop shops may not have the means to acquire so much new hardware. At the very least, however, we can do some consolidating.

For example, it would be logistically trivial to combine your drivers license and passport into a single card and eliminate the booklet altogether. In fact passport cards already exist, though they are not approved for air travel (this is a bureaucratic problem, not a technological one I'm sure).

Any sort of membership card or pass can easily be added as well, since this passport/license both uniquely identifies you and contains an RFID chip; any door that could be opened with your work ID can be programmed to accept your passport code instead.

RFID credit cards exist as well, though there are concerns over security. But whether or not the RFID technology is linked to financial information, it's increasingly the case that no more than one card is necessary to access your money (and why not combine that into your passport as well?).

Banks already allow you to set up default accounts; my old check card was linked to two checking accounts and a savings account. At the ATM I was able to specify where I wanted a withdrawal to come from and online I set one account to be the default that would be accessed when the card was swiped. A credit line could in principle also have been added to that card, even multiple lines, with no additional problem.

And online settings could even allow conditional default accounts; it would not be complicated to set it up so that making an airline purchase would automatically be charged to your SkyMiles card while groceries would go on your other card which gives better rewards for those.

This could even be done across multiple banks!

These specific options are not available but the technology to implement them is. None of this is more complicated than moving money between accounts, which can already be done online in real time.

As with any credit card/passport/identification, this super-card is not something that you would want stolen. A giant picture on the front of the card can impede fraudulent use. And as long as we're making use of technology we might as well include a GPS chip small enough to fit within the card.

(If this is getting a little too Orwellian for you, keep in mind that you probably already have GPS functionality in your phone.)

Of course the most secure solution would just be to eliminate the card entirely in favor of something which cannot be lost, such as an RFID implant (not so different from what they use in animals). This of course requires RFID readers anywhere you need to use your credit card, though in principle that's no different from a card scanner. The final step would be one past that where you actually use biometric identification everywhere, not just online; the hangup here is that it requires the distribution of a LOT of hardware.

Tuesday, May 29, 2012

Sangria

Rather than have two blogs I'm absorbing Cooking with Charles into Thinking with Charles. This blog exists for me to write about whatever. Sometimes I want to write about food, but probably not often enough to maintain an additional space to do so. You'll also notice that old Cooking with Charles posts have been imported here.



One of my goals for this summer is to figure out how to make a good sangria. I perused several recipes online until I found one I liked the look of, though I did not adhere to it particularly closely. Here's the recipe I used, which is a half batch due to the size of my pitcher. To use the whole bottle of wine, double this.




1/2lemon, sliced
1/2lime, sliced
1orange, sliced
1/2pear, diced
1/4 csugar
1/4 ctriple sec
3/4 cspiced rum
1/2 bottledry red wine




As the recipe recommends, I let the fruit and sugar sit in the rum and triple sec for a few hours before adding the wine. I mad to mush the fruit down a little bit to get it all to be covered. Before serving I poured in the wine and stirred it up. I did not serve it over ice, though all of the ingredients were cold.

When I fished out a piece of pear later in the evening it wasn't particularly boozy so I don't know that letting the fruit sit in the rum had much of an effect. In the future I'll probably just combine all of the ingredients at the same time then let it sit for at least an afternoon, maybe overnight, to really let the flavors blend.

I used the sugar because it appears in most recipes but I don't think it belongs. Most of it did not even dissolve (you can see it at the bottom of the pitcher) but the drink was plenty sweet. It's hard to tell how sweet it would have been had I followed the recipe more closely; I left out the orange juice but did use triple sec which is very sweet.

This drink was good, but I intend to experiment more with sangrias this summer to really get a feel for them. There are a lot of potential ingredients -- fruits, beverages, herbs, and so on -- to try out. At the very least I'd like to have in my repertoire a good recipe for red wine and another for white.

UPDATE: After drinking the first batch (short work with so many helpers) I repeated this with the second half of the bottle. I used the same recipe, minus the sugar, and reused the same fruit. All ingredients were added at once. The mix sat in the fridge for about 24 hours before being tasted. The sangria itself was about the same -- still plenty sweet -- and the pear chunks were very boozy and delicious.

Wednesday, April 11, 2012

A Break

All,
 I'm taking a break from blogging to take my preliminary oral exams. I need to write a paper, put together a talk, and study furiously in preparation for getting grilled by four professors for two hours about any physics they feel like asking me about.
Expect updates to resume soon after May 3rd.
 Thanks for reading!
Charles

Thursday, April 5, 2012

The American Political System

Our political architecture is a mess. Our entrenched two-party system rewards dickishness and limits voter preference to one political dimension. Our voting scheme damps the possibility of a third party. The electoral college is fundamentally undemocratic. It's no wonder our government is viewed as ineffective.

Let's start out with voting. Though perhaps the most intuitive, ours is not the only way to vote; there are many possible voting schemes. Though it's been proven that no voting scheme can be perfect, we can do better.

As we have it everyone gets to cast a single vote for a single candidate. If there are two candidates that they like they must choose between them. If we were directly electing representatives this would be great at ensuring proportional representation (for example, if distributing 100 seats, 48% of the vote for Democrats means that they get 48 seats). However, in electing a single president, our system is easily disrupted by third-party candidates "splitting the vote."

One of the simplest alternatives is having each voter rank their choices first through Nth in the case of N candidates. For example if 55% prefer Gore to Bush he would win, even if 10% prefer Nader to Gore.

Approval voting is similar, though rather than a rating each candidate simply gets a thumbs-up or a thumbs-down. The candidate with the most thumbs up wins; this avoids the possibility (however implausible) of having a majority prefer Gore to Bush, but also having a majority prefer Nader to Gore, but also having a majority prefer Bush to Nader.

Beyond how the votes are cast we can draw issue with how they're counted. The electoral college has been opposed by the strong majority of Americans for decades, according to the Gallup Poll. Proponents of the electoral college (according to Wikipedia), argue that it is "an important, distinguishing feature of federalism in the United States," giving a halfway point between a direct election and a congressional appointment for the office of the president. Furthermore it ensures that the small states are not marginalized.

In principle the electoral college prevents a politician from campaigning only to the big states; the twelve most populous states contain over half of Americans. Suppose I run for president, and my platform is to dramatically increase the taxes in the thirty least populous states while abolishing federal taxes in the most populous states (this is probably unconstitutional, but you get the idea). If there were no other issues, I would presumably win all of the large states in a landslide, and thus the popular vote. The electoral college gives extra say to the small states to make them relevant. This is the same reason that we have a Senate rather than just a House of Representatives.

However, people are not rational voters and they make choices based on a variety of issues so I would argue that this advantage is overshadowed by the disadvantages of the electoral college system.

The overrepresentation of small states is dramatic. Effectively each person in Montana gets triple the vote of a person in Texas. It also marginalizes almost all of the voters. Voting Democrat in a blue state is redundant while voting Republican in a blue state is futile. Only swing states are important since other states are so predictable. On the rare occasion that a blue state votes for a Republican (as in Reagan vs. Mondale) the votes in that state still didn't matter because the candidate was strong enough to carry the election using red states and swing states.

The presidential primaries, which at this point are a half-year spectacle or more, already choose candidates as if the vote were popular. The preferences of Florida, which is crucially important, are not held above those of California and Texas, which are completely predictable. It wouldn't make for much of a show, but a more electable candidate could be found by only counting swing states; that's where the vast majority of general election campaigning will be anyway.

Switching to a popular vote would be trivial, since we already count all the votes. In addition to making our representation more uniform this removes the possibility of faithless electors. No faithless elector has ever changed the outcome of a presidential election (and many states even have laws against the practice) it seems foolish to invite the possibility.

Additionally, a popular vote makes it easier for minor parties to accumulate recognition, as they do not need to be the majority in any single state to be acknowledged.

A strict two-party systems makes strange bedfellows; in order to vote for the openly Christian candidate, a working class man must vote against his own economic interests (that is, be taxed more and see less for it). Similarly a pharmaceutical corporation, to experience lower taxes, must support the party that opposes teaching biology in public schools.

Having only two parties disincentivizes compromise. The Republican congress has shown us that through filibustering and strict party unity they can essentially shut down any legislation that is not in line with their agenda - and since the Democrats are the ones trying to implement changes this means that the Republicans are winning the political game.

The existence of additional parties (the most obvious would be a fiscally conservative but socially tolerant - Libertarian - party and a fiscally liberal and socially conservative - Orwellian? - party, though there are of course more than two degrees of freedom) would give voters more freedom in what they want the government to do, as well as giving legislators more angles from which to pursue compromise.

This is a dimension present in the legislatures of many other countries, though I'll have to explore that in detail in a later post.

There's plenty more political dysfunction in this country to talk about but this is about as much as I can expose you to at once in good conscience. Perhaps at a later date we'll compare our year-and-a-half-long, multi-billion-dollar, TV-attack-ad-filled, presidential selection routine to that of some countries.

Wednesday, April 4, 2012

Introduction to Abortion

Abortion is a complicated issue. Any claim otherwise would be convenient but does not hold up to scrutiny.

A single egg is not a person (or women would charged with murder every time they menstruate). Similarly a single sperm is not a person (with, very conservatively, 100 million men of reproductive age each producing 100 million sperm per day, and with 4 million babies born per year, that's about one sperm out of a trillion -- 1,000,000,000,000 -- that will ever become a baby). So before conception, obviously, there is no issue.

Even after conception nothing is certain. Though figures vary, somewhere around half of conceptions are aborted naturally, mostly before the woman is even aware of the pregnancy, and mostly due to defects in the fetus. This is even more pronounced among women over 40 and those who have previously miscarried.

Personhood is not well defined but certainly it has some correlation with biological complexity. The complexity of a zygote is not much more than a sperm plus an egg. It grows quickly, but a human embryo is not really distinguished from that of any other mammal (such as the cow you kill to eat or the mouse you kill for convenience) until quite a few weeks into development. At nine weeks, after which abortions decline sharply, the fetus is roughly the size of a grape. And it's not a grape-sized person by any means; it's just starting to develop a skeletal structure.






Plot of abortions in the US vs. gestational age in 2004


On the other side of that coin, late in pregnancy a fetus is basically a baby. Provided some intensive care immediately after birth, babies even a few months premature can lead normal lives. Appropriately enough, very few abortions take place at this stage. The United States lags other developed nations in this respect, but even so 98% of abortions in the US take place before 20 weeks (halfway through pregnancy).

In terms of effects we can measure on a societal level (that is, not counting the erosion of America's soul), legal access to abortions is good for us as a country. Abortions still take place in nations with laws restricting or outlawing them. In these cases they are much more likely to be unsafe and the woman is much more likely to suffer complications, including death. Something like 68,000 women die per year due to unsafe abortions, mostly in developing countries. Furthermore, though it's controversial, some argue that legalized abortion lowers crime by reducing the number of children born into families that won't take care of them. Historically there has been a drop in crime 18-24 years after abortion becomes legalized in a state (as well as nationwide from Roe vs. Wade).

Abortions can be divided between elective and theraputic (to save the life of the mother, or protect her from very probably harm). I have to believe that proponents of banning theraputic abortions are in the fringe minority; at any point in pregnancy the mother is obviously more of a person than the fetus. The loss of a perhaps viable child is tragic, but less so than the loss of a woman.

Perhaps even more extreme is recent legislation (Georgia HB 954) that outlaws the surgical removal of an already stillborn fetus, even in the interest of the mother's health. It is the norm in politics right now to treat abortion as a simple issue that you can either be for or against. That is simply not the case.

Saturday, March 31, 2012

Nudity and Pornography

The puritanical idea that we must convince our children that sex does not exist, and that a naked body is sinful, is unsustainable. Asymmetry in indecent exposure precedent is perhaps not measurably bad for the country (as abstinence-only sex education is) but it is certainly awkward and pointless. For most adults in this country, sex - even recreational sex - is a regular part of life. Premarital sex is nearly universal and nearly all sexually active women have used contraception.

I'll accept that genitals ought to be covered. It's probably justifiable from a hygiene angle. But mandating that a woman's nipples must be covered is, as far as I can tell, nonsense. It's certainly incorrect to have gender asymmetry in the rule; the idea that a female nipple is more sexual than a male nipple is hard to justify. If you're unconvinced, try to tell which sex each of these nipples belongs to.



(Just a heads up - be careful about putting "nipple" into a Google image search; apparently nipple enlargement, nipple torture, and giant nipple piercings are pretty popular on the internet.)

Furthermore, if our goal is to protect children from explicit material, banning the female nipple is a really bad way to do it (of course it is generally easy to tell if a picture contains a female nipple; you'll notice that discussing complex issues as if they're black and white is a recurring pet peeve of mine). For example, you'll notice that of the four images below, three have exposed nipples. The first is art. The second is educational, helping teach how to do a self breast exam. The third, breastfeeding, I had to modify because a Google bot flagged it as pornographic. However, only the last image, "Sexy Bikini Girl," who has her nipples covered, is undeniably sexual.




And though this should go without saying, acknowledging that a nude body is not inherently dirty is not the same as insisting that everyone be naked all the time. Men are free to bare their entire torsos in public but few do. When not constrained by laws we are still constrained by practicality.

This is of course not to say that a naked body cannot be sexual; it obviously can be. But nudity is not inherently pornographic and it should not be censored as if to see it is shameful. Like comprehensive sex education, the stigma associated with pornography comes from the religious notion that we must be sexually pure. This is completely irreconcilable with reality.

According to surveys, only a quarter think pornography is protected under the First Amendment, just over a third think it's "morally acceptable to look at pictures of nudity or sexually explicit behavior," while 82% of adults think that laws against online obscenity should be "vigorously enforced." Meanwhile, back in fact land, one in four web searches is for pornography, one in ten emails is pornographic, half of all online spending is pornographic, and thirty million Americans - about one sixth of online users at the time - access online porn per day. Two thirds of men between 20 and 40 admit to looking at online porn regularly, as do a third of churchgoing women. These figures are from 2005, but you get the idea.

Shame over the sexual act is obsolete. Kinsey showed us sixty years ago that just about everyone is sexual; there comes a point where you can no longer act surprised and indignant.

That said, pornography is overwhelmingly aimed at men. It portrays sex as a male-dominated, even misogynistic, act. This is a norm I don't think we should accept as a culture. However, that's hard to change, as I imagine that porn production is market driven. And with annual porn revenues conservatively at ten billion dollars (in 2005), producers have a pretty big sample as far as gauging what sells.

(The nipples were all male.)

Wednesday, March 28, 2012

Pokemon Types

Pokemon is a pop culture phenomenon (primarily a video game but also made television series, movies, playing cards, toys, and so on) in which you capture monsters and battle them for sport and profit. Five generations of Pokemon games have been released for Gameboy and each has been a top selling game; the popularity of the franchise has ingrained Pokemon into our pop culture lexicon.

And that's great - the game has broad appeal, high replay value, and is more fun when played with friends. However it's doubtless that the core of the Pokemon game is battling Pokemon. And the type system by which that happens is, in hindsight, inelegant.

Each Pokemon has one or two elemental types inherent to its species. Additionally, each Pokemon can learn up to four attacks, each of which has an elemental type. Pokemon need not learn attacks of their own type, though they receive a bonus for doing so.

These types are crucial to making Pokemon battles interesting. For example Charizard is a fire- and-flying type Pokemon. Suppose my Charizard knows Fire Blast, Wing Attack, Scratch, and Bubblebeam. It will receive an attack bonus every time it uses Fire Blast or Wing Attack, but no bonus for the other two. Furthermore, Fire Blast will be super effective (double damage) against an ice-type Pokemon, but not very effective (half damage) against a rock-type Pokemon. On the other hand Bubblebeam, a water-type attack, will give Charizard no bonus by itself but will be super effective against a rock-type Pokemon.

The idea of having types interacting with each other adds significant depth to battles, but we see awkwardness in the types themselves.

The first issue is grammatical. I do not think it's unreasonable to expect that all elemental types be nouns (as most of them are). Some of the problem types even suggest an obvious choice; flying may as well be air or wind and electric could be lightning or electricity. There are a few more offenders, though I'll touch on those later as I look at other issues.



There are too many types. In total there are seventeen Pokemon types (initially there were only fifteen but dark and steel were added for balance reasons after the first generation of games). That means that in order to keep the game at a manageable level of complexity, on average a type will have no interaction with about two thirds of the other types. With fewer types we could have a less sparse interaction matrix. Some types have strong flavor overlap with one another; for example rock and ground or bug and grass. And some types are just bad from a creative standpoint.

For example, bug and dragon aren't elements; they're kinds of animal. The type itself constrains what the Pokemon can look like. Furthermore, Charizard and Gyarados show pretty clearly that a Pokemon can look like a dragon without being dragon-type. There are plenty of Pokemon shaped vaguely like a lizard, a fish, a bird, and so on without needing lizard, fish, or bird types. But in practice the existence of a bug type means that if any Pokemon wants to be bug-shaped it must be saddled with that type, depriving it of a spot that could have a real element. Particularly given the near-nonexistence of bug- or dragon-type attacks it seems to me that these types might as well not exist.

Similarly, the fighting type is awkward because it mandates that a Pokemon of that type be a close human analog. Fighting-type attacks are generally kicks and punches, so fighting-type Pokemon must have feet and fists.

The normal type is Pokemon that have no elemental proclivity. It's also the type that goes along with early attacks like Tackle and Scratch. It's basically the boring type that you encounter early on in the game then move past. I would advocate merging the fighting and normal types, perhaps call the new type strength or muscle. This seems fine thematically; it was never obvious how a punch could be super effective against something resistant to tackling.

The psychic, ghost, and dark types all feed on the same general theme of creepiness; they certainly don't need three distinct types. Psychic has a decent lexicon of moves but ghost has few. Dark moves tend to just correspond to fighting dirty (stealing their items, sucker punching, fake crying) which is thematically questionable. Perhaps one new type (shadow? darkness?) could replace the three together.

Of course merging types throws off game balance in a significant way, so the entire type interaction chart would need some reworking. But that's fine, because it's got issues too.

Some existing types are pretty noninteractive. Only ice- and dragon-type attacks are super effective against dragon-type Pokemon, and dragon-type attacks are super effective against nothing else. Electric, a common Pokemon type, is weak against only ground, a pretty rare attack type. Dark-types also rarely have to worry about weaknesses; rather than having to weigh the pros and cons of having a Pokemon of that type, it's more a matter of using one as soon as you can find it.

No types are mutually weak to one another. It's an option for an interesting game dynamic that simply doesn't exist. One might expect, for example, that water would be super effective against electricity and vice versa; when you drop a toaster in the aquarium it's bad for the fish of course (electricity super effective against water) but it's also bad for the toaster... and your home wiring (water super effective against electricity). The closest Pokemon comes to that is having dragon-type be super effective against dragons, but you already know how I feel about that type.

We would perhaps expect the type setup would be inelegant if it were carried through from the first generation of games, before the Pokemon franchise was swimming in money. But it wasn't. After the first generation the steel and dark types were added to address balance issues. Some other weaknesses and resistances were modified as well. It seems to me that makes criticism reasonable.

Chart from Bulbapedia