2016 charity plan

This is our plan for our 2016 charitable giving. Our ongoing goal is to spend 10% of our annual budget on charity (minus big ticket items like house purchase and renovations.) Here is the breakdown:

Charity notes category scope Final %
Wikipedia
education global 1.4
AMF malaria health global 15.2
Cool Earth global warming environment global 6.2
SCI parasites health global 11
Deworm the World parasites health global 9
Give Directly poverty human services global 8.3
Manos De Christo Austin homeless human services local 5.5
Elephant Sactuary tenessee animals national 1.4
Cure Alzheimer's Fund gene mapping -> cure health national 2.1
charity navigator meta! research national 1.4
Meals on Wheels Austin elderly/poverty care human services local 5.5
ACLU civil rights politics national 5.5
Sierra Club environmental environment national 5.5
Southern Poverty Law social justice politics national 4.1
Planned Parenthood reproductive human services national 5.5
represent.us bottom-up anti-corruption politics national 4.1
pro publica journalism non profit politics national 4.1
union of concerned scientists science advocacy politics national 4.1

This year we have greatly increased the share of our giving to national causes. Mostly this is because we no-longer trust the US federal government to do a good job in areas we care about, like civil liberties, social justice, global warming, and education. But a big portion remains focussed on global problems like Malaria.

These are all (technically) non-partisan causes, but in addition I may seek out and support particular politicians and political organizations.

election reaction

I'm overwhelmed.

I see a lot of people struggling to process it, like me. I see some posts trying to tell other people how to feel about it. I don't think this is the right time for that. Here's how I feel.

I feel guilty. I was worried and stressed about this election to the exclusion of work, for a month. But I didn't do anything, other than vote. I could have done more, and I knew it at the time. So I feel guilty. I have friends who feel (reasonably, in my opinion) threatened by the election results. I feel bad that I didn't do more to prevent this outcome.

I am an atheist*, and an elitist. I believe in science, reason, and progress. I subscribe to humanism and feminism and multiculturalism. I believe that intellectual honesty is a prime virtue. In this election, one of the candidates was well aligned with my values, and the other was not, and I didn't do very much about it. I did vote at least.

Elitist?

Yes. I believe that knowledge and experience matter, that science helps us make good decisions, and that people who have studied and practiced subject are better at it. I don't believe that an uninformed opinion is worth as much as an informed one.

There's another meaning of elitist, which is more about judging which people are worthwhile and which are not. I don't identify with that, I try not to act that way, but I can see why people can get that impression of my tribe. Empathy is hard work, and human beings often just skip it.

So, I feel guilty, and I want to start helping move the country forward. I'm not sure what that means yet. Here are a few of organizations I've been interested in:

https://represent.us/
https://www.codeforamerica.org/
http://evonomics.com/

Another idea I've been kicking around is to gamify civic engagement. Basically to take https://www.vote.org/ and smash it together with pokemon go. Here's my angle. I believe that when people are engaged with their government at all levels, they feel invested in the outcome. If you feel like government basically works, then you don't need to flip the table. You can work within the system to address your needs. So let's make civic engagement into an addicting and social experience.

But that's all speculative and distant. For now I am committed to finishing up Legacy. After, I might consider some kind of career pivot. In the meantime we will adjust our charitable giving. I want to write a post on that when we've done our homework and cut our checks.

...

For now, I feel bad when I go out in public. As a straight white man with a good career, I am insulated from basically everything. I likely won't face the consequences of this election personally. I don't know if I should be wearing a safety pin or something. I want to show solidarity with the people who feel personally threatened by America's new direction.


*I try not to push my atheism on other people. I think it's rude to proselytize, and I do believe in multiculturalism. I know lots of religious people who are virtuous, intellectually honest, and thoughtful. I'm not trying to say otherwise. But if you wanna argue we can argue.

iteration fanaticism

One of the bad reputations I inadvertently acquired at my last job, I'm told, was that I'm a technology zealot. The charge is that I care more about how good the tech could be, than about delivering actual value to players.

I understand why people might think that about me, because, I really love thinking about awesome tech, in particular workflow tooling. I might be fanatical about instant feedback and safe iteration.

In order to keep myself in check, I've developed a couple of personal rules.

Rule 1. Never make a tool for a user who does not exist. This means I need to figure out who, exactly, will be using the tool, and make it work for that real person. This keeps me from getting lost in tool usability land. If I'm the user, and I know how to edit a json file, great!

Rule 2. Prefer viewers to editors. Editing a text file is actually a pretty rich experience these days. If you can edit a text file, press save, and see instant feedback, that's pretty good. You don't necessarily need or want to drag boxes across the screen. This rule alone has saved me hundreds, maybe thousands of tool programming hours while working on Legacy.

In-place runtime iteration is the gold standard. You should be able to modify source files to edit any number or string value you care about, and instantly see it updated in the game. If you can do that, you don't need a dedicated editor, in-game or otherwise. JSON is a pretty good data format. In particular, it's a good data format when you're editing it inside an IDE with live syntax feedback and domain validation.

education, culture

http://slatestarcodex.com/2016/05/19/teachers-much-more-than-you-wanted-to-know/

I read this thing and I want to talk about it.

The question is, why do some students do better than others? Are there good teachers and bad teachers? (There must be, right?) How can we measure teacher quality? The essay reviews a lot of literature on the subject and ends up with a big shrug. It seems like teachers have a small but non-zero affect on students' long-term achievement.

Anyway what I want to say is:

It's the culture. It's the culture of the kids in the class. That's why one disruptive student can have such a big measured impact. They can swing the whole classroom culture away from the subject and toward scatology, or whatever. But I think there must be a hundred effects more subtle than just the presence or absence of disruption. What do kids talk about with eachother? Do they cheat, and how much? What do they think of their teachers, their school, their parents, their community? How do they feel about their own futures?

Really great, standout teachers don't just cover the material, they're not just "more engaging." They actually hijack the culture of the classroom and bend it towards academic achievement. Every great teacher I've had did this, either via a naturally contagious enthusiasm for the subject, or by literally terrifying the class and commanding their respect. (Ideally both.)

When you join the military (I'm led to believe), you go through basic training. In all the montages I've ever seen, a mean old drill sergeant will break you down, put you through hell, and you'll come out the other side a completely different person. But what's happening at the cultural level of the platoon?

You start as a group of civilian strangers with a weak shared culture based on national identity, and a wide variety of problem solving and interpersonal approaches. Take that culture and hand them guns and tell them to take a hill, what do you get?

At the end of basic, you have a different (and -importantly- shared) culture. One that values teamwork, physicality, toughness, aggressiveness, hierarchy. Now hand the second group guns. Right?

The drill sergeant's main job is not to whip the recruits into physical shape. That's important, but their main job is to wipe away civilian culture and replace it with military culture, because that's the culture you need to be an effective soldier.

Back to education. Kids learn from eachother. Maybe not academic subjects so much, but behavior. Disruptive, studious, creative, serious, cynical, whatever. The culture of the class determines how the student interacts with the teacher's lessons. Will she sink her teeth into the big project and learn a ton? Or will she half-ass it, collude, cheat, and end up with little to show (academically) for her time? The classroom culture determines the outcome.

Kids in school have a really strong culture all their own. This culture is molded by their previous school experience. Teachers influence this culture. Standout teachers can hijack it in a way a drill sergeant does. But this is difficult to replicate. Kids are cynical, and their culture is resistant to "inspirational teachers."

Ok that's what I wanted to say. I don't have any citations, this is just my 20 minutes of thought.

blend modes, alpha compositing

I'm learning graphics! (BORING!)

Ok, so for Legacy, I want to be able to programmatically compose 2d art using the same blend modes that Photoshop uses. This allows us to just specify some hex values, and automatically generate all the nicely colored images. I'm talking about stuff like overlay, screen, multiply, hard light, all that.

It turns out that photoshop blend modes are fairly subtle. In particular, they perform math and logic on the underlying color. This is something that a standard pixel shader can't do, because you just don't know what color the destination is until you get to the fixed function step, after your shader is done. The fixed function step can do some basic addition and multiplication, and that's not enough to give you the fancier stuff like screen, overlay etc..

So what you gotta do is use the underlying layer as an input to the shader that's doing the blend. This is kindof annoying because it means you need two texture targets, and you need to ping-pong between them, and then you also need to do image copying at each step, or do a whole framebuffer pass at each step. But whatever, for Legacy we don't need this in the realtime pipe, so that's fine.

I was gonna build all this myself but then I found this blog post and shader file that has it all, and it also answered my question about whether the blend logic should be per-component or on a pixel "value."  (per-component is the answer.) Sweet. So now I have a little utility class to compose images using photoshop blend styles.

Once you have the rgb value correct, you also need to get the alpha right. This is something that I had always kinda glossed over. I never quite understood how the fixed function blending handled alpha, and why alpha premultiplication is necessary. So I made some bad assumptions. But I figured it out!

If you care about the alpha value in the final image - i.e. you are rendering an intermediate texture that will later be rendered into the scene and it's alpha must be correct - then you cannot use the standard alpha blend function:

source.rgba*source.a + dest.rgba*(1-source.a)

because - although it will get the rgb values right, it will cause your image to be too transparent. To see this, plug in 1.0 for dest.a and 0.5 for source.a. The final a value is (0.5*0.5)+1.0*(1-0.5) = 0.75.
But it should be 1, because the underlying layer is opaque. Basically this blend function treats alpha like a color component, instead of compositing it separately. This is the part I failed to realize, I thought there was special handling of the alpha component, for some reason.

What you need instead is, inside the shader, multiply your rgb components by your alpha component, and then use:

source.rgba*1 + dest.rgba*(1-source.a)

which expands to:

vec4(source.rgb*source.a, source.a) + dest,rgba*(1-source.a)

so, now plugging in 1.0 for dest.a and 0.5 for source.a, we can see that the rgb values are the same as before, but the alpha value is now correctly calculated as 1.0.

So this is why alpha premultiplication is sometimes important. It's important if you need the alpha values in your final image to be accurate.


freedom is scary

phase 1: get money.
phase 2: build.
phase 3: victory points.

We've got a lot of freedom in our life right now. Almost a terrifying amount, in some ways. Benjamin is getting older and much more capable. Legacy is floating along nicely. We're starting to talk about where to buy a house, and what we want our days to look like.

I don't think it's quite castle time yet, for a couple reasons. One, we don't really have enough money to support full-time construction-kind of activities, and the stress that would create is not worth it. Two, the kid is not really going to be safe around an active construction site, for a few more years. And we might have another kid? So, maybe we put off the active construction lifestyle for bit.

But otherwise, we have a ridiculous amount of freedom. As long as we can bring in a bit of money here or there, we can pretty much do what we want with our days. So, we're working on figuring out what that means. Travel? Treehouse Village? Other projects?

Seriously if anyone wants to pitch a project, this is a good time for it. The thing I miss the most these days is working with other people, my friends in particular. I'd kindof love to take on a project for someone, report progress, get feedback, all that good stuff. For now Legacy still has to come first, but let me know if you have an idea, and we could start estimating and planning at least.

What else. We've also been getting interested in effective altruism, and we did a big year-end charity spend this year, which is something that I always thought rich people did to get tax write-offs and feel good about themselves. Turns out it works great.

On those lines I've been reading a lot about macro economics, global development, and the way the world works. It's pretty crazy. One insight is that the human world has been getting much, much better over the past several decades, and it seems like the trend can continue. Climate change is a real challenge, but a solvable one, and the human world seems to be getting its shit together overall. I'm not calling the end of history, politics, tragedy, or any of that, but I think it's a pretty great time to be alive, compared with any time that's come before.

That's the dream, anyway. :-) Happy new year!