Although one can code artfully, coding is not art, it’s more of a craft.
Also I would not consider code itself as a work of art. Even inside an artwork that consists entirely or in part of software, the actual code is not work of art, it’s just code. From my experience, code in artworks is often especially crappy, as artists rarely have training as software engineers, and they are even more prone to hack it together until it works.