Wednesday, July 29, 2015

What Scott Sumner believes

I will confess that I haven't actually been reading much of Scott Sumner. I was vaguely aware of his views through commentary on other blogs, but it wasn't till I read this post that I realized that he thinks the Federal Reserve actually caused the Great Recession:
"I've always thought that it was patently obvious that the Fed caused the Great Recession with a tight money policy that allowed NGDP expectations to collapse in late 2008."
Obviously, Sumner knows that, unlike the ECB, the Fed didn't raise interest rates prior to the Great Recession, but he thinks there was "passive tightening" where the Fed failed to lower interest rates in response to the macroeconomic shock, and in that sense caused the recession that followed.

Sumner continues:
"But other people apparently don't see it as being at all obvious. They look for alternative explanations. And yet when you ask them why, they tend to give these really lame 'concrete steppes' explanations, such as, 'The Fed didn't raise interest rates on the eve of the Great Recession, so how can you claim that tight money caused the recession?' Or they show themselves to be completely ignorant of actual Fed policy, and claim that the fed funds target was at zero when NGDP expectations collapsed in 2008. It wasn't."
To a certain extent, Sumner is just playing with words: the Fed "caused" the recession by not engaging in enough monetary stimulus to prevent it from happening. That doesn't lessen the need to search for theories to explain the shock that necessitated the Fed's reaction, but that's besides the point. When you look at NGDP you do see the Fed lagging a bit:
The Fed funds rate did trail NGDP by a few months—it doesn't start to fall until a bit after NGDP starts to fall, and doesn't trough until a bit after NGDP troughs. But there's still something a bit weird about this claim.

Sumner's argument boils down to this: if only the Fed had lowered the Fed Funds rate a few months earlier, the whole recession would not have happened. But lowering the Fed Funds a few months late fails to produce a similar effect.

Apparently in the market monetarist view, timing is everything. I think that's the key reason mainstream economists are skeptical of Sumner's hypothesis. Monetary-induced recessions typically have sharp upturns once monetary policy is loosened. Sumner writes
"But as for the rest, the overwhelming majority who think nominal shocks do matter, I’m mystified. Take the AS/AD model that you see in McConnell, Mankiw, Krugman, Cowen and Tabarrok, Hubbard, or any of the other textbooks. Why do we even teach this model if confronted with an almost perfect example of a depression caused by tight money, we simply don’t believe it?"
Problem is, that's not what those models say. Those models predict a symmetrical positive effect on NGDP when monetary policy is loosened, like we saw in the early 1980s with the Volcker experiment. But there was no sharp upswing in 2008 as the Fed floored interest rates. Hence, there's definitely something weird here that conventional theory doesn't explain. If the Fed dropped the ball, why did the ball shatter instead of bounce?

Aside: my inner web programmer must criticize Sumner's blog API. One of my big pet peeves is when websites use querystrings incorrectly, as Sumner's blog does. I've made some corrections:
Everything before the ? in the URL is the URI path, which identifies a resource—in this case the blog post—within a hierarchical interface, while everything after is called the "querystring." A handy way to think about it, I think, is that the path should be required information to get to the resource, while querystrings should contain only optional, user-defined information relevant within the requested resource. For example, https://myshop.com/products/42 should give us product number 42 from shop.com, but if we want to supply a search term to filter products by, we might use https://myshop.com/products?search=market+monetarism which filters the products resource on our search term "market monetarism" that we provided.

Monday, July 27, 2015

Why do we hate artificial sweeteners?

There's a long history of health controversies surrounding artificial sweeteners, with critics accusing them of causing everything from cancer to diabetes to attention deficit disorder. Aaron Carroll reviews the evidence and shows, pretty clearly, that none of the claims are sound. Bottom line: there's no evidence that artificial sweeteners have adverse health effects, and no serious studies cast doubt on the zero-calorie proposition: consuming zero-calorie artificial sweeteners doesn't cause you to gain weight.

So why are so many people so against artificial sweeteners? I'd like to posit a hypothesis: people keep looking for reasons why artificial sweeteners are bad for you because they dislike the way artificial sweeteners taste. Personally, I think they taste awful. Bitter and harsh, and not really all that sweet. Artificial sweeteners taste a bit different to different people, depending largely on genetics. But we all generally do agree that sugar tastes good. Maybe all of this scare is just people looking for a way to justify their unhealthy preference for sugar over artificial sweeteners.

Friday, July 24, 2015

ARGH--Microsoft database edition

Ok, here's a question: how do programmers make non-web applications in .Net anymore?

I ask because Microsoft has killed off SQL Server Compact Edition, which I had previously thought was the standard way to make a database for a non-web-based program in .Net. But there's no SQLServerCE assembly in Visual Studio 2013 or 2015, not even as a reference you can add--if you want it, you have to download and install the .dll file manually. Every non-trivial program necessarily involves storing and manipulating data, and I have a hard time believing that most non-web programs don't have relational, query-able data that calls for a database, so what exactly are these non-web programs using?

Ok, obviously Microsoft left a way to have a local non-web relational database--in fact, they've now extended SQL Server Express so that you can create local SQL Server databases that work offline for your applications, and this is the standard (only) way to add a local database in 2013-5 editions of Visual Studio. And at first I was quite pleased with this because you can use the same SQL Server client namespaces, such as System.Data.SqlClient for a local database as you would use for a database on the web server, making it useful for development of web applications.

In other words, local databases in .Net programs are now "real" SQL Server databases rather than an alternative made specifically for offline applications. There are advantages to this--for example, Compact Edition databases did not support stored procedures whereas real databases do. On the other hand, I'm not sure why developers of offline apps would care--stored procedures are really a way of handling data complexity, which is important on a server-side system with data streaming in from disparate sources, but unimportant in an offline app where you have full control over the format of the incoming data. And the difference is not benign: whereas Compact Edition databases were self-contained within the offline apps that used them, these new full databases have a hard dependency on SQL Server Express, an entire separate program which must be installed on every computer before they can run the offline app.

And that's what has me puzzled. I've installed a couple offline programs with local databases onto other peoples' computers, and in every case, on both new Windows 8 operating systems and older ones, it has prompted me to install SQL Server Express, thus revealing two things: 1)that this isn't just something that Microsoft has built into new operating systems, so that the dependency doesn't matter, and 2)no program developers are using Microsoft's new system for local databases. For comparison, this is now the code to create a database:
string filename = @"C:\Users\User\Documents\testdb.mdf";
if (!System.IO.File.Exists(filename))
{
    string databaseName = System.IO.Path.GetFileNameWithoutExtension(filename);
    using (var con = new SqlConnection("Data Source=.\\sqlexpress;Initial Catalog=master; Integrated Security=true;User Instance=True;"))
    {
        if (con.State != ConnectionState.Open) con.Open();
        using (var command = con.CreateCommand())
        {
            command.CommandText =String.Format("CREATE DATABASE {0} ON PRIMARY (NAME={0}, FILENAME='{1}')", databaseName, filename);
            command.ExecuteNonQuery();
            command.CommandText =String.Format("EXEC sp_detach_db '{0}', 'true'", databaseName);
            command.ExecuteNonQuery();
        }
        con.Close();
    }
}
That's a lot harder than before. You now have to connect to the computer's SQL Server instance, create a database and then detach that database to it's own file. Then you can connect to the new database.

But the bigger problem is this: SQL Server Express, as best I can tell, does not support transparent encryption. That's a big problem when you think about it. Sure, you can encrypt data before putting it into the database, but then the DBMS can't tell what it's value is when you query it, which severely complicates a lot of the functionality you'd like a program to be able to have (the only way to do "in the past year" type searches is with a web of surrogate keys; if encryption is done correctly, the only way to find a search term is to query and decrypt all the data one-by-one until it's found). Between the dependency on SQL Server and the lack of usable encryption, there's a strong temptation to continue using the old Compact Edition databases. But that's problematic: if Microsoft is no longer supporting Compact Edition, that means they aren't upgrading encryption algorithms and fixing security bugs.

In conclusion, it is now basically impossible to make a standards compliant offline application using only supported Microsoft frameworks. I get and agree with the web-first paradigm, but come on, that's ridiculous.

Tuesday, July 7, 2015

Rand Paul isn't Libertarian. Here's how we know:

Any analysis of political ideologies is going to produce some version of this chart:
Political ideologies are spanned by two basic dimensions: economic freedoms versus social freedoms. Source.
Basically, ideologies can be measured in terms of what they define as freedom: Republicans and conservatives generally define freedom in terms of economic freedom, and don't have a problem with regulating what people can do outside the marketplace. Democrats and liberals define freedom in terms of the freedom to do whatever you want outside the marketplace, but don't have a problem regulating how people must conduct business inside the marketplace. Libertarians are defined by the fact they value both equally: freedom includes both the ability to do what you want outside the marketplace and inside it. The fourth box is labeled "hardhats," a term that comes from Paul Krugman, but there's really no one in that box because the only way to get there is to not value any kind of freedom at all--not a popular stance.

Andrew Kaczynski points us to this quote from Rand Paul that makes his ideology quite clear:
"if we tax you at 100% then you’ve got zero percent liberty. If we tax you at 50% you are half slave, half free."
Thus, Rand Paul places zero weight on non-economic freedoms, and highly values economic freedoms. That puts him squarely in the Republican/conservative box.

The absolutism of Rand Paul's conservatism is quite remarkable. Consider the hypothetical scenario where the government taxes 100 percent of income but provides free food and other consumption for everyone (nevermind how they pay for it, for the moment). Obviously, there'd be no point to working, and you'd have no freedom to increase your consumption beyond what the government hands out. There's no doubt that the high tax rate would reduce your freedom. But you certainly could enjoy quite a bit of other kinds of freedom in this world--just to take a timely example, you could marry whoever you want, of either gender. Rand Paul's position, then, is that the freedom to marry is insignificant compared to the ability to earn untaxed income. That's pretty solid Republicanism, which has no problem prescribing who people can marry and when they can get divorced, so long as taxes are low.

Incidentally, on Twitter I recently started a debate on a related question and Adam Omizek said this:And he's right: the lack of a paycheck is not what defines slavery. To put it differently, merely giving a slave a paycheck does not set him free--in fact, many slave owners did give them paychecks. Clearly, an integral part of the definition of slavery is it's involuntary nature--the compulsory labor and the lack of agency over one's own life. But according to Rand Paul, the inability to work for pay is the same as being forced to work for no pay.

Sunday, June 28, 2015

Thoughts on Obergefell v Hodges

On Friday morning the US Supreme Court declared that states cannot deny gay people the right to marry.

There's a common line of criticism I'm hearing from conservatives--including some of the justices who dissented in Friday's case--that goes like this: without necessarily making it clear whether they think gay marriage should be legal, they assert that "5 unelected judges" was not the right way to legalize gay marriage and that gay people should have sought validation through legislatures instead. I think there are a lot of things wrong with this critique.

For one, the critique sounds like a derailing tactic. Arguing for a more difficult path to legalization is a way of opposing gay marriage without having to stake your reputation on explicitly anti-gay arguments. I think by and large we should just call out these arguments for what they are: arguments against gay marriage from people who know, deep down, that they're wrong.

Even ignoring that, I think these critics are wrong that legalization through the legislatures would somehow be more legitimate or democratic. For one thing, it isn't true that only "5 unelected judges" made this decision--while far from unanimous, there was already a broad consensus among lower courts that the constitution protects the right of gay people to marry. But more importantly, the court's decision was better than a statute, because it recognized that equality in marriage is a fundamental right, not a privilege that legislatures can grant or revoke. The gay rights movement has experienced false starts before, and has experienced backlashes, sometimes violent, in the US and abroad. Marriage is supposed to be something permanent, something too fundamental to allow the next governor, the next state assembly, or the next ballot initiative to revoke. Friday's ruling gives gay people some degree of protection from future backlash, without which we can't truly say their marriages are equal.

One of the most common anti-gay talking points more generally has been that we shouldn't overturn "thousands of years" of traditional marriage. This, I think, has always been their worst line of argument, because all it really says is that gay people have always been a relatively small minority. That's just biology--homosexuality only seems to occur in about 3 to 4 percent of the population, and that has been more or less the case in every society throughout history. Pointing out that a group has been oppressed for millennia is not argument against protecting their rights but an argument in favor.

Overall, Friday's decision has been one of the most heartening events in recent US history. We pride ourselves on being a beacon of freedom, but spent the past couple decades mired in various anti-freedom enterprises, from NSA overreach to the torture of prisoners detained indefinitely without any hope of trial or due process. On Friday, in at least one small respect after a decade of darkness, the USA resumed the cause for freedom--not the first, but one of the first, and by far the largest country to affirm the freedom to marry for all LGBT people.