28

That feeling when you're supposed to debug code someone else wrote a decade ago but it's such a horrible mess that your brain just gives up and you end up staring at your monitor for an hour in confusion 😵

Comments
  • 2
  • 2
    I was once in the same situation, but then my boss allowed me to rewrite the part and this was much quicker than to debug the code.
  • 2
    Yep. Need to rewrite. It's faster and safer.
  • 1
    @siggi Yup, I'm definitely going to do that when I get back to it after the weekend.
  • 3
    That feeling when you suddenly realize that it was your code all along...
  • 1
    @TobiSGD I won't lie, that has happened too 😅
  • 1
    @TobiSGD That‘s why I always use git blame before shouting „Who wrote this piece of crap you morons“ ;)
  • 0
    @ExGetMessage how can you do the recognize your own code?
  • 0
    @irene There are multiple options of course, all implementing git blame(last change).
    You could do something like git blame -L 5 index.php to see who changed line 5 in index.php the last time but that‘s annoying of course so I normally use my IDE for that.

    At work we currently have to use phpstorm(Doing web dev atm since team needs support). There you just do a right click on the line number->annotate and there you go.
  • 0
    @ExGetMessage there was a dumb correction. How can you not recognise your code?
  • 0
    @irene ok then I misunderstood you, sorry.
    Well, I work on many projects at the same time with multiple teams and sometimes I realize that it‘s my code but it doesn‘t look exactly like it should be. Then git blame helps to see what line was changed by whom and when.
Your Job Suck?
Get a Better Job
Add Comment