Programming is not coding! Programming a medium for creative expression. Composing a good program can be an esthetic experience similar to writing a story, a piece of music, or poetry,
A good programming experience is an exploration of abstract design. A successful design requires careful choice of the levels of detail for each layer of a programming project. Some of these choices involve classical issues of philosophy, such as the status of referents of expressions, the meaning of quotation, the problems with negation, the power of self-reference, and the use (and danger) of abstraction. Well-composed programs can be effective at expressing emotional content as well. There are the beauties of symmetrical design, and the horrors of ugly kludges.
All programs have bugs, even ones that meet given specs (because the specs are always incomplete or inconsistent). Bugs are inevitable because the creation of buggy approximations is a crucial part of the design process. Thus, it is more effective to make systems that are debuggable than to try to make systems that are correct by construction.
In any case, we must keep the fun in programming and not allow it to become a tedious job.