The funny thing is that another definition of mediocre is 'low quality'. And it seems plausible to me that even expert programmers can write low quality programs.
Expert programmers should write 'low quality' programs if that's what the situation calls for. Most of us are solving business problems, and lateral thinking can be worth more than perfect engineering or fancy algorithms.