05.20.09
Posted in Hacking, Technology trends, programmer productivity, robobait at 11:44 am by ducky
I had a very brief but very interesting talk with Prof. Margaret Burnett. She does research on gender and programming. at Oregon State University, but was in town for the International Conference on Software Engineering. She said that many studies have shown that women are — in general — more risk averse than men are. (I’ve also commented on this.) She said that her research found that risk-averse people (most women and some men) are less likely to tinker, to explore, to try out novel features in both tools and languages when programming.
I extrapolate that this means that risk-seeking people (most men and some women) were more likely to have better command of tools, and this ties into something that I’ve been voicing frustration with for some time — there is no instruction on how to use tools in the CS curriculum — but I had never seen it as a gender-bias issue before. I can see how a male universe would think there was no need to explain how to use tools because the figured that the guys would just figure it out on their own. And the most guys might — but most of the women and some of the men might not figure out how to use tools on their own.
In particular, there is no instruction on how to use the debugger: not on what features are available, not on when you should use a debugger vs. not, and none on good debugging strategy. (I’ve commented on that here.) Some of using the debugger is art, true, but there are teachable strategies - practically algorithms — for how to use the debugger to achieve specific ends. (For example, I wrote up how to use the debugger to localize the causes of hangs.)
Full of excitement from Prof. Burnett’s revelations, I went to dinner with a bunch of people connected to the research lab I did my MS research in. All men, of course. I related how Prof. Burnett said that women didn’t tinker, and how this obviously implied to me that CS departments should give some instruction on how to use tools. The guys had a different response: “The departments should teach the women how to tinker.”
That was an unsatisfying response to me, but it took me a while to figure out why. It suggests that the risk-averse pool doesn’t know how to tinker, while in my risk-averse model, it is not appropriate to tinker: one shouldn’t goof off fiddling with stuff that has a risk of not being useful when there is work to do!
(It has been emotionally very difficult for me to write this blog post today. I think it is important and worthwhile, but I have a little risk-averse agent in my head screaming, screaming at me that I shouldn’t be wasting my time on this: I should be applying for jobs, looking for an immigration lawyer, doing laundry, or working on improving the performance of my maps code. In other words, writing this post is risky behaviour: it takes time for no immediate payoff, and only a low chance of a future payoff. It might also be controversial enough that it upsets people. Doing laundry, however, is a low-risk behaviour: I am guaranteed that it will make my life fractionally better.)
To change the risk-averse population’s behaviour, you would have to change their entire model of risk-reward. I’m not sure that’s possible, but I also think that you shouldn’t want to change the attitude. You want some people to be risk-seeking, as they are the ones who will get you the big wins. However, they will also get you the big losses. The risk-averse people are the ones who provide stability.
Also note that because there is such asymmetry in task completion time between above-median and below-median, you might expect that a bunch of median programmers are, in the aggregate, more productive than a group at both extremes. (There are limits to how much faster you can get at completing a task, but there are no limits to how much slower you can get.) It might be that risk aversion is a good thing!
There was a study I heard of second-hand (I wish I had a citation — anybody know?) that found that startups with a lot of women (I’m remembering 40%) had much MUCH higher survival rates than ones with lower proportions of women. This makes perfect sense to me; a risk-averse population would rein in the potentially destructive tendencies of a risk-seeking population.
Thus I think it does make sense to provide academic training in how to use tools. This should perhaps be coupled with some propaganda about how it is important to set aside some time in the future to get comfortable with tools. (Perhaps it should be presented as risky to not spend time tinkering with tools!)
UPDATE: There’s an interesting (though all-too-brief!) article that mentions differences in the biochemical responses to risk that men and women produce. It says that men produce adrenaline, which fun. Women produce acetylcholine, which the article says pretty much makes them want to vomit. That could certainly change one’s reaction to risk..
Permalink
05.10.09
Posted in Maps, Politics at 6:38 pm by ducky
I added a state legislatures partisanship layer to my election map, and also modified a metric which shows kind of how liberal an area is. For every governor, US senator, or US congressman in a district that is a Democrat, I added one. For every legislator who is a Republican, I subtracted one. Now, with the new data, I also add one point for each state legislative chamber that is controlled by Democrats, and subtract one for each that is controlled by Republicans.
This gives me a range of -6 to plus 6 (governor, two US senators, one US congressman, one state senate, one state lower chamber), which I can show in shades of red to blue:

Some things are not surprising: the northeast is very blue; Idaho and Utah are very red. However, I don’t get Arkansas. I wouldn’t have thought that it would be culturally very different from its neighbours, yet most of the state has the maximum value of +6.
Is this all due to Clinton? Did he build a really strong Democratic Party operation in Arkansas? Or did he throw a bunch of money towards Arkansas, for which they are still grateful?
Can anyone familiar with Arkansas shed any light on this?
UPDATE:
A reader from Arkansas explained that the Arkansas Democratic party is very entrenched and strong, but that the populace is not particularly liberal. Essentially, people who are Democrats in Arkansas would be Republicans just about anywhere else. (This is similar to the Liberal Party in BC, which is the most conservative of the three viable parties in BC. The Liberal Party in BC is much more conservative than the Canadian federal Liberal party.)
Permalink
05.09.09
Posted in University life at 12:59 am by ducky
Jerome Dolittle recently reported via James Fallows that he had asked thirty Harvard first-year students to redesign universities from the ground up; 29 of 30 came up with, as the author put it, “something that looked very much like Harvard, except a little farther out of town”. He seemed to take this as evidence that Harvard students were not very creative.
This was in response to an article by Randy Pollack talking about how uncreative Chinese MBA students were: when asked to come up with a the most original idea they could for a business, e.g. a restaurant chain, five of six groups came up with the idea of — a restaurant chain! This was given as evidence of how the Chinese educational system did not foster creativity.
Dolittle seemed to think that the Harvard students were just as uncreative as the Chinese students, but I don’t think that comparison is fair. I think that reforming education is a much more difficult problem for first-year students than thinking of a business would be for MBA students.
In addition to the age difference and the difference in academic focus, the MBAs had probably encountered hundreds if not thousands of businesses and products in their day-to-day life. I would bet that the majority of the Harvard freshman had intimate knowledge of exactly one university. It’s difficult to consider how you can change something if you don’t have an idea of the number of degrees of freedom you have.
Even faculty have difficulty being creative about reforming universities. Recently there was a New York Times opinion piece End the University as we know it that got quite a bit of buzz in my circles, despite its recommendations being, in my opinion, not very creative:
- Restructure the curriculum to be more interdisciplinary.
- Abolish permanent departments, replacing them with problem-focused temporary departments (e.g. Water).
- Collaborate more across institutions.
- Allow dissertations in forms other than things that look like scholarly books.
- Give graduate students real-world skills.
- Abolish tenure.
Three recommendations (#1,# 3, and #5) are goals that institutions already aspire to. They might not do it well, but they sure talk about it a lot.
I think people haven’t done #6 because it would lead to either a rise in cost or a decline in quality (or both), not because it wasn’t an obvious thing to try.
Aside from the increased administrative overhead and lack of departmental reputations that #2 would cause, project-based learning has been tried before to some extent. (Hampshire College is highly individual-project based; Colorado College students take one compressed course at a time.) One could also easily argue that each graduate student is supposed to create their “department of one”. (When I got my first MS, I took classes in library science and intellectual property law because that’s what made sense for my area of interest.)
For #4, I believe that it already is possible to do a non-book thesis, particularly in the performing arts. One friend’s “dissertation” was a symphony. Another friend made a movie for her anthropology thesis. While I have a copy of my thesis printed on dead trees, the important version of the thesis is the PDF available on-line.
Even though Taylor’s ideas are not that novel, they got buzz. I think that means that it is really hard for most people to come up with ideas on how to reform university education.
In contrast to the inexperience of the Harvard freshmen, I have been downright promiscuous with universities. (I have eight transcripts now, for examplet.) This familiarity helped me identify — fourteen years ago — some core functions of a university institution that I thought could be disaggregated: unidirectional information transfer, interactive learning experiences, caring/paying attention, and certification. I also showed how these pieces could be rearranged by private enterprise and social media. (In later blog posts, I showed how this disaggregation/disintermediation is already happening.)
Now, it is possible that it is a coincidence that I have both unusual intimacy with universities and was able to come up with creative insights about reform. I suppose it’s also possible that I’m just amazingly brilliant. I don’t think so. I think that if you see lots of X, then it becomes easier to think creatively about things you could do with X.
It might be that the Harvard students were in fact just as uncreative as the Chinese MBAs. However, I don’t think Dolittle proved that.
Permalink
05.04.09
Posted in Technology trends, programmer productivity at 4:22 pm by ducky
Update: it turns out that lots of people have done exactly what I asked for: see Instruction-level Tracing:
Framework & Applications and the OCaml debugger. Cooool! (Thanks DanE!)
In my user studies, programmers used the debugger far less than I had expected. Part of that could perhaps be due to poor training in how to use a debugger — it is rare to get good training in how to use a debugger.
However, I think the answer is simpler than that: it is just plain boring and tedious to use a debugger. One guy did solve a thorny problem by stepping through the debugger, but he had to press “step over” or “step into” ninety times.
And when you are stepping, you must pay attention. You can’t let your mind wander, or you will miss the event you are watching for. I can’t be the only person who has done step, step, step, step, step, step, step, boom, “oh crap, where was I in the previous step?”
Omniscient debuggers are one way to make it less tedious. Run the code until it goes boom, then back up. Unfortunately, omniscient debuggers capture so much information that it becomes technically difficult to store/manage it all.
I suggest a compromise: store the last N contexts — enough to examine the state of variables back N levels, and to replay if desired.
I can imagine two different ways of doing this. In the first, the user still has to press step step step; the debugger saves only the state changes between the lines that the user lands on. In other words, if you step over the foo() method, the debugger only notes any state differences between entering and exiting the foo() method, not any state that is local to foo(). If the user steps into foo(), then it logs state changes inside foo().
In the other method, the user executes the program, and the debugger logs ALL the state changes (including in foo(), including calls to HashTable.add(), etc.). This is probably easier on the user, but probably slower to execute and requires more storage.
You could also do something where you checkpoint the state every M steps. Thus, if you get to the boom-spot and want to know where variable someVariable was set, but it didn’t change in the past N steps, you can
- look at all your old checkpoints
- see which two checkpoints someVariable changed between
- rewind to the earlier of the two checkpoints
- set a watchpoint on someVariable
- run until the watchpoint.
Permalink
05.01.09
Posted in Politics at 8:47 am by ducky
CNN released a poll that showed that how often an American Christian goes to church corresponds strongly to how much he/she supports torture.
To a liberal, this makes no sense at all. The Golden Rule says to treat others as we would like to be treated ourselves, right? And most people would not want to be tortured, right? What’s the deal?
It makes sense to me in light of Haight’s findings on morality. The people who go to church the most often are those for whom belonging to a group is most important, which ties to in-group loyalty. I can imagine that as in-group loyalty increases, desire to protect the in-group gets fiercer. Meanwhile, I can imagine that as in-group loyalty increases, respect for/value of people in the out-group decreases. To put it another way, the higher your loyalty to people who look like you, I bet the less interested you are in preserving the rights of people who don’t look like you.
This is not my value structure.
Update: A friend pointed me to a study that shows that participation in religious rituals (but not how often they prayed) predicts support for suicide bombing! This was true across cultures — Palestinian Muslims, Israeli Jews, Mexican Catholic, Indian Hindus, Russian Orthodox Christians, UK Protestants, and Indonesian Muslims. Furthermore, in some of the interviews, they “primed” the interviewee to think about religious affiliation before asking about support for suicide bombing; that turned out to significantly increase reported support for suicide bombing!
This paper thus seems to me to pretty strongly support the CNN poll, albeit indirectly. It seems to me that it not a great leap to replace
- a suicide bomber from the in-group who kills members of the out-group
with
- a torturer from the in-group who tortures members of the out-group.
Permalink
04.27.09
Posted in Random thoughts, Too Much Information at 11:15 am by ducky
I’ve been working on LOLcat subtitles for Sita Sings The Blues, and a friend asked me what the ISO 639 language code for LOLcat was.
It turns out that the ISO 639 language code LOL does exist, and is for the central African language Mongo. Who knew that the kittehs were African!?!?
Update: My buddy Luther points out that the African Wildcat is the ancestor of the domesticated housecat. As he pointed out, “Duh.”
Update2: Luther also asks, “I can haz bank scam?”
Permalink
04.24.09
Posted in Politics at 7:41 am by ducky
A few days ago, I read something somewhere about how disappointing it was that there wasn’t more hue and cry about the recent release of the torture memos. (Sorry, my computer died and I was somewhat off the air for a few days, so don’t have a citation.)
Initially, I wasn’t going to blog about the release of the memos, but I feel I have to go on the record. I feel I have to say something in order to be counted, to make the “torture bad” side of the argument one voice stronger.
Initially, I wasn’t going to blog because I didn’t think any more needed to be said. I’ve already discussed why I think torture is a bad idea. (Never mind discussions about it being morally wrong, it’s still just flat a bad idea.) The things that I said — that I thought it was impossible to keep our torturing a secret, impossible to only torture guilty people, and that torture gave faulty information — proved true well before the memos were released.
I was angry and saddened at my country’s cavalier treatment of our military prisoners even before the memos were released. I had already seen routine torture at Abu Ghraib, and it was already known that we had waterboarded some prisoners. To hear that we waterboarded one guy 183 times was appalling, but I was already appalled that we did it at all. The difference between someone who knocks over 90 year-olds for fun and one who doesn’t is far starker than one who knocks over three seniors over versus one who knocks over 183.
I was already angry and saddened at how many of my fellow citizens thought torture was a hunky-dory method; just one more tool in the toolchest for waging war. To hear that Peggy Noonan thought we should not have released the memos — that we should just avert our eyes and walk on by was jaw-dropping, but my jaw has been on the floor for a long time.
The only thing that has changed is my attitude towards prosecution. I had gone along with the argument that we shouldn’t spend political capital on dragging something along that would devolve into partisan bickering. After seeing how stunningly in denial the Right-Wing is about torture being illegal, immoral, and ineffective, I now think we have to prosecute. If we don’t — if we continue to let a large portion of the country think that torture is okay — then we will torture again.
This is not about retribution. This is not about vengence. This is not even about justice. This is about prevention. This is about deterrence. This is about making sure that my country never goes down that slippery slope again.
Permalink
04.21.09
Posted in Canadian life, Hacking, University life at 11:47 am by ducky
The UBC programming team took 34th place at the 2009 International Collegiate Programming Contest (ICPC) World Finals in Stockholm! W00t!!
This marks the sixth year in a row that UBC has gone to the World Finals, despite being entirely undergraduates and entirely without World Finals experience. (We have information on past teams, but don’t know the seniority of the 2004 team.)
Congratulations, team!
Permalink
04.19.09
Posted in Maps, Politics at 4:56 pm by ducky
I have been looking at unemployment figures today. Here’s unemployment rate by county for 2008, from the Bureau of Labor Statistics. Pure white corresponds to a rate of 2%; pure green corresponds to a rate of 10%.

Unemployment Rate 2008
Note that the unemployment rate is dimensionless, i.e. it’s the number of people looking for work divided by the number of people in the workforce. The BLS makes its estimates by interviewing thousands of people each week and carefully asking them questions about their employment. If they have worked at all in the past week (even part-time), that counts as employed. If they haven’t looked for work in four weeks, they do not count as being in the workforce. This means that retired people, stay-at-home moms, and people who have given up do not count. (The BLS has a good explanation of their methods.)
Here is the unemployment rate by county for 2007:

Unemployment Rate 2007
Again, I think the more interesting picture is the difference between the two years; red where unemployment has gone up, blue where unemployment has gone down. Full red means a change of +5 percentage points or more; full blue means a change of -5 percentage points or more.

2008 unemployment rate minus 2007 unemployment rate
There’s an awful lot of red there, alas. The unemployment rate fell in 272 counties and rose in 2767 counties.
Things worth noting about the above maps:
- There are a fair number of state boundaries visible in the 2008 minus 2007 map. For examples, Wisconsin is particularly visible, Wyoming is visible to a lesser extent, and there is also a line visible running along the north side of Oklahoma, Arkansas, Alabama, Mississippi, and South Carolina, and a line along the east side of Alabama. I think this means that state policies actually do matter.
- West Virginia had lower unemployment in 2008 than 2007. I presume that was demand for coal relating to the high price of oil in most of 2008. The Oklahoma drops in unemployment also be due to the higher value of oil; I don’t know why North Dakota did better.
- Woods County, OK, which is the bright blue spot in near the center of the country in the 2008 minus 2007 map, has a relatively small population: 120 people were unemployed in 2008 versus 261 in 2007. Oklahoma’s economy has a large fossil fuel component.
It’s also interesting to look at the difference between 2008 and 1998:

2008 unemployment rate minus 1998 unemployment rate
Thoughts:
- Poor Michigan.
- In addition to West Virginia, the rural West had higher unemployment in 1998 than in 2008. I presume this has to do with the very strong market for resources (trees, minerals, coal, etc.) for most of 2008.
I have added the first three maps to my elections map page. (Note that I have data such that I can put even more maps on the page, but I worry about the UI getting too cluttered. Thus, if you really want to see some map, let me know.)
Update: A friend of a friend pointed me at Wisconsin Business Climate Statistics. That page points out the Wisconsin has a very lean government, low taxes, low crime,and tax exemption for energy used in manufacturing. Frankly, it sounds like a Republican party platform — even though Wisconsin is a very Democratic-leaning state.
Permalink
04.13.09
Posted in Maps, Politics at 5:51 pm by ducky
I recently got historical data on presidential election results by county from Robert Vanderbei, for presidential elections 1960-2004. While it is interesting to look at the raw data, I find it even more interesting to look at the differences between years, like the 2008 vs. 2004 map I commented on already. This helps separate how people felt about a particular pair of politicians from how liberal/conservative they are in general. For example, here’s the 1960 (Nixon vs. Kennedy) map, with Democratic counties in blue and Republican counties in red:

1960 -- Kennedy vs. Nixon
And here’s the 1964 (Johnson vs. Goldwater) map:

1964 -- Johnson vs. Goldwater
1964 Difference
You can see even from the 1964 map that LBJ was not very popular in the South (presumably because of his civil rights work), but the difference map below really hammers it home. In this map, it is blue if LBJ did better than Kennedy and red if the reverse. You can see from the difference map that the South really hated LBJ:

1964 results minus 1960 results
Another interesting thing about the 1960/1964 maps is that there is no evidence at all of “the black belt”. Here is a map of counties which were majority black in 2000, with darker green the stronger their majority:

Majority-black counties (2000)
I have to believe that blacks would have overwhelmingly voted for LBJ — if they were able. I think this is a pretty vivid demonstration of how thoroughly their voting rights were repressed.
1968 vs. 1960
The 1968 (McGovern-Nixon) minus 1964 map is basically an inverse of the 1964 minus 1960 map, basically because the southern antipathy towards Johnson was so strong that it skews everything. A more interesting map is to compare Humphrey vs. Nixon to Kennedy vs. Nixon:

1968 (Humphrey-Nixon) minus 1960 (Kennedy-Nixon)
Humphrey explicitly called for the Democrats to move away from states’ rights and towards civil rights, and that apparently played well in the upper Midwest and Northeast but not as well in the Southeast or West. You can also see a faint outline of Minnesota (where Humphrey was from) and a strong outline of Maine (where Muskie, the Democratic VP, was from). (Maryland, where Nixon’s VP Spiro Agnew was from, is too small to see in this picture.) You can maaaybe start to see the majority-black counties in some states, but not in Georgia.
There are some blue areas in the above map, but those probably would be red if it weren’t for George Wallace. Wallace ran as an independent, and did extremely well in southern states. It is unlikely that he took any votes away from Humphrey, as he was an outspoken proponent of segregation. While third-party candidates usually struggle to get over 10% of the vote, Wallace won a number of states outright. Here is a map of counties that he won outright:

Counties won by Wallace in 1968
1972
Nixon was re-elected in a landslide. Not only was McGovern staunchly anti-war during the Vietnam War, he was criticized for his first choice of running mate (who he fired). The only obvious counties on this map that voted more for McGovern than for Humphrey were in McGovern’s home state of South Dakota:

1972 (McGovern vs. Nixon) minus 1968 (Humphrey vs. Nixon)
1976
The Carter/Ford minus McGovern/Nixon map looks almost exactly the opposite, as the Watergate scandal destroyed Nixon’s and Ford’s standing. The South also rallied to Jimmy Carter, the first post-Civil War Southerner to be elected President.

1976 (Carter-Ford) minus 1972 (McGovern-Nixon)
1980
Jimmy Carter had his own troubles: the economy was in dire shape, in large part because of the rise in gas prices because of the second oil crisis. Carter also was not a strong leader: my memory of the time is that he suffered from what I called “Democrat’s dilemma”: being able to see all sides to all issues and thus unable to take a strong stand. Ronald Reagan, who exuded a forceful, “can-do” attitude, was more successful than the disgraced Ford almost everywhere:

1980 (Carter vs. Reagan) minus 1976 (Carter vs. Ford)
1984
Reagan got even more popular in large swaths of the country. Mondale could only manage to erode some of Reagan’s support in spots.

1984 (Mondale vs. Reagan) minus 1980 (Carter vs. Reagan)
Note that many of the blue counties above are areas of high Native American population. The map below shows counties where more than 30% of the people identify as Native Americans:

Counties with more than 30% Native American
I suspect that Reagan did something to upset Native Americans, but I don’t know what that was.
1988
George H.W. Bush was able to get elected in 1988, but he was pretty uniformly less successful than Reagan.

1988 (Dukakis vs. Bush41) minus 1984 (Mondale vs. Reagan)
1992
Bush continued to do worse in 1992, again pretty much across the whole country, losing to Clinton. Note that you can see the outline of Arkansas (home of Bill Clinton) clearly and Tennessee (home of Clinton’s VP Al Gore) somewhat.

1992 (Clinton vs. Bush41) minus 1988 (Dukakis vs. Bush41)
Ross Perot made a strong third-party run in 1992. I’m not sure who he took more votes from.

1992 third-party votes (mosty Perot)
1996
The Republicans made some inroads in 1996 in the West — especially in Bob Dole’s native Kansas (outline visible in the center of the country) — but it wasn’t enough. Clinton gained support in the upper Midwest, Northeast, Florida, Louisiana, and Southern Texas (which is heavily Latino).

1996 (Clinton vs. Dole) minus 1992 (Clinton vs. Bush41)
2000
Bush43 and Gore had a famously close race, but Bush43 did better than Dole almost everywhere (or Gore did worse than Clinton, depending on how you look at it).

2000 (Gore vs. Bush43) minus 1996 (Clinton vs. Dole)
2004
Bush43 strengthened his lead in the middle and southeast of the country in 2004, but lost support in some Northern and Western places:

2004 (Kerry vs. Bush43) minus 2000 (Gore vs. Bush43)
I’ve written about the 2008 vs. 2004 map already, so I won’t talk about it here. Instead, I think it is interesting to compare the 2008 election to the 1960 election, to see how the country’s party affiliations have changed:

2008 (Obama vs. McCain) minus 1960 (Kennedy vs. Nixon)
The biggest difference is that the Southeast is much, much more Republican now (except for minority-heavy areas: the Black belt and parts of Florida).
The New England states and the upper Midwest are much more Democratic. Native Americans voted heavily for Obama. Most importantly, perhaps, is that the Pacific coastal areas are much, much more Democratic than they were in 1960. (Those areas have also experienced a great deal of population growth, so this change is bigger than it looks.) The only area that seems like it stayed sort of the same is a belt running through Mossouri, Illinois, Indiana, and Kansas.
Note: The difference maps aren’t up on my maps page yet, but they hopefully will be soon.
Permalink
« Previous entries