by Remy Porter on (#18VT8)
“The scales are down again, where the heck is Andre?â€Roger had heard this cry often enough that he didn’t bother to poke his head out of his cubicle to see what the issue was. He worked for a meat-packing company. Sides of beef came in one side of the building, where they were sectioned and cut into smaller, grocery-store-friendly portions, and then shipped out the other side in refrigerated trucks. Along the way, the pieces of meat needed to be weighed multiple times. When the scales went down, production stopped.“I’ve got it,†Andre called out. “They’ll be back up in a second!â€The scales weren’t Roger’s job. His job was making sure bills of lading and manifests and shipping instructions could be generated for every truck going out. That system was fragile and provided him more than enough work- he needed to integrate data from three different off-the-shelf ERPs and generate output suitable for each of their shipping partners (who all required different formats). Roger had enough problems without worrying about Andre’s scales.But damn, if those scales didn’t go down a lot.After a bad stretch of frequent outages, Pierre, the plant manager, had enough. Furious, he called the entire IT department into a conference room to give them a dressing down. He had a slide deck with charts and graphs documenting each of the IT failures that had impacted meat packing. “We pack and ship meat,†Pierre said as he paced in front of the projector screen. “This company’s been doing that since before you had this newfangled computer garbage, and we’ll keep doing it when computers get replaced by robots or whatever. All I want to know is, why are you screwing up my goddamn plant?â€No one made it out of the meeting unscathed. Roger got called out because an outdated template file caused a shipping label misprint which left a truck sitting in the dock for two hours. There was one system, though, that represented the lion’s share of the issues on the graphs: Andre’s scale management system.After the meeting, Roger’s boss, Elene, pulled him aside. “Andre is really struggling,†she said. “And he says it’s an issue with communicating. Can you give him a hand?â€Roger said “yesâ€, and sat down with Andre. “So,†he said, “you always seem to be able to fix the problem pretty quickly. What’s the underlying cause?â€â€œOh, well,†Andre said, “this cruddy scale system is like three hundred years old, and like anything built in the mainframe era, it only understands flat-file format instructions. To get data from our database and into the weighing system, I have to send it a file. Sometimes, there’s a locking issue, and I can fix it by just deleting the file.â€â€œThat would be annoying,†Roger said. “So you have to delete the file and resend it?â€â€œWell, it’s not usually the file we send that gets locked. It’s usually the INI file.â€â€œThe… can I see your code?â€Roger traced through the code, starting with the function that fetched data from the database. FindProductInfo was a pretty standard CRUD function, so he looked for places where it was called- like UpdateData.