Time to run my horrifying python code that builds a bash script that I use to repeatedly call some fortran code and make output I pull back into python for calculating telescope pointings.

My deepest apologies to everyone here who actually has training in making good software. I'm doing science!

(And no, I'm not looking for advice. Hilariously, this dumpster fire of code works well enough, and I don't need to improve it right now.)

Ooo I like this piece of accidental Kuiper Belt art

@sundogplanets No problem detected here. Sometimes it doesn't need to be seamlessly engineered, it just has to work "enough"!

Thinking of some prototyping I did where C++ code run in parallel on our cluster made an occasional system() call to ssh, to run an ML Python script on the one machine that had a big GPU 😅 It didn't generate Fortran, admittedly, but I'm sure I've some of that lying around, too! #science

@sundogplanets Just be glad the fortran code doesn't call some Forth routines which interrogate a clockwork device simulating Ha-dec pointing to do the conversion to az-el.

Yes, I observed on a radio telescope that did that. Went there once and found it went into slow slew mode for dec < 0 which meant it never went on source down in the South. "Fix that? You must be kidding. Just don't observe down there."

@TMEubanks HA! Wow, that's amazing

@sundogplanets

Most radio telescope in the early az-el period (say, 1965-70) had somewhere in the structure a simple equatorial mount with pickups and A-D converters to do provide the digital pointing data. The digital computers of the time just weren't fast enough on the trig functions. This viewed the equatorial mount as an analog computer with the clock drive as an integrator.

@sundogplanets I used to say the equatorial mounts buried under tons of concrete and steel would for sure confuse future archaeologists, but I think most of them have been removed by now.
@sundogplanets The telescope I'm referring to would point the equatorial and drive both the telescope outside and a small pointer inside to the ha-dec position. The pointer would touch the ha-dec position, signalling that the telescope should go into slow slew mode to complete the pointing. I had noticed we would never get southern VLBI sources with this so when I was there I investigated and found that there was an equatorial ring it would hit and go into slow slew, never reaching the source.
@sundogplanets
Or, I should say, never reaching the source in typical astrometric VLBI with 3 - 5 minute scans. It would take 20 - 30 minutes to go on source, and maybe if you were doing 8 hour scans on something in the South you wouldn't care much. I can't say.
@sundogplanets omg! I'm definitely going to have nightmares from this!🤣
@sundogplanets absolute cringe.. but if it works, it works 🤷‍♂️
“Don’t let perfect be the enemy of good enough” or something like that..
@sundogplanets I’ve known enough programmers and engineers from 60s era banks and military through contemporary aerospace engineers to know that some of the most important systems run on the creakiest code and the people who know those systems best are terrified of updates.
@sundogplanets sounds legit to me 🤷🏼. My job as an engineer in astro is scale. If a scientist's pipeline works, correctly, often enough for its user base, without crashing other people's research, awesome. I can go build other things instead of wasting time sucking the joy out of other people's lives. (Also I have committed my share of terrible shell scripts.)
@sundogplanets
I support user software at an HPC center. This wouldn't even make the top ten of janky software setups :)
@jannem There should definitely be a an award for this: "Jankiest software setup"

@sundogplanets
To be fair, few researchers have software development training, so jank is expected.

On the other hand, you could argue that this is becoming as essential as, say, statistics, and should be taught as a core skill along your actual field of study.

@jannem I did try to take computer science way back when I was a baby undergrad scientist, but Caltech wanted us to start in Scheme so I ended up dropping the class... that's why my code is really awful now! I blame Caltech :)

@sundogplanets
Yes, asking people to become computer scientists is of course not realistic, any more than asking everyone to become a statistician.

With that said, I was a programmer and CS graduate before becoming a neuroscientist. And that background was *very* useful for finding research jobs. I'd be the computer person in the project, same as you'd pick someone for their skill at a specific experimental method. It's made me coauthor on papers where I'd struggle to explain the title :)

@sundogplanets Necessity is the mother of invention!
@sundogplanets
"“The evil that men do lives after them; the good is oft interred with their bones.” These insightful words were spoken by Marc Antony in Shakespeare's Julius Caesar"🙂
More seriously, a great deal of research software has been written this way, as at Bell Labs long ago.
However, sometimes such software was wanted by others... in which case, sometimes software engineers would get asked for help.
@sundogplanets This is some very relatable content.

@sundogplanets Sounds reasonable.

To be actually man though, you're not actually calling the fortran code (I hope).

@sundogplanets

We all have this kind of code. We usually just don't talk about this 😀

Mine is a website with PHP code that starts a python script, which runs a Fortran program, reads the output back into Python and then shows a plot from this data on the website. Our IT department recently upgraded the OS of the webserver, and everything stopped working. It was a nightmare to fix it. 😱

@sundogplanets
This sounds mad at first glance, but anyone using SciPy is probably calling some Fortran code from Python. The only grossly clunky language in that setup is bash. Ew.

@sundogplanets « I’m doing science » « works well enough, don't need to improve it »

With all respect, no, it’s not Science. Your description’s about Engineering, not Science! Nothing wrong with Engineering. For sure it’s required when having scientific activities.

Avoid to confuse one for the other = a great help against https://en.wikipedia.org/wiki/Replication_crisis

It’ll be a better Science if scientific practitioners know the difference between engineering methods and scientific methods. ;-)

Replication crisis - Wikipedia

@zimoun I'm doing engineering in order to make science happen (in this case, point the telescope in the right place on the sky to find the Kuiper Belt Objects we discovered a year ago and measure their orbits, and learn about how the Solar System formed and evolved). How's that?

@sundogplanets « I'm doing engineering in order to make science happen »

I’m totally aligned with this!

And don’t take me wrong, I include myself: we often justify work-enough shortcuts by I’m doing science. It could be understood in two ways: sorry plumbing’s not my business as scientists or I don’t have enough time for plumbing already too busy by “real” science.

Both need to recognize most of our activities as scientists are engineering to make science happens. :-)

@sundogplanets The unspoken requirement zero of code:

It (only) needs to work.

Used to make the quality wonks incandescent...

@sundogplanets what, no compiled Matlab mixed with labview vis a custom C++ dll written by a masters student who has long since disappeared into industry?

Are you even trying to write obtuse academic code or are you just focused on getting some science done, smh

@dotjayne hahaha I have yet to incorporate former students' code into this mess, but I'm sure it'll happen at some point
@sundogplanets OK if this is like fesshole, I once wrote an R script that generated 1000 bash scripts which called each other in a chain to download and process stuff from a public repo.
@sundogplanets sounds like a standard software deployment with extra points for knowing the whole stack! 😬
@sundogplanets
While some people are computer scientists or software engineers, some of us are just computer mechanics.
@sundogplanets i firmly believe you are absolutely winning at devops! Kudos 🙇🏽‍♂️
@sundogplanets the secret the industry doesn't want you to know is that this is exactly what the pros build 😂