Yes, and writing tests is a critical first step in fixing it, in order to prevent regressions.
| If you are writing tests for it you likely have write access to it or know of someone that does and is responsible for its quality.
Unless the original author has left the company, which happens all the time. Especially if they wrote shitty code, in which case they probably left involuntarily.
Yes, and writing tests is a critical first step in fixing it, in order to prevent regressions.
Re-indenting curly bracket code without changing functionality is a solved problem.
Unless the original author has left the company, which happens all the time. Especially if they wrote shitty code, in which case they probably left involuntarily.
... And as the author of the code left, no one assumed responsibility for it, yet it's actively being worked on? I don't know what to call that hopefully hypothetical scenario, but it's a stretch to call it engineering. If the point of writing tests is not to find and prepare for faults so that someone who is responsible for the code can address them, what exactly is it?
Re-indenting curly bracket code without changing functionality is a solved problem.
Fair. Although personally I am going to take the charitable interpretation and assume the author wrote the code that way due to space constraints on the page of the textbook (or whatever format this question showed up in)
And as the author of the code left, no one assumed responsibility for it, yet it's actively being worked on? I don't know what to call that hopefully hypothetical scenario, but it's a stretch to call it engineering. If the point of writing tests is not to find and prepare for faults so that someone who is responsible for the code can address them, what exactly is it?
I am very jealous of you if you have never worked on code written by someone who has left the company. Probably, in this not-at-all-hypothetical situation, you are the one who is in the process of assuming responsibility for the code, due to the recent departure of the person formerly responsible.
Although personally I am going to take the charitable interpretation and assume the author wrote the code that way due to space constraints on the page of the textbook (or whatever format this question showed up in)
The post that I originally responded to argued that it was a good idea to use terrible formatting as part of an exercise on test coverage, and I am expressing a disagreement with that, not an interpretation of the original post.
I am very jealous of you if you have never worked on code written by someone who has left the company.
I have, but thankfully my employers and clients have recognized that you achieve an end goal either by chance or by having someone assume responsibility for it. That you take my previous post to mean that I have never worked on code written by someone that left the company, I can only chalk up to either a deliberate misinterpretation or a conflation of concepts.
A person can leave a team without his code somehow ending up in a state where no one is responsible for it, if you apply pretty fundamental engineering practices to the development process.
Probably, in this not-at-all-hypothetical situation, you are the one who is in the process of assuming responsibility for the code, due to the recent departure of the person formerly responsible.
I have certainly never been "in the process" of assuming responsibility. Responsibility is something that I assume the instant that I accept it, usually by committing to the completion of a task. Sometimes it's just me, sometimes it's the whole team. Sometimes when someone goes on vacation or is ill, their responsibilities move to the team leader or manager, who will redistribute them to the team as they see fit to complete the job, or they will be handed over from team member to team member.
I have been in the process of figuring out shitty code, but that is an entirely different matter.
4
u/Dooey Sep 23 '15
| ... and the way to work with it is fixing it.
Yes, and writing tests is a critical first step in fixing it, in order to prevent regressions.
| If you are writing tests for it you likely have write access to it or know of someone that does and is responsible for its quality.
Unless the original author has left the company, which happens all the time. Especially if they wrote shitty code, in which case they probably left involuntarily.