How It's Like to Work as a Graphics Programmer

Today I met with Brenna, a lovely woman. She asked a lot of insightful questions, so I thought I'd write them down somewhere for others to see.

So, what got you into graphics programming?

I kind of got into it by accident. I didn't aspire to being a graphics programmer, or doing what I do today. I started with math, and burnt out working too much there, and thought computer science would be a more practical thing to study and I could start to get a job soon.

So I got a job at a company that was 40 designers and 4 programmers right out of college. My professor recommended me to her former student that worked there. I liked it because the job was part art and design, part programming. I ended up doing a lot of engine coding by necessity-- the kinds of installations we built couldn't be built in things like Unity.

Then I got a job in engine programming because of the work I did here with these custom engines. I didn't want to work in the game industry necessarily. But I did know that I wanted to get away from flying everywhere to talk to clients and interacting with clients so much on design-- I preferred to work on back end technology. I'm a social person, so people don't expect that, but it really is what I prefer.

When did you start your company?

About nine months ago. And finally moved to Seattle maybe around March or so.

What do you two do?

We make a compression product, and have done contract work to fund it.

Contract work sounds ideal!

It can be. Make sure you charge a lot, because dry spells can get stressful otherwise. What I like about making a product is that we can see profits from it that aren't just a linear relation to hours put in.

And honestly, it boggles my mind how unfair a lot of full time programming jobs are in that regard, and even contract work. We deserve to be compensated for our work fairly. Both Rich and I are programmers, full stop. We do all the code and get all the profits from it.

I know you've talked about how working full time in the industry was stressful.

Yeah, for various reasons. At one job, the CEO was a cause of a lot of stress. My coworkers and even my manager were lovely, but the CEO just put so much pressure on everyone to deliver and we just worked so much.

Many people complain about managers and hierarchies in companies. How has your experience with that been?

Yeah, it's very trendy to have "no managers" at programming jobs, and that's really stupid in my opinion. At one company, I had a manager and I often complained about that, things did get very stressful sometimes. But then my manager was taken away, and I was placed into a flat hierarchy. It was so, so terrible. Programmers think they can navigate those social dynamics but they just often navigate them terribly.

And the code suffers, too. That's how I've added value in a lot of companies-- working on systems like multithreading that touch all areas, and just getting people to talk about how we should handle that. In so many places the physics programmers keep to themselves and the graphics programmers keep to themselves and the lighting programmers keep to themselves beyond that. I really believe communication skills are so important in programming, and so often lacking.

What are some specific things that were stressful?

Working a lot. 80+ hours, often.

But also sexual harassment. I was once sexually harassed for months at a job. And people in general were terrible. One guy in particular was just such a misogynist, but when I told people about him they said surely that's not true. And then I complained about him to HR, and I was fired a week later.

Yeah, he didn't seem sexist to everyone else because they were all men.

One thing that's helped me cope is creating a strong community. It's why I joined groups like the VR/AR Collective as soon as I moved to Seattle. I started a women in engine programming group while all this harassment was happening, for instance. There are probably 20 women game engine programmers in the world, it seems. And they had my back, and were so supportive. That meant the world to me. Being a part of a strong, supportive community outside of work has been crucial for me.

So what do you do now?

Product work, primarily. Working on compression. I always tell people, the code is the easy part. The hard part is selling it, and business. Getting to know people who want to buy it. Getting the word out. Explaining the concepts. If you can do that, you can figure out how to build the product much of the time.

In terms of the tech, compression is pretty cool. Just to give you a high level idea of how it works, think of an image as a list of pixels, each has an RGB value. What we do is split the image into blocks-- maybe 4x4 pixels. Now think of a line through 3d colorspace with two RGB endpoints. Then you have 2 bit selectors that represent each pixel-- they choose a point on the line (one of four points). Now instead of having an RGB value per pixel, we only have two RGB values per block of pixels, and 2 bits per pixel beyond that. That's the basic idea.

I'm thinking of going into web programming, and have been looking at languages like Python and Ruby. How is C++ different? What is graphics programming like in general?

In C++, you do things like manage memory and have more control over low level operations like multithreading-- doing multiple things at the same time.

You might ask, isn't multithreading easy? It gets tricky for two major reasons-- dependencies between threads, and shared memory. Sometimes one action relies on another action or alters the same memory as another action, but if they aren't aware of each other and are just happening at the same time this can get pretty tricky.

With C++, it can be really helpful to have a good mental model of hardware. So with the CPU, let's think about how memory is managed. Let's say we have a table of names and ages of students in a school. We want to figure out what age Fred is in that table. In just a flat memory hierarchy, we would go through all the students in the school and find Fred and ask what his age was. Well, what if we knew what class Fred was in, and pulled those members away from main memory, and searched that? It'd take a lot less time, because we're only searching that class. That's kind of like what caches are like. You have the L1, L2, and L3 caches on the CPU, and then RAM and main memory and actually the internet can be considered a giant cache beyond that. L1 cache is very tiny, but very close and small.

GPUs are different. They are made to be highly parallel. You don't get a lot of memory, but you do get the ability to do a lot of simple actions all at the same time.

OpenGL is a specification that allows you to send instructions to the GPU. You see, C++ code executes on the CPU. A compiler turns it into machine code. You don't run C++ on the GPU. Instead, you send the GPU instructions and can also send it shaders-- GLSL for OpenGL. GLSL shaders allow you to program specific processes that are compiled and executed on the GPU. It's pretty nice!

To give a simple example, there are vertex shaders and fragment shaders. Vertex shaders deal with mesh points-- moving those points around, doing operations on them. Fragment shaders deal with texture data-- you can run a fragment shader on a texture that covers a model, say to light it, or the screen space itself.

The nice thing about all these concepts is if you understand them, you can bring that knowledge to higher level languages and better troubleshoot problems there too.

So should I learn C++ instead of Ruby?

Well, I'm not sure honestly. Ruby is easier to learn, but C++ is closer to what's actually happening and actually less confusing in that sense. There's less of a black box. Is it worth it to learn something that's harder at first but a more accurate picture of how things work? I'm not sure. Honestly, I don't know Ruby well so it's hard to comment too much on how it's like.

One thing I will say is be wary of learning non-transferrable skills, like Unity development. C++ and Ruby are both very transferrable skills, you can use them in lots of areas and parts of programming.

I do wish more people would teach C++.

Honestly, I think that's why C++ is so full of men. Many schools, especially focusing on getting more women in tech, focus on higher level languages. It's a pity.

What's your favorite thing about compression work?

Back when I was in school studying math, I thought "Well, if I'm not going to be a quantum physicist or a stock brocker or a professor, I won't use this." And I didn't want to do any of those things. So even though I loved advanced mathematics so much, it felt silly to study. I needed to make money, now.

Now I can actually use those mathematics skills, and get paid for it! And it's also inspiring to see the reach compression has.

Another thing worth noting both with graphics programming and compression is that it's easy to add value as someone new to the field. Graphics changes so much, and compression is such a specialized field that not a lot of people study. It can be easy to become more specialized and knowledgeable than many in both fields.

What's the most inspiring use of compression?

Oh my goodness, all kinds. I'm most inspired by its use in the sciences-- astronomy and medicine and biology. I don't see programmers and scientists and mathematicians talking a lot, and I'd like to see more of that. I'd like to see more game programmers communicating with scientists and sharing knowledge, too.

A Few Stories of Tech Interviews

Closed Source Engines are a Big Risk