Not sure if really related but I couldn't follow the math at school. For example in algebra the rules were complicated and required you to know things that are not explicitly set.
Because of that I wrote my own functions to do what my teacher said.
Then in the exams we are allowed to bring formulas, therefore I bring my own JavaScript function and I was the compiler :)
The teacher steps would resume in 5 sentences, but the function would be more long and include exceptions and weird cases. No room for mistakes with my JavaScript.
No wonder I had the biggest score in the classroom.