JT Klopcic could not believe his eyes. It was supposed to be a simple assignment. The length of some data field was changing, so he needed to walk through the import process and make sure that all the associated data sizes would accommodate the new length.
JT was unfamiliar with the process, so he took a look at the import file. Thankfully, it was all well-formed XML. This should be rather easy, he thought. And then he stumbled over this:
// parse the XML data file if (File.Exists(StdFileName)) { // opens file for header data extraction. _sr = new StreamReader(StdFileName); FindHeaderString(_sr); // First line oHeader.FixABC = Convert.ToDouble(m_Textline.Substring(11, 6)); oHeader.FixDEF = Convert.ToDouble(m_Textline.Substring(19, 6)); oHeader.XYZ = Convert.ToDouble(m_Textline.Substring(26, 6)); oHeader.PDQs = Convert.ToDouble(m_Textline.Substring(33, 6)); oHeader.ChkIn = Convert.ToDouble(m_Textline.Substring(41, 6)); oHeader.DblFix = Convert.ToDouble(m_Textline.Substring(49, 6)); oHeader.DblUnload = Convert.ToDouble(m_Textline.Substring(57, 6)); oHeader.DblLoad = Convert.ToDouble(m_Textline.Substring(65, 6)); // Reads the next line and find the header string. if ((m_Textline = _sr.ReadLine()) != null) { FindHeaderString(_sr); // 2nd line oHeader.DelAdj = Convert.ToDouble(m_Textline.Substring(73, 6)); oHeader.PSPPerSt = Convert.ToDouble(m_Textline.Substring(82, 6)); oHeader.PSPPerPk = Convert.ToDouble(m_Textline.Substring(91, 6)); oHeader.PSPPerPg = Convert.ToDouble(m_Textline.Substring(100, 6)); oHeader.PSPPerSetup = Convert.ToDouble(m_Textline.Substring(108, 6)); oHeader.OffProp = Convert.ToDouble(m_Textline.Substring(117, 6)); oHeader.OnProp = Convert.ToDouble(m_Textline.Substring(126, 6));
It was not going to be as easy as he thought.
[Advertisement]
BuildMaster allows you to create a self-service release management platform that allows different teams to manage their applications. Explore how!