It can be both I think.
There can be times where it is very scientific in approach (particularly when dealing with 3rd party APIs/middleware!), where it involves trying something, if it doesn't work, make a note, and try a new approach. If it does work, make a note, and proceed.
But, there can be times when you find a particularly elegant and concise solution to a complex problem; and you go back and look at it and think to yourself, "yeah, I wrote that. And it's pretty".
Personally, I think any form of workmanship where attention is paid to every last detail, is art. It could be a Swiss watch, a beautifully executed free kick, a lovingly landscaped garden, a haunting, soul-searching song, or a simple, efficient, flawless piece of code.
There can be times where it is very scientific in approach (particularly when dealing with 3rd party APIs/middleware!), where it involves trying something, if it doesn't work, make a note, and try a new approach. If it does work, make a note, and proceed.
But, there can be times when you find a particularly elegant and concise solution to a complex problem; and you go back and look at it and think to yourself, "yeah, I wrote that. And it's pretty".
Personally, I think any form of workmanship where attention is paid to every last detail, is art. It could be a Swiss watch, a beautifully executed free kick, a lovingly landscaped garden, a haunting, soul-searching song, or a simple, efficient, flawless piece of code.