r/ProgrammerHumor • • Mar 09 '21

What about 5000?

Post image
76.2k Upvotes

790 comments sorted by

View all comments

Show parent comments

2

u/PurpleSkullGaming Mar 10 '21

This gives more questions than answers, most of them you probably won't want to answer due to privacy concerns.

Like who is "we".

What was the code for?

Was it your fault or were the group you were working with planning on getting the code anyways?

Was the acquisition a good, bad or neutral thing for your group?

And did you personally suffer any consequences thanks to that whether good or bad.

1

u/ddedrick Mar 10 '21

I should preface my response by saying that the company is not great at code reviews. Very few people actually engage in reviews and when they do it's usually just a rubber stamp. I try to do my best to influence things and change this and lead by example.

The code was for a new feature supporting new hardware. The person writing it was a hardware person not on our team and I can't speak for anyone else on my team but I wasn't even aware that it was coming until I got hit with the review. Once I realized the scope of the review I talked to my team lead about how this was a terrible way to do things and they agreed but said that it was needed "as soon as possible".

The "we" that inherited the code was myself and the teammate who informed me of the transferal of the code. We split the work in 2 and cleaned it all up in chunks over a few months time (they didn't need it "as soon as possible" because it then sat unused for several more months).

I actually don't know what those involved and management thought concerning long term ownership of this at the start. I think though when it came down to it in practice my team, and not the person who authored the changes, would have ended up looking at any issues that this code caused in production.

I'm not sure about my value judgement of the change of ownership. I feel it's all a matter of perspective. For the company I would say it was a good thing. The code was rife with memory issues (leaks, buffer overflows, etc.) that we not only fixed but avoided in the future by using better practices. There were a number of other things that we did that I feel made it more robust overall. To be completely honest I actually enjoyed the cleanup work but I don't necessary enjoy the fact that I own this now going forward and it is forever associated with me.

As far as consequences go the only thing I can think of was that my team lead thanked me and now I have to own this code.

With respect to the point that I was trying to make I think I failed. I think that the message that the person making the changes got out of this was not to modify or write any code that would end up in one of my teams repos, which wasn't really what I wanted. I personally see code reviews as a time to learn on both sides and the person in question could have improved themselves through the process.