In graduate school, I wrote some algorithm-heavy code myself. It's a bit of a tough nut to crack. To put it coarsely, a lot of programming conventions are built around the idea of putting information into a database, retrieving it at the right time, and then massaging that data to present it to a user, typically using a library for any math- or algorithm-heavy parts of that process.1 For these programs, everything you've heard about OOP, breaking code into short functions, and making everything easily understandable at a glance where possible is excellent advice. But it doesn't quite work for algorithm-heavy code, or code that implements complex mathematical calculations and little else.
1 There are of course a lot of other types of commercial development. But most of them share the idea that for most of the math- and algorithm-heavy parts of a program, it's usually preferred to use an existing library than write the algorithm yourself when possible. That's not a bad thing, it's just the reason why math-oriented programming is better served by different conventions.