Back when I was learning to code, I used to just popup hard code line number so I could find where error occured.

I once inherited code that did this. The previous dev had added one last feature before handing it over to my team, and said: "I'll update all the line numbers in the error messages, then I can send it over to you". I and the other guy on my team (we were going to be the primary people working on it) just looked at each other and tried to hold back from snickering out loud.

It was a ~30k LOC conglomeration of copy-pasted code, nested loops, swallowed errors, and duplicated logging (the same output to a file and to the console).

This is my favorite snippet from the project.

/r/badcode Thread Link - i.redd.it