The Daily WTF

CodeSOD: Brillant Python Programmers

InitAg's team, focused on code quality, faces challenges from legacy code. This older code stemmed from data scientists lacking software engineering experience. A critical system, maintained solely by Stan, exemplifies these issues. Stan's dedication and brilliance, while admirable, produced code rife with problems. The `utils/file_io.py` module reveals numerous inefficiencies and poor design choices. Redundant functionality, like reinvention of pathlib methods, and inefficient file operations plague the code. The code also features unnecessary sleep calls and a reliance on shell commands for tasks. Despite its flaws, the code is surprisingly readable, which complicates the needed rework. Management acknowledges the situation and has authorized a full-scale rewrite. The author concludes that this code is terrible, but also somewhat clean and easy to understand.
favicon
thedailywtf.com
thedailywtf.com