我工作过的国家实验室的代码库

  • Freshman Year and Ideal World: During freshman year, lived in a magical world where students often submitted sloppy code but professionals wrote nice, maintainable codebases. Everyone followed best practices, used Git and GitHub, and proper branching protocols.
  • Internship at National Laboratory:

    • Given Property Protection clearance. Came across a top security lab with a six million line codebase from Java 8 updated to Java 11. Codebase had no unit tests or known test coverage percentage. Part of the job was writing new unit tests.
    • Found a file from Java 4 library in Java 8 codebase with a manually changed constant. There was a code rollout with errors causing complaints every six months. The lab used Accurev instead of Git, and there was dead code due to update difficulties.
    • Many files seemed not updated for a while, with copyright messages from different years. Programmers were shocked by the lack of tests, and the boss thought full code coverage was not realistic. The author made a mistake with a bash script and translated it to Python.
  • Reasons for Bad Code: Supervisor's supervisor claimed trouble recruiting young people. It could also be due to lower pay compared to FAANG+, a cycle of bad code, or the lab's focus on science over programming.
  • Final Thoughts: The codebase is not much worse than average legacy codebases. Research was getting done despite the codebase. The situation is an egregious missallocation of talent as the code quality should be better for such important work. But the author can console themselves by thinking their code is better than the lab's.
阅读 7
0 条评论