[comp.society] programming and gender

taylor@hplabs.HP.COM (Dave Taylor) (06/17/87)

[The following article is from Dan Flak and appeared in the Usenet 
newsgroup `soc.women']

I have this weird idea (about 50% of my ideas fall in this category)
Could a psychologist trained in computer programming use another
person's program as a psychoanalitical tool? (Sounds like a neat theme
for a master's thesis).

As an engineering student, I took a *whole* semester of philosophy, and
as a subset of the course we dabbled in psych. (You know, Freud, "a
thing is a phallic symbol if it's longer than it's wide").

It's really interesting to inherit other people's code and see how they
approach a particular problem. Computer languages, unlike human
languages, have a limited vocabulary and are totally unambiguous. When
a programmer writes a program, (s)he must solve a problem staying
within a very narrowly defined set of rules. Within these bounds, the
programmer is limited only by knowledge, imagination and ingenuity.

I've inherited code from both male and female programmers, and there
*is* a difference. The men tended to write "flashier" (C) code. That
is, why use 5 statements when one will do. The women tended to be more
explicit.  I've found the women's code easier to work with. (Do I think
like a woman?).  I'm all for "compacting" things when it means the
program runs faster, but in many cases, the compiler will produce the
same code if it uses 4 lines or one. The only difference is that the 4
line version is easier for the human to read and maintain (it's easier
to slip in extra statements later).

I've also found that the women tended to be more detailed in their
work.  They used more comment statements, and tested for more
"exceptional" cases.  On the other hand, the men seemed to write more
"high performance" code.  (It ran faster, and compiled into smaller
object code).

The men's projects were typically "internal" (things that the user
never actually sees on the screen) while the women's projects were more
oriented towards the user interface.

Now to "muddy" the gender issue. All of the "male" code I looked at was
written by CS Majors. Two of the three "female" codes that I looked at
were written by engineers. I am an engineer, perhaps the difference is
really due to the difference in education instead of gender. For those
of you who know C, given a equal choice between using an array or
pointers, the women usually chose arrays (FORTRAN uses them, engineers
use FORTRAN, therefore ...). The CS types tended to think pointers
first.  Engineers think of for loops before while loops, etc... Enough
of the technical differences.

Other than that there really is a wealth of information into how a
person thinks based on the code (s)he writes. Some of it is convoluted
spaghetti, some of it is simply wasteful, and some, nearly poetry. I
imagine a properly trained person could tell who had the uptight anal
stage, and who had a terrible ordeal during the Oedipal stage by
looking at code.  My analysis, by comparison must be primitive. (My
physchology is at the "See spot. See spot run" stage. Unfortunately, I
think most psychologists are at the same stage with computer
programming).

OK, flame away. When one makes statements as broad and as general as
the ones I presented above, comments of all sorts are possible. I'll
leave the general question, "Do men and women think differently?"
alone.  (Personally, I think they do). I'll ask a more cautious
question instead, "Do the differences (IF ANY) in thinking between men
and women show up in the way they write programs?"

Not exactly a great social issue, but it amuses me nonetheless.
- -

tomr@drilex.UUCP (Tom Revay) (06/30/87)

You bring up some interesting points.  First of all, some qualifications:  I
have been very close to a woman engineer for about seven years now, and I'm
a CS major myself.  I've noticed some fundimental differences between us on
programming, and I tend to attribute them more to our educational and
professional backgrounds, rather than our genders.  You observe, correctly
in my mind, that engineers have different approaches than programmers.  In
the case of my friend, I was surprised at her use of what I considered 
"inelegant" code, when she was learning Pascal a few years ago.  I felt that
her formatting was poor, her grasp of programming and data structures was
sketchy, and her understanding of Booleans ... well, one way NOT to use
them is to say IF sentinel = TRUE THEN dosomething; ... you get the idea.

But where was she coming from?  Fortran 77!  Now, I must admit a prejudice
here, after having a terrific Compiler teacher from Wang Labs (a PL/M
junkie), who referred to Fortran as "one of the dead tongues ...."  So
her inability to write Pascal might be attributable to her exposure to
some of the ancient customs of a forgotten time ....

Anyway ... the differences you observe seem more likely to have arisen from
education and profession, rather than gender.  And as for psychology (and
this oughta throw some gasoline on the flames ...) -- psychology provides
some explanations for some people.  It helps some folks get a handle on
the world.  And some people feel more in control of their lives after they
read their morning horoscope.  And some people go to palm readers.  And
some do tarot ....
......................Tom Revay

eravin@dasys1.UUCP (Ed Ravin) (06/30/87)

With regard to the male vs. female computer programming style discussion...

I spent two years of my college life grading students programs at the
State University at Albany, and I remember observing some of the
male/female differences in programming style.  The biggest difference
was neatness and comments: the men often wrote programs that looked
like a tornado had gone through (badly spelt and inconsistent
comments, varying case (this was Pascal, so it didn't matter), etc),
while the women almost never did this (the work looked like it had
been proofread at least once and there were almost always halfway
decent comments).

One possibility is that the women were being more conscientious and
attentive to the course requirements, either because they were better
motivated or had less experience on computers than the men did and
therefore less bad habits.  Another viewpoint might be that they were
paying more attention and working harder because they needed to offset
the disadvantage of studying in a field where our culture
traditionally discourages women from pursuing (like chess or just about
any "hard" science).

All of the programs were done by computer science students, most of
them majors.  (which is a more consistent sample than the one described
in the original article)

However, when I got into the "real" world, at my first job, none of
the women programmers exhibited any of those characteristics.  These
were all women who had been working in the field for at least three
years.  Some of them weren't neat at all, some wrote cryptic code
doing ten things at once, some hardly bothered with comments.  Others
were paragon programmers, who wrote the cleanest and most reliable
code in the entire company.  When digging into other people's code I
saw none of the "gender-specific" stuff described above (and in DT's
article).

So maybe the "difference" is really just in one's background, and
disappears as soon as the women "catch up" in experience and
expertise.  This could be contrasted with the writing styles of
science fiction authors, where the women for the most part write
differently from the men, the more experienced women even more so.

Disclaimer: this is all exceedingly unscientific, and like much of
human communication, may be nothing but an exercise in making the
world fit in with one's preconceived notions.  Other people's viewoints,
responses or flames welcome.

- -
Ed Ravin                                  eravin@dasys1.uucp

eugene@pioneer.arpa (Eugene Miya N.) (07/07/87)

I am just catching up on some interesting reading.  Separating out the
other cultural effects would be tough, but I think you can do it.  I
suggested in a letter to the original author to contact a friend who is
a psychology prof (interested in these types of studies: learning
programming and separately, gender stuff).  In addition, you might also
look at other backgrounds.  Until recently, it was known that software
work was held in high regard in Japan, in fact considered `woman's work.'
You might also perform some cross-cultural studies as well.

from the Rock of Ages Home for Retired Hackers:

 --eugene miya 		NASA Ames Research Center