In fact programming is particularly good at teaching you how to think. Programs are literally built out of ideas. Which is one reason it's still a goo...
Programming is particularly effective at teaching thinking skills because programs are built from ideas. This makes computer science valuable to study even in the AI era, as thinking well remains important.