Sunday, April 21, 2013

bool Person.isEqual(Person b) { return true? }


Gender equality is certainly getting a lot of air-time lately. I read Rock Paper Shotgun's article on the subject today. Then I spent a while reading the reddit thread that's substituting for RPS's own comments. Then I read some hilariously sexist blog responses. And wow, this is an incredibly difficult subject to think clearly about.

Let's start with some unarguable stuff - Nobody can seriously claim that sexism doesn't exist. I mean, just look at the hate-filled comments on any webpage that brings up this topic.

But that in itself doesn't mean much. Ten minutes on the internet should be enough to show you that all opinions are held. Heck, some people believe that it's a good idea to fly a plane into a tower block, bomb a marathon or shoot up a school. People have always done horrible things to one another. In the end, some people will always be jerks, and worse; I can't imagine any movement would realistically hope to change that.

So what, then, is the real goal of feminism? (I'm aware that there are conflicting factions; just trying to boil down to the essence here.) Now that the inequalities built into the legal system have been mostly abolished, what exactly would constitute a success here?

Most of the material I've seen (such as Anna Sarkeesian's controversial (though in my opinion, coherent and well-written) videos) tries to point out what we might call "accidental sexism": widespread patterns of behaviour, by both men and women, which are not maliciously done, and often well-intentioned, but nevertheless contribute to gender inequality.

However, this is where it gets awkward. When we get away from obvious negative stereotypes, what actually constitutes sexism? Men and women, when you get right down to it, are really not equal. They inherently have a different average life expectancy, height, weight, strength, aggressiveness, a different pattern of mental skills (for example, women tend to score higher on language, and men on spatial awareness), and so on... and most fundamentally, a different relationship with childbirth. In fact, the difference between maternity leave and paternity leave is one of the few remaining gender-specific laws in many countries.

Is it sexist to say that men are physically different from women, or to act in accordance with such differences? Surely not - if a doctor advised his female patients to maintain the same BMI as his male ones, he might be liable for a malpractice suit. (Well, probably not. But he certainly wouldn't be in accordance with standard scientific advice.)

And yet, and yet... it's a slippery slope, isn't it? So many of the differences between men and women are not inherent, physical or genetically based things, but actually cultural conventions - to pick a less-controversial example, the association of girls with the colour pink. It's clearly arbitrary: study different cultures and historical periods, and you find different color associations; or a lack thereof.

So let's explore that. Is it sexist to associate girls with the colour pink? I can't see that this is inherently bad - no more sexist than associating girls with the word "girl", or with the female symbol ♀. I mean, yes, I've certainly seen complaints about the pink-saturated "Lego for girls" range, but I don't think those objections are about the pinkness per se: it's the implicit declaration that the other toys are "Lego for boys" that upsets people.

Which leads to an interesting thought experiment - what if they made a "Lego for Native Americans"?

It's easy enough to imagine a Lego set about Native Americans: you'd have Lego totem poles, minifigs holding bows and wearing head-dresses, and little Lego buffaloes. I'll be surprised if it hasn't been made already. Oh, hey, look, it has:




However, can you imagine a Lego set specifically targeted at Native American children? To be honest I don't know enough about their culture to even imagine what that would look like... but clearly, its mere existence could be taken as an insult. (If that doesn't ring your alarm bells enough, can you imagine "Lego for African Americans"?)

Ok, so we seem to have a valuable distinction here! Lego about Native Americans seems fine; Lego for Native Americans seems obviously racist.

...which, in turn, begins to explain why the pinkness is a problem: it's just a signal, very clearly, that we're dealing with Lego for girls, not merely Lego about girls.

So let's explore that. Why is it sexist to make toys for a female audience? I mean, marketing folk always identify a target market for their products - "cat lovers", "people with families", "people who ride bikes"..... ah, but in asking the question, it answers itself. Target markets are about identifying what people do, and/or what they care about. If your target market is "women", or "native americans", have you identified anything about what they do or care about? All you've identified is a stereotype.

Compare "Lego for Chinese people" (which seems like an obviously racist concept) with "Supermarkets for Chinese people" (which are commonplace and inoffensive). What's the difference there? Simple enough: supermarkets for chinese people are actually catering to something real, not just a stereotype. They're primarily "Supermarkets for people who need ingredients for chinese food".

So that's the key; it's sexist to market things to a stereotype of women's needs, but it's not sexist to market things to real women's needs. ("Tampons for women", anyone)?

And the thought of things "for women" leads to another thought - the stupid "men's magazines", and "men's TV channels". Clearly, making something "for men" is just as poorly-defined as "for women". Are these channels sexist? Their idea of what men are like certainly seems to pander to stereotypes - obsessed with sport, cars, tits and violence. Which means... yes, I suppose they must be sexist. (And heck, that's even before we consider their idea of what women are like.)

So let's explore that. I had to deduce that this portrayal of men was sexist! Why does it feel so different from sexism towards women? I guess it's partly because the feminism movement has sensitized us to such issues as they apply to women. But underneath that, more fundamentally... stereotypes of men just don't seem like a threat. I don't think any men go around in fear of being dismissed on the basis of that kind of gender stereotype - "oh, a man; you must be aggressive and obsessed with your football team". It doesn't feel as though the men's magazines are really affecting my life by portraying men this way.

And why is that? Well, fundamentally, I think men just get portrayed in so many different ways in the media, and in culture in general, that no one portrayal seems universal. For every "football hooligan" stereotype, there are plenty of "scientists", "poets", "soldiers", and so on: so many different portrayals that they don't affect the perception of the gender as a whole. Honestly, I find stereotypes of awkward nerds more threatening than stereotypes of "men" as a whole.

And that's interesting too - why is that? Simply because "awkward nerd" describes me better: I feel like parts of it apply to me, and by the nature of stereotypes, the parts that fit you make them stick to you. And that makes the rest feel threatening. I imagine some rural americans likewise feel threatened by the "redneck" stereotype. "Yes, my family lives in a trailer, I like country music and I drive a pickup truck; why would that mean I'm toothless, unemployed or inbred?"

Ok then - what happens when there's a stereotype of your entire gender? "Yes, I am female and have breasts; why would that mean that I'm a passive participant in my life, or that my best hope is to be pretty enough to make a rich man fall in love and marry me?" I can see why that would be threatening. And the better it fits an individual, the more threatening it becomes.

What is the goal of feminism? I guess I see the objective now: to weaken that stereotype. It's unrealistic to silence the jeering comments - remember, all opinions are held and people will never stop being jerks - but it is realistic to change girls'  perception of themselves. They need to see a range of female role-models.

In fact, not even that - there should be less of a perception that female role-models and male role-models need to be separate things. Anything that people do professionally is a credible life for anyone who can do that thing. Girls need to see that for every "football hooligan" stereotype they could grow up to be, there are "scientists", "poets", "soldiers", and so on. You know; people.

Ok, this all seems nice. But there's one last question that just won't stop nagging me - is that kind of equality a realistic goal? We opened with a discussion about the fact that women are actually different from men. Doesn't that imply there are some jobs, some goals, that are genuinely appropriate/realistic for one gender but not for the other? Well, sure, there are a few obvious ones. Sperm donor, for example, or surrogate mother.

But that's not exactly an interesting example. What about those differences in weight, aggressiveness, height? Surely they count for something? Well, there's something to keep in mind there - those are averages. The tallest women are far taller than the average man. The smallest men are far smaller than the average women. If a job requires someone tall, it's going to exclude a whole bunch of men as well as a whole bunch of women. So that's hardly a cause for excluding all women.

If you read this far, thanks for sticking with me. I learned a lot in writing this essay; I hope you enjoyed it.

Friday, November 23, 2012

Guiding Star

If you open your heart and let the world in,
it can tell you who you are,
how to find true happiness,
and it will be your guiding star

It will tell you, keep your day job,
better buy a second car
you're gonna need that new shampoo
and folks respect a padded bra

Or in fact, you'll find the surgery
gives the best results by far
aren't you happy? we're all happy;
look, you can hardly see the scars


Thursday, April 26, 2012

Towords a modden spelling sistem

So far all the poasts on this blog have been about compleatly diffrent toppics. This entry will not chainge that pattern. :-)

We all no how riddickulously inconsistent Inglish spelling is. What woud the langwidge louk like if we chainged owr spelling to follo consistent rools, cairfouly chosen to maintain the current spelling of as many wurds as possible?

Well... probbably a little like this poast. Here I'm using a spelling sistem I dizzined. It's supposed to be a uniffied sistem for all inglish - not speciffic to a partickular regional dyalect. Hence, spellings are not 100% prissise.
The rools (in order of pressiddence) are:

  • 12 very common wurds - "a", "as", "is", "of", "have", "if", "all", "I", "the", "are", "to" and "you" - are unchainged.
  • "ow" is pronownced as in "cow".
  • "oo" is pronownced as in "boo".
  • "oi" and "oy" are pronownced as in "boy".
  • "ou" is pronownced as in "coud". (Tradishonnally spelled "could", of corse.)
  • "ai", "ay", or an "a" that's folloed by wun consonant then a vowel, sownds like the letter "a" - as in "mate".
    • When the next consonant is "r", this sownds like "hare" or "hair".
  • "ea", "ee", "ey", or an "e" that's folloed by wun consonant then a vowel, sownds like the letter "e" - as in "meat".
    • When the next consonant is "r", this sownds like "here" or "hear".
  • A "y", "ie", or an "i" that's folloed by wun consonant then a vowel, sownds like the letter "i" - as in "mite".
    • When the next consonant is "r", this sownds like "hire".
  • "oa" or an "o" that's folloed by wun consonant then a vowel, sownds like the letter "o" - as in "mote".
    • When the next consonant is "r", this sownds like "boar".
  • "ew" or a "u" that's follode by wun consonant then a vowel sownds like the letter "u" - as in "mute".
  • "a" is pronownced as in "pat".
    • When the next consonant is "r", and at the end of a word, it sownds like "car" or "bra".
  • "e" is pronownced as in "pet", exxept:
    • When the next consonant is "r", it sownds like "her".
    • If it's the oanly vowel in the wurd, it sownds like "me".
    • If a wurd (with mor than one vowel) ends with "e" or "ed", the "e" is silent.
  • "i" is pronownced as in "pit".
    • At the end of a word, it sounds like "pi".
  • "o" is pronownced as in "pot", exxept:
    • At at the end of a wurd, it sownds like "so".
    • If the next consonant is "r", it sownds like "cor".
  • "u" is pronownced as in "putt" (as in golf), exxept:.
    • When the next consonant is "r", it sownds like "cur".
  • "s" is pronownced as in "sip". It never sownds like "z".
  • A "c" that's folloawed by "e" or "i" is pronownced like "s" - as in "pace".
  • A "c" that's folloawed by enny uther letter is pronownced like "k", as in "cat".

Wun mor rool: any vowel sownd can opshonally be pronownced as a schwa - such as the "a" in "conga".
(This is a bit of a cheat to keep mor wurds unchainged, I admit, but it arguwabley cownts as a dyalect choice.)

The weerdist chainge is probbably the "ou" rool. Inglish spelling really duzzen't have a way to distingwish sownds like "coud" from "coot". It touk me a long time to fynd a convenshon that wurked for it. Fortunatley "ow" fits nicely into moast "ou" words, so "ou" coud fill in this gap.

So... how am I dooing at folloawing my oan rools?

Wednesday, December 21, 2011

A compile-time debugger?

Today, I've been thinking about templates: the second hardest bits of code to read in any given C++ program. (The very hardest, of course, would be the error messages that the templates generate.)

And, as is my tendency at such times, I've been thinking about how to do a better job in my programming language, Swym. All the cool languages are into type inference these days, and I'm keen for Swym to do it too - but I'm worried that global type inference (as opposed to local type inference like the "auto" keyword, which seems just fine) will lead inevitably to bad error messages.

In that sense, Haskell's type error messages and C++'s template error reports find themselves in a similar situation: there's a chain of types, and one end doesn't match the other. Somewhere along the chain, something went wrong, and we need to tell the user what happened.

C++ just spews out information about the whole chain, which gives you an unreadable a wall of error messages. Haskell's approach is to pick a place and tell you about it. All things considered, it picks fairly good places - but inevitably, there are times when it picks the wrong part of the program, and there's no way to get more information about what else it might have highlighted.

So I was thinking... well, really, we'd like the best of both worlds. Let the compiler tell me its best guess about where it went wrong, but somehow give me the option to explore further. A lot like a call stack in a debugger. "Wait, it thinks parameter x is an int? Where did it get that idea from?" (back out) "Oh, apparently f is returning an int now?" (drill into f)... etc.

This is a fascinating idea. Think about it - when your program crashes at runtime, you can attach your debugger and see exactly what was going on. Wouldn't it be nice to be able to explore the program state at compile time, in exactly the same way?

This supports some other ideas I've been toying with, too. In Lisp, you can write arbitrary code that runs at compile time. Why aren't there any tolerable languages that let me do that? (Sorry Lisp fans, I tried, but I really can't handle the parens). And if you're writing arbitrary code... well, if it crashes, what happens to the compile?

Clearly it's time to start writing a Swym debugger. One that can run at compile time AND run time. :-)

Monday, September 12, 2011

The Three Little Pigs (Reprise)

Last year I drew a little comic in pencil. It's secretly about programming.
I hadn't seen it for months, but this morning I found it among the stuff on my desk at work, and was charmed enough to colorize it and make it look slightly more professional.

Enjoy...

Monday, August 29, 2011

Wordsmith - a new puzzle RPG

I'm really stoked. I just made a first version of an awesome new game concept. I enclose a link to the current work-in-progress version below... but first I want to tell you about it.

Let me introduce the concept. Back in July, I was watching Word World with my daughter. It's a TV show that teaches children to read. Every object and character in the show is visibly constructed out of the letters in its name, and the plot typically involves breaking a word-object into its component letters, and using those letters to build something else.

And it slowly dawned on me... what an awesome game concept! Specifically, an RPG in which, when you kill a monster, you don't receive random loot or experience points... instead, the animal just breaks apart into the letters of its name, which you can collect.

Then, you'd use these letters to build things you need. Instead of "levelling up", or buying weapons from shops, you get more powerful in the game by simply typing yourself a more powerful weapon.

And when you're injured, heal yourself by creating food, or medicine. Just spell "stew" or "balm" or whatever you've got the letters for.

So I thought it over for a few days, following that same kind of logic. Honestly, I have never felt more strongly that a game was designing itself for me. Everything just seemed obvious: oh, obviously when you type "wings", you can put them on and fly around. Sure.

The name of the game was actually one of the last things to fall into place. I dithered about it for a long time... World of Wordcraft? (hard to pronounce). Spellsword (= spells-word... Too cute.) Super Letters RPG? (clumsy).

But I think I found the right name in the end. The game is simply called... Wordsmith.

Of course, the elephant in the room here is the DS game Scribblenauts. In a sense, Wordsmith could be considered very similar to Scribblenauts - you write what you need, and use it to solve puzzles.

However, although superficially similar, the restriction about having to collect letters before you use them makes a huge difference. Figuring out what needs to be done in Wordsmith is usually pretty straightforward. In other words, the challenge is not "what do I have to create?", but rather "how do I get the letters to create that?".

There's another big difference, too: the perspective. The characters in Scribblenauts inhabit a vertical 2D platform game world, all subject to the whims of the physics engine. Wordsmith, on the other hand, looks like a fairly traditional, retro, top-down tile-based RPG.

Hopefully, this means that one of the biggest problems cited in Scribblenauts reviews - the awkward controls - should be silently fixed.

Well, I'll let you decide. Link to the current version:
http://www.mediafire.com/?u79c62j9d8k9one
(That's a zip file containing a self-installing XNA executable. This only runs on PC at the moment, I'm afraid.)

Please give it a try, and leave me a comment - either here, or on Reddit. I'm really interested to know how hard the puzzles are, and which of the multiple solutions you've found.

The controls are pretty simple - Click in places to move, click on objects to interact with them. For example, click on a creature to attack it. Type a word (if you have enough letters), and press Enter to see the object you've created. Then click somewhere to place it, or right click to cancel.

If you're not sure what you're supposed to be doing - your first objective is to get off the little island.

One final note - I'm following a Minecraft style, very open development model here: releasing early and often. What you see here is really early - about three weeks of work. In particular, (unsurprisingly), three weeks has not really been enough time to create every word in the english language! This version understands roughly 300 words, and I'm adding more every day; so if a word you wanted to write was unsupported, please let me know! It will almost certainly be one of the next things I add.