Specifically with code, you have to learn how to see it in a more abstract way. Not just a sequence of instructions, but a function that operates on a space of inputs, some good, some bad. Almost like a quantum superposition of all possible inputs, and which outputs those generate.
There is a great interactive article on this by Bret Victor: http://worrydream.com/LadderOfAbstraction/