Site icon Journal of Astrological Big Data Ecology

Can you find the bug in the Legacy Code? A coding Choose your own Adventure

man sitting in front of three computers

Photo by olia danilevich on Pexels.com

You are a new employee at the code factory. The job listing said that you’d get to do all sorts of fancy machine learning applications but it turns out you’re needed to fix old legacy code that doesn’t work anymore! You re-run the code against the test cases laid out by the last guy who worked on this legacy code and it’s outputting the error.

ERROR: Traceback line(942) RunTest()
Line(633) StepAlgorithm()
Line(912) ReInitParams()
Line(220) Calc_AGP_F_OLD()
NaN Value found in Attribute Error in Non-Zero Reference de-allocated in name 

What do you do?

  1. Google the Error
  2. Look through the code line by line
  3. Strategically add a bunch of debug logging print statements
  4. Ask the guy who wrote the code
  5. Try running the code again
Exit mobile version