Tuesday, April 11, 2006

I Hate Hungrian Notation

I hate Hungarian Notation. It's true. I'm willing to stand behind this one. When I'm reading code, the alphabet soup at the start of the variable names just slows me down. Moreover, it's often misleading. Take, this example from a real piece of code:


string m_pcResourceName;


Now, please correct me if I'm wrong, but I believe that notation is saying that the variable is a char*. But it's not. It's a std::string. While std::string and char* are used for effectively the same things -- storing string values -- their usage is completely different.

Now, you can say that this is just the bad habits of one person -- that he should've called it m_strResourceName, or some such. But how do you know what string library he's referring to. Heck, traditional Hungarian Notation insists on using an "o" in front of all objects. But, that's not meaningful or useful. The problem is, when you are doing object-oriented programming, your world is full of new types. A full game project could have hundreds of types. Do you call them all "o"? Or are you going to come up with some clever acronym for every single type in the entire project? And will everyone remember what the heck all those acronyms mean?

Variables should always be named very clearly, in a way that makes their purpose readily transparent. In the event that I need to know the exact type of a variable, there happens to be a very good, authoritative place to find out: The variable declaration. It is always right and meaningful, unlike Hungarian Notation.

Old Comments

Wednesday, February 22, 2006

Ten Things I Hate About Visual Studio 7.1

1.) When I try to attach to and debug an already running process, it often mysteriously crashes.

2.) It occasionally just starts ignoring all breakpoints, for no apparent reason, and the only way I have found to fix the problem is to restart Visual Studio.

3.) If you place a breakpoint in one file, and just happen to have another file with the same name, it often triggers the breakpoint on the other file, instead of the one you requested.

4.) Sometimes, it decides that it can't write out a new binary file, because the old one was in use. However, the only thing that was using it was Visual Studio, and the only way to fix this is to restart Visual Studio.

5.) Updating your project/solution files from your version control system while Visual Studio is still open sometimes results in the updates not actually happening correctly.

6.) It makes terrible use of screen real estate. Why can't I look at two source files side-by side?

7.) It habitually forgets the working directory for projects.

8.) Searching the source code in one solution, it might find a string I'm looking for in five minutes. If I'm lucky.

9.) It constantly reports that it has successfully built N projects where N is the total number of projects in your solution. Yet, when you go to run an executable associated with one of the minor projects, it tells you some of the files have changed, and they need to be rebuilt. Why couldn't it have told the truth, the first time?

10.) Whenever it feels the least bit busy with anything, the user interface becomes completely unresponsive. Whatever I'm trying to do is probably more important than whatever it's cogitating about, but it doesn't care. Heck, I might be trying to CANCEL whatever it's doing, but well, that's just too bad.

What are your pet peeves?

Old Comments

Thursday, February 16, 2006

Lack of Perspective

In Australia, any 15-year-old can buy games where they beat people up, shoot people, violate all manner of road laws, sell drugs, and heaven knows what else, but graffiti -- that's the scourge of civilization:

Australia First to Ban Graffiti Game

Now, this may come as a shock to some of the folks in the US who have quietly assumed that all the graffiti in their cities was the work of certain ethnic minorities prevalent in North America, but I can assure you that there is a hell of a lot of graffiti in Australia. It is, indeed, a problem here. I see graffiti in neighbourhoods I would never expect to see it in -- neighbourhoods where one would otherwise feel completely safe walking at night.

I'm from Washington, DC. I remember Cool "Disco" Dan. I remember Surrender Dorothy. We always had graffiti around us. My elementary school had to sandblast it off. Nonetheless, I'll tell you, there's a lot of graffiti here in Sydney. I'm simply shocked at the amount of graffiti on the trains, sometimes. No, I'm not just shocked. I'm angry. I feel bad for the poor shopkeepers who have to stay late to repaint their walls. Nobody is paying them for that. They'd rather be home with their kids. I want to grab the kids that mark up the trains, and yell at them, "WHAT THE HELL IS WRONG WITH YOU, YOU IDIOT? NONE OF US CARE ABOUT YOUR STUPID, MEANINGLESS BULLSHIT TAG."

But in spite of all this, I can't, for a moment, see any reason to ban a graffiti game. It doesn't make any sense that you can buy games where you kill people, but not games where you spray graffiti. Why is spraying virtual graffiti more harmful than killing virtual people? I'd honestly rather taggers were inside, playing video games, than outside, scribbling incoherent, pointless nonsense on my front gate.

Really, there are three separate issues that trouble me, with respect to this:

1.) There is a double standard between movies and games. If this were a movie, rather than a game, it would not have been banned.

2.) The reaction to this game has been wildly out of proportion with its danger. Playing this game will not make anyone a graffiti artist any more than playing hours of "The Movies" has made me into a movie mogul.

3.) Australia desperately needs an R18+ rating for games. They have historically had to deny classification to numerous games, because they have no equivalent to the ESRB M and AO ratings. It's not possible to sell a game in Australia, if it is deemed inappropriate for fifteen-year-olds to play. This is not only bad because it causes some games to be effectively banned, but also because there are games available to all fifteen year olds that were originally designed with mature audiences in mind (since the alternative would have been banning them). The lack of an R18+ rating really isn't helping or protecting anybody.

Wednesday, October 26, 2005

Gamers or Game Developers

My laptop brick is completely dead, and thus, I am without a computer. Sadly, the brick in question is nowhere to be found in Australia, so I am waiting for it to arrive from the US. I am, as one might imagine, going completely insane. Also, because I do not like posting to pixelsea during business hours, my posts are a bit thin. I do apologize, and I promise some good, meaty posts when everything is back in working order.

In the meantime, I couldn't resist bringing up a particular pet peeve of mine, because I just saw it rear its ugly head, once again.

Please, please, please don't ever call game developers "gamers" when talking to the media. Yes, I know, "game developer" may be a long, cumbersome thing to say or type. I, as a game developer, will understand, from context, what you mean when you use the term "gamer," in place of "game developer." However, I guarantee you the mainstream media will conflate the two and/or will report about it in such a way as to confuse the public.

It has gotten so bad that when I see any headline about "gamers" earning money, I don't know whether it's going to be an article about professional game developers or professional game players (two very different things). You wouldn't say that "patients" were gathering at a medical conference, would you? Yes, certainly, all those doctors ARE somebody's patient, but that's not the capacity in which they're gathering. Yes, most of us game developers are gamers, but that's not the capacity in which we conduct business.

The same holds true for "gaming." We game developers don't earn money by gaming. Or, at least, I sure as hell don't. That is strictly the domain of professional gamers. Game developers earn money by making games. We should only say that someone is "studying gaming," if they are, in fact, studying the act, nature, psychology, or characteristics of gaming -- not studying game development. While some amount of studying gaming may be useful for game developers, the disciplines are not the same thing.

The 2001 Wired Article, Gaming: Too Cool For School? is a complete train wreck, with respect to this. Consider this quote:

"One gaming company head was enthusiastic about the program."

When I hear "gaming company," I think "gold farmers." Language, people!

Old Comments

Monday, October 10, 2005

Six letter word and starts with "P"

In his latest diatribe to politicians, Jack Thompson said, "The best entity, then, to determine whether a video game is harmful to a minor, by virtue of its sexual and/or violent content, is a jury."

WRONG. The best entity to determine whether a video game is harmful to a minor, by virtue of its sexual and/or violent content, is a parent. Sorry, Jack, your ulterior motives are showing.

But, pointing out what's wrong with Thompson is merely raising a small voice in a very large chorus, at this point, so I really shouldn't waste the keystrokes.

I swear, I have a longer post coming. I just haven't had a moment to collect it.

Old Comments

Wednesday, October 05, 2005

Verb: Acquire

So, Autodesk has bought Alias. Imagine, for a moment, if Coke bought Pepsi. That's what we're talking about here. Sure, there's Fanta and Softimage out there. You've got RC Cola and Lightwave. You've got Ramune and TrueSpace. You've got Jones and Milkshape. You've got that hippie stuff they sell at the organic food store and Blender. There's other stuff. But, we're talking about the big two.

It makes me vaguely uncomfortable.

My favorite question from the acquisition FAQ:

"Are there areas of duplication in Autodesk’s and Alias’ product lines?"

Gee, ya think?

Old Comments

Wednesday, September 28, 2005

Manifesto

I would like to congratulate Greg Costikyan and Dr. Johnny Wilson for their new venture, Manifesto Games. I have a lot of respect for people who are willing to put their money where their mouths are. I applaud their pioneering spirit, and wish them the very best.