Don’t overwrite Rails guts

In getting ready to load a bunch of new trades into my database of stock trades by members of Congress, I was troubled to see that ActiveRecord was no longer working the way it was supposed to. For one of  my models, every call to save prompted a false, which I noticed when I realized that none of the data I was trying to put was being saved. (This was a reminder that I should use save! for these data collection purposes.) At first I thought maybe the database was locked for some reason, but then I realized that saving worked on other models/tables, so that couldn’t be it. It was acting like a validation was failing, but I don’t have any validations for this model. I cursed and googled for a solution in vain.

Finally I looked into the ActiveRecord source code, which seemed to be not going anywhere until I saw that a key part of the validation process is a method called valid? For some reason I remembered that I had written a valid? method for this model (it checks to see if there is a company and a date for this trade) and I realized this must be it: none of the trades I am trying to put in have a company (that association comes later) so because they are not valid? Rails thinks they fail the validations.   

So: I will try not to stomp on the ActiveRecord::Base code again. It’s a tricky bug to fix when you do. 

Good questions about Bjagojevich case

The NYT piece by David Johnston raises some interesting questions and provides some useful answers about legal issues in the Blagojevich case. The article focuses on the difficulty of defining the “difference between criminality and political deal making,” which is an area that has been interesting to me. As the article points out, everyone knows that politicians take official actions in return for campaign contributions. I’ve wondered whether Blagojevich’s only real offense was to make the quid pro quo explicit.  

The analysis in the article confirms that in fact Blagojevich would be in the clear if he had managed to keep his wheeling and dealing out of the investigators’ earshot. It also suggests that while explicitly offering a seat to a candidate in return for campaign contributions is illegal, it would be “easier to prosecute” if the benefits he was to receive were personal favors like cash or a job. 
The fundamental issue raised by the article is that so far we only know of Blagojevich telling his aides that he wanted something in return for the seat — nothing we know of has him on the phone with a candidate making an offer. It’s possible, the article suggests, that the juiciest stuff about him wanting something in return for the Senate seat will amount to “just talk” and any prosecution will have to go forward on other material. 
All of this suggests that this is another case (like Microsoft, like Enron) where the main lesson for other people who might want to bend rules in the future is to be smarter about communication. Blagojevich could easily have carried out a sale of the office with impunity if he had done it more subtly. So: let the sale of government offices continue, but let’s just be sure to not do it in such a crass and open way.  

Jim Steinberg

I’ve seen some speculation that Jim Steinberg might be among Obama’s top choices for National Security Adviser. I met Jim a few times when I was working at Brookings and I think he was the most impressive person I encountered there. One time Mary Graham and I went in to talk to him about some work we were doing on disclosure policy (transparency vs. security-type stuff) and I was taken aback by how quickly he cut through the clutter (both of what we were saying and of the policy area as a whole) and seized the key issues. I don’t remember specifically what he suggested or anything; I just remember a feeling of awe. One of the reasons I am excited about the new administration is that people like Jim Steinberg will be making important decisions.

bandcamp

On Waxy.org I found an interview and screencast about bandcamp.mu, a new site that tries to make it as easy for bands to publish and share music as it is for bloggers to write blog posts. From experience I know that bands struggle with how to share their music and establish a web presence. MySpace really changed how bands operated on the web but, from the bandcamp perspective, MySpace gives the band too little flexibility over how their stuff will be distributed. I hope this site is a success.

I miss Google Chrome

Last week the keyboard and trackpack on my MacBook Pro stopped working (again!). I took it into the Apple store and had to leave it there (again!). So, over the weekend it was back to the thinkpad. The transition was pretty easy because so much of my work is on svn and google docs. The best part was that I got to download and use Google Chrome, which is not yet available on the Mac. I think the overall performance was quite good, but there were a few little things I especially liked. So, my MacBook comes back with a replaced topcase (again!), and I’m happy to have it back, but now I miss a few things about Google Chrome as I go back to Firefox:

  1. The “type anything” address bar: I found it really useful to be able to type “besley coate scholar” and just key down to “Search Google Scholar for ‘besley coate'”
  2. The way it handles downloads is really nice — each document available as a little tab along the bottom of the window, with options for how to handle that file and others like it always available.
  3. Integration with Google products like gmail, calendar, and docs somehow seemed a little smoother in Chrome — I don’t know if this has to do with the Javascript engine or what.

Form factor vs price point

A few years ago I noticed people started saying “form factor” when they talked about the design of electronic devices. I found it annoyingly jargony and uneconomical, kind of like “price point”, which means price. Yesterday my friend Ryan used the term in reference to the shiny iPhone he was about to buy. On reflection I guess it’s not quite as bad as “price point.” “Form factor” refers to both the size and the shape of an object (and it appears to be used in a semi-technical way in electronic engineering), and I can’t seem to think of a single term that refers to both size and shape. Any ideas?

Transparency empirics: Li, Pincus, and Rego on the market value of financial disclosure

The intellectual case for transparency is easy to make, but it’s hard to demonstrate that transparency has the benefits its advocates (like me) claim. On Kevin Lewis’s List I came across a paper that appears to do a nice job of documenting the benefits of financial disclosure regulation to investors. The abstract is below. Their approach is to look at how the stock market reacted to events surrounding the passage of Sarbanes-Oxley. As SOX came closer to passage, firms that had been “managing” their earnings more closely saw a larger stock price boost than firms that had been doing less book-cooking. The authors appear to interpret this as evidence that SOX-induced financial disclosure benefited investors, since the firms more affected by it saw a larger boost in price.

It’s a result that may be counterintuitive to a lot of people: the BAD firms are the ones that benefited from the regulation. (More intuitive would be a story where the bad guys who had been getting away with something took a hit as it became clear that the free and easy days were over.) But the paper’s interpretation of stock price movements reflects the way financial economists tend to look at these things: investors had already discounted the price of these bad companies based on their questionable financial reporting, so signs that this would stop and that the real value of the firm would become clearer led investors to feel better about the investment and trade away the discount.

If this is how things work, why would firms obfuscate in the first place?

Also, how do we know that the news about SOX being passed was not interpreted by investors the opposite way, ie, “Well, if it’s going to be this lax, then these bad guys are going to get off easy”?

I may come back to this one. Anyway, here is the abstract:

Market Reaction to Events Surrounding the Sarbanes-Oxley Act of 2002 and Earnings Management

Haidan Li, Morton Pincus & Sonja Olhoft Rego
Journal of Law and Economics, February 2008, Pages 111-134

Abstract:
The Sarbanes-Oxley Act (SOX) of 2002 is the most important legislation affecting corporate financial reporting enacted in the United States since the 1930s. Its purpose is to improve the accuracy and reliability of accounting information that is reported to investors. We examine stock price reactions to legislative events surrounding SOX and focus on whether such stock price effects are related cross-sectionally to the extent firms had managed their earnings. Our univariate results suggest that significantly positive abnormal stock returns are associated with SOX events, and our primary analyses reveal considerable evidence of a positive relationship between SOX event stock returns and the extent of earnings management. These results are consistent with investors anticipating that the more extensively firms had managed their earnings, the more SOX would constrain earnings management and enhance the quality of financial statement information.

Kevin Lewis’s List

I’m on a mailing list of Kevin Lewis, who contributes to “Surprising Insights from the Social Sciences” in the Globe, in which he groups together interesting-looking abstracts on a particular theme. He does this every day. I find a lot of interesting papers this way, and it’s a pretty inspiring way to start the work day to see that other people are doing cool things, and that people care about it.

I expect to post some abstracts here; I wrote about a paper from the list yesterday on the Social Science Stats blog.

He appears to not have a blog, but he should. Mailing list is a pretty clumsy way of distributing this information, and I think a lot of people would be interested in getting it.

You can sign up by emailing him at kevin.lewis.ideas@gmail.com.

Difficult to understate the importance of this blog post

Macher and Richman’s review of empirical research on transaction cost economics (working paper version, published in Business and Politics earlier this year) includes this statement about the importance of TCE research relating to economic development:

It is perhaps difficult to understate the policy implications of this research, especially as developing countries consider implementing a host of new and unproven approaches.

Let me try to understate its importance: “It’s not important at all.” See, that wasn’t so difficult.

“Difficult to understate” gets 750 google hits, some of which seem like appropriate uses but many of which seem to reflect the same mistake Macher and Richman made. (By contrast, “difficult to overstate” gets 96,100.)

"Let me tell you a story . . ."

I was watching an episode of the Wire the other day, season 4, where Councilman Carcetti has a talk with the former mayor of Baltimore. When Carcetti asks him why he didn’t run for reelection after his first term, the former mayor starts his reply with, “Let me tell you a story . . . .” He goes on to tell a figurative story (a parable, I guess) about arriving his first day and being handed bowl after bowl of shit to eat by various constituencies in Baltimore politics — the Irish, the blacks, the Poles, etc.

It occurred to me that I never respond to a question with “Let me tell you a story.” I know enough to include anecdotes in my writing and in presentations, but in conversation I tend to quickly veer towards abstraction, wondering what the big forces are at play, whether there’s any data out there. This is a useful response for an academic but I realize some people don’t find this style of communicating very persuasive. I think pretty much everyone loves stories, and only a few people really like data.

Answering a question with “Let me tell you a story” is such a big-shot move that I’m not sure I can pull it off with a straight face, but I’m going to try, as a social experiment. Watch out.