Follow Slashdot stories on Twitter

 



Forgot your password?
typodupeerror
×
Programming IT Technology

Do Women Write Better Code? 847

JCWDenton writes "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. Women are more touchy-feely and considerate of those who will use the code later, she says. They'll intersperse their code ... with helpful comments and directions, explaining why they wrote the lines the way they did and exactly how they did it. The code becomes a type of 'roadmap' for others who might want to alter it or add to it later, says McGrattan, a native of Ireland who has been with Ingres since 1992. Men, on the other hand, have no such pretenses. Often, 'they try to show how clever they are by writing very cryptic code,' she tells the Business Technology Blog. 'They try to obfuscate things in the code,' and don't leave clear directions for people using it later. "
This discussion has been archived. No new comments can be posted.

Do Women Write Better Code?

Comments Filter:
  • That's not why! (Score:3, Interesting)

    by 91degrees ( 207121 ) on Monday June 16, 2008 @08:40AM (#23808935) Journal
    Often, "they try to show how clever they are by writing very cryptic code," she tells the Business Technology Blog.

    Yeah... the advice to add comments explaining why and how is good, but how about you stop telling us what we're thinking and what our motivations are. If I do do something "clever", I'll sure as hell make it clear how it works and why I did it. And the reason for it is because it's the best way to do things. I don't have to prove anything.
  • Not my experience (Score:5, Interesting)

    by Hyppy ( 74366 ) on Monday June 16, 2008 @08:41AM (#23808949)
    I know the plural of "anecdote" is not "data", but in my experiences this is far from true. I have found female coders in my jobs to be downright malevolent in their coding. All women I have worked with that write any sort of code obfuscate the hell out of it, document absolutely nothing, and will barely explain how to even use their product. If everything is not run "their way", then it seems like armageddon.

    Case in point. We have a coder who wrote an application for our office. Because of the fact that she refused to use any variable for the Program Files folder (hard coded as "c:\Program Files\") and she insisted that all workstations need a D: partition (to hold a 100kb support file), we had to rebuild 4 servers.

    Say what you will about women coders being "touchy feely." I won't fall for it, any more than the NOW propoganda that all women are natural caring mothers, even the coked out alcoholics.
  • Ingres needs help (Score:1, Interesting)

    by Anonymous Coward on Monday June 16, 2008 @08:44AM (#23808983)
    Sounds like they need some real R&D management and processes. I have worked with both male and female programmers for 25 years and they both write code in the style required by the company, period. Maybe people sitting in a basement somewhere write code differently, certainly there is *some* 'freelance' coding going on in smaller companies (vast generalization) but when it comes to application code written by large companies, any R&D manager worth their salt is going to put a stop to people writing code in a questionable style and/or not putting in sufficient comments.
  • by Hyppy ( 74366 ) on Monday June 16, 2008 @08:51AM (#23809075)
    Because if the Wall Street Journal put ANY story out that even insinuated that women were less than the epitome of all that is good and right in the world, their offices would be firebombed.
  • Gender differences (Score:5, Interesting)

    by Sobrique ( 543255 ) on Monday June 16, 2008 @08:56AM (#23809147) Homepage
    Women and men do tend to think differently.

    Not worse, nor better really, just ... different

    So yes, I can see women writing 'better' code, but I still think that's more likely to be a matter of training and discipline, as much as anything else. Or perhaps the 'female geek' effect - in a word where you'll be faced with massive prejudice and pressure, the 'female techy' is typically (and yes, I realise this is a broad generalisation) even more hardcore than male counterparts - simply because she's there because she _really_ wants to, and has had to face a lot of uphill struggle to get there. This seems to hold true in petrolhead circles too (see, I can do car analogies too) - the few 'girl racers' I've met, have extremely extreme car mods, and rigs, because they're competing against everyone else _and_ the gender stereotype.

  • by kurisuto ( 165784 ) on Monday June 16, 2008 @08:59AM (#23809177) Homepage

    As an additional dimension to this question:

    I'm a gay man, and I've been told that my code is unusually clear. I think of my code as a letter that I'm writing to the next person who has to work with it. (Frankly, I consider clarity in code to be a measure of the competence of the programmer.)

    Obviously, a pattern can't be drawn from one individual. However, if there's any validity to the claim about a difference in coding styles between the male and female populations, I wonder whether gay men tend to pattern one way or the other.
  • by stewbacca ( 1033764 ) on Monday June 16, 2008 @09:00AM (#23809199)

    "They try to obfuscate things in the code, and don't leave clear directions for people using it later."
    Excuse me? "Try to?" Like, it's on purpose?
    I'll buy the article's premise, because I see it at work every day. I'm a little more cynical, because I get to hear the "defense" of obscure (i.e., passive-aggressive) code writing practices in meetings. I can't go a day without hearing some sort of gripe from the programmer about how unfair work is, or how under-appreciated, overworked they are, or how unrealistic the demands are. Their response is a natural one...stick it to the man by imbedding self-preserving code.
  • by Anonymous Coward on Monday June 16, 2008 @09:01AM (#23809229)
    The only thing I've noticed between the two is females tends to use more descriptive and longer variables names.

    Male:
    int iBlobPermBF;

    Female:
    int iBinaryBitFieldForPermissions;
  • pseudo psychology (Score:1, Interesting)

    by soulfury ( 1229120 ) on Monday June 16, 2008 @09:03AM (#23809257)
    I have my own crack theory. :) In the I.T. field, men greatly outnumber women. The women that decide to work on I.T. are usually intuitive thinkers that don't easily get pressured into accepting the gender roles assigned to them by society (i.e., programming is a man's job).

    In general, sensate thinkers (ST) greatly outnumber intuitive thinkers (NT). When someone thinks of "male programmers", they are actually thinking of "male ST programmers" that like to show how clever they are by writing cryptic code.

    The NT programmers that I've worked with try to show off by explaining the concepts behind the code through comments and diagrams, which is often a good thing.
  • Think differently? (Score:4, Interesting)

    by foxtrot ( 14140 ) on Monday June 16, 2008 @09:17AM (#23809445)
    Sure, men and women think differently, but perhaps the answer is even simpler. Look around your average IT shop, and it's pretty plain that there are a lot more men there than there are women.

    Perhaps it's just that for men, IT's a reasonable and expected field to go into, but for women, it's not as much, so a woman going into IT is much more likely to be well-suited for it and better at it?

    It might have very little to do at all with the difference in thought processes between men and women.
  • by Anonymous Coward on Monday June 16, 2008 @09:19AM (#23809471)
    First, Perl is not an acronym, see the FAQ. Second, there have been studies [JFGI] that show that women give directions differently. Men use spatial reasoning (go north 5 miles), women use procedural methods (turn right at the bargain outlet).
  • by wtfispcloadletter ( 1303253 ) on Monday June 16, 2008 @09:38AM (#23809731)
    I've seen 1, ever, a DB programmer, she was supposedly good. Heard of a few others through the grapevine, but only heard of them because how utterly useless and cruddy their code was. Just like I've heard of a few male programmers that I've never met. The phrase "complete rewrite" kept coming up from my associates after they (females and males) were canned.

    Oh, wait, I have met a few others. They were no longer coding, they somehow had left the field and had a change of careers (working minimum wage jobs through a contract agency...) Actually, no different than after the big dotcom bubble pop and I met several (male) "network admins" who were (and still are, 7? years later) driving delivery truck. Seems they can't find a job in their field of choice again. I think the companies were looking for any excuse to let them go as these guys were from some very large manufacturing companies that really weren't effected by the dotpop.

    Seriously, how many women, percentage wise compared to men, are in the field? How can they come up with some stat that says women are better programmers if you've got (pulling number out of air) 1 woman to every 1000 men in the field? How about a statement like "a percentage of women who become programmers and are successful at it (as in my experience a lot are not, but that's no different than men), tend to be better programmers than men"
  • This brings me back to my first post college job. It was 1991 and the guy sitting next to me had a picture of Paula Abdul as his desktop background. Someone complained to HR and he was asked to remove it.

    At the same time my boss who was also his boss had an anatomical poster "Penises of the Animal Kingdom" on her wall with to scale anatomical drawings of about 10 different species penises - including homo sapien. HR never asked her to remove it, and she was in a position of authority.

    Never really bothered me, but did show me that sexism and sexual harassment rules are applied differently to men than to women.
  • Code Janitor (Score:4, Interesting)

    by kcdoodle ( 754976 ) on Monday June 16, 2008 @09:59AM (#23810001)
    I have cleaned up and maintained programs from literally hundreds of other programmers.

    I have not noticed any sexual bias for bad code. Some people have it and some people do not. I see tons of unneeded and often unused variable with poor names. Databases with numeric fields where text should be and vice versa. Platform or vendor specific techniques where generic ones will do just as well.

    Oh yeah, I have seen the deliberate obfuscation. (Ranjeev Dolas where are you?) Splicing assembly code into a 4GL Informix program to make it say "Is the third octet = 192?". It is not hard to see when people have deliberately made things hard for others to figure out, probably all for job security.

    Me on the other hand, I know that I will probably be the fool that has to come back to this code later and fix it again. So I add comments to the things I can figure out and even to the things I cannot. Put comments and dates around my fixes. After a while the code starts to look like my own.

    My poor code comes from my throw-away programs. The kind you write once to solve a problem today. You run the code once and never expect to touch the code again. Except next month, a really similar tool is needed. Now I go back to my old code, if I can find it, and OMG it looks like a freaking third grade did it with construction paper and crayons. This is my biggest downfall.
  • by Anonymous Coward on Monday June 16, 2008 @10:01AM (#23810029)
    You have something against taxidermists?

    Yeah, that was too much, even for me, definitely gonna go AC.
  • by natoochtoniket ( 763630 ) on Monday June 16, 2008 @10:14AM (#23810203)

    Men really do think differently than women. Numerous studies of brain activity, using CAT and similar scanners, find that different areas of the brain are active during similar tasks. Just this week, another study was published showing that the brain activity in gay men is very similar to straight women, and that the activity in lesbian women is similar to straight men, and that brain activity in straight men is very different from straight women.

    I work in a system of several million LOC, with a hundred different authors over the course of two decades. I know all of the developers, and I see the difference in the code all the time. Code written by women or gay men is much easier to read, and rarely requires maintenance to fix bugs. Code written by straight men is often uncommented, difficult to read, and requires frequent maintenance to fix bugs. (I don't think we have had any lesbian programmers.) The maintenance frequency shows up very strongly in the reports from the revision control system.

    I try to make my code beautiful and clear, in addition to being correct. And verifiable theoretical correctness is better than just passing the test case. The straight men I work with don't seem to be concerned with aesthetic values or theoretical correctness. They just want it to work for the immediate test case. Then they have to work on it again, to fix bugs, usually ten or more times in the first year that the module exists.

    If frequency of repair (bug fixes) is an indication of quality, straight women and gay men produce higher quality code, and the numbers prove it. It really is quicker to do it right once than to rush and then fix it later. But, to do so seems to require a different way of thinking.

    Perhaps we should go out of our way to recruit women and gay men.

  • by COMON$ ( 806135 ) * on Monday June 16, 2008 @10:26AM (#23810401) Journal
    You are making an odd comparison here. The gen of dotcom grads werent necessarily computer people. They were people who saw a wave and tried to ride it. Back in those days the suits were grabbing anyone who was even remotely connected to technology and making them admins for code and networks. Some of these people fooled administration and stayed on as IT people, graduated to management before anyone noticed that they had no skill whatsoever.

    As for female programmers, I was a CS tutor at my university growing up and I can state from experience that any female that was able to make it through CS 101 was a much better programmer than their male counterparts on average. Unfortunately these females were all on the education path so they didn't go into dev work.

    Interesting sidenote; the females that didn't make it did cry a lot more but would forge on, the guys just threw hissy fits when they couldn't get concepts and drop the class. Maybe there is a bit to the female capacity to persevere and the male stubbornness :)

  • by b4dc0d3r ( 1268512 ) on Monday June 16, 2008 @10:30AM (#23810451)
    For the same reason, try to name a famous flautist (one who plays the flute). If you managed to do that, now try to name a famous female flautist. Chances are you can't think of one - even though well over 95% of flute players in middle / high school band classes are female.

    It's not guaranteed obviously, but there are data points to support some correlation.
  • by Simonetta ( 207550 ) on Monday June 16, 2008 @10:47AM (#23810643)
    I have not the slightest doubt that your experience is completely true.
        I had an experience like this at Hewlett-Packard in Camas, WA in 1993. I was assigned to tear apart fully-assembled printers so that the parts could be used for prototypes of the next generation. I worked alone in a room filled with printers. No one had access to this room except from me and my (supposedly) male boss.
        After a few weeks, I put a close-up picture of Claudia Schiffer on the PC's wallpaper. My boss saw it and flipped out. He ordered me to remove it immediately. I said that I liked it and that no one could be offended because no one had access to the room.
        A day later I was fired from Hewlett-Packard for 'creating an environment conducive to sexual harassment'. I couldn't get unemployment benefits.
        To this day I hate H-P and I don't believe anything anyone says about it being an advanced or great company. I will never sign off a purchase order for any of their products for any company that I work for. I suspect that most of the so-called great companies in the electronics/computer industry are the same way.
  • by bberens ( 965711 ) on Monday June 16, 2008 @11:05AM (#23810923)
    You neglected to mention the quality of code which comes from the women in your group. You did mention that the CEO was a woman in a way that a reader might assume indicates that the only reason you have women coders is because you have a woman CEO. At the shop I work in, we have one woman coder on staff and currently one woman contractor. Both of them write code which seems to be on par with the rest of the staff. I do agree with the comments in the summary though, whenever we get a 'hotshot' programmer in here it seems like they try to make the most complicated solutions to simple problems.
  • by gad_zuki! ( 70830 ) on Monday June 16, 2008 @11:41AM (#23811387)
    >Men use spatial reasoning (go north 5 miles), women use procedural methods (turn right at the bargain outlet).

    How much of that is social? I would think how a girl grows up is very different from how a boy grows up. If a boy joins boy scouts, goes hunting with dad, etc then he'll see a map as something with directions and distances. If a girl doesnt get these experiences, she may never see a map until she learns how to drive and at that point has internalized her surroundings by using landmarks.

    I think many of the things we write up to genetic determinism really have social roots.
  • by Dare nMc ( 468959 ) on Monday June 16, 2008 @12:19PM (#23811949)

    Never really bothered me, but did show me that sexism and sexual harassment rules are applied differently to men than to women.
    You pretty much summed up harassment, since it is defined by what bothers others. It is treated equally when complaints are filed. IE men never complain about harassment (and trained by society to not complain about these type issues), so their opinions don't merit the same consideration (because were not bothered.) Of course in practice complaints by guys are treated differently, but that falls outside of the 99% of harassment complaints.
  • by somersault ( 912633 ) on Monday June 16, 2008 @01:39PM (#23812955) Homepage Journal
    And are you saying that it says something negative, or that it shows that this person understands how society currently operates, whether you like it or not? ;)

    I think there will be women who write better code than some men, and men who write better code than some women. Obviously most of the coders in the world are male though, that is just how it has turned out so far.

    I have only met one woman who I know must have been a half-decent coder. She often got among the top marks in all of our classes at University, and obviously put more effort in than most, as well as being bright, so I expect her code must have been okay. And then again there was another girl in our classes, who once came over and tried to get me to basically do her assignment for her. I politely tried to help her along without actually giving her the answer (as I think any good teacher would/should do when asked for help), but could tell that she didn't actually care and was just trying to get me to do it for her, so I eventually got pretty pissed off and thankfully she just took the hint and moved on to the next unsuspecting sex-deprived geek. I was confused as to why someone like that would even do Computer Science at University level.. and how she managed to get so far. She probably was quite bright too, but just lazy.

    Anyway, anecdotal evidence can always be found to argue one way or the other, it doesn't mean much at all. I have met plenty of smart guys and girls, and plenty of dumb ones. This article is just flame bait. I would say that I believe that women in all societies are naturally more empathetic and considerate, for whatever reason, but I personally comment my code or try to make it as obvious as possible what is happening with sensible variable names, etc. Not all guys are macho jerks out to show that they are 'smarter' than the rest. In fact I'd say the truly smarter guys are the ones who are sensible enough to write their code in a way that it can easily be maintained by themselves or others in future. I know I've come back to my code after weeks/months and been like wtf!? I then proceed to delete a line of code that looks like it is completely extraneous, only to find that a completely different section of my program relies on it being there, it's just that everything has been modified so many times (either through my own fault or by management always asking for things in the program to be changed far beyond the original agreed implementation..) that it is in a mess.
  • by KillerBob ( 217953 ) on Monday June 16, 2008 @02:08PM (#23813325)

    Back when I wrote code, I would, when writing for myself, not document a damned thing. However, if i wrote for general purposes I would explain each section in a large amount of detail. I would even point out what kind of problems that cutting out a particular section of code would cause.


    I generally can't stand code that was written by a male... specifically because it's not usually commented, or when it is commented, it's stuff that is relatively useless, like:

    //hope this works


    There are people who break the mold, though... when writing for myself, I don't generally comment it. My coding style hasn't changed in a decade, and I have a damned near eidetic memory. I can look at code I wrote 10 years ago, and still understand how it works and not need comments. When I'm writing for somebody else, I'll comment the bejeezus out of it, just like the story claims. *shrugs* I've been known to pull out examples of code I wrote a long time ago and spend time adding comments before I pass it on to somebody who needs it. :)
  • by Flagran ( 556301 ) on Monday June 16, 2008 @03:52PM (#23814551) Homepage
    I know exactly what you mean... I work in a small shop with seven developers: four men, three women. I'm the senior developer, so I review everyone's code. We're all so different from each other, I don't think there's a single thing where I could say "the men all X" or "the women all Y", or even "only the women X" or "only the men Y". I can't even think of anything where I'm tempted to say "the men tend to X" or "the women tend to Y". Although --- believe you me --- I could certainly pick out each individual and say what kind of tendencies they have. I know seven is very small sample, but it just gives me the impression that someone's gender is a very poor predictor of their coding style.
  • by Alpha830RulZ ( 939527 ) on Monday June 16, 2008 @06:24PM (#23816241)
    Having supervised several gay people, I can tell you that there doesn't seem to be any useful patterns that I can discern. As near as I can tell, they seem to act and code like, well, people.

    The biggest system disaster I have been close to was headed by two women who we all suspected, but do not know, were lovers. They were horrible developers. One of the best SDET's I know is a gay woman, one of the best web devs I know is a gay man. One of the most anal and anti-productive programmers I know is a gay man. One of the better large project managers I know is a gay woman.

    I haven't known many excellent pure programmers that are female, but, truth be told, female programmers of any skill are pretty rare.

The moon is made of green cheese. -- John Heywood

Working...