三期压疮:Code like a girl

来源:百度文库 编辑:偶看新闻 时间:2024/04/28 13:25:39

Code like a girl

Do engineers and programmers care about concepts like beauty and elegance? Should they? Designers have always known that looks matter--that the outside (interface) matters. But deep in the heart of those building the inside--the technology most users never see--lies the sensibility of an artist. In a kind of "Design Eye for the Code Guy" way.

While I‘m stereotyping with abandon, I might as well be honest. I‘vebeen going to tech conferences for the last 15 years, and I swear theratio of pocket protectors to Urban Outfitter clothes has shifteddramatically. So maybe it‘s not accurate to say geeks today are better looking--but they‘re certainly better dressed. With hipper haircuts.

Does this <>mean anything? Maybe.

What prompted this post--and it‘s whimsical title--is a post by Jamis Buck titled Beautiful code, test first, which includes the following:
"He was telling me how he feels like he has to sit and tweak hiscode over and over until it not only acts right, but looks right. Itcannot be merely functional, it must be beautiful, as well."

But the best part was a comment by "Morten" that included the line:

"As for spending too much time on making the code look right downto the last indentation - my code has been called “girl code” for thesame reason..."

And there you have it. I think "girl code" is quite a compliment. Because caring about things like beautymakes us better programmers and engineers. We make better things.Things that aren‘t just functional, but easy to read, elegantlymaintainable, easier--and more joyful--to use, and sometimes flat-outsexy. A passion for aesthetics can mean the difference between codethat others enjoy working on vs. code that‘s stressful to lookat. And whether we like it or not, most of the world associates anappreciation for beauty more with women than men (especially geek men). Women may have a genetic advantage here.

From one of my favorite books on aesthetics and technology, David Gelernter‘s Machine Beauty:

"This book explains how beauty drives the computer revolution:how lust for beauty and elegance underpinned the most importantdiscoveries in computational history and continues to push researchonward today....The best computer scientists are, like [Henri]Vaillancourt, technologists who crave beauty.

There is the ever-present danger when you discuss beauty inscience, mathematics, and technology that readers will assume the wordis being used metaphorically... And could a mathematical proof,scientific theory, or piece of software be "beautiful" in the real,literal way that a painting or symphony or rose can be beautiful?
Yes."

And from the back cover:

"Both hardware and software should afford us the greatestopportunity to achieve deep beauty, the kind of beauty that happenswhen many types of loveliness reinforce one another, when designexpresses an underlying technology, a machine logic...

These principles, beautiful in themselves, will set the stage forthe next technological revolution, in which the pursuit of elegancewill lead to extraordinary innovations."

Yes, calling beautiful code "girl code" is both silly and some mightbelieve sexist. But that doesn‘t mean there isn‘t some truth to it. Asa female technologist in a heavily male-skewed industry, don‘tcompliment my hair, but if you tell me my code is pretty, I might just give you some tips.

And if it makes you feel better, I‘ll refer to YOUR gorgeous code as metrosexual. But we‘ll both know the truth.

[full disclosure: though I‘m 100% female, I have personally authored some of the worst-looking code in north america.]

[UPDATE: someone has Code like a girl shirts on CafePress.]