Colleague wrote bad source code, what do do?
.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty{ margin-bottom:0;
}
up vote
2
down vote
favorite
The situation is the following.
I have been asked to review the source code written by a colleague.
He is a novice in this particular field.
This colleague has been working with a client for more than a month, basically solo on the platform he is responsible for.
He does not have enough experience and the code is not very good:
- not very maintainable,
- little testing,
- questionable choices,
- far from best practices...
it does work though...
In my opinion it was a mistake to send him solo to a client.
What should I do now?
What should I tell to management?
What to do with all the mediocre job done so far?
What do do from now on, for all the code that will be written in the future?
feedback
New contributor
Lisa Anne is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
add a comment |
up vote
2
down vote
favorite
The situation is the following.
I have been asked to review the source code written by a colleague.
He is a novice in this particular field.
This colleague has been working with a client for more than a month, basically solo on the platform he is responsible for.
He does not have enough experience and the code is not very good:
- not very maintainable,
- little testing,
- questionable choices,
- far from best practices...
it does work though...
In my opinion it was a mistake to send him solo to a client.
What should I do now?
What should I tell to management?
What to do with all the mediocre job done so far?
What do do from now on, for all the code that will be written in the future?
feedback
New contributor
Lisa Anne is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
6
How much experience have you had in reviewing anyone's code before now? You can point out your concerns to him in a way that doesn't sound like you are attacking him.
– Kozaky
2 days ago
I'm voting to close this question as off-topic because this is about code review not navigating the workplace. This is more appropriate to softwareengineering.stackexchange.com
– IDrinkandIKnowThings
2 days ago
What is your charter for the code review? In your company, does the output of a code review usually include your judgement as to their fitness to work solo? Does it usually include comments about the mediocrity of the job? Does it usually include comments about "questionable choices"? Do you job. Do the code review as it is expected to be done. Leave the management of your colleagues to their bosses.
– Joe Strazzere
2 days ago
1
Sounds like the new person did a mediocre quality job that is common across many industries. Now is the time for some mentorship and training to bring the person up to higher standards. Very few people begin as star performers. The question about "all the code that will be written in the future" suggests that the OP feels the situation is permanent. It is not necessarily true, performance varies across a career.
– teego1967
2 days ago
Can you give us some examples here "questionable choices" for example and little testing how do you know what tests they or the end client performed
– Neuromancer
2 days ago
add a comment |
up vote
2
down vote
favorite
up vote
2
down vote
favorite
The situation is the following.
I have been asked to review the source code written by a colleague.
He is a novice in this particular field.
This colleague has been working with a client for more than a month, basically solo on the platform he is responsible for.
He does not have enough experience and the code is not very good:
- not very maintainable,
- little testing,
- questionable choices,
- far from best practices...
it does work though...
In my opinion it was a mistake to send him solo to a client.
What should I do now?
What should I tell to management?
What to do with all the mediocre job done so far?
What do do from now on, for all the code that will be written in the future?
feedback
New contributor
Lisa Anne is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
The situation is the following.
I have been asked to review the source code written by a colleague.
He is a novice in this particular field.
This colleague has been working with a client for more than a month, basically solo on the platform he is responsible for.
He does not have enough experience and the code is not very good:
- not very maintainable,
- little testing,
- questionable choices,
- far from best practices...
it does work though...
In my opinion it was a mistake to send him solo to a client.
What should I do now?
What should I tell to management?
What to do with all the mediocre job done so far?
What do do from now on, for all the code that will be written in the future?
feedback
feedback
New contributor
Lisa Anne is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
New contributor
Lisa Anne is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
New contributor
Lisa Anne is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
asked 2 days ago
Lisa Anne
1193
1193
New contributor
Lisa Anne is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
New contributor
Lisa Anne is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
Lisa Anne is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
6
How much experience have you had in reviewing anyone's code before now? You can point out your concerns to him in a way that doesn't sound like you are attacking him.
– Kozaky
2 days ago
I'm voting to close this question as off-topic because this is about code review not navigating the workplace. This is more appropriate to softwareengineering.stackexchange.com
– IDrinkandIKnowThings
2 days ago
What is your charter for the code review? In your company, does the output of a code review usually include your judgement as to their fitness to work solo? Does it usually include comments about the mediocrity of the job? Does it usually include comments about "questionable choices"? Do you job. Do the code review as it is expected to be done. Leave the management of your colleagues to their bosses.
– Joe Strazzere
2 days ago
1
Sounds like the new person did a mediocre quality job that is common across many industries. Now is the time for some mentorship and training to bring the person up to higher standards. Very few people begin as star performers. The question about "all the code that will be written in the future" suggests that the OP feels the situation is permanent. It is not necessarily true, performance varies across a career.
– teego1967
2 days ago
Can you give us some examples here "questionable choices" for example and little testing how do you know what tests they or the end client performed
– Neuromancer
2 days ago
add a comment |
6
How much experience have you had in reviewing anyone's code before now? You can point out your concerns to him in a way that doesn't sound like you are attacking him.
– Kozaky
2 days ago
I'm voting to close this question as off-topic because this is about code review not navigating the workplace. This is more appropriate to softwareengineering.stackexchange.com
– IDrinkandIKnowThings
2 days ago
What is your charter for the code review? In your company, does the output of a code review usually include your judgement as to their fitness to work solo? Does it usually include comments about the mediocrity of the job? Does it usually include comments about "questionable choices"? Do you job. Do the code review as it is expected to be done. Leave the management of your colleagues to their bosses.
– Joe Strazzere
2 days ago
1
Sounds like the new person did a mediocre quality job that is common across many industries. Now is the time for some mentorship and training to bring the person up to higher standards. Very few people begin as star performers. The question about "all the code that will be written in the future" suggests that the OP feels the situation is permanent. It is not necessarily true, performance varies across a career.
– teego1967
2 days ago
Can you give us some examples here "questionable choices" for example and little testing how do you know what tests they or the end client performed
– Neuromancer
2 days ago
6
6
How much experience have you had in reviewing anyone's code before now? You can point out your concerns to him in a way that doesn't sound like you are attacking him.
– Kozaky
2 days ago
How much experience have you had in reviewing anyone's code before now? You can point out your concerns to him in a way that doesn't sound like you are attacking him.
– Kozaky
2 days ago
I'm voting to close this question as off-topic because this is about code review not navigating the workplace. This is more appropriate to softwareengineering.stackexchange.com
– IDrinkandIKnowThings
2 days ago
I'm voting to close this question as off-topic because this is about code review not navigating the workplace. This is more appropriate to softwareengineering.stackexchange.com
– IDrinkandIKnowThings
2 days ago
What is your charter for the code review? In your company, does the output of a code review usually include your judgement as to their fitness to work solo? Does it usually include comments about the mediocrity of the job? Does it usually include comments about "questionable choices"? Do you job. Do the code review as it is expected to be done. Leave the management of your colleagues to their bosses.
– Joe Strazzere
2 days ago
What is your charter for the code review? In your company, does the output of a code review usually include your judgement as to their fitness to work solo? Does it usually include comments about the mediocrity of the job? Does it usually include comments about "questionable choices"? Do you job. Do the code review as it is expected to be done. Leave the management of your colleagues to their bosses.
– Joe Strazzere
2 days ago
1
1
Sounds like the new person did a mediocre quality job that is common across many industries. Now is the time for some mentorship and training to bring the person up to higher standards. Very few people begin as star performers. The question about "all the code that will be written in the future" suggests that the OP feels the situation is permanent. It is not necessarily true, performance varies across a career.
– teego1967
2 days ago
Sounds like the new person did a mediocre quality job that is common across many industries. Now is the time for some mentorship and training to bring the person up to higher standards. Very few people begin as star performers. The question about "all the code that will be written in the future" suggests that the OP feels the situation is permanent. It is not necessarily true, performance varies across a career.
– teego1967
2 days ago
Can you give us some examples here "questionable choices" for example and little testing how do you know what tests they or the end client performed
– Neuromancer
2 days ago
Can you give us some examples here "questionable choices" for example and little testing how do you know what tests they or the end client performed
– Neuromancer
2 days ago
add a comment |
4 Answers
4
active
oldest
votes
up vote
9
down vote
accepted
If you've been asked to review his code, then you should review his code. Code review is part of the process of being a professional engineer, and your colleague should get used to it. Point out all the mistakes, even if there are a lot of them and it feels like you're being harsh, but remember to always be constructive. If there's a mistake made, or a bad practice, or something else, you should call it out, but you should be mindful that maybe he doesn't understand the code review process yet, so you don't want to come off as harsh or aggressive, but helpful. But in the end, the bottom line is, if his code is bad, you should tell him it's bad, and you should expect him to fix it.
As for what to tell management, nothing. He is a novice in the field. Management knows he is a novice (presumably they read his resume). The best that can happen (for you) is you report this guy, he is reprimanded, and he ends up getting fired for nothing more than the "crime" of being a novice. That's not how you train novice engineers, that's how you get them to give up and move to other disciplines. First, you should try to teach him and build him up. Eventually he won't need any more hand-holding, or if he continues to need hand-holding then you should report him to management at that time. But give him some time to learn and grow, and you should help him do that. If you absolutely want to report something to management, what I would say is something like this:
I have reviewed Joe's code, and it looks like there are a lot of issues with it. Being that Joe is a new engineer, these mistakes are understandable, but unfortunately it presents a bad image of the business for Joe to be working solo with this client. I would like to take responsibility to work with Joe on this project to try to train and teach him best practices so he can be more productive in the future.
That's the best thing you can say to management, imo.
2
Why "be harsh"? How about "be clear"?
– DaveG
2 days ago
3
@DaveG By "be harsh" I meant "don't be afraid to point out as many mistakes as they are, even if there are a lot and it feels like you're being harsh". It's important to point out mistakes to a novice engineer, because if they don't know they are making mistakes then they won't fix them.
– Ertai87
2 days ago
Thanks, that is a very good and meditated advice!
– Lisa Anne
2 days ago
add a comment |
up vote
5
down vote
With coding (as with basically every profession!) it's pretty normal to produce to very ropey work when a novice - especially when first "flying solo" and pretty much everything you list can be explained by inexperience.
What should I do now?
If feasible I would suggest having a session with your colleague where you can take him through the ways the code could be improved. Make sure to also stress any good things about it as well!
Don't
Say things like:
What you did wrong here...
&
Your code sucks!
&
This isn't best practice
Do
Say things like:
If this section was written like this it would be more maintainable
&
What was you reasoning behind doing this section like this?
&
While the approach you took here works, best practice is usually to do XY&Z because of AB&C
Basically keep the conversation focused on the code and positive steps that could be taken to improve it, rather than negative statements and references to him.
What should I tell to management?
Give them your honest assessment, if you think he needs more training before future solo work then say so. You won't be doing anyone any favors by fudging it. But make sure to stress where "issues" have arisen through simple inexperience, and if they "got it" during your review with them mention this too
XYZ was a common mistake by novices, when I talked it through with [colleague] they totally understood and know how they improve next time.
What to do with all the mediocre job done so far?
Ultimately it's a management call to decide what to do with it - you say the code works so at this point it's about cost/benefit for any refactoring. It would be a great learning experience to have the colleague work on a version 2.0 that incorporates your feedback but if the code is functional enough to "release" to the client this might be a tough sell in short term ROI - it's not unreasonable to take the position that the colleague can take the lessons-learned into the next paying project. While not as an effective learning strategy it can still be more cost-effective in the long run.
What do do from now on, for all the code that will be written in the future?
Again this is a management call - it might not be a bad idea to have intermediate reviews with either yourself or another experienced developer to spot and correct any issues before the project is complete.
add a comment |
up vote
2
down vote
Every human have a threshold, the guy is a novice. I think the session to review the code must be fair and related to his level, underline the bad and good parts. In some bad cases, it is possible to guide him by asking questions like: how your code will react is this event happen or how flexible is your code if the client ask you to add this feature?
I would take note of the advance topics that were not mastered and I would introduce them gradually trough lunch and learn, pairing, later code review, session training, books, tutorials, etc.
If you are hard on him or criticize everything, probably the guy will start to ignore your feedback after a couple of months of code review and may end to hate his job if he feel depreciated.
Secondly, I would write down a list of what need to be addressed, I will prioritize that list then plan what the review can cover by the available time without exhausting the reviewer and the reviewed. A programmer repeats his errors when they do not understand a topic. So I would not feel the need to review everything in detail because he will probably repeat the same mistakes and you will have another chance to pick them up in the next code review. This will spread your recommendations trough multiple reviews and it will lightening the process. Also, there is probably uncovered topics that the guy will pick up by himself in the following months.
Finally, on the side, I would track the technical debt in the company planning tools.
Working solo with a client as a novice is usually a stressful task. The code works, that means he understood the requirement, the business domain and able to demonstrate leadership.
Here's the thing: If you are criticizing everything, that means everything needs to be criticized, and that means there are a lot of learning opportunities. If the colleague takes criticism as an attack, then that colleague has other issues that should be reported to management. You can criticize everything, as long as you are careful to frame it as a teaching moment; that builds respect and camaraderie.
– Ertai87
2 days ago
@Ertai87 I think we differ on our review process and it is ok because they is multiple ways to achieve the same goal. My opinion is learning is a slow human process, when reviewing, I prefer to focus on critical issues than trying to cover all the learning opportunities to ensure those critical issues will improve.
– Sebastien DErrico
2 days ago
add a comment |
up vote
2
down vote
The junior's colleague code is reviewed after one month. That is a very long time. So I'm wondering what the purpose of this review is. If the purpose is to fix all the faults in the code that was created during one month, that will be an awful lot of work and nobody will be happy with either of you. If the purpose is to teach how to do things better, that's a bit late, but better late than never.
Assuming that nobody wants to spend weeks on fixing everything, I would look at the code, find strategic and tactical mistakes that were made, and then spend a good amount of time with the colleague to discuss these things.
Strategic mistakes are things that you can (just about) get away with in a project that took a month to create, but that will kill you in a one year project. Tactical mistakes are things that are localised and can be fixed in a localised way.
For the future: The best time for a code review is before the code is written. Figure out what strategic plan there is (if any) and fix it if there are problems. And then there is the question: Do you want good code quality (review tasks that didn't take more than a day), or do you want your colleague to learn (every week, spend time reviewing, find problematic code, and discuss how to fix and avoid such code.
add a comment |
StackExchange.ready(function () {
$("#show-editor-button input, #show-editor-button button").click(function () {
var showEditor = function() {
$("#show-editor-button").hide();
$("#post-form").removeClass("dno");
StackExchange.editor.finallyInit();
};
var useFancy = $(this).data('confirm-use-fancy');
if(useFancy == 'True') {
var popupTitle = $(this).data('confirm-fancy-title');
var popupBody = $(this).data('confirm-fancy-body');
var popupAccept = $(this).data('confirm-fancy-accept-button');
$(this).loadPopup({
url: '/post/self-answer-popup',
loaded: function(popup) {
var pTitle = $(popup).find('h2');
var pBody = $(popup).find('.popup-body');
var pSubmit = $(popup).find('.popup-submit');
pTitle.text(popupTitle);
pBody.html(popupBody);
pSubmit.val(popupAccept).click(showEditor);
}
})
} else{
var confirmText = $(this).data('confirm-text');
if (confirmText ? confirm(confirmText) : true) {
showEditor();
}
}
});
});
4 Answers
4
active
oldest
votes
4 Answers
4
active
oldest
votes
active
oldest
votes
active
oldest
votes
up vote
9
down vote
accepted
If you've been asked to review his code, then you should review his code. Code review is part of the process of being a professional engineer, and your colleague should get used to it. Point out all the mistakes, even if there are a lot of them and it feels like you're being harsh, but remember to always be constructive. If there's a mistake made, or a bad practice, or something else, you should call it out, but you should be mindful that maybe he doesn't understand the code review process yet, so you don't want to come off as harsh or aggressive, but helpful. But in the end, the bottom line is, if his code is bad, you should tell him it's bad, and you should expect him to fix it.
As for what to tell management, nothing. He is a novice in the field. Management knows he is a novice (presumably they read his resume). The best that can happen (for you) is you report this guy, he is reprimanded, and he ends up getting fired for nothing more than the "crime" of being a novice. That's not how you train novice engineers, that's how you get them to give up and move to other disciplines. First, you should try to teach him and build him up. Eventually he won't need any more hand-holding, or if he continues to need hand-holding then you should report him to management at that time. But give him some time to learn and grow, and you should help him do that. If you absolutely want to report something to management, what I would say is something like this:
I have reviewed Joe's code, and it looks like there are a lot of issues with it. Being that Joe is a new engineer, these mistakes are understandable, but unfortunately it presents a bad image of the business for Joe to be working solo with this client. I would like to take responsibility to work with Joe on this project to try to train and teach him best practices so he can be more productive in the future.
That's the best thing you can say to management, imo.
2
Why "be harsh"? How about "be clear"?
– DaveG
2 days ago
3
@DaveG By "be harsh" I meant "don't be afraid to point out as many mistakes as they are, even if there are a lot and it feels like you're being harsh". It's important to point out mistakes to a novice engineer, because if they don't know they are making mistakes then they won't fix them.
– Ertai87
2 days ago
Thanks, that is a very good and meditated advice!
– Lisa Anne
2 days ago
add a comment |
up vote
9
down vote
accepted
If you've been asked to review his code, then you should review his code. Code review is part of the process of being a professional engineer, and your colleague should get used to it. Point out all the mistakes, even if there are a lot of them and it feels like you're being harsh, but remember to always be constructive. If there's a mistake made, or a bad practice, or something else, you should call it out, but you should be mindful that maybe he doesn't understand the code review process yet, so you don't want to come off as harsh or aggressive, but helpful. But in the end, the bottom line is, if his code is bad, you should tell him it's bad, and you should expect him to fix it.
As for what to tell management, nothing. He is a novice in the field. Management knows he is a novice (presumably they read his resume). The best that can happen (for you) is you report this guy, he is reprimanded, and he ends up getting fired for nothing more than the "crime" of being a novice. That's not how you train novice engineers, that's how you get them to give up and move to other disciplines. First, you should try to teach him and build him up. Eventually he won't need any more hand-holding, or if he continues to need hand-holding then you should report him to management at that time. But give him some time to learn and grow, and you should help him do that. If you absolutely want to report something to management, what I would say is something like this:
I have reviewed Joe's code, and it looks like there are a lot of issues with it. Being that Joe is a new engineer, these mistakes are understandable, but unfortunately it presents a bad image of the business for Joe to be working solo with this client. I would like to take responsibility to work with Joe on this project to try to train and teach him best practices so he can be more productive in the future.
That's the best thing you can say to management, imo.
2
Why "be harsh"? How about "be clear"?
– DaveG
2 days ago
3
@DaveG By "be harsh" I meant "don't be afraid to point out as many mistakes as they are, even if there are a lot and it feels like you're being harsh". It's important to point out mistakes to a novice engineer, because if they don't know they are making mistakes then they won't fix them.
– Ertai87
2 days ago
Thanks, that is a very good and meditated advice!
– Lisa Anne
2 days ago
add a comment |
up vote
9
down vote
accepted
up vote
9
down vote
accepted
If you've been asked to review his code, then you should review his code. Code review is part of the process of being a professional engineer, and your colleague should get used to it. Point out all the mistakes, even if there are a lot of them and it feels like you're being harsh, but remember to always be constructive. If there's a mistake made, or a bad practice, or something else, you should call it out, but you should be mindful that maybe he doesn't understand the code review process yet, so you don't want to come off as harsh or aggressive, but helpful. But in the end, the bottom line is, if his code is bad, you should tell him it's bad, and you should expect him to fix it.
As for what to tell management, nothing. He is a novice in the field. Management knows he is a novice (presumably they read his resume). The best that can happen (for you) is you report this guy, he is reprimanded, and he ends up getting fired for nothing more than the "crime" of being a novice. That's not how you train novice engineers, that's how you get them to give up and move to other disciplines. First, you should try to teach him and build him up. Eventually he won't need any more hand-holding, or if he continues to need hand-holding then you should report him to management at that time. But give him some time to learn and grow, and you should help him do that. If you absolutely want to report something to management, what I would say is something like this:
I have reviewed Joe's code, and it looks like there are a lot of issues with it. Being that Joe is a new engineer, these mistakes are understandable, but unfortunately it presents a bad image of the business for Joe to be working solo with this client. I would like to take responsibility to work with Joe on this project to try to train and teach him best practices so he can be more productive in the future.
That's the best thing you can say to management, imo.
If you've been asked to review his code, then you should review his code. Code review is part of the process of being a professional engineer, and your colleague should get used to it. Point out all the mistakes, even if there are a lot of them and it feels like you're being harsh, but remember to always be constructive. If there's a mistake made, or a bad practice, or something else, you should call it out, but you should be mindful that maybe he doesn't understand the code review process yet, so you don't want to come off as harsh or aggressive, but helpful. But in the end, the bottom line is, if his code is bad, you should tell him it's bad, and you should expect him to fix it.
As for what to tell management, nothing. He is a novice in the field. Management knows he is a novice (presumably they read his resume). The best that can happen (for you) is you report this guy, he is reprimanded, and he ends up getting fired for nothing more than the "crime" of being a novice. That's not how you train novice engineers, that's how you get them to give up and move to other disciplines. First, you should try to teach him and build him up. Eventually he won't need any more hand-holding, or if he continues to need hand-holding then you should report him to management at that time. But give him some time to learn and grow, and you should help him do that. If you absolutely want to report something to management, what I would say is something like this:
I have reviewed Joe's code, and it looks like there are a lot of issues with it. Being that Joe is a new engineer, these mistakes are understandable, but unfortunately it presents a bad image of the business for Joe to be working solo with this client. I would like to take responsibility to work with Joe on this project to try to train and teach him best practices so he can be more productive in the future.
That's the best thing you can say to management, imo.
edited 2 days ago
answered 2 days ago
Ertai87
5,3281518
5,3281518
2
Why "be harsh"? How about "be clear"?
– DaveG
2 days ago
3
@DaveG By "be harsh" I meant "don't be afraid to point out as many mistakes as they are, even if there are a lot and it feels like you're being harsh". It's important to point out mistakes to a novice engineer, because if they don't know they are making mistakes then they won't fix them.
– Ertai87
2 days ago
Thanks, that is a very good and meditated advice!
– Lisa Anne
2 days ago
add a comment |
2
Why "be harsh"? How about "be clear"?
– DaveG
2 days ago
3
@DaveG By "be harsh" I meant "don't be afraid to point out as many mistakes as they are, even if there are a lot and it feels like you're being harsh". It's important to point out mistakes to a novice engineer, because if they don't know they are making mistakes then they won't fix them.
– Ertai87
2 days ago
Thanks, that is a very good and meditated advice!
– Lisa Anne
2 days ago
2
2
Why "be harsh"? How about "be clear"?
– DaveG
2 days ago
Why "be harsh"? How about "be clear"?
– DaveG
2 days ago
3
3
@DaveG By "be harsh" I meant "don't be afraid to point out as many mistakes as they are, even if there are a lot and it feels like you're being harsh". It's important to point out mistakes to a novice engineer, because if they don't know they are making mistakes then they won't fix them.
– Ertai87
2 days ago
@DaveG By "be harsh" I meant "don't be afraid to point out as many mistakes as they are, even if there are a lot and it feels like you're being harsh". It's important to point out mistakes to a novice engineer, because if they don't know they are making mistakes then they won't fix them.
– Ertai87
2 days ago
Thanks, that is a very good and meditated advice!
– Lisa Anne
2 days ago
Thanks, that is a very good and meditated advice!
– Lisa Anne
2 days ago
add a comment |
up vote
5
down vote
With coding (as with basically every profession!) it's pretty normal to produce to very ropey work when a novice - especially when first "flying solo" and pretty much everything you list can be explained by inexperience.
What should I do now?
If feasible I would suggest having a session with your colleague where you can take him through the ways the code could be improved. Make sure to also stress any good things about it as well!
Don't
Say things like:
What you did wrong here...
&
Your code sucks!
&
This isn't best practice
Do
Say things like:
If this section was written like this it would be more maintainable
&
What was you reasoning behind doing this section like this?
&
While the approach you took here works, best practice is usually to do XY&Z because of AB&C
Basically keep the conversation focused on the code and positive steps that could be taken to improve it, rather than negative statements and references to him.
What should I tell to management?
Give them your honest assessment, if you think he needs more training before future solo work then say so. You won't be doing anyone any favors by fudging it. But make sure to stress where "issues" have arisen through simple inexperience, and if they "got it" during your review with them mention this too
XYZ was a common mistake by novices, when I talked it through with [colleague] they totally understood and know how they improve next time.
What to do with all the mediocre job done so far?
Ultimately it's a management call to decide what to do with it - you say the code works so at this point it's about cost/benefit for any refactoring. It would be a great learning experience to have the colleague work on a version 2.0 that incorporates your feedback but if the code is functional enough to "release" to the client this might be a tough sell in short term ROI - it's not unreasonable to take the position that the colleague can take the lessons-learned into the next paying project. While not as an effective learning strategy it can still be more cost-effective in the long run.
What do do from now on, for all the code that will be written in the future?
Again this is a management call - it might not be a bad idea to have intermediate reviews with either yourself or another experienced developer to spot and correct any issues before the project is complete.
add a comment |
up vote
5
down vote
With coding (as with basically every profession!) it's pretty normal to produce to very ropey work when a novice - especially when first "flying solo" and pretty much everything you list can be explained by inexperience.
What should I do now?
If feasible I would suggest having a session with your colleague where you can take him through the ways the code could be improved. Make sure to also stress any good things about it as well!
Don't
Say things like:
What you did wrong here...
&
Your code sucks!
&
This isn't best practice
Do
Say things like:
If this section was written like this it would be more maintainable
&
What was you reasoning behind doing this section like this?
&
While the approach you took here works, best practice is usually to do XY&Z because of AB&C
Basically keep the conversation focused on the code and positive steps that could be taken to improve it, rather than negative statements and references to him.
What should I tell to management?
Give them your honest assessment, if you think he needs more training before future solo work then say so. You won't be doing anyone any favors by fudging it. But make sure to stress where "issues" have arisen through simple inexperience, and if they "got it" during your review with them mention this too
XYZ was a common mistake by novices, when I talked it through with [colleague] they totally understood and know how they improve next time.
What to do with all the mediocre job done so far?
Ultimately it's a management call to decide what to do with it - you say the code works so at this point it's about cost/benefit for any refactoring. It would be a great learning experience to have the colleague work on a version 2.0 that incorporates your feedback but if the code is functional enough to "release" to the client this might be a tough sell in short term ROI - it's not unreasonable to take the position that the colleague can take the lessons-learned into the next paying project. While not as an effective learning strategy it can still be more cost-effective in the long run.
What do do from now on, for all the code that will be written in the future?
Again this is a management call - it might not be a bad idea to have intermediate reviews with either yourself or another experienced developer to spot and correct any issues before the project is complete.
add a comment |
up vote
5
down vote
up vote
5
down vote
With coding (as with basically every profession!) it's pretty normal to produce to very ropey work when a novice - especially when first "flying solo" and pretty much everything you list can be explained by inexperience.
What should I do now?
If feasible I would suggest having a session with your colleague where you can take him through the ways the code could be improved. Make sure to also stress any good things about it as well!
Don't
Say things like:
What you did wrong here...
&
Your code sucks!
&
This isn't best practice
Do
Say things like:
If this section was written like this it would be more maintainable
&
What was you reasoning behind doing this section like this?
&
While the approach you took here works, best practice is usually to do XY&Z because of AB&C
Basically keep the conversation focused on the code and positive steps that could be taken to improve it, rather than negative statements and references to him.
What should I tell to management?
Give them your honest assessment, if you think he needs more training before future solo work then say so. You won't be doing anyone any favors by fudging it. But make sure to stress where "issues" have arisen through simple inexperience, and if they "got it" during your review with them mention this too
XYZ was a common mistake by novices, when I talked it through with [colleague] they totally understood and know how they improve next time.
What to do with all the mediocre job done so far?
Ultimately it's a management call to decide what to do with it - you say the code works so at this point it's about cost/benefit for any refactoring. It would be a great learning experience to have the colleague work on a version 2.0 that incorporates your feedback but if the code is functional enough to "release" to the client this might be a tough sell in short term ROI - it's not unreasonable to take the position that the colleague can take the lessons-learned into the next paying project. While not as an effective learning strategy it can still be more cost-effective in the long run.
What do do from now on, for all the code that will be written in the future?
Again this is a management call - it might not be a bad idea to have intermediate reviews with either yourself or another experienced developer to spot and correct any issues before the project is complete.
With coding (as with basically every profession!) it's pretty normal to produce to very ropey work when a novice - especially when first "flying solo" and pretty much everything you list can be explained by inexperience.
What should I do now?
If feasible I would suggest having a session with your colleague where you can take him through the ways the code could be improved. Make sure to also stress any good things about it as well!
Don't
Say things like:
What you did wrong here...
&
Your code sucks!
&
This isn't best practice
Do
Say things like:
If this section was written like this it would be more maintainable
&
What was you reasoning behind doing this section like this?
&
While the approach you took here works, best practice is usually to do XY&Z because of AB&C
Basically keep the conversation focused on the code and positive steps that could be taken to improve it, rather than negative statements and references to him.
What should I tell to management?
Give them your honest assessment, if you think he needs more training before future solo work then say so. You won't be doing anyone any favors by fudging it. But make sure to stress where "issues" have arisen through simple inexperience, and if they "got it" during your review with them mention this too
XYZ was a common mistake by novices, when I talked it through with [colleague] they totally understood and know how they improve next time.
What to do with all the mediocre job done so far?
Ultimately it's a management call to decide what to do with it - you say the code works so at this point it's about cost/benefit for any refactoring. It would be a great learning experience to have the colleague work on a version 2.0 that incorporates your feedback but if the code is functional enough to "release" to the client this might be a tough sell in short term ROI - it's not unreasonable to take the position that the colleague can take the lessons-learned into the next paying project. While not as an effective learning strategy it can still be more cost-effective in the long run.
What do do from now on, for all the code that will be written in the future?
Again this is a management call - it might not be a bad idea to have intermediate reviews with either yourself or another experienced developer to spot and correct any issues before the project is complete.
answered 2 days ago
motosubatsu
38.6k18101162
38.6k18101162
add a comment |
add a comment |
up vote
2
down vote
Every human have a threshold, the guy is a novice. I think the session to review the code must be fair and related to his level, underline the bad and good parts. In some bad cases, it is possible to guide him by asking questions like: how your code will react is this event happen or how flexible is your code if the client ask you to add this feature?
I would take note of the advance topics that were not mastered and I would introduce them gradually trough lunch and learn, pairing, later code review, session training, books, tutorials, etc.
If you are hard on him or criticize everything, probably the guy will start to ignore your feedback after a couple of months of code review and may end to hate his job if he feel depreciated.
Secondly, I would write down a list of what need to be addressed, I will prioritize that list then plan what the review can cover by the available time without exhausting the reviewer and the reviewed. A programmer repeats his errors when they do not understand a topic. So I would not feel the need to review everything in detail because he will probably repeat the same mistakes and you will have another chance to pick them up in the next code review. This will spread your recommendations trough multiple reviews and it will lightening the process. Also, there is probably uncovered topics that the guy will pick up by himself in the following months.
Finally, on the side, I would track the technical debt in the company planning tools.
Working solo with a client as a novice is usually a stressful task. The code works, that means he understood the requirement, the business domain and able to demonstrate leadership.
Here's the thing: If you are criticizing everything, that means everything needs to be criticized, and that means there are a lot of learning opportunities. If the colleague takes criticism as an attack, then that colleague has other issues that should be reported to management. You can criticize everything, as long as you are careful to frame it as a teaching moment; that builds respect and camaraderie.
– Ertai87
2 days ago
@Ertai87 I think we differ on our review process and it is ok because they is multiple ways to achieve the same goal. My opinion is learning is a slow human process, when reviewing, I prefer to focus on critical issues than trying to cover all the learning opportunities to ensure those critical issues will improve.
– Sebastien DErrico
2 days ago
add a comment |
up vote
2
down vote
Every human have a threshold, the guy is a novice. I think the session to review the code must be fair and related to his level, underline the bad and good parts. In some bad cases, it is possible to guide him by asking questions like: how your code will react is this event happen or how flexible is your code if the client ask you to add this feature?
I would take note of the advance topics that were not mastered and I would introduce them gradually trough lunch and learn, pairing, later code review, session training, books, tutorials, etc.
If you are hard on him or criticize everything, probably the guy will start to ignore your feedback after a couple of months of code review and may end to hate his job if he feel depreciated.
Secondly, I would write down a list of what need to be addressed, I will prioritize that list then plan what the review can cover by the available time without exhausting the reviewer and the reviewed. A programmer repeats his errors when they do not understand a topic. So I would not feel the need to review everything in detail because he will probably repeat the same mistakes and you will have another chance to pick them up in the next code review. This will spread your recommendations trough multiple reviews and it will lightening the process. Also, there is probably uncovered topics that the guy will pick up by himself in the following months.
Finally, on the side, I would track the technical debt in the company planning tools.
Working solo with a client as a novice is usually a stressful task. The code works, that means he understood the requirement, the business domain and able to demonstrate leadership.
Here's the thing: If you are criticizing everything, that means everything needs to be criticized, and that means there are a lot of learning opportunities. If the colleague takes criticism as an attack, then that colleague has other issues that should be reported to management. You can criticize everything, as long as you are careful to frame it as a teaching moment; that builds respect and camaraderie.
– Ertai87
2 days ago
@Ertai87 I think we differ on our review process and it is ok because they is multiple ways to achieve the same goal. My opinion is learning is a slow human process, when reviewing, I prefer to focus on critical issues than trying to cover all the learning opportunities to ensure those critical issues will improve.
– Sebastien DErrico
2 days ago
add a comment |
up vote
2
down vote
up vote
2
down vote
Every human have a threshold, the guy is a novice. I think the session to review the code must be fair and related to his level, underline the bad and good parts. In some bad cases, it is possible to guide him by asking questions like: how your code will react is this event happen or how flexible is your code if the client ask you to add this feature?
I would take note of the advance topics that were not mastered and I would introduce them gradually trough lunch and learn, pairing, later code review, session training, books, tutorials, etc.
If you are hard on him or criticize everything, probably the guy will start to ignore your feedback after a couple of months of code review and may end to hate his job if he feel depreciated.
Secondly, I would write down a list of what need to be addressed, I will prioritize that list then plan what the review can cover by the available time without exhausting the reviewer and the reviewed. A programmer repeats his errors when they do not understand a topic. So I would not feel the need to review everything in detail because he will probably repeat the same mistakes and you will have another chance to pick them up in the next code review. This will spread your recommendations trough multiple reviews and it will lightening the process. Also, there is probably uncovered topics that the guy will pick up by himself in the following months.
Finally, on the side, I would track the technical debt in the company planning tools.
Working solo with a client as a novice is usually a stressful task. The code works, that means he understood the requirement, the business domain and able to demonstrate leadership.
Every human have a threshold, the guy is a novice. I think the session to review the code must be fair and related to his level, underline the bad and good parts. In some bad cases, it is possible to guide him by asking questions like: how your code will react is this event happen or how flexible is your code if the client ask you to add this feature?
I would take note of the advance topics that were not mastered and I would introduce them gradually trough lunch and learn, pairing, later code review, session training, books, tutorials, etc.
If you are hard on him or criticize everything, probably the guy will start to ignore your feedback after a couple of months of code review and may end to hate his job if he feel depreciated.
Secondly, I would write down a list of what need to be addressed, I will prioritize that list then plan what the review can cover by the available time without exhausting the reviewer and the reviewed. A programmer repeats his errors when they do not understand a topic. So I would not feel the need to review everything in detail because he will probably repeat the same mistakes and you will have another chance to pick them up in the next code review. This will spread your recommendations trough multiple reviews and it will lightening the process. Also, there is probably uncovered topics that the guy will pick up by himself in the following months.
Finally, on the side, I would track the technical debt in the company planning tools.
Working solo with a client as a novice is usually a stressful task. The code works, that means he understood the requirement, the business domain and able to demonstrate leadership.
edited 2 days ago
answered 2 days ago
Sebastien DErrico
1,040514
1,040514
Here's the thing: If you are criticizing everything, that means everything needs to be criticized, and that means there are a lot of learning opportunities. If the colleague takes criticism as an attack, then that colleague has other issues that should be reported to management. You can criticize everything, as long as you are careful to frame it as a teaching moment; that builds respect and camaraderie.
– Ertai87
2 days ago
@Ertai87 I think we differ on our review process and it is ok because they is multiple ways to achieve the same goal. My opinion is learning is a slow human process, when reviewing, I prefer to focus on critical issues than trying to cover all the learning opportunities to ensure those critical issues will improve.
– Sebastien DErrico
2 days ago
add a comment |
Here's the thing: If you are criticizing everything, that means everything needs to be criticized, and that means there are a lot of learning opportunities. If the colleague takes criticism as an attack, then that colleague has other issues that should be reported to management. You can criticize everything, as long as you are careful to frame it as a teaching moment; that builds respect and camaraderie.
– Ertai87
2 days ago
@Ertai87 I think we differ on our review process and it is ok because they is multiple ways to achieve the same goal. My opinion is learning is a slow human process, when reviewing, I prefer to focus on critical issues than trying to cover all the learning opportunities to ensure those critical issues will improve.
– Sebastien DErrico
2 days ago
Here's the thing: If you are criticizing everything, that means everything needs to be criticized, and that means there are a lot of learning opportunities. If the colleague takes criticism as an attack, then that colleague has other issues that should be reported to management. You can criticize everything, as long as you are careful to frame it as a teaching moment; that builds respect and camaraderie.
– Ertai87
2 days ago
Here's the thing: If you are criticizing everything, that means everything needs to be criticized, and that means there are a lot of learning opportunities. If the colleague takes criticism as an attack, then that colleague has other issues that should be reported to management. You can criticize everything, as long as you are careful to frame it as a teaching moment; that builds respect and camaraderie.
– Ertai87
2 days ago
@Ertai87 I think we differ on our review process and it is ok because they is multiple ways to achieve the same goal. My opinion is learning is a slow human process, when reviewing, I prefer to focus on critical issues than trying to cover all the learning opportunities to ensure those critical issues will improve.
– Sebastien DErrico
2 days ago
@Ertai87 I think we differ on our review process and it is ok because they is multiple ways to achieve the same goal. My opinion is learning is a slow human process, when reviewing, I prefer to focus on critical issues than trying to cover all the learning opportunities to ensure those critical issues will improve.
– Sebastien DErrico
2 days ago
add a comment |
up vote
2
down vote
The junior's colleague code is reviewed after one month. That is a very long time. So I'm wondering what the purpose of this review is. If the purpose is to fix all the faults in the code that was created during one month, that will be an awful lot of work and nobody will be happy with either of you. If the purpose is to teach how to do things better, that's a bit late, but better late than never.
Assuming that nobody wants to spend weeks on fixing everything, I would look at the code, find strategic and tactical mistakes that were made, and then spend a good amount of time with the colleague to discuss these things.
Strategic mistakes are things that you can (just about) get away with in a project that took a month to create, but that will kill you in a one year project. Tactical mistakes are things that are localised and can be fixed in a localised way.
For the future: The best time for a code review is before the code is written. Figure out what strategic plan there is (if any) and fix it if there are problems. And then there is the question: Do you want good code quality (review tasks that didn't take more than a day), or do you want your colleague to learn (every week, spend time reviewing, find problematic code, and discuss how to fix and avoid such code.
add a comment |
up vote
2
down vote
The junior's colleague code is reviewed after one month. That is a very long time. So I'm wondering what the purpose of this review is. If the purpose is to fix all the faults in the code that was created during one month, that will be an awful lot of work and nobody will be happy with either of you. If the purpose is to teach how to do things better, that's a bit late, but better late than never.
Assuming that nobody wants to spend weeks on fixing everything, I would look at the code, find strategic and tactical mistakes that were made, and then spend a good amount of time with the colleague to discuss these things.
Strategic mistakes are things that you can (just about) get away with in a project that took a month to create, but that will kill you in a one year project. Tactical mistakes are things that are localised and can be fixed in a localised way.
For the future: The best time for a code review is before the code is written. Figure out what strategic plan there is (if any) and fix it if there are problems. And then there is the question: Do you want good code quality (review tasks that didn't take more than a day), or do you want your colleague to learn (every week, spend time reviewing, find problematic code, and discuss how to fix and avoid such code.
add a comment |
up vote
2
down vote
up vote
2
down vote
The junior's colleague code is reviewed after one month. That is a very long time. So I'm wondering what the purpose of this review is. If the purpose is to fix all the faults in the code that was created during one month, that will be an awful lot of work and nobody will be happy with either of you. If the purpose is to teach how to do things better, that's a bit late, but better late than never.
Assuming that nobody wants to spend weeks on fixing everything, I would look at the code, find strategic and tactical mistakes that were made, and then spend a good amount of time with the colleague to discuss these things.
Strategic mistakes are things that you can (just about) get away with in a project that took a month to create, but that will kill you in a one year project. Tactical mistakes are things that are localised and can be fixed in a localised way.
For the future: The best time for a code review is before the code is written. Figure out what strategic plan there is (if any) and fix it if there are problems. And then there is the question: Do you want good code quality (review tasks that didn't take more than a day), or do you want your colleague to learn (every week, spend time reviewing, find problematic code, and discuss how to fix and avoid such code.
The junior's colleague code is reviewed after one month. That is a very long time. So I'm wondering what the purpose of this review is. If the purpose is to fix all the faults in the code that was created during one month, that will be an awful lot of work and nobody will be happy with either of you. If the purpose is to teach how to do things better, that's a bit late, but better late than never.
Assuming that nobody wants to spend weeks on fixing everything, I would look at the code, find strategic and tactical mistakes that were made, and then spend a good amount of time with the colleague to discuss these things.
Strategic mistakes are things that you can (just about) get away with in a project that took a month to create, but that will kill you in a one year project. Tactical mistakes are things that are localised and can be fixed in a localised way.
For the future: The best time for a code review is before the code is written. Figure out what strategic plan there is (if any) and fix it if there are problems. And then there is the question: Do you want good code quality (review tasks that didn't take more than a day), or do you want your colleague to learn (every week, spend time reviewing, find problematic code, and discuss how to fix and avoid such code.
answered 2 days ago
gnasher729
78.6k34143248
78.6k34143248
add a comment |
add a comment |
Lisa Anne is a new contributor. Be nice, and check out our Code of Conduct.
Lisa Anne is a new contributor. Be nice, and check out our Code of Conduct.
Lisa Anne is a new contributor. Be nice, and check out our Code of Conduct.
Lisa Anne is a new contributor. Be nice, and check out our Code of Conduct.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fworkplace.stackexchange.com%2fquestions%2f122623%2fcolleague-wrote-bad-source-code-what-do-do%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
6
How much experience have you had in reviewing anyone's code before now? You can point out your concerns to him in a way that doesn't sound like you are attacking him.
– Kozaky
2 days ago
I'm voting to close this question as off-topic because this is about code review not navigating the workplace. This is more appropriate to softwareengineering.stackexchange.com
– IDrinkandIKnowThings
2 days ago
What is your charter for the code review? In your company, does the output of a code review usually include your judgement as to their fitness to work solo? Does it usually include comments about the mediocrity of the job? Does it usually include comments about "questionable choices"? Do you job. Do the code review as it is expected to be done. Leave the management of your colleagues to their bosses.
– Joe Strazzere
2 days ago
1
Sounds like the new person did a mediocre quality job that is common across many industries. Now is the time for some mentorship and training to bring the person up to higher standards. Very few people begin as star performers. The question about "all the code that will be written in the future" suggests that the OP feels the situation is permanent. It is not necessarily true, performance varies across a career.
– teego1967
2 days ago
Can you give us some examples here "questionable choices" for example and little testing how do you know what tests they or the end client performed
– Neuromancer
2 days ago