Abstract Algebra and Linear Algebra are adjacent fields with a lot of clean abstractions that I believe exercise the same muscles as programming (even if a lot of it isn't directly applicable)
Related comment: https://news.ycombinator.com/item?id=23152152
i.e. basically linear algebra for engineers is not abstract. Linear algebra for mathematicians is quite abstract, e.g. a 400+ page textbook that doesn't refer to any matrices.
----
On the flip side, I think mixing abstract thinking with testing/debugging is the ideal combo for programming.
It is a skill to write useful test cases. To explore the state space efficiently.
If your code isn't grounded in real examples, then it may become overly general and not RUN run very well. It's a big danger to abstract before you have enough examples.
And probably the hardest thing that programmers do is debug OTHER people's code, as opposed to your own code.
(I guess you didn't ask about programming, but I'm sort of assuming you are programming by asking on this site :) )