The motivational factors and work styles are similar, but I think the arguments for it being like painting or like writing are unconvincing. I've come to the conclusion that what programming is really most like is analytic philosophy.
The key insight that lead to this is thinking about ontologies - basically, naming things, but it also goes deeper to deciding how to map the problem onto data structures/design the class hierarchy. This is the same basic idea Evans had for Domain-Driven Design, although I don't know if he made the connection to the philosophy concept of ontology back then (I don't know if he is interested in philosophy, but I do know someone that worked with him who knew about this stuff).
In short, if you can't think or name what it is you're trying to write about, your writing will not come out clear.