Saturday, October 31, 2009

Quotes for 10/31/09

"Everything reminds Milton Friedman of the money supply. Everything reminds me of sex, but I try to keep it out of my papers." - Robert Solow

Friday, October 30, 2009

Siege of Leningrad

Siege of Leningrad.  Pointed out in the Yale food course in the lecture on starvation.  In the rationing, manual laborers were given about 700 calories per day.  Non-manual laborers around 400.   Citizens recalled that the paste to put up wallpaper was made of potatoes.  Wallpaper was stripped off walls, and the dry paste was scraped into pots and boiled into soup.  Leather as well.  This was by the end of the first year.  The siege lasted another 1.5 years.  Then the cannibalism began.  After the corpses were eaten, children began disappearing.  The government made it illegal to sell fresh meat.  Over 1 million deaths by starvation.  1.5-3 million overall.  After the siege was lifted, it was formally illegal to speak of the cannibalism that took place during the siege.

Articles for 10/30/09

  1. Interesting Wal-Mart hack.  How can personal information be so poorly protected by such a massive store?
  2. Draw a symbol, and get the LaTeX code back.

Thursday, October 29, 2009

Blue footed bubi

Who knew?









Richmond rape case

The recent Richmond High School rape case (article 2) has a number of disturbing qualities.  The short story is that a 15 year old girl left a dance at the school, met up with some people on the side of campus, and was brutally raped by 6-10 young men, while the whole incident was observed by something like a dozen other people. Particularly important is that no one at the scene called the police, and the grisly mess lasted for nearly 2 hours.

In addition to the facts of the case, a number of comments also grabbed my attention.  The perpetrators currently in custody are aged 21, 19, 17, 16, and 15 years old.  The 21 year old has not been charged yet as far as I know.  The 19 year old is apparently the main assailant.  The DA apparently will seek life in prison for him, as well as for the juveniles (to be tried as adults).  An investigator from the police department is quoted as saying
  "These suspects are monsters. And, I don't understand how this many people capable of such atrocious behavior could be in one place at one time."
Focusing on the non-participating witnesses first, the first thing that's been on my mind regarding this case is the seemingly similar case of Kitty Genovese
that will be well known to anyone who took Psychology 101.  There a woman was beaten to death in broad daylight on a busy New York City street.  Similarly, no one watching the violence escalate called the police.   After the initial name calling and sermons on how NYC is a den of thieves, psychologists went around asking witnesses why they didn't call the police.   They replied that they figured someone else had already called them.  This led to numerous studies on group behavior that corroborated the claims.  It's one of the reasons I think Psychology 101 is the most important courses in college:  If you are aware of your tendency, as a human being, not to act in group situations, you can overcome your natural response, and get something done.

This seems slightly different though, since due to the remote location, any witness could see what any other witness was doing, so it would probably be clear if someone had called the police or not.  I'm curious whether there were threats of physical violence to the crowd from the attackers if anyone alerted the police, or if it was something like a Roman Colosseum spectacle.  In Gangleader for a Day, minorities from the Robert Taylor homes just don't call the police, since the police are frequently abusive and infrequently get anything done there.  Perhaps something like this was at work.

The second thing that sticks in my mind is the immediate response of the DA that he will not only seek to try the minors as adults, but will seek life in prison for all 4.  Even the oldest (currently charged), at 19,
is depressingly young.  Now, I'd agree that they obviously pose a danger to society, and should spend time in prison.  But a 15 year old getting life?  It is possible that he is a young psychopath that will do nothing but rape and pillage as long as he's on the streets.   Yet I find that incredibly hard to believe.  The interesting thing to me is the quote.  Again
  "These suspects are monsters. And, I don't understand how this many people capable of such atrocious behavior could be in one place at one time."
Indeed.  It seems highly improbable that 6-10 sociopaths happen all to go to the same high school and happen to all be hanging out together after a dance.   (Though, on second thought, any gang would probably satisfy this description.)  I think it is important to figure out what was going on in their minds (e.g. peer pressure) while this was happening.  The fact that the area is impoverished and known for gang violence, also would seem to play some kind of role.  I hope the psychology department at Berkeley researches this crime as seriously as those researchers studying the Genovese case.

In Stumbling on Happiness, Dan Gilbert reports on research showing that, almost unbelievably, about half of the people involved in horribly traumatic experiences similar to this one (though indeed this must be near the top of the list of most horrendous crimes) are able to recover psychology from the trauma.  I pray that the victim of this tragedy is one of these resilient ones.

Tuesday, October 27, 2009

Supertasters

I'm listening to the new food course from Yale online.  The most interesting fact so far is the existence of supertasters.  Basically, some people react to tastes much more strongly than others.  For instance, a supertaster might experience broccoli as extremely bitter.  I'm constantly amazed when people don't like things like olives or avocados.  Perhaps if I could experience their presumable super-reaction I'd dislike them as well.

Outrun a horse?

Is this true?  From http://www.nytimes.com/2009/10/27/health/27well.html?em  Seems impossible to me.
Most mammals can sprint faster than humans — having four legs gives them the advantage. But when it comes to long distances, humans can outrun almost any animal. Because we cool by sweating rather than panting, we can stay cool at speeds and distances that would overheat other animals. On a hot day, the two scientists wrote, a human could even outrun a horse in a 26.2-mile marathon.

Sunday, October 25, 2009

Cool hack

http://en.wikipedia.org/wiki/Xor_linked_list

Efficiency

I ran into a friend coming out of the grocery store last night.  In mock surprise, I said "What are you doing grocery shopping on Saturday night?".  She replied, "Well, if I go on Sunday morning I spend so long shopping.  On Saturday night, well, it's sad to be grocery shopping, so I get done quickly."

Friday, October 23, 2009

Oil Creek State Park

The most undervalued park in western PA.  A perfect place for a short weekend backpacking trip.

Funny rant on SFO travel.

So true. Public transportation to SFO is bad.

puzzles

Article on Martin Gardner, the math puzzle guy.

Wednesday, October 21, 2009

Monday, October 19, 2009

Against Transparency

Article by Lawrence Lessig on the surprising downside of donation transparency in government.

Wednesday, October 14, 2009

Best PL quote I've heard since CADE.

This one also involves Derek Dreyer.

http://www.iai.uni-bonn.de/~ralf/WG2.8/24/slides/derek.pdf

"Great, but who cares about the Apply functor?  It's a very lame functor."

Tuesday, October 13, 2009

Monday, October 12, 2009

Death penalty

I'm not against the death penalty in principle.  In practice though, it's usually impossible to
know for sure if the guy is guilty.  At least if you imprison a guilty person, you can let him
out when you realize your mistake (and the governor doesn't interfere with the case).
This simple fact and the further fact that executing someone actually costs more than keeping
them in prison for life makes the death penalty seem completely wrongheaded.

http://www.newyorker.com/reporting/2009/09/07/090907fa_fact_grann/

Sunday, October 11, 2009

Weird Haskell import behavior

Say you have a module A:

module A where

class A a where
  a :: a -> a

Now you wish to write a module B that instantiates A.A.
Since you don't want to include the whole namespace of A, you try

module B where

import A(A)

instance A Int where
  a = id

This fails to compile because it says 'a' is not a visible method of class A.  The strange thing is it compiles if you instead write

module B where

import qualified A
import A(A)

instance A Int where
  a = id


I find this strange since you don't have to write

instance A Int where
  A.a = id

Importing with brackets brings only those names into scope, thus making a not
visible.  But I fail to see why importing all of A qualified allows you to figure
out that a (unqualified) is visible.

A good article day

Great article about the celebrity chef Jamie Oliver, and his crusade in America.

Another good one by Malcolm Gladwell comparing dog fighting and football injuries.

Thursday, October 08, 2009

Haskell strictness

The following Haskell program eats 2GB of memory in about 5 seconds:

index n i (x:xs) = if x == n then i else index n (i+1) xs
main = putStrLn $ show $ index 0 0 [1..]

This seemed odd to me, since it is tail recursive.  The problem is that the i+1 does not get evaluated, and therefore creates a thunk at each recursion step.  Compiling with -O2 fixes this, as does the following fix

index n i (x:xs) = i `seq` if x == n then i else index n (i+1) xs
main = putStrLn $ show $ index 0 0 [1..]

This simple example just shows how you really have to unlearn your most fundamental strict functional  programming beliefs if you start hacking Haskell.

Good column on health care by Nicholas Kristof

Tuesday, October 06, 2009

A dissenting opinion on electronic voting.

M. Shamos at CMU is the first computer scientist I've seen argue that paper trails are a bad idea in electronic voting.  I don't agree with his biggest point, but I think that there is some interesting
sociological information there.  For example, requiring paper trails by law stifles technological
innovation since anything non-paper-based would be illegal.

Monday, October 05, 2009

Cabal oddity

When you use Cabal to make a library, you have to be careful about what you include in the 'exposed-modules' section.  If you don't include a module, and you refer to it in another library, the code will compile, but not link.  It will give you an uninformative (ar) error message about undefined symbols.
This will even happen if you export modules that use unexported modules.  I think of this as a bug,
but for now, I suggest exporting every module that might be touched by an export.

Excellent article about Larry Summers

http://www.newyorker.com/reporting/2009/10/12/091012fa_fact_lizza?currentPage=all

Thursday, October 01, 2009

Best GHC option

-B:
Sound the bell at the start of each (major) garbage collection. Oddly enough, people really do use this option! Our pal in Durham (England), Paul Callaghan, writes: “Some people here use it for a variety of purposes—honestly!—e.g., confirmation that the code/machine is doing something, infinite loop detection, gauging cost of recently added code. Certain people can even tell what stage [the program] is in by the beep pattern. But the major use is for annoying others in the same office…”