by noobermin · 2y ago · 0 comments
Anyway, to each their own, it's fine for people who somehow think because there are wrapper methods everywhere a code is "cleaner". I just submit that this really is a aesthetic preference, and that instead of trying to "fix" other professions, understand there are often reasons why things are that way when everyone in a field works that way.
(a) is the calculation itself the end goal--e.g. am I trying to draw a plot which shows the motions of the three bodies?
or
(b) am I trying to use the code which describes the motion of the 3 bodies as a modular part of a system to answer other questions, perhaps interactively.
If everything is a one-off, and you're working on a very small team, of course excessive abstractions make little sense. But that's not how engineering is done. Abstractions are really important, because they allow us to collaborate.
Of course, I once was that physicist! Now I prefer working with arrays and functions that receive arrays and return arrays, even in the top-level, user-facing script.
But who knows, maybe there will be a next stage in the journey!
I used to work at a company that wrote an atomic scale simulation package. Every dev was a physics/chemistry PhD turned coder. We didn't quite hit one comment for _every_ line of code, but we were close! At first I really hated this style; one comment every few lines. However, I eventually learned to kind of like it, even though it was a bit redundant.
I don't really have a point here, but I just wanted to echo your statement that the physicists-turned-coder style is real!
As a computer scientist this sounds odd to me, but if you are the sole consumer of your own API, you do you!