But this is the difference between "art" and "craft". The art is deciding what to build, how it should look and feel. This part is imprecise and emotional. It depends more on talent than practice, and is the bit that needs a muse or inspiration.
The craft bit is building it. This part is logical, precise, and needs to be done competently so it doesn't obscure the "art" part (great art can be ruined by bad craft, but good craft with no art is just boring). This needs lots and lots of practice.
This duality applies to writing, coding, sketching, music, movies, any creative practice.
Writing for people to read is not “very logical and very precise.” It’s “very expressive,” and sometimes, although the part the compiler reads is correct, the thing the human infers from the program is imprecise and expressive.
Working with code teaches that code is experienced, too. We read a thing, go hunting for its downstream dependencies, learn other things… Coding is an experience as much as walking through a building is an experience.
Architects of buildings work with precise engineering, but they also craft experiences for humans. I am cautious about drawing parallels between code architecture and physical architecture, but the parallel between the work a code architect performs—creating a precise thing for the compiler and simultaneously creating an imprecise experience for the programmer—and the work a physical architect performs is much more sound.
My thesis, therefore, is that programming is the art of doing a precise thing for one audience—the machine—and a creative, imprecise thing for another audience—the human who experiences the code.
There’s a continuum between writing technical manuals and ‘Ulysses’, with airport-bookstand thrillers somewhere in between.
A Technical Manual would need more attention to the human experience than a spec, IMO.
Deciding how to structure your code is half logic and half aesthetics, the fact that we spend a large chunk of our time refactoring, i.e. switching around pieces of code so that the code does the same thing is a testament to this.
More broadly, I feel like "X is like Y"-type articles are somewhat of a Rorschach test. Things we are experienced at are by definition things we spent a lot of time doing. It's inevitable one will try to self-reflect and draw parallels.
While the specific final words are less precise, there's a lot of rules to adhere to in order to write well as well.
And the best programming is often very creative.