When you study CompSci (depending on where IG) you tend to see them that way when trying to mathematically prove something about an algorithm. It's only really a good way of thinking if you're into coding, but I don't think a teacher for a non-coding related algebra class should show this, it can be really confusing for some people.
Hi, you can look into "discrete mathematics" if you're interested in the overall subject of math for programmers, it was one of my hardest class but highly intesting!