There are many articles on this topic findable on the Internet. Here are some recommendations:
-
Think Like a Programmer - a book by V. Anton Spraul. The original 2012 edition used the C++ language for its examples, and is available for free from archive.org at https://archive.org/details/think-like-a-programmer/mode/1up. There is also a newer edition using Python examples, at https://www.amazon.com/dp/1593278047
-
Think Like A programmer, a short essay with a plug to an inexpensive eBook. Examples in Python.
-
Think like a programmer by Alan Downey, free download from UMN for the 2020 Java edition.
-
Think Python: How to think like a computer scientist, the Python edition of Downey’s book.
-
How To Solve It (Polya), a mathematician talks about problem solving in general.
-
The Elements of Programming Style, an older book by Brian Kernighan with examples in now-less-used languages but with good advice.
-
Kernighan’s newer exposition on same topic, more detailed: The Practice of Programming.
See also: