Wednesday, February 18, 2009

Python's user class implementation, and GIT

CPythonImage via Wikipedia

Comment to Guido's post "The History of Python: Adding Support for User-defined Classes"
I like dictionaries/namespaces better than objects. For me, your accomplishment with Python's implementation of user classes is on a par with Linus's insight to base a DVCS on a "mere" filesystem that only tracks content based on cryptographic hashes. A single idea, very simple but not _too_ simple, implies everything else, to great success.

Guido Van RossumImage by palewire via Flickr

Computer science is too important to leave in the hands of people who are not implementors.
Reblog this post [with Zemanta]

Tuesday, February 17, 2009

Lessons of the Financial Collapse

[From an attempted comment to Arnold Kling's post (Amar Bhide Monday) about Amar Bhidé's Wall Street Journal article "Don't Believe the Stimulus Scaremongers" and Econtalk podcast "Bhide on Outsourcing, Uncertainty, and the Venturesome Economy"]
MHodak:
> Only a people as ignorant of history as they are of economics can consider the current boom-bust cycle a failure of laissez-faire.
I wouldn't express it this strenuously, but it is difficult to argue with.
[but, be aware: if boom-bust cycles cannot confute laissez-faire markets, then, equivalently, boom-bust cycles cannot confute market regulation.  If market regulation does not stop boom-bust cycles, but meets other social goals, then regulation is working as _designed_, if perhaps regulation is not working as it is being _sold_ to the voters.]
I appreciate being on this side of the financial bubble.  I now know the hard limitations of many financial innovations:
* cheap cheap cheap lending as social policy
* credit default swaps
* mortgage securitization, or other alchemy used to turn shit into gold
* more alchemy: thinking that deregulation and/or regulation can turn shit into gold
* swapping really existing heavy tails with negligible light tails in modeling, for ease of modeling
* borrowing to invest, which was always speculation and always will be speculation, begin tarted up as "savvy leverage"
* hand-waving away concerns about alleged "systems of trust" that only reward for short-time-horizon goals
* relying on rating agencies in the pocket of those being rated
* not treating liquidity as a scare resource (in reality, you should force people to pay dearly for liquidity *now* as opposed to liquidity later); thinking that you can pull liquidity out of your ass
* in general, trying to profit from financial instruments that *you* don't personally understand
I didn't have the chops to puzzle out all these myself, and now I don't have to.  I am standing on the far side of the bubble.
I am weathering this current storm, not badly, not because of my smarts, but because my father and wife are fanatically risk-adverse, and I don't have enough energy to take them both on simultaneously.  So I am in a position to profit from lessons I am unworthy to have granted to me.

Monday, February 9, 2009

Paul Graham writes something worth reading

Paul Graham: "Keep Your Identity Small"
I finally realized today why politics and religion yield such uniquely useless discussions.
...
I think what religion and politics have in common is that they become part of people's identity, and people can never have a fruitful argument about something that's part of their identity. By definition they're partisan.
Which topics engage people's identity depends on the people, not the topic. ...
...indeed, you can have a fruitful discussion ... so long as you exclude people who respond from identity.
This is correct, and well put. But I disagree with the title, taken as advice, and the last paragraph, taken as advice:
Keep Your Identity Small
Most people reading this will already be fairly tolerant. But there is a step beyond thinking of yourself as x but tolerating y: not even to consider yourself an x. The more labels you have for yourself, the dumber they make you.

2007APR081822Image by bootload via Flickr

The problem is that Identity just didn't develop in humans to make them dumber. A great deal of your effectiveness and personal power comes from your Identity.
  • If you identify yourself as a Provider, you will be able to accomplish more for your families needs in good times, in bad times, and, especially, in the very worst times.
  • If you are running a Democratic campaign, your most effective workers will identify themselves as Democrats.
  • If you identify your worth as a person with the label Electrician, you will operate on a higher plane of competency than your colleagues that don't identify their worth as such.

2007DEC131726Image by bootload via Flickr

If I had to try to develop my best advice in this area, I would say:
  • "Make your deepest expression of Identity explicitly"
  • "Use slightly more labels than you otherwise would"
  • "Stay resolute inside your Identity, with all its labels"
  • "In brief and infrequent times of personal downtime, allow yourself to critically examine all the labels of your identity, and change them if they are unlikely to help you secure what you now greatly value"
What you risk, by not using slightly more labels than you otherwise would, is foregoing the power that labels provide.
Reblog this post [with Zemanta]

Kling lets his inner Libertarian Crank come out, at the worst possible time.

"The Third-Term Panic", by Thomas Na...Image via Wikipedia
I endorse Arnold Kling's "macroeconomic" analysis of the current crisis.  Quoting myself in a comment on Will Wilkinson's blog:

Arnold Kling's "Macro out of the mouths of children of the Austrian School" makes the most sense, in my uneducated opinion:


summarized as:

#1) The way out of the recession will be powered by business profits (as usual). A targeted macro solution: tax cut on the payroll tax (profits go up, and only after the profits have been locked in, employment will go up)

#2) Nobody wants leverage. Let the modern finance system built on leverage die, quickly and painfully, because drawing it out will only be more painful (like removing an adhesive bandage). Nobody wants leverage, people will only pay attention to profits (see #1)
But Mr. Kling recently wrote a really unfortunate post "Stimulus Bill or Reparations Bill?".  I will quote the worst bits, because I think it is a candidate to fall into the Memory Hole by Kling deleting it (he already blocked further comments).
I think the answer is that it is a reparations bill, not a stimulus bill. People who pay income taxes tend to vote Republican. People who live off taxes tend to vote Democratic. [my emphasis]  To the Democrats, the Bush tax cuts were a heinous evil, comparable to Germany's violation of Belgian neutrality in World War I. Now, they are demanding reparations, with hundreds of billions of dollars to be paid into teachers unions and other members of the coalition that won the election.
[Aside:  To be perfectly honest, Libertarians are much less likely to use the Memory Hole than Leftists.]

The problem here is that there is a net flow of federal taxes out of the Blue Democratic states, and a net flow of liabilities in the form of subsidies into the Red Republican states.  You can make some more subtle argument here, maybe by claiming federal taxation is mainly on the back of Republican businessmen working in Democratic states, but, make the argument.  You can't just assert this crap and think people outside of right-wing shout-o-sphere will buy it.

[Edit:  found some base statistics from Joseph Fried: Democrats and Republicans - Rhetoric and Reality, p. 154 (via Google Book Search)

http://books.google.com/books?id=wGtJ66o3EyIC&printsec=toc&dq=REPUBLICANS+WHO+PAYS+MORE+TAXES+DEMOCRATS&source=gbs_summary_s&cad=0#PPP10,M1

"Does the government collect more from people in the blue states than from people in the red states?  The answer is "yes," and the reason is obvious: People in blue states tend to earn more  than people in red states.  However, this does not mean that Democrats pay more taxes than Republicans...

... on average, Republican men paid about 70 percent ($2,900) more in federal income tax than did Democratic men, Republican women paid about 53 percent ($1,700) more than Democratic woman, and, on a gender-neutral basis, Republicans paid about 62 percent ($2,300) more."]

The bigger problem is that Reparations already has a meaning in American politics: Reparations for slavery.  In that light, Kling's comments come off a very ugly.

Libertarians are cranks.  They are not always cranks, but none fail to indulge in crankishness.  See Denailism Blog for their "Unified theory of the crank".

Libertarians exist as a meaningful social entity because they provide intellectual cover for the worst abuses of majorities abusing minorities, corporatism, and folk paranoia.  And majorities interested in abusing minorities, corporatists, and folk paranoids have considerable political power.  That isn't all Libertarians do, proving intellectual cover for this crap, but they are completely ignored by their benefactors for their other work.  So they can get paid (supported, published, otherwise compensated) for their politically convenient statements, and the other 95% of their writings never interferes with getting paid.

They are never punished for crankishness, they are sometimes rewarded for it, so they develop themselves into better cranks.  Along with the definition of the crank from the Denailism Blog, I would add:
  • ignorance of all human activities outside of their small area of personal interest (example: Kling having no idea that Reparations has a prior definition)
  • Holding themselves to a very low intellectual standard at the exact moment that they should be holding themselves to a very high one, to secure influence in the broader world
  • repetition of shouted talking points from their little worlds
And I am rooting for Kling.  His analysis of the alleged Obama stimulus package is correct.  His suggestion for the best way out of the crisis is correct.  His take on the limits of macroeconomics is correct.

And he knows he has to hold his own side to a higher intellectual standard to secure influence after the market crash.  Kling didn't let Fama's lame analysis pass without critism: "Boo, Eugene Fama".
Readers of this blog know that I am against the Paulson/TARP bailout thingy and against a big stimulus. Some of you may also have read that distinguished (some would say Nobel caliber) financial economist Eugene Fama has a new blog, where he wrote a post against bailouts and stimulus. I did not link to that post, because I did not think that he contributed to our economic understanding of the issue. Today, I want to go further, because it occurs to me that we should not just leave it up to ideological opponents of Fama, such as Mark Thoma or Brad DeLong, to bear the sole burden of pointing out the vapidity of Fama's analysis.  [my emphasis]
But, at heart, a Libertarian is a crank.  That crankishness has to come out.  Always at the worst time.
Reblog this post [with Zemanta]

Monday, February 2, 2009

Joel Spolsky sometimes sucks. But we already knew that...

Joel Spolsky says "100% unit test coverage" should not be a Joel Rule:
... "You should have a 13th thing on here: Unit Testing, 100% unit tests of all your code."
And that strikes me as being just a little bit too doctrinaire about something that you may not need.
Glyph (Mr. Twisted) nails it, about why Joel is wrong, wrong, wrong.
He goes on and on about how the real measure of quality is whether your code is providing value to customers, and sure you can use unit tests if that's working for you, but hey, your code probably works anyway.
It's a pretty weaselly argument, and I think he knew it, because he kept saying how he was going to get flamed.  Well, Mr. Spolsky, here at least that prediction has come true ;-).
It's weaselly because any rule on the Joel Test could be subjected to this sort of false equivalence.
However, I think Glyph drives his argument over a cliff.  In comments, Glyph says some pretty indefensible things responding to the valid concerts of commenter Andrew Dalke:
(Note: I am butchering Glyph's comments, to make him appear ridiculous.  I would feel guilty, if it wasn't my absolute goal in life, to make everyone appear ridiculous.)
You might be right about this test being so hard to write. If so, MySQL and C++ are bad places to work, because testing there is unnecessarily difficult.
...
Should the developers stop working in C?
Yes.
Frankly, I think 100% unit test coverage can sometimes be completely at odds with delivering quality code to customers.  Completely at odds, because sometimes it takes considerable time to cover that last 1% of the code paths, and your customer are practically begging you to put that time on new functionality.
I would write the "über-Joel" rule as:
"100% unit test coverage, unless you are willing to advertise to your customers exactly which sections of code only have 99% test coverage of all the code paths"
If I was a customer, and the developer told me that the last 1% of comprehensive unit test coverage would take 20 hours of development away from new features, I would give him a pass.  If other customers are not as lenient, then the developer should make a choice between that particular customer's patronage and the effort to build a truly comprehensive test rig (in this case, 20 hours of developer time).

Friday, January 23, 2009

Ugh. The bed-wetting over Gitmo detainees has begun.

Glennzilla covers the worst offenders:
And in response to a heartening post from Will Wilkinson, I demonstrate the need for anger management training.
My unhinged post:
> http://andrewsullivan.theatlantic.com/the_daily_dish/2009/01/where-should--1.html
Bed-wetting.  The only risk from bringing Gitmo detainees into the US justice system is exposing the Gitmo kangaroo court.
I don't find the justice system of 3rd world juntas attractive.  In this I am in a 60% majority (per current polling on US citizens' appetite for sanctioned torture).  I weep for the US, because 40% of the population is more than enough to fully staff a totalitarian prison system, all in the name of our "safety".
Allow me to preemptively apologize.  At this point, I am usually chastised for not supporting the open discussion of opinions.  I apologize for crushing the tender flowers of free expression.

Thursday, January 22, 2009

Explaining Megan McArdle's Schitck

Enfuriating crap from Megan McArdle, with a great Glennzilla take-down:
Megan:
Everyone's hailing Obama's decision to suspend all Guantanamo trials for 120 days. ... Doesn't this just further prolong the incarceration of anyone who might be innocent?
Glennzilla:
Despite the fact that it's only 74 words, one could spend hours highlighting the factual inaccuracies in McArdle's "uncomfortable question."
...
But to say, as McArdle did:  "Gee, what's all the fuss about with these military commissions?  I thought people wanted Guantanamo detainees to have nice trials under the UCMJ like they're having now" is to demonstrate a complete ignorance about what the entire debate is about.  There's just no way to have paid even a tiny amount of attention to what's been going on at Guantanamo and not understand that the controversy is over the rigged and profoundly un-American military commissions themselves, the denial of rights that the UCMJ affords, and the mockery of Western justice they entail.  That is why Obama didn't want his name anywhere near those proceedings and why he immediately suspended them.
And "Sadly, No!" explaining Megan's place in the Bloggo-Sphere - "Teh Megan, Matt, And Ezra Show":
Megan McArdle: What I mean is, why do you drive on the parkway and park in the driveway? Isn’t that a contradiction? It seems to me that it’s immoral to fund social programs because black people smell, and also paradoxes, like why is a carpet neither a car nor a pet?
Matt Yglesias: I think Megan misses the point with her post on the morality of social spending.
Ezra Klein: Studies clearly show that black people do not, in fact, have a distinctive odor.
McArdle: When I said that it’s immoral to fund social programs, I was not referring to black people.

Wednesday, January 21, 2009

The Canny Chicago Politician

Are people serious about wanting a new Lincoln? The "word cloud" comparison of Lincoln's two inaugural speeches demonstrate clearly how he intended to run roughshod over the Constitution. (I admire Lincoln, but I definitely don't admire what he did to the Constitution.)
Also, who is this transformative presidential candidate that people keep talking about? I voted for the canny Chicago politician, and I thought that is who won.
From comment to Will Wilkinson: The Speech

Tuesday, January 20, 2009

Self-satisfaction is a primary human trait

From my experience, even in a relationship with very high leverage (an employer working with an employee), it is practically impossible to motivate somebody to work on any relative deficits, even if the rewards would be considerable.
Self-satisfaction is a primary human trait.
To a first approximation, in a western democracy, the best we can do is corral and socialize humans until the age of 16 (sometimes the age of 20), and hope they pick up the habit of motivating and improving themselves. If that doesn't happen, then corral them for 50 more years, in institutions differentiated by the tiny amount of liberty they allow.

Good news and Bad news on Parenting, from Bryan Caplan

Bryan Caplan in The Chronicle of Higher Education.
Many of us worry that our nation will pay a heavy price in years to come because modern parents are shirking their responsibilities to the next generation. If you combine the results from time diaries and behavioral genetics, however, you get a different picture. It turns out that there is some really good news and some mildly bad news. The really good news is that we can stop worrying about the horrible fate of the next generation. The bad news is that parents today are making large "investments" in their children that are unlikely to pay off.
My comment:
I will remind myself to teach my daughter the tools to achieve her own goals, per her own morality, any present my morality only through my example.