According to Tolstoy, anything, which transfers emotions of the author could be considered art.
I think many of the quines and polygots out there are beautiful. Plus some of the "code golf" examples, as long as they aren't obfuscated, are usually educational.
I consider coding to be something in between art and industry. Creativity and production.
Could you give an example?
Sure. One of my favorites is still the doctest module in Python library. Elegant is how I would describe it.