I can't find my Prolog book which is irritating but not surprising since I live ...
arclight @arclight@oldbytes.space
I can't find my Prolog book which is irritating but not surprising since I live in a toppled book pile connected to a doorbell. Honestly, I should finish any one of the three books I have on SNOBOL then worry about Prolog.
Today's fun was trying to decipher the first serious piece of Python I wrote. It's awful. However it's not undecipherably awful and it probably saved me hundreds of hours by automating a massive amount of processes.
I basically built a platform-independent batch queueing system and a convention for running an application, copying files, excerpting text, and generating plots. This worked on Windows to run the Windows version of our code and on Linux to run both Linux and Windows builds, the latter under Wine. I also set it up to count the number of processors/cores on a machine and run (nproc - 1) jobs simultaneously; I wanted at least one core available for me if something went awry and I needed to kill jobs. The metadata for each job included a duration estimate so I could run jobs from fastest to slowest so I could detect failures early.
All this was accreted with time and built to be compatible with both Python 2 & 3. Like I said, the model and scheme are ok and despite the implementation being rather crap, it was still a godsend for running integral tests and generating a huge test report.
I need the same capability now but tuned for a different set of applications. I'm reimplementing a minimal set of the original features with a less baffling and convoluted architecture.
What our engineers want could probably be built compactly in PowerShell but it wouldn't be maintainable or portable or extensible. It's a crapshoot if it would work since PowerShell availability to end users is spotty; Microsoft and/or IT sabotage it or lock it down. Having a short working script doesn't help if you can't rely on having permissions to run non-privileged PowerShell. Python has worked for this in the past and it seems like a waste of effort if the tool only works on a single platform (also the reason I wouldn't consider writing this in bash either). One wrinkle is that we run our production code under Slurm on Linux. My half-assed batch queue is no match against Slurm so I need to change tactics and just build sbatch files instead and queue them all up under Slurm. Let the expert-developed batch queueing system do all the heavy lifting. Still, you need the same info whether you run the application locally yourself or hand it all off to Slurm.
This is one of those sad-making cases where I could see someone try to vibecode a Windows batch queue and miss out on some of the critical security aspects of spawning subprocesses. If I do the work with any diligence it will take time and put me on critical path. If left to a chatbot, there are no guarantees it would work or work securely and reliably. But the chatbot may be (or be perceived as) faster. The point is to build a maintainable and coherent tool that's aware of risks and isn't likely to fail with no chance of repair. How else do you mentor recent generations of engineers to identify security issues before problematic code is written.
But the chatbot is faster and most just want to do their engineering work without learning the uninteresting subtleties of building tools. It can be a hard sell and I don't know how much the schedule demons will let me spend time writing utility code and mentor people. How do we pass on hard-won skills and experiences in the face of least-cost ("lean", minimal) work expectations especially to an audience that isn't that interested in programming or system administration. People also held to this "lean" blinkered schedule-focused work standard.
I don't see a good way forward and it's depressing. I'm feeling more and more obsolete and irrelevant and simultaneously not seeing how we keep quality and safety high if we can't effectively distribute skill and judgment.