I’ve always had this loosely held opinion that the actual code you write is the least important part of coding.
The important parts are deciding what code to write, deciding how that code fits into the overall software design, deciding why you should work on this feature vs. that feature.
Given that perspective, I have no fear of AI taking my job as a programmer.
AI is fantastic at writing contained, low-context code. If you give it a box, and tell it to fill the box, it will fill that box like an army of hungry junior engineers.
Things start to fall apart if it needs to understand anything outside of the box. The more constraints you put on filling the box, the worse it gets.
And not just worse, it forgets, hallucinates, does all the classic LOL AI things.
But having an army of junior engineers is honestly great. You just have to manage them.
A couple points about this:
Test Driven Development is not great.
It’s an interesting idea, but if you follow the TDD-brick-road far enough, you end up getting shanked in the alley by an entity with a mocking smile.
The good thing about TDD is that it forces you to write code that is testable.
Easily testable code forces good patterns like single responsibility functions, etc.