5 ms·
I also had that moment; ask “Who wrote that shit?”, run ‘git blame’ and find yourself. This happened 1 year into my second job.
by sshine 5y ago
I also had that moment; ask “Who wrote that shit?”, run ‘git blame’ and find yourself. This happened 1 year into my second job.
- rwoerz 5y agoIf you want to take that to the next level, accidently address an email to yourself and then complain that the "response" is all but helpful. I mean... that could happen... hypothetically... to... someone.
- abainbridge 5y agoMore than once I've googled how to do something new and found the answer on Stackoverflow, written by me. I haven't even written that many answers on Stackoverflow.
- Yajirobe 5y agoIt sometimes can be misleading. If I'm refactoring large parts of code (e.g. splitting a large file to smaller ones), then sometimes the original logic written by someone else will be left, but git blame will show me because I was the last to make changes
- couchand 5y agogit checkout BLAME_COMMIT~ && git blame should take care of that.
- jimohalloranau 5y agoI had this happen _several times_ at an agency I used to work at. I stumbled across some really bad code in their main product, got irate and asked "who wrote this shit?". Ran git blame and discovered it was me. Ok, but this is still s#*t, I need to fix it. Spent a couple of hours and found no way of improving it, figured "well, it's ugly, but I guess it is what it is" and moved on. A few months later I came across the same chunk of code... "Who wrote this shit?", and off we go again. I must have gone through this loop 4 or 5 times with the same piece of code.
- Seb-C 5y agoWould be a good idea to add a comment explaining the situation, so you don't have to waste time again on it.
- jimohalloranau 5y agoYeah a "why didn't I" thought occurred to me while I was writing the comment above. All I can say is that it was a long time ago now (15 years), and the notion of leaving notes in the code for future versions of myself (and others) is a much bigger part of my way of working these days.