4 ms·
Terrifying to think that even physicists can't code their own simulations anymore. We're plunging headfirst into the dark ages.
by breezybottom 2mo ago
Terrifying to think that even physicists can't code their own simulations anymore. We're plunging headfirst into the dark ages.
- Gangway0829 2mo agoHave you seen the average physicist code? I've crawled around in the muck of Fortran codes written in 1970 with unreadable 8 character variable names (the first of which encodes the type), with implicit typing, zero comments, computed go-tos, SAVE, the works. Tests? Never heard of it. Bugs everywhere. You would be far less sanguine about physicists coding if you looked into some of the "flagship" codes used today. And believe me, it isn't a "boomer bad" phenomenon. Every incoming student I've had in the last decade writes shit code too. My (only somewhat facetious) opinion is that physicist access to programming languages should be controlled like doctors' access to opiates.
- breezybottom 2mo agoIt doesn't have to look pretty, but there should be a human brain involved in creating it. How can we trust models based on AI slop?
- Gangway0829 2mo ago0. It's not about "looking pretty", it's about being nigh impossible to understand or reason about. There is a 1000 LoC subroutine that I'm convinced was ported from FORTRAN 1 unchanged that cannot be understood by anyone under the age of 50 that underpins one of the "flagship" physics codes in my field. It's a fucking nightmare every time I have to worry about that stupid thing. I remind you that this was 100% the product of a human brain (pre computer age, pre social media, and I'm told quite the genius too). Perhaps one should not place the human brain on too high a pedestal and deify it. 1. Why did you take from my OP that I tell codex "write a climate simulation code, make no mistakes" and go suntanning on a beach in the tropics for the rest of the semester? 2. Perhaps you have a different experience from me in writing HPC codes, but my experience is that > 90% of the code is boilerplate. I find GPT 5.6 can be prone to overengineering, but with a little steering and good judgement it generates very nice interfaces and high level code. I just have to think about the solver structure or metastructure. 3. Even with core numerics - pre-AI, it was a bunch of iteration going back and forth between code and optreports. Now codex will just do it. I suppose this may seem grim to you if you loved decorating every variable with !DIR$ ASSUME_ALIGNED, and manually batching array operations or whatever, but I didn't and I'm glad I no longer need to. 4. I'm now highly motivated to write tests, and AI makes it way easier to write the immense boilerplate around good tests (sorry not sorry, my {FUNDING_AGENCY} program manager doesn't give a flying fuck what my test coverage is, and my next grant won't depend on that in the slightest, so pre-AI I did the bare minimum. You can argue that the results will be worse, yadda yadda, but the incentive structure that {FUNDING_AGENCY} has in place don't promote good software standards, and my career never suffered for it) 5. I can generate docstrings with high accuracy (see the above)