Friday, February 27, 2015

Let's Make Up History to Suit Our Prejudices!

In a review book for AP European History, I find:

"Supernatural and miraculous forces played no role in Newton's universe."

Um, say what?! This guy saw no role for what today would be called the supernatural and miraculous? (Newton himself would not have recognized a distinction between the natural and the supernatural as meaningful, I suspect.) Even in his "pure" physics, Newton believed that God constantly intervened to keep the planets in their orbit.

It is amusing that the newspaper stories about the online publication of the Newton archives claim that they "reveal" that Newton was a mystic. Of course, people who had studied him seriously, such as Keynes and Westfall, knew this decades ago.

And here is the killer: since the is a review for a standard AP history test, I assume that if you actually know anything about Newton, you will be marked wrong on the test!

Thursday, February 26, 2015

Just another ape

Everywhere I gape
People know the part I'm playing

It is curious that someone who keeps telling us that humans are "just another ape" seems to be very concerned that human males and females don't behave in exactly the same way, and tells us that "things are getting better" whenever they come closer to behaving in the same way.

Let's get "naturalistic" and look at sex roles among our close animal relatives. Here are some recent findings on primates... and these are by researchers seeking to "assail stereotypes" about sexual roles:

"Males compete to gain access to ovulating females; females compete to gain access to food resources they need to bear and rear their young. And female competition tends to be expressed in more subtle, less violent ways."

"The stereotype has been that pubescent males wander off, permanently leaving their relatives or the community into which they were born, in search of potential mates or new homes, whereas females remain attached to the natal group. Although that remains generally true, in several primate species - notably the African red colobus monkey, the chimpanzee and the South American howler monkey - it is the females who demonstrate such wanderlust. In fact, among chimpanzees, considered the nearest living relative of humans, males keep closer emotional attachments to their kin than females do."

"A common thread through the new findings is that the fundamental evolutionary demand - that parents successfully pass on their genes - imposes different reproductive strategies and behaviors on males and females."

The upshot here (by the way, did you know I wrote a book about Michael Upshot?) seems to be that, although there is no single way males behave or females behave among primates, within any species, they still exhibit quite different ways of behaving.

So why, as just another ape, should humans be different? If women take more time off from work to care for children than do men (naturally leading to lower wages), why isn't this simply another example of differentiated sexual behavior among primates? Why does it need to be corrected? Why would we say "things are improving" when this seemingly natural behavior is changed by government programs and so on?

Or, is it perhaps that we also need programs to correct our animal relatives? Baby gibbons spend their time hanging on to their mothers: perhaps we need a government program to eliminate the "hanging gap," until the infants spend at least 49.998% of their time hanging on to their fathers? (We don't want to go overboard and demand it be exactly 50%!)

You code a line at a time

One thing I see my students doing all the time is trying to write an 80-line program in one shot. Then, when it blows up, they are overwhelmed and have no idea where to find the bugs.

After many, many years of programming, I find myself sometimes testing every line of code I write. Other times, there may be four or five lines that make no sense unless they are all written at once, so that they must be tested as a group. If I have to write ten lines without a test, I am extremely uncomfortable!

Whatever it is you want to become...

Taking my son on a college tour, I got to listen to a talk from the dean of the college's music program. He seemed a very nice, sincere man. But he is trapped in the modern cult which sees "self-fulfillment" as the highest aim in life. He told we parents, "We are here to help your child become whatever it is he wants to become."

Hmm, and what if what he wants is to become a genocidal dictator? Well, maybe the college can offer an elective for that!

Rationalism in temperature measurement

Here is a nice post on why Fahrenheit is superior to Celsius for every day use. The triumph of Celsius is another example of rationalism: because it worked well for scientists, it was "rational," and had to be forced on a reluctant populace. (In the UK, a grocer was actually arrested for selling bananas by the pound.)

At least the U.S. has held out!

Tuesday, February 24, 2015

Thanks for all the fish!

Thanks everyone for your great suggestions on my algorithm bleg.

Here is what I wound up doing (self.empties is set up in the classes __init__()):

    def position_agent(self, agent, x=RANDOM, y=RANDOM):
        """
        Position an agent on the grid.
        If x or y are positive, they are used, but if RANDOM,
        we get a random position.
        Ensure this random position is not occupied (in Grid).
        """
        if x == RANDOM or y == RANDOM:
            if self.exists_empty_cells():
                coords = random.choice(self.empties)
                x = coords[0]
                y = coords[1]
                self.empties.remove(coords)
            else:
                logging.error("Grid full; "
                              + agent.name + " not added.")
                return

        self.grid[y][x] = agent
        agent.pos = [x, y]


Monday, February 23, 2015

Algorithm Bleg

I want to position agents on a grid consisting of X*Y cells. I want to plop them around randomly. But I don't want to put them in a cell containing another agent. Right now, I have the following function:

    def position_agent(self, agent, x=RANDOM, y=RANDOM):
        """
        Position an agent on the grid.
        If x or y are positive, they are used, but if negative,
        we get a random position.
        Ensure this random position is not occupied (in Grid).
        """
        if x == RANDOM or y == RANDOM:
            got_cell = False
            while not got_cell and self.exists_empty_cells():
                x = random.randint(0, self.width - 1)
                y = random.randint(0, self.height - 1)
                if self.is_cell_empty(x, y):
                    got_cell = True

            if not got_cell:
                logging.error("Grid full; "
                              + agent.name + " not added.")
                return
   

        self.grid[y][x] = agent
        self.filled_cells += 1
 


This function works, but the problem with it is the maximum potential run-time is essentially unbounded: As the grid gets filled up, this function simply relies on random.randint() to eventually hit upon an empty cell! One potential solution is to check how full the grid is, and once it gets past a certain percentage, just place each successive agent in one of the empty places. But that strikes me as kludgy. Any ideas on how to do this better?

Liberalism, Our Culture's Faith

Liberalism (in the broad, politicla theory sense) purports to be religiously neutral. But that is false. It itself is a religion, and to forward its ends acts continually to marginalize, and especially, to push from the public sphere, all other religions. But it is part of the creed liberalism that it is "value neutral," so it is extremely difficult for liberals to admit that they are perfectly willing to "push their (liberal) values on others." So, for instance, I encountered someone online who thought it was ridiculous for a florist to "push her values" on others and refuse to provide flowers for a lesbian couple's wedding. I pointed out that he was perfectly willing to "push his values" (for the acceptance of homosexuality, in this case) on the florist to the extent of driving her out of business. His response was to tell me to fellate him, but in cruder terms. It is rather obvious that he is "pushing his values" on the florist far harder than the florist is with the lesbian couple. The couple, after all, only had to go down the street to find another florist perfectly willing to sell them a wedding bouquet. Meanwhile, the florist is losing her very livelihood. But my liberal interlocutor, when faced with the risk of having the façade of liberal neutrality exposed for what it is, could only respond with crude insults.

In any case, here is Ed Feser on liberalism:

"What liberals of all varieties -- from Hobbes and Locke to Kant to Rawls and Nozick -- share in common, whatever their significant differences, is an emphasis on the sovereignty of the will of the individual. For liberalism, no demand on any individual is legitimate to which he does not in some sense consent. The tendency is therefore to regard any such imposition as an affront to his dignity. The liberty that the liberal wants to further is freedom from fetters on the individual’s will, whether those fetters are political, social, moral, religious, or cultural. The individual will is sovereign, its dignity supreme.

"Liberalism in this broad sense is the dominant way of thinking and feeling in modern times. It is, essentially, the compulsory ethos, indeed the religion, of modern times. It absolutely permeates contemporary political, social, moral, religious, and cultural life."

Presentism

Bob Murphy, for one, seemed somewhat shocked by my "presentism." But I find I am in very good company:

"But how does this future, which does not yet exist, diminish or become consumed? Or how does the past, which now has no being, grow, unless there are three processes in the mind which in this is the active agent? For the mind expects and attends and remembers, so that what it expects passes through what has its attention to what it remembers..."-- Augustine, The Confessions

A stunning misinterpreatation of a point I have posted again and again...

In response to post like this one, I have been asked again and again questions like "Why do you deny the possibility that machines might be able to think?"

This is rather stunning to me, as I have posted numerous times, on this very same blog, my affidavit that I do not now, and never have, denied this possibility for even a second! I have posted the example of a thermostat turning up the heat because it "feels cold," not because I deny the possibility that the thermostat feels cold, but because I want to see if my AI enthusiast correspondents are willing to be consistent, and admit that their thermostat might truly feel cold, just as their Turing-test-passing machine might truly be conversing.

I am, in fact, perfectly willing to contemplate the idea that atoms are held together because electrons "feel attracted" to protons: such geniuses as Gottfried Leibniz, Alfred North Whitehead, C.S. Peirce, and, more recently, my friend David Chalmers, have put forward positions that broadly fall under the heading of panpsychism, a position I take very seriously indeed.

So I do not deny the possibility that, say, when I type "ls" at a Unix system prompt, my Unix computer "knows" that I want it to list the files in my current directory. What I do deny is that the fact that a more involved program than "ls," simply because what it does is more complicated and harder to follow than "ls," should suddenly deemed to be thinking, while the "ls" command is not so deemed. It seems to me that such people are simply punting, and once a program gets too complicated for them to understand why it does what it does, revert to cargo-cultism, and declare "Ooh, magic!"

So, people who have objected to my recent Turing posts: let me put forward a (hypothetical) metaphysical position in a series of assertions:

1) Electrons orbit around atomic nuclei because they feel very attracted to protons.
2) Hydrogen atoms unite with oxygen atoms because they know they will achieve a lower energy state by doing so.
3) Microorganisms understand that if they move away from toxins they will survive better.
4) The Unix "ls" program knows that I want it to list the files in my current directory.
5) The latest IBM chess program understands how to checkmate its opponents.

I have never denied that 5) might be true. But what I do deny is that any of my critics can formulate any reason to reject 1-4 while asserting 5. And the fact that they keep asserting that I think 5 is "impossible," I suggest, means that they have an ideological attachment to asserting proposition 5, even while denying propositions 1-4.



Saturday, February 21, 2015

America's three liberalisms

Re the hub-bub over Giuliani's remark about Obama not "loving America": once one understands the three liberalisms of America, the partial truth behind the remark, who it was designed to appeal to, and whom it offends, I think the true meaning behind what seems to be a trivial gaffe and subsequent controversy becomes clearer.

America's three liberalisms are:

* Liberal nationalism

* Liberal cosmopolitanism

* Liberal economism

If we make a table of the characteristics of each form, I think it will become fairly clear what I am talking about.

Liberalism Object of worship Intellectual Politician Sponsor
Liberal nationalism America Harry Jaffa John McCain Woody Johnson
Liberal cosmopolitanism Universal human rights John Rawls Barrack Obama George Soros
Liberal economism The free market Murray Rothbard Ron Paul The Koch Brothers

All three are liberalisms since the three objects of worship are intertwined: for instance, the cosmopolitans believe free markets (so long as their outcomes are moderated with redistribution) are an aspect of universal human rights, while the liberal nationalists believe that free markets are an attribute of American greatness. And liberal economism sees the free market as the sine qua non of universal human rights, and America as exemplary in so far as it has had freer markets than most countries. It is a matter of which characteristic comes to the forefront.

So when Giuliani says that Obama doesn't love America, he is trying to appeal to the liberal nationalists, and is indicating that Obama doesn't worship America, "you know, the way we nationalists do." (By the way, I have no idea whether Giuliani is being sincere here or just engaged in marketing.) And he is right about that: just look at column two, row two above. But Giuliani can't quite say that, since the liberal nationalists can't quite admit that they actually worship America. So he has to claim that Obama doesn't love America, which offends Obama supporters: Obama (and other liberal cosmopolitans) love America as a country leading the way towards an international regime of universal human rights. It is like the difference between worshiping the ground your wife walks on and loving her as an example of a liberated woman.

The Turing Test and Google Translate

You have to hire a Croatian translator. Two candidates for the job show up to interview, me, who knows not a word of Croatian, and my friend Neil, who is Croatian. You begin to interview us, but I have brought a trump card: I have along my attorney, Elen Touring, who says, "Wait a second, this is not fair to my client: Mr. Ganic here simply looks much more Croatian than Dr. Callahan, and so you must interview them blind. In addition, since Mr. Ganic sounds more Croatian, and you only need to have someone translate written material, it is only fair that you can't hear them either. You must test them both, behind curtains, without knowing which is which.

So we both are concealed in curtained rooms. In Neil's, he translates Croatian text to English "by hand." But in mine, I just type it into Google translate on my phone, and write down the English output. When you judge my output superior, Attorney Touring insights you must hire me.

Someone may wish to point out, "Well, that means Google Translate is doing a great job!" So it does: but it also means that I am completely superfluous. But not allowing you to look behind the curtain, Attorney Touring has seriously hampered your ability to evaluate your potential translators (including Google). And we regularly want to "peek behind the curtain" in doing such evaluations: at students taking tests, at job applicants, at witnesses testifying in court. The demand for the curtain is a demand that we look only at the surface of phenomena, and forego any analysis of how that surface emerged. If a mechanical horse bucks like a horse, it is a horse. If Viola in disguise convinces Olivia she is a man, then she is a man.

A great theme in Shakespeare was appearance versus reality. But Alan Turing gives us the metaphysics of appearance as reality.

NOTE: Obviously the above story involving Google Translate resembles John Searle's Chinese room thought experiment. But I think it is sufficiently different to be interesting in its own right.

Friday, February 20, 2015

Philosophy and Ideology: Guest Post from Joe Jordan

My friend Joe Jordan, after reading my post on "Religion and Ideology," sent me the following, which I post with his permission:

I bring this up in my political theory courses to differentiate between philosophy and ideology. I hate it when people talk about having a "philosophy" as if it were a method of fixing a flat tire while pulled over on the side of the road. To keep "philosophy" pure from ideology, I present the following dichotomies:

Philosophy:
Involves humble personalities
Begins in wonder
Open-minded
Involves dialogue / hence republican
Ever-differentiating Asks questions
Seeks truth

Ideology:
Involves vainglorious personalities
Begins in assumed certainty
Close-minded
Involves dictation / literally dictatorship
Attempts a one-size-fits-all explanation of reality / reductionistic
Avoids questions / Asserts ready-made "answers"
Seeks power

A very rough sketch, of course. The battle between Socrates and Thrasymachus embodies these distinctions, I'd say.

Wednesday, February 18, 2015

Animals, Friendship, and Animal Friendships

I am watching "Nature: Animal Odd Couples," which documents the cross-species friendships among animals. It is available on Netflix, and is much better than many such documentaries. For one thing, it has the great Temple Grandin in it. Grandin is pretty rough, for instance, on those who would say that animals don't think because they don't think with abstract symbols. She herself thinks perceptually more than with symbols (as often do I): someone who makes this claim is essentially telling her that she doesn't think, something she finds a bit offensive!

In light of our previous post, I also found interesting the scientist in the documentary from Duke who seems to think that until we understand friendship from an evolutionary perspective, we haven't really understood it. (Interestingly, she says that it is only very recently that anyone was even allowed to talk about animal friendships in scientific papers!) I am not even bothering to rewind and catch her name, because the point here is not to criticize her personally, but to note her as an instance of a type. You can picture her, with a lover, saying "I value our relationship because intimate ties are important to me as a social animal with bonding instincts."

Note: I am not in the least denigrating studies on things like "The evolutionary roots of friendship in gibbons" and so on. By all means, study these things! Just don't mistake what emerges from them as in any sense a deeper understanding of friendship than possessed by Aristotle or Aquinas!

Seeing Things as Theories

"He registered a dizzy 7.6 mmv over Brodmann 32, the area of abstractive activity. Since that time I have learned that her reading over 6 generally means that a person has so abstracted himself from himself and from the world around him, seeing things as theories and himself as a shadow, that he cannot, so to speak, reenter the lovely ordinary world. Instead he orbits the earth and himself. Such a person, and there are millions, is destined to haunt the human condition like the Flying Dutchman." -- Walker Percy, Love in the Ruins, p. 34

Compare with:

“Descartes, Locke, and Newton, took away the world... Berkeley restored the world. Berkeley has brought us back to the world that only exist because it shines and sounds.” -- W.B. Yeats

Monday, February 16, 2015

Downsides to open borders?

The vapidity of nature show commentary

As I said, these shows are nice eye candy. And no doubt one can learn some truths about nature from them. (So, for instance, when the narrator says, "The monsoon rains arrive in Cambodia in May," I feel about 90% confident that they do so.) But consider the following bit of narration I just heard:

"Cambodia is a land where animals face a daily struggle to survive."

What, as opposed to, say, Laos, where animals can do f*&k-all everyday and still skate by?! What possible location on earth could replace "Cambodia" in the above sentence and thereby render it false?

UPDATE: And the narrator just described Cambodia as "One of the most bio-diverse countries in Southeast Asia"... which is exactly how he has described every single other country in Southeast Asia in the series! Apparently, Southeast Asia is the Lake Wobegon of geographical regions, in that every single location in it is above average for the region.

Religion and Ideology

Here, I consider the difference between a religion and an ideology. Of course, as is always the case, someone may define these items differently, and no one can say their different definition is wrong.  Definitions cannot be right or wrong, they can only be more or less helpful. So please, please, don't post a comment arguing about my definitions as being different than yours! Of course, someone could define these terms so that all religions are "ideologies," if by "ideology" they mean a somehow connected nexus of thoughts, images, and so forth. And someone could define "ideology" in such a way that every single person on earth has an "ideology," if that just means "how they think about things."

I am only trying to say that here is what I have found to be a fruitful differentiation of these terms, and certainly not "the correct" differentiation of them! And further I will note that I am here following in the footsteps of a master, Eric Voegelin, in suggesting these uses.

Religion: an attempt to grapple with our primary, experiential reality.

Ideology: an attempt to create an alternate reality through verbal constructions that act to replace primary, experiential reality with an abstraction.

So, for instance, Zen Buddhism, under these definitions, is very obviously a religion: it instructs its followers to shut down their discursive thoughts, and simply sit until they begin to encounter reality without the intervention of any abstract scheme for understanding it.

Materialism, on the other hand, at least in its modern forms, is obviously an ideology: primary experience is through-and-through qualia, and yet consistent materialists, like Alex Rosenberg, are forced to admit that within their ideology, qualia are mere illusions! Of course, this move makes nonsense out of all of science, since every single bit of scientific evidence consists of qualia experienced by individual scientists. (We know the charge of an electron only because individual scientists have had they experience of seeing similar readings on their measuring apparatus when trying to determine the charge of an electron! If their experiences were mere "illusions," then we actually don't know anything about electrons at all!) So we can see that modern materialism, rather than being an effort to directly encounter and make sense of our experience, is an attempt to flee from experience behind a screen of discursive thought.

Now, many phenomena we typically regard as religious can actually be ideologies in disguise: this occurs, as Voegelin noted, when the symbols the original, genuine religious figures created are turned into "dogmas," so that rather than being transparent images that direct the mind toward the ultimate mystery of being, they instead become a "system" of ideas that must be believed in order to achieve some sort of approval from God. (E.g., "If you do not believe in the doctrine of Immaculate Conception, you are going to Hell!") And such "religious" dogmas are typically the understandable targets of "rationalist" critics of religion: once a "religion" is turned into an ideology, then it has opened itself up to the well-justified attacks of rival ideologues, who can clearly see that this competing ideology makes no sense. (Of course, their adoption of an ideology blinds them to the fact that their own ideology makes no sense either!)
 

Sunday, February 15, 2015

A lovely story about two brothers

Myths and Theories

Myths are not ideas, in the sense that a scientific theory or philosophical thesis are ideas. They are images. There telos is not to be analyzed, but to be contemplated.

Take the myth of original sin. This is not natively a proposition of moral philosophy. It is neither a scientific nor historical theory as to how humankind wound up in the shape it is in. A myth is an object for contemplation, not for analysis. If one meditates upon a myth, if it is a "true" myth, after some time, one will find that the myth illuminates a part of human experience in a way that neither scientific nor philosophical ideas can. (That is why Plato, the father of philosophy, still continually created myths: the story of the cave is not a "philosophical doctrine": it is a myth.)

Now, it is absolutely true that myths can be transformed into theories: then they are called dogma. As Eric Voegelin put it, living symbols are then transformed into hieroglyphs, "superficial invocations of a pre-existing [symbol] that failed to embody its essence because those invoking it had not themselves experienced the reality behind the original [symbol]." No longer something to be contemplated, they are now something to be believed in and "defended." (As if something like a painting could be "rationally justified"!) And, in one sense, then, the attacks of "rationalists" on things like the myth of original sin are justified: of course, if you transform the myth into a theory, it makes no sense! Huh, some people sinned a long time ago, and that is why we all had to be punished until God killed his soon?! Stated as a theory, it is ridiculous!

If you want to understand a myth, meditate upon it!

Saturday, February 14, 2015

Libertarian "Non-aggression" and Ostracism

Libertarians often suggest that using ostracism is a "non-aggressive" was of responding to actions or speech one doesn't like. And this is tied in an interesting way to the metaphysical error at the heart of liberalism.

Here is a good (if harrowing) New York Times article about what has happened to the lives of people ostracized by social media thought police for minor missteps in Tweets, etc.
These people's lives were shattered by these "non-aggressive" campaigns: they would have been harmed far less if the government had jailed them for a week for a "hate speech" crime.

Liberalism à la Hobbes and Locke starts with an atomic individual as fundamental. That individual then may (or may not!) enter into a "social contract" and so voluntarily take part in society.

But this is nonsense: no such individuals have or could exist. Humans are inherently social animals, and membership in a society is integral to our very being. Short of killing a person outright, there is no act more aggressive towards them than ostracism, something primitive societies have understood very well.

So libertarians are suggesting that we replace the relatively tepid aggression of jailing someone with the extreme aggression of ostracizing them. And then they call this course of action "following the non-aggression principle"!

"Learning" from nature documentaries

They are nice eye candy. And I suppose if they show you a picture of an elephant, you can surmise that, "Yes, such creatures probably exist." But I wouldn't trust them much further.

I happened to watch Wildest India and Wildest Indochina back-to-back. In the Himalayan episode of Wildest India, we are shown footage of what is described as a red panda coming down from a tree to try to attract a female wandering by, but to no avail.

In the Southwest China episode of Wildest Indochina, we are shown footage of what is described as a red panda coming down from a tree to drive off a male that has intruded on its territory.

Very interesting depictions of how red pandas interact, right? The only problem is that (and I just re-watched both scenes to make sure) it is the exact same footage in each instance! So in at least in one case (and perhaps both!), the voice over is total rubbish! Not only that, but in at least in one case (and perhaps both!), they are not actually filming in the country that is the subject of the documentary.

Deconstructing the Turing Test

Friday, February 13, 2015

I say it's all in the 'If'

Nick Rowe attempts to explain OLG models again:

"...if you use debt to finance transfers to the old in generation A [, t]here is no way you can do it without making some future generation have lower lifetime utility."

I spent some time with an OLG model, and after a while I understood the model. At the very least, I could clearly see how wealth was being transferred from the young to the old. And from the moment I grasped the model, it seemed to me the key was the transfer payments, not the debt. So yes, if you transfer wealth from the young to the old, you transfer wealth from the young to the old! And that happens whether you transfer it using debt or taxes.

Wednesday, February 11, 2015

Deneen again arrives at the essence of things

Here:

"At the same time, progressive liberalism shares certain fundamental commitments with classical liberalism. The first of these is a deep distrust of custom, tradition, and unchosen authority."

Yep: and here we see a point I have been trying to make previously: if classical liberalism makes sense, then the liberal anarchists are the logically consistent classical liberals.

But, of course, classical liberalism does not make sense, and so the liberal anarchists are just those who consistently follow the implications of a nonsensical idea!

Monday, February 09, 2015

This is literally...

Stubborn is as stubborn does

Nick Rowe is simply one of my favorite, favorite economists alive today. When he generates a macro-economic model, I spend as long as it takes to grok it, and the time is always well repaid. And sometimes it takes me hours to get what Nick is saying in a model that probably took him minutes to knock off. In other words, in general, I am in awe of Nick's depth of understanding of the macro-economy. But...

On OLG models and government debt, he is simply stuck on one model, and can't see that we can easily model the exact opposite result! Yes, debt can have inter-generational distributional implications: but it can have them in either direction, or it can be completely neutral in this regard!

I can be walking down the street, whistling, and

1) Shooting random people nearby.

Or I can be walking down the street, whistling, and

2) Handing out sandwiches to needy people.

The fact that I can create a model in which 1) occurs no more proves that whistling causes mass shootings than does the fact that I can create an OLG in which:

A) The government issues debt;
AND
B) The government engages in inter-generational transfers of wealth from the young to the old,

Show that debt causes inter-generational transfers!

Because,  after all, it is easy to create an OLG model in which the government issues debt, and uses it to transfer wealth from the old to the young.  (For instance, issue lots of bonds, and use the revenue garnered to give every newborn $100,000!)

Or, I could create a model in which government debt transfers wealth from Earthlings to Martians. This model would not "demonstrate" that all issuance of government debt benefits Martians!

And lest the Martian example be considered too silly to have any relevance, consider a model in which government debt is used to continually transfer wealth to, say... the military-industrial complex.

The fact that there is a model A in which X occurs does not prove that X is occurring, and that someone questions whether X is occurring does not mean that they simply don't "get" model A!

Thursday, February 05, 2015

Getting financial advice from financial charlatans

Here we find "financial guru" David Ramsey telling his guru-ees: "T]he 30 year mortgage robs your future. […] It simply enabled borrowers to buy more house than they could afford by spreading the payments out over a longer term. On top of that, those homeowners paid tens—even hundreds of thousands of dollars more in interest."

Sigh. First of all, why is this "more house than they can afford"?! They can afford, it, since they spread the payments out! And if Ramsey's argument works, why doesn't it work equally well against his preferred 15-year mortgage?! Don't all mortgages enable borrowers to buy "more house than they could afford" if they had to pay cash?

And doesn't "financial guru" Ramsey have any idea about discounting cash flows? Doesn't he know that the duration on a 30-year bond paying 5% interest is about 16 years, while that of a 100-year bond is only about 20 years? In other words, extending the bond by 70 years barely makes a difference in when the weighted average dollar is paid back?

And let's say inflation is about to kick in big-time, say, rising to 7 or 8%: in that case, you'd prefer to have a mortgage as large and long as possible, since you make money off of it every year.

Yes, in some cases, a shorter mortgage might be better. But Ramsey shows no signs of acknowledging the trade-offs involved.

Did you offer to cut your salary?

I frequently hear complaints about, say, the airlines, along the lines of, "Oil prices have dropped, and yet the airlines haven't cut their fares!"

I am curious: Does the person making this complaint commute to work by car? If so, have they gone in to their boss and said, "You know, my commuting costs have dropped, so would you cut my salary a bit?"

Of course, there are other factors at play: perhaps the airlines are making huge profits, and the worker is just barely scraping by. But the general point holds: market participants enter a market looking to get the best deal they can. In general, there is nothing immoral about asking for any price one thinks one might be able to get.

Wednesday, February 04, 2015

Bob Weir, rock's strangest rhythm guitarist?

I happened to have this on while I was working today. At around 1:10:30 up to 1:11:35, the sound man seems to suddenly decide he would like to hear Bob Weir more clearly, and the rhythm guitar is seriously elevated in the mix. When you can hear Weir clearly, you realize just how odd a lot of what he plays is.

Implementing an efficient random iterator over a multi-level data structure

FRONT UPDATE:

Ken B. has pointed out that I was thinking like a C programmer in writing this: I was thinking in terms of shuffling arrays of C-like integers versus arrays of larger C data structures. In that situation, my algorithm would be more efficient.

But that is not how Python does things! These are Python lists, not C arrays, and the list is a list of pointers, whether the list is of integers or of agents. So the shuffle has the same cost either way!

In other words, I did a bunch of fancy coding that would be nice in a different language, but that makes no difference in the one I am actually using.

Still, the coding was interesting.

FRONT UPDATE II:

An important lesson I learn yet again -- I guess I am rustier than I thought! -- Don't "optimize" without profiling (timing portions of) your code!

I timed my fancy-pants version of the random iteration, as well as of reverse iteration, against the "naive" versions that just used basic Python operations: in both cases, the basic versions ran much faster than my fancy versions! I made two mistakes here:
* I thought like a C programmer instead of a Python programmer.
* I failed to account for the fact that the basic Python list operations would be implemented in C code, and thus run very fast compared to my "improved" versions, which had to run in interpreted Python code.

Here is the simple random iterator:
# simple random iterator:

    def all_agents_list(self):
        """
        Assemble all agents in a single list.
        """
        all_agents = []
        for var in self.varieties_iter():
            all_agents += self.vars[var]["agents"]
        return all_agents


    def agent_random_iter(self):
        """
        Loop through agents in random order.
        """
        all_agents = self.all_agents_list()
        random.shuffle(all_agents)
        return iter(all_agents)

 

But there is another important point here: By interfacing with my data only through certain abstractions (these iterators), I was able to very easily swap different implementations of the iterators in and out without breaking the code of any model at all. So long as the iterator returned the "same" result -- same is in quotes as by definition a random iterator returns different results each time, but different in the "same" (random) sort of way -- I could experiment with different implementations very easily. As someone noted in 1992, using objects can greatly simplify making extensive changes to the code implementing an interface.

******************

We have a population of agents. Sometimes we want it to look like there is a list of agents... but there isn't, because most often it is more efficient to store them by their type, and access them that way. (Furthermore, different models have different numbers of agent types.) The code to iterate straight through the various populations sequentially was fairly straightforward:

# iterate over multiple lists as if one:
    def __iter__(self):
        alists = []

        # self.varieties_iter() returns each
        # type of agent we have at hand
        for var in self.varieties_iter():
            alists.append(

                self.vars[var]["agents"])
        # create an iterator that chains 

        # the lists together as if one:
        return itertools.chain(*alists)


But how do we iterate over the agents randomly, making sure we hit each one? We can form a big list on-the-fly and use Python's random.shuffle() to mix them up, but that will be very inefficient for large agent populations. The key to doing this somewhat simply and with decent efficiency was to generate a random sequence of integers between 0 and the size of the agent population (minus one, of course!), and then iterate through that list, figuring out which list of agents an index points into along the way. Here is the code that does this:

# iterate over multiple lists
# in a random order:
    class AgentRandomIter:
        """
        Iterate randomly through our agents.
        Eventually this should be made

        generic so it can randomly iterate
        through anything that implements
        an element_at() method.
        """
        def __init__(self, agents):
            self.i = 0
            self.agents = agents
            self.indices = 

                list(range(len(agents)))
            random.shuffle(self.indices)
            # at this point, indices holds

            # a list of the agent indices, 
            # but scrambled, i.e., with
            # four agents, it might hold
            # 3, 0, 2, 1

        def __iter__(self):
            return self


        def __next__(self):
            """
            Return the next element or

            raise exception to stop iterating.
            """
            if self.i < len(self.indices):
                # get an agent!
                agent = self.agents.element_at(

                            self.indices[self.i])
                self.i += 1
                return agent
            else:
                raise StopIteration()



    def agent_random_iter(self):
        """
        Loop through agents in random order.
        """
        return AgentPop.AgentRandomIter(self)


    def element_at(self, i):
        """
        Another way to treat the AgentPop

        as if it were really one big list.
        """
        if i < 0 or i > len(self):
            raise IndexError()
        else:
            for var in self.varieties_iter():
                l = len(self.vars[var]["agents"])
                if i < l:
                    # that means the agent is

                    # in this list
                    return self.vars[var]["agents"][i]
                else:
                    # otherwise, the agent lies

                    # in one of the
                    # remaining lists, so

                    # subtract the length
                    # of this one from i and

                    # continue.
                     i -= l

Monday, February 02, 2015

An excellent post from Noah Smith on why solar...

is going to beat out nuclear power.

Smith is a blogger who drives me nuts, in that he has really great posts followed by one's that give me severe agita. (I bet I am the same for many of my readers!) This is one of the good ones.

Distributists should certainly welcome this conclusion, but I think libertarians ought to as well: solar puts power (pun intended) in the hands of the individual, as opposed to nuclear, which can only be implemented by huge corporations, the very beasts who lobby the government for special economic favors.

Engineering models and economic models

As I am finishing up my review of Mary Morgan's book, as well as reflecting back on several months of fairly intensive agent-based modeling, I find myself thinking that the use of models in the social sciences is much like its use in engineering: the model allows us to answer questions such as, "If the assumptions that went into building the model are true, then what will happen if we introduce this change?" In either field, the assumptions are always only more-or-less true, and may be wildly off: the engineer, for instance, may be mistaken about how strong the effect of the wind will be on a bridge he is building:

To understand the analogy I am making, consider that the above can also be taken as a visual representation of what happened to Murphy's macroeconomic model following 2007. (We kid because we love, Bob!)

Discounting taxes

Samson is having trouble with this post, about why you can't "save money" by moving to a place with lower property taxes.

Let us picture three homes, identical in every respect. (This is a thought experiment, OK?)

Each is priced at $100,000.

Now the property tax fairy descends on the area, placing a tax of $1000 per year on home B, and $10,000 per year on home C, while ignoring home A. Furthermore, assume that there are no benefits from the higher taxes, such as better schools: the tax fairy just whisks the money off to fairy-land.

The market of potential owners is, on average, planning to occupy their next home for ten years. The present value of the tax payments on home B for a ten-year period, discounting at 5%, is roughly -$7500, and that on home C roughly -$75,000. (Should we discount in perpetuity? Maybe, but that doesn't really change the outcome of our exercise.)

If all three homes (aside from taxes) are identical to me, I will pay $100,000 for home A, $92,500 for home B, and $25,000 for home C. I do not save a penny by buying home A with low property taxes: in an efficient market, the burden of future property tax payments is already priced into the home.

What will be a benefit or loss to the homeowner will be unexpected changes in property taxes. Also, if property taxes are providing some large benefit, like top-notch public schools, but I have no interest in that service, I may be better off going to a lower tax location.

Sunday, February 01, 2015

Made by nerds for nerds

Yesterday my daughter accidentally wiped out the Ubuntu partition from my ChromeBook. So I had to download it again, and I'm now reinstalling it. Here is the sort of nonsense one encounters while setting up the system: when I finally booted Ubuntu, a dialog box comes up that reads as follows:

"Welcome to the first start of the panel
Choose below which set up you want for the first startup.
Use default config
One empty panel"

So, in my 30th year of being fairly to heavily involved in the computer world, I really only understand "Use default config" from this dialogue. What the heck is "The first start of the panel"? What in the world will happen if I choose "One empty panel"?

Curious, I tried choosing the second. I booted into a screen with some disc icons and... one empty panel on it! It is a little gray rectangle. I can drag it around the screen. What else I can do with it I have no idea. There is no menu bar at the top, and no application launcher at the bottom.

And here is the real kicker: I cannot find a clue anywhere about how to get back to the "default config." I have probed the various preference and setting menus: nothing.

After a half hour of trying to figure out how to get a desktop from which I could actually do some work, I finally simply reinstalled Ubuntu.

By their euphemisms you shall know them

I'm watching the Belgian TV series The Break . Not bad, but... At several points the subject of abortion comes up. The characters say...