Mixtral (a small local model) was churning out better code in fall 2023 that what an incompetent programmer would produce. Am sure others models could as well. It had severe limitations with tiny context and blind spots but still you'd never see it doing the kind of terrors a hack of a developer would do.