Tuesday, July 29, 2008
The Next Step in Computing Surfaces
If you have several people working at the same Surface, somebody's going to be sitting in what pretty much amounts to a "Master Control" spot, while others may end up getting upside down views of the current data. Or, if everyone can see a right-side-up view of their data, then things could get pretty darned jumbled looking.
The solution?
Why, use a sphere instead of a plane!
And that's exactly what Microsoft is working on. The obvious applications involve mapping, but even being able to send data to the "other side" of the sphere to make collaboration a bit easier on the eyes is pretty appealing. I'm sure there are some other innovative interfaces possible to make certain tasks easier with this new sphere surface; we just need some ultra-creative folks to think of them.
Monday, July 28, 2008
Women and the Quality of Code
A good way to stir up some controversy is to bring up possible differences between the way men and women write code. Add to it a tone that suggests that women write better code, and you’ll really get people talking. Is there something to it? Would you really be able to tell the difference between male and female code, and could you really say that one is better than the other?
Programming computer applications involves writing multiple lines of instructions that will be turned into something a computer can understand. When writing these instructions, or code, a programmer can also add extra information that the computer will ignore, called comments. To get a bit of an idea of what code is all about, go to ‘View, Page Source’ on your browser to see what a web page really looks like. When we ask about the differences between code that men and women write, we are talking about what instructions are used, what style is used to write them, and what kinds of comments are included.
A story was recently featured on Slashdot, a news website geared towards nerds like us, called Men Write Code from Mars, Women Write More Helpful Code from Venus – I think you’ll probably agree that even the title sets the ‘women are better’ tone! This article describes how “Emma McGrattan, the senior vice-president of engineering for computer-database company Ingres – and one of Silicon Valley’s highest-ranking female programmers – insists that men and women write code differently.”
Apparently, McGrattan believes that women’s code tends to include more useful comments than men’s. She says that women use comments to explain what they were thinking when writing their code so it is easy to understand by programmers that haven’t seen it before. On the other hand, she suggests that men actually try to make their code more cryptic, with fewer useful comments, in an effort to show how clever they are. To help fix this problem, she set up rules and standards for Ingres programmers to follow, forcing everyone to document their code, and any changes they made to other peoples’ code, with detailed comments.
The comments section back at Slashdot has some interesting reaction. One reader says:
It’s now well established that the human brain builds negative stereotypes more easily than positive ones and that people see what they are expecting and apply a double standard. This person sees what she wants to see.
Another points out:
Personality is complex, not binary. I know many girls that code beautifully, and many more that can not code at all.
The general theme throughout the comments is that men and women do think differently, but that neither writes better code than the other, nor could you really tell the difference arbitrarily.
Interestingly, there seems to be a good selection of research trying to determine whether men and women write English compositions differently. One study concludes that “there are indeed different strategies employed by men and women in setting forth information and especially in encoding the relation between writer and reader in texts.” In other words, there are apparently several indicators that can help decide fairly reliably whether a text was written by a male or female, such as the number of personal pronouns (I, we, you) used in place of noun specifiers (much, some). Could this difference extend to how men and women write code, too?
From my own job experience in two different companies, I can say that I was very careful to write useful comments, and was even complimented for it. While some of the guys did occasionally forget to add in the same kind of detailed comments that McGrattan is asking for, many of them wrote just as many comments as I did. On the flip side, some of the girls I worked with barely wrote any at all! In my case, it really did seem to depend on the person, not the gender.
So what’s the answer to the question of whether women write better code than men? And is it possible to tell the difference between women’s and men’s code just by looking at it? There may be some noticeable trends like those found in English composition, but this has yet to be scientifically studied as far as I know. Besides, until women make up a little closer to half of the programming workforce, how can we do a fair comparison? I think we’ll have to mark this one down as inconclusive for now, though I’m leaning toward a no for the part about women writing better code. What do you think?
Friday, July 25, 2008
Geek Dating
Let's have a dreamy flashback for a moment. In high school, I knew I wanted to do something with computers afterward, but wasn't sure exactly what. I had always had my own computer in my room (thanks to my dad and the government's surplus of machines). I toyed around with layout, graphics and design software, right back to the good old days of Print Shop. I wanted to know how these things worked "behind the screen". Computer science or software engineering were looking pretty good.
In Grade 11, I met Andrew. He was into computers, too. In fact, he seemed to already know about programming and networking. He was planning on going to Algonquin College for a computer science diploma program. Turns out he was able to inspire me and help me figure out which program I should take. As the time drew nearer for me to embark on that post secondary journey, he helped give me the confidence to dive into a subject (i.e. programming) I never had time for in high school.
And here we are, all those years later, happily married and both still geeks!
It may be true that doing the exact same thing might incite competition between two people, and could be bad for a relationship. Luckily for us, even though we are both computer science geeks, we are different enough in the field to avoid this problem. He works in industry and is more about learning about different technologies and understanding systems, while I'm still in school and enjoy working with algorithms and visual stuff.
But I have to say, there's nothing better than being able to come home from a long day, and be able to complain about with the other person understanding what the heck you are talking about!
And just for fun, I leave you with a classic Craig's List post: Why Geeks and Nerds Are Worth It.
Celebrating One Hundred
Saturday, July 19, 2008
Artificial Intelligence in Animation
If you didn't see the movie on that page yet, take a few minutes to watch it in its entirety. It's both amazing and amusing to see how researchers have used evolution to teach a stick man how to react to various stimulus (such as being pushed over).
The first results show the stick man learning to walk, and the first attempts are just plain hilarious. Many face plants ensue. But after several generations, things start to improve, and finally the stick man can walk in a straight line, more or less like you and I.
Next, the stick man was shown to wobble and brace himself for a hard landing after being pushed from the side. It was amazing how natural it looked. I don't think it would be possible to spend enough time animating this behaviour by hand and have it look as real, though perhaps a pricey motion capture system could do the trick.
Finally, on a whim, they decided to see how well their technology would work for a famous stunt that has James Bond jump off a dam and get caught by a bungee on the way down. The animated version performed very well! This means that dangerous and expensive stunts may be replaced by animations that look just as natural.
This kind of technology could be applied to everything from big film productions to video games to medical simulation. That last one piqued my interest. Apparently one of the upcoming projects was to give software to surgeons who could then using the walking stick man to predict the outcome of surgery performed on, say, children with cerebral palsy.