There's nothing whatsoever distinctive about the analogy to painters, except that Paul Graham likes to paint, and would like to feel that his programming allows him a similar level of self-expression. The reason Graham's essay isn't entitled "Hackers and Pastry Chefs" is not because there is something that unites painters and programmers into a secret brotherhood, but because Paul Graham likes to cultivate the arty aura that comes from working in the visual arts. Having been both a painter and a programmer, I can certainly sympathize with him.
Great paintings, for example, get you laid in a way that great computer programs never do. Even not-so-great paintings - in fact, any slapdash attempt at splashing paint onto a surface - will get you laid more than writing software, especially if you have the slightest hint of being a tortured, brooding soul about you. For evidence of this I would point to my college classmate Henning, who was a Swedish double art/theatre major and on most days could barely walk.
Also remark that in painting, many of the women whose pants you are trying to get into aren't even wearing pants to begin with. Your job as a painter consists of staring at naked women, for as long as you wish, and this day in and day out through the course of a many-decades-long career. Not even rock musicians have been as successful in reducing the process to its fundamental, exhilirating essence.
It's no surprise, then, that a computer programmer would want to bask in some of the peripheral coolness that comes with painting, especially when he has an axe to grind about his own work being 'mere engineering'.
Maciej also notes the self-celebratory rock-starriness that sometimes emerges in popular software development figures; I've definitely observed this first hand. You need a dash of this stuff to be a good leader or public speaker, but a little goes a long way:
I blame Eric Raymond and to a lesser extent Dave Winer for bringing this kind of schlock writing onto the Internet. Raymond is the original perpetrator of the "what is a hacker?" essay, in which you quickly begin to understand that a hacker is someone who resembles Eric Raymond. Dave Winer has recently and mercifully moved his essays off to audio, but you can still hear him snorfling cashew nuts and talking at length about what it means to be a blogger . These essays and this writing style are tempting to people outside the subculture at hand because of their engaging personal tone and idiosyncratic, insider's view. But after a while, you begin to notice that all the essays are an elaborate set of mirrors set up to reflect different facets of the author, in a big distributed act of participatory narcissism.
Blogs certainly don't help matters in this regard. To be fair, I've subscribed to egoless group blogs and they do suffer in comparison-- a strong, personal voice is a much more compelling read.