Computer
OpenAI Offers 20 Million User Chats In ChatGPT Lawsuit. NYT Wants 120 Million.
Read more of this story at Slashdot.
Roku Launches Cheap, Ad-Free Streaming Service 'Howdy'
Read more of this story at Slashdot.
Intel Struggles With Key Manufacturing Process For Next PC Chip
Read more of this story at Slashdot.
Google's New Genie 3 AI Model Creates Video Game Worlds In Real Time
Read more of this story at Slashdot.
DRAM Prices Soar as China Eyes Self-Reliance For High-End Chips
Read more of this story at Slashdot.
US Proposes New Drone Rules That Could Lead To Starbucks, Amazon Deliveries
Read more of this story at Slashdot.
Retraction-Prone Editors Identified at Megajournal PLoS ONE
Read more of this story at Slashdot.
OpenAI Releases First Open-Weight Models Since GPT-2
Read more of this story at Slashdot.
Three US Agencies Get Failing Grades For Not Following IT Best Practices
Read more of this story at Slashdot.
Wikipedia Editors Adopt 'Speedy Deletion' Policy for AI Slop Articles
Read more of this story at Slashdot.
'No One Cares' About Elite Degrees at Palantir, CEO Tells Investors
Read more of this story at Slashdot.
Microsoft Teases the Future of Windows as an Agentic OS
Read more of this story at Slashdot.
AI Is Listening to Your Meetings. Watch What You Say.
Read more of this story at Slashdot.
Nearly 100,000 ChatGPT Conversations Were Searchable on Google
Read more of this story at Slashdot.
Deadly Titan Submersible Implosion Was Preventable Disaster, Coast Guard Concludes
Read more of this story at Slashdot.
An Illinois Bill Banning AI Therapy Has Been Signed Into Law
Read more of this story at Slashdot.
Fraudulent Scientific Papers Are Rapidly Increasing, Study Finds
Read more of this story at Slashdot.
Man Controls iPad With His Mind Using Synchron Brain Implant
Read more of this story at Slashdot.
NASA's Lunar Trailblazer Mission Ends In Disappointment
Read more of this story at Slashdot.
CodeSOD: An Annual Report
Michael has the "fun" task of converting old, mainframe-driven reports into something more modern. This means reading through reams of Intelligent Query code.
Like most of these projects, no one has a precise functional definition of what it's supposed to do. The goal is to replace the system with one that behaves exactly the same, but is more "modern". This means their test cases are "run the two systems in parallel and compare the outputs; if they match, the upgrade is good."
After converting one report, the results did not match. Michael dug in, tracing through the code. The name of the report contained the word "Annual". One of the key variables which drove original the report was named TODAYS-365 (yes, you can put dashes in variables in IQ). Michael verified that the upgraded report was pulling exactly one year's worth of data. Tracing through the original report, Michael found this:
# DIVIDE ISBLCS BY ISB-COST-UOM GIVING ISB-COST-EACH. MULTIPLY ISB-STK-QOH TIMES ISB-COST-EACH GIVING ISB-ON-HAND-COST. # SUBTRACT TODAYS-DATE MINUS 426 GIVING TODAYS-365. # SEARCH FOR ITMMAN = 'USA' AND ITMNMB <> '112-*'This snippet comes from a report which contains many hundreds of lines of code. So it's very easy to understand how someone could miss the important part of the code. Specifically, it's this line: SUBTRACT TODAYS-DATE MINUS 426 GIVING TODAYS-365..
Subtract 426 from today's date, and store the result in a variable called TODAYS-365. This report isn't for the past year, but for the past year and about two months.
It's impossible to know exactly why, but at a guess, originally the report needed to grab a year. Then, at some point, the requirement changed, probably based on some nonsense around fiscal years or something similar. The least invasive way to make that change was to just change the calculation, leaving the variable name (and the report name) incorrect and misleading. And there it say, working perfectly fine, until poor Michael came along, trying to understand the code.
The fix was easy, but the repeated pattern of oddly name, unclear variables was not. Remember, the hard part about working on old mainframes isn't learning COBOL or IQ or JCL or whatever antique languages they use; I'd argue those languages are in many cases easier to learn (if harder to use) than modern languages. The hard part is the generations of legacy kruft that's accumulated in them. It's grandma's attic, and granny was a pack rat.
[Advertisement] Keep all your packages and Docker containers in one place, scan for vulnerabilities, and control who can access different feeds. ProGet installs in minutes and has a powerful free version with a lot of great features that you can upgrade when ready.Learn more.