If you first design your software to near-perfection and then find coding it to be tedious because no problems remain to be solved, I recommend that you obtain a thing called a “compiler” to do the coding part for you. You see, a “compiler” takes a formal specification of your design as input, and
automatically produces a program as output! I know this sounds like science fiction, but we’ve been using these things for a while now, even though they took a while to get accepted.
Alternatively, if you’re already using a compiler, have you considered that maybe you’re doing some things by hand that the compiler could do for you? Modern “high-level languages” (as the design notations compilers accept as input are known) are astonishingly capable of eliminating repetition in the “source code” through the use of “abstractions” and “embedded domain-specific languages”.
Of course, there’s always the risk of making your system so abstract that you can’t figure out how to debug it! So you probably don’t want to remove all repetitiveness.