I have always found geometry to be the most similar in terms of content. Geometry is where most people are introduced to proofs, which are similar in a lot of ways to programming. Also, you often need to know some amount of geometry in even CRUD apps to properly deal with interfaces, charts, etc.
That said, I spend 90% of my time writing geometric analysis libraries, so I am biased.