Unfortunately, I didn't learn how to program! I thought that what I was missing was knowledge about algorithms, and that was occasionally right but mostly wrong. Worse, algorithmic textbooks bias you to look for the one weird trick that makes your apparently complex problem simple. But usually that trick doesn't exist, and when it does you usually have to solve the problem the hard way first before you understand the problem well enough to find it. The process of debugging, refactoring, optimizing, and testing that gives rise to the final polished form of a program cannot easily be inferred from what remains. Books like The Practice of Programming and Code Complete were much more helpful, but you can't learn to program by reading books, any more than you can learn to play baseball or win lawsuits by reading books.
I did eventually learn to program pretty well, though I'm not yet a master of the craft like Knuth, Jeff Dean, Rob Pike, Walter Bright, or Norvig. I did it largely by a practice described in this interview: writing new programs every day. I also learned a lot from pair-programming, which taught me both to read other people's code (we had collective code ownership) and to write code others could understand. My main obstacle was not ignorance but perfectionism and lack of practice.
I have a BS & MS in CS, and most of the material in TAOCP was still new to me. Even the stuff I thought I knew like hash functions was covered in a new depth I never would have imagined.
https://www-cs-faculty.stanford.edu/~knuth/fasc2b.ps.gz
I just managed to finish the first Alg. P (plain changes); it was really hard, considering that I didn't understand the algorithm and the description is made for Pascal like languages.
This would be an iconoclastic route into programming, to say the least.
If you are looking for a more approachable or practical book that gets you programming and introduces some theory I recommend “Classic Computer Science Problems in Python” by David Kopec.
Reading TAOCP to get into programming is sort of like reading a physics textbook in order to build a doghouse in your backyard.