How to Improve

This caught my eye this morning: “10 ways to improve your programming skills”

Since I’m learning how to program (has it been two months!?), and I want to get better at it, I should try to follow some of this advice. Here’s the list:

1. Learn a new programming language

Um. It’s all new!

2. Read a good, challenging programming book

Ok, bit advanced.

3. Join an open source project

Yeah, right.

4. Solve programming puzzles

Possible candidate here. Sounds like a lot of work, though.

5. Program

Got enough of that to do!

6. Read and study code

Ugh.. no time.

7. Hang out at programming sites and read blogs

No “hanging out”, but I read.

8. Write about coding

Hmm….

9. Learn low-level programming

Nope.

10. Don’t rush to StackOverflow. Think!

Meh.

-=-=-=-=-

So maybe writing about programming is the low-hanging fruit here.

Ok, so here’s what I did today at work.

There’s this company called AM Best who are an insurance-specialist rating agency, like S&P but much narrower in focus. I go there periodically for financial information on our clients and markets and for the industry in general.

Anyway, I noticed that there is a press release archive going back to 2000. The thought struck me that it would be neat to have a database of all these press releases to crunch and see if there are any patters in the rating actions taken on companies.

THEN it would be neat to link these rating actions to stock prices, to see whether the ratings actually, um, you know, work.

For instance: how good of a predictor are they of default? Is there an immutable ‘snowball effect’ where a rated entity just keeps getting downgraded until it fails or merges with someone else?

So this project has been bubbling around in my head for a few weeks and this morning I finally had enough spare time in which to implement it.

I’ve put together a scraping routine (busily ‘scraping’ as I type) that is pulling down all 10,000+ press releases and dropping them into a database.

I considered doing all the actual data mining today, too, but that’s going to take a bit too much time. I’m happy with just sitting on the data for now.

My next objectives:

1. Parse the text to figure out what the various categories of press releases are.

I know there are downgrades and upgrades of companies, but what about actions against subsidiaries only? What about debt ratings? Most of this crap is useless to me.

2. Figuring out a system for identifying companies that matter.

There is going to be a ton of mergers, defaults, spin-offs and goodness knows what going on that I’ll need to work out. That will be tricky.

3. Isolating the rating actions associated with corporates and building a more ordered database of actions over time.

This is the ‘real work’, obviously. How ironic that it’s going to by far be the easiest step once everything’s organized. Regular Expressions, baby. Cinch.

3. Figuring out how money has been made or lost in this process.

I want to link these names to stock symbols and see if there is any perceived contagion (by the market) and, even more importantly, whether there is any ACTUAL contagion. I suspect not.

Fundamentally, Engineers Serve Ideas

Here is Horace Dediu:

RIM is an engineering led company. Many successful companies rightly develop their engineering skills first because that is what allows them to create new products more quickly. This is true of Nokia and also of Apple and Microsoft in their early years.

What is difficult is to allow marketing people to define products after that early phase. This is partly due to the fact that there is less respect for “Marketing” among engineers. Many see it as a “soft” discipline where there is little rigor.

Engineering is about implementation. To the extent that the first paragraph is true, it is so because these companies already HAD a proven idea. After all, they had to give the engineers something to do and sell something to pay for them.

Once you need to start looking for the next idea, it requires something other than engineering skill, not that someone can’t have both abilities, of course.

As for the second paragraph, of course marketing is a soft discipline. And that is exactly why it’s so hard to get right. The difference between an 80th and a 99th percentile engineering idea isn’t going to be a big deal. Indeed, perfect is often the enemy of good.

Go with 80th percentile marketing ideas, though, and you’re dead meat.

The Devil You Don’t See

A few weeks ago I had lunch with a cat bond manager who was crowing about buying and selling a particular bond at a solid profit in a single day.

The bond was Mariah Re, which is at risk of being triggered by tornado losses this past quarter in the US. It hasn’t triggered yet, but it’s close.

My bond manager friend figured that, since Tornado Season is over, the fact that the bond was trading at a steep discount at the time meant it was a steal. And it was. He sold half of his position for a tidy little profit and figures he’ll ride the rest out at the great yield he’s secured.

He’s looking a bit less smart today.

He’s actually probably ok, but this made me once again appreciate the power of IBNR.

IBNR is a classic Rumsfeldian phenomenon:

[T]here are known knowns; there are things we know we know.
We also know there are known unknowns; that is to say we know there are some things we do not know.
But there are also unknown unknowns – the ones we don’t know we don’t know.

Claims happen with uncertain cost. Ok, that’s the set of unkowns.

Some claims get reported reasonably promptly, even if the ultimate cost is still uncertain. These are the known unknowns.

The unknown unknowns is the IBNR. It can be estimated, but you need lots of good data. Anyone who hasn’t looked at a lot of portfolios over a long period of time will struggle with this.

Even then, it’s a horribly difficult concept to keep in your mind. People appear to be hard-wired to think that things in the past are in the past and can’t hurt us in the future.

Not so.

How Much Does AC Cost? An Accounting Issue

There’s a great discussion of the costs of Air Conditioning for soldiers on MR. Here’s the original story.

Here’s the boogeyman soundbite:

The amount the U.S. military spends annually on air conditioning in Iraq and Afghanistan: $20.2 billion.

That’s more than NASA’s budget. It’s more than BP has paid so far for damage during the Gulf oil spill. It’s what the G-8 has pledged to help foster new democracies in Egypt and Tunisia.

What is a cost? I am reminded of an accounting prof of mine who once said: “give me some public accounts and I can turn a $5m profit into a $5m loss for a company and get every accountant in Canada to agree with me”.

So that’s an interesting bit.

Another interesting story is how people argue.

In the comments on MR (best around), there are a few analytical folks (“let’s look at the seasonal variation in running costs and adjust for stuff”), some hierarchical brown-nosers (“it’s a super-high ranking dude who said this so it HAS to be right”), and die-hard cynics (“I expect the number 20 billion comes under the category of “too good to check.”).

The number is probably BS, sure. But that doesn’t mean it’s “wrong” in a technical sense.

And none of that is going to stop a heated Internet discussion from swiping employers’ time all across the nation.

Bodily Symmetry

Apparently it predicts intelligence:

body symmetry more strongly predicts intelligence than brain size, nerve conduction velocity, reaction time reliability, and a number of other measures.

And the point:

The authors suggest that human intelligence may therefore be a “fitness indicator,” like a male peacock’s tail is a sexual advertisement to female peacocks.

Here’s another interesting sentence:

Bodily symmetry may reflect “developmental stability” – i.e., influences like disease, mutation and stress may cause a developmental divergence from DNA’s symmetric blueprint.

(Symmetric blueprint, eh? So nurture wins?)

Now, do I know anything about brain science or evolutionary biology? Absolutely not.

I do know that the measures of intelligence they used (two vocabulary tests and a pattern recognition test), don’t quite nail what I’d call genuine General Intelligence.

Let me put it this way: prospective mates don’t give each other math tests and actually using the vocabulary you’d surely need to ace the “WAIS II vocabulary quiz” could well be a countra-signal of mating fitness (ie being a dorky ‘try-hard’).

These are proxies for intelligence, of course, but not the proxies real people use. For real people, general intelligence is signaled through humor, social facility and (messily) through brute force financial might.

I’m not arguing against the conclusion, nor indeed against the hypothesis. It rings true. I just get the impression that ‘academics’ like to think ‘book smarts’ matters in a direct evolutionary sense. I don’t think it does.

It’s a byproduct. These studies work because intelligence developed for one thing bleeds over into everything else.

Robin Hanson gets it (obviously):

an “intelligent” thing has a great many useful capabilities, not some particular specific capability called “intelligence.”

In Praise of Judd Apatow

Just saw Bridesmaids.

I’m not the target market here and the title really made me reluctant but the 90% rotten tomatoes rating did the trick.

It was hilarious.

And I was thoroughly unsurprised to see a producer credit for Judd Apatow at the end; everything about the movie fit his style. The guy owns the heartfelt comedy genre and, even putting aside the fact that he’s allied with all the blue-chip comedy names around, it’s always surprising when someone puts together a movie like his but not with him.

Take The Hangover. A very good, very funny movie. I found it a bit of a strange experience, though, because I’d almost been conditioned to expect that kind of plot to be done in Apatow’s style. I get the same feeling when I watch animated movies not made by Pixar. Good? Sure, often enough.

But it’s like drinking Pepsi when you were expecting Coke. It takes you a second before you realize something’s different, then you can’t get it out of your head. It also takes you a minute to get passed that (if you can) and decide whether you like it better.

Maybe you don’t like it better, but let’s face it, if you like one, you are probably going to think the other is perfectly suitable (brand loyalty aside, since I know people can be ridiculous about these things).

Anyway, I think Apatow probably kicked himself when he saw someone else make a good movie about a bachelor party in Vegas. It’s a plot he would definitely have done eventually. And I don’t know if the world really works like this, but Bridesmaids almost feels like Apatow’s response to The Hangover.

I certainly identify more with the guys in the Hangover, but I probably laughed more in Bridesmaids.

Point, Apatow.

What You Should Practice

Robin Hanson points us to a study that shows kids should only do math homework. He takes the opportunity to bang on his drum of school as indoctrination, but I was reminded of a few of my own experiences.

Most of my worst academic decisions had to do with me deciding not to work harder at more technical kinds of subjects: math, science, etc. The cake was taken when I studied for a finance exam by doing word problems instead of math problems and got blown out of the water.

It was years before I realized finance was what I should have been doing in University all along.

It was years after that that I realized what I SHOULD have been doing was engineering.

It all comes down to me taking the easier, less intellectually painful route. Practicing logic/math-related subjects is difficult. Progress is slow because foundational knowledge is not obviously related to the fun stuff you get to do at the end. And for me, if it wasn’t crystal clear how I was going to benefit from something, I just wasn’t going to do it.

I’m a selfish bastard like that.

At work, I was finally liberated to explore these subjects by learning through doing actual projects. No tests, no homework, no BS I don’t care about.

And now at home I’m exploring a deeper counter-factual about my life and learning programming.

I am obsessed and have mostly sacrificed my other hobbies. It’s a miracle I’ve kept the blog streak alive.

I’m the happiest I can ever remember being.

 

When Cockiness Counts

Here is Barker:

Ironically, the bias toward seeing ourselves as better than average causes us to see ourselves as less biased than average too. As one research team concluded, “Most of us appear to believe that we are more athletic, intelligent, organized, ethical, logical, interesting, fair-minded, and healthy—not to mention more attractive—than the average person.

We’re more similar to others than we are different. Don’t fight this, embrace it. It is, apparently, the key to a much happier life.

It makes sense. If you had yourself convinced of your superiority, constantly facing reality would be a terrible source of stress. There’s always someone smarter, faster, stronger, richer, cooler.

Stay too humble, though, and you’d never achieve anything!

But Does it Work?

Here is Merkel’s review of Mandlebrot’s Misbehaviour of Markets, a book I’ve read:

Most serious investors and academics could benefit from the book.  It will challenge your preconceptions.  That doesn’t mean that everything Mandelbrot writes is correct, but most of his criticisms of MPT are correct.  .

Here is the key conclusion, which struck me as well:

The question becomes what to replace MPT with?

From memory there are a lot of neato descriptions of how price movements can be described by power laws. But what they cannot do is predict future price movements, which makes this book a fun but ultimately useless intellectual exercise, like a crossword puzzle.

Sure, the normal distribution is the ‘wrong’ way to think of all kinds of economic and natural processes. But it’s a friggen useful heuristic and better than nothing.

And better than nothing is usually as good it you get.

Brilliant Idea

I love the idea of an ideological Turing Test:

Put me and five random liberal social science Ph.D.s in a chat room.  Let liberal readers ask questions for an hour, then vote on who isn’t really a liberal.  Then put Krugman and five random libertarian social science Ph.D.s in a chat room.  Let libertarian readers ask questions for an hour, then vote on who isn’t really a libertarian.  Simple as that.

What a delightful idea.

There are a lot of problems in the world that could be eradicated if people were more easily able to adopt others’ perspectives.