Why Astronomers Love Python [video]
youtube.com
youtube.com
For the record I am a numerical astrophysicist and I read and write plenty of bad code every day.
So writing bad code every day, means you are serious about your main line of work!
Can't say I agree with this sentiment, but it is slowly changing.
And if you go back 10 years, 9 of the top 10 articles are software programs: https://pubrank.carbocation.com/article?y=2007
At that level it's a brutal time/return calculation, like allowing a long trained neurosurgeon to do any of their own paper work. Far more profitable to have them constantly in surgery.
So it was: "fix that three lines of FORTRAN to change the output for 'table #17' and get back to the bench!" (egads i saw some horrific code)
Scientists (and the general population) are not professional programmers. If the need arises, they hire one. Scientists usually need to jot down a prototype and a model in order to see if their theory works.
It's like comparing a physician with a prepper. A prepper might know how to use some first-aid methods and tools, but is not expected to act as a trauma surgeon or emergency doctor. She has just the right knowledge for the task in hand. Yeah, Python might simply be Hansaplast in this case, but who cares if you are alone? :p
IF you need a real software developer for some extended work, you hire one. But to call scientists lousy programmers is like calling every driver on this earth lousy driver (in respect to Formula 1 drivers, for example).
Don't you mean a programmer? A fine scientist can still be a terrible programmer.
> to call scientists lousy programmers is like calling every driver on this earth lousy driver
Why? Most drivers on earth are fine drivers, terrible F1 drivers.
Maybe most scientists are fine scientists, terrible programmers?
In programming, the map is the territory, and in the time you can map out and nail down all of the unpredictable bits of a program, you could have written it already. We also don't have the luxury of physical laws. The few natural laws that do apply, the speed of light and time complexity, are so rarified and remote that they don't apply most of the time. We share more with the mathematician than the engineer, but even that comparison rings hollow.
We create programs custom built for a purpose, using rules of thumb and our own aesthetic instincts, that meet a need. Craftsman seems appropriate.
> We create programs custom built for a purpose, using rules of thumb and our own aesthetic instincts
Software can be general too, it's not the same as, say, making a small stool or chair. Plus, craftsmen are tied to physical constraints too, much like engineers. I'm not sure I agree with how much s/w depends on "rules of thumb and our own aesthetic instincts" though.
'terrible' is the word we use, but they were not professional programmers (and had zero interest in the craft) So fit-for-purpose maybe, 'unstructured' but not 'terrible'.
My test is two simple test runs, did they give me the answer I expected? Yes! Winner. Set off long running job and go home
For instance, I'm currently working on a project where I have to process 110 GB/s of radio data aggregated from 288 antennas. The data will need intensive cleaning after, so plenty of thought is put into logging the right statistics (since we have to average for 3 months to get the right data). This is where the real effort is being applied.
However, if there happens to be a missing edge case or malformed data packet, I can (and will) just cronjob a (if process hung, pkill and restart) the processor with the next bit of realtime data. Anyone who wants to reuse the algorithm will need our exact same antennas and specialized computing hardware, so why make it portable?
Programs are mathematical proofs. If the mathematical proofs are a weak link in a scientific work, then this is a serious problem.
I was just setting up https://github.com/karpathy/arxiv-sanity-preserver (By Andrej Karpathy no less) and the whole experience from spinning up a VM to deploying the code made me realize how pathetic computers are for casual use.
Computers are a hot mess.
from astronomy import find_planet