How do you explain to your boss that the code needs a major rewrite? [closed]
Clash Royale CLAN TAG#URR8PPP
.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty margin-bottom:0;
up vote
5
down vote
favorite
I recently joined an organization in which I am to be one of the two new lead developers on the public website. The previous developer (who was alone) left a sizable codebase which although functional, is rigid and fragile. Normally, the saying goes "if it ain't broke don't fix it", but in this case the poor coding style and lack of documentation makes the code unreadable (to me, the other developer, and our interns) and thus require extra time when adding features, tweaking things. Both my partner and I have deemed it essential for both our mental well-being as well as necessary if the development teams are to progress on the organization's schedule.
The problem is that our boss, who is also the head of the organization (biology phD, not a developer) thinks that the last guy was brilliant, and doesn't believe that a rewrite is necessary. Both my partner and I have attempted to contact the previous developer, but to no avail - it appears that he has disappeared off the face of the earth. How do I/we convince the boss the code is in dire need of a major rewrite?
Past Action:
- We've informed our boss the code is a mess
- We've showed him the code (he responds, "what's wrong with it?")
EDIT
I'm am almost completely certain a rewrite is needed. I apologize to all the non-pythonistas out there, but the code looks like this:
def index(request):
return render(request,'index.html',locals())
repeated for perhaps 20 of the 30 "view" functions in the code. For those of you who don't understand, this type of code essentially requires every member of the team to memorize what is used for each template, and makes it difficult to change the code without breaking anything. From what I could tell, the previous developer had no more than 1 year worth of experience coding, and perhaps none professionally. The code is quite buggy right now, and nobody can quite figure out where/why.
If it changes anything, this is a non-profit research organization so grabbing market share isn't that important, but since members generally stay for about a year or so (while doing their post-doc work) I think readability/ease of maintenance is probably the single largest thing we need (other than functionality).
software-industry professionalism communication
closed as off-topic by Simon O'Doherty, CincinnatiProgrammer, jcmeloni, Telastyn, HLGEM Aug 1 '13 at 13:44
- This question does not appear to be about the workplace within the scope defined in the help center.
 |Â
show 2 more comments
up vote
5
down vote
favorite
I recently joined an organization in which I am to be one of the two new lead developers on the public website. The previous developer (who was alone) left a sizable codebase which although functional, is rigid and fragile. Normally, the saying goes "if it ain't broke don't fix it", but in this case the poor coding style and lack of documentation makes the code unreadable (to me, the other developer, and our interns) and thus require extra time when adding features, tweaking things. Both my partner and I have deemed it essential for both our mental well-being as well as necessary if the development teams are to progress on the organization's schedule.
The problem is that our boss, who is also the head of the organization (biology phD, not a developer) thinks that the last guy was brilliant, and doesn't believe that a rewrite is necessary. Both my partner and I have attempted to contact the previous developer, but to no avail - it appears that he has disappeared off the face of the earth. How do I/we convince the boss the code is in dire need of a major rewrite?
Past Action:
- We've informed our boss the code is a mess
- We've showed him the code (he responds, "what's wrong with it?")
EDIT
I'm am almost completely certain a rewrite is needed. I apologize to all the non-pythonistas out there, but the code looks like this:
def index(request):
return render(request,'index.html',locals())
repeated for perhaps 20 of the 30 "view" functions in the code. For those of you who don't understand, this type of code essentially requires every member of the team to memorize what is used for each template, and makes it difficult to change the code without breaking anything. From what I could tell, the previous developer had no more than 1 year worth of experience coding, and perhaps none professionally. The code is quite buggy right now, and nobody can quite figure out where/why.
If it changes anything, this is a non-profit research organization so grabbing market share isn't that important, but since members generally stay for about a year or so (while doing their post-doc work) I think readability/ease of maintenance is probably the single largest thing we need (other than functionality).
software-industry professionalism communication
closed as off-topic by Simon O'Doherty, CincinnatiProgrammer, jcmeloni, Telastyn, HLGEM Aug 1 '13 at 13:44
- This question does not appear to be about the workplace within the scope defined in the help center.
6
Are you positive a rewrite is necessary? Smarter people than I have suggested that a full rewrite is rarely the correct approach. Is it impossible to update it bit by bit as you work on specific functionality? Is the current implementation causing specific issues beyond causing you difficulty in understanding the code?
– jmac
Aug 1 '13 at 1:33
5
More useful on programmers.stackexchange.com
– Simon O'Doherty
Aug 1 '13 at 6:53
@SimonO'Doherty I was wondering about this, but I think it's more relevant in workplace because I have no doubt in my mind that it needs a rewrite, the difficulty is in convincing my boss.
– Snakes and Coffee
Aug 1 '13 at 9:03
6
In most situations I found iterative refactoring the best course. Full rewrites are annoying, especially since you usually don't have a crystal clear specification.
– CodesInChaos
Aug 1 '13 at 11:12
YOu and your team mates need to read this: amazon.com/Working-Effectively-Legacy-Code-ebook/dp/B005OYHF0A/…
– HLGEM
Aug 1 '13 at 13:44
 |Â
show 2 more comments
up vote
5
down vote
favorite
up vote
5
down vote
favorite
I recently joined an organization in which I am to be one of the two new lead developers on the public website. The previous developer (who was alone) left a sizable codebase which although functional, is rigid and fragile. Normally, the saying goes "if it ain't broke don't fix it", but in this case the poor coding style and lack of documentation makes the code unreadable (to me, the other developer, and our interns) and thus require extra time when adding features, tweaking things. Both my partner and I have deemed it essential for both our mental well-being as well as necessary if the development teams are to progress on the organization's schedule.
The problem is that our boss, who is also the head of the organization (biology phD, not a developer) thinks that the last guy was brilliant, and doesn't believe that a rewrite is necessary. Both my partner and I have attempted to contact the previous developer, but to no avail - it appears that he has disappeared off the face of the earth. How do I/we convince the boss the code is in dire need of a major rewrite?
Past Action:
- We've informed our boss the code is a mess
- We've showed him the code (he responds, "what's wrong with it?")
EDIT
I'm am almost completely certain a rewrite is needed. I apologize to all the non-pythonistas out there, but the code looks like this:
def index(request):
return render(request,'index.html',locals())
repeated for perhaps 20 of the 30 "view" functions in the code. For those of you who don't understand, this type of code essentially requires every member of the team to memorize what is used for each template, and makes it difficult to change the code without breaking anything. From what I could tell, the previous developer had no more than 1 year worth of experience coding, and perhaps none professionally. The code is quite buggy right now, and nobody can quite figure out where/why.
If it changes anything, this is a non-profit research organization so grabbing market share isn't that important, but since members generally stay for about a year or so (while doing their post-doc work) I think readability/ease of maintenance is probably the single largest thing we need (other than functionality).
software-industry professionalism communication
I recently joined an organization in which I am to be one of the two new lead developers on the public website. The previous developer (who was alone) left a sizable codebase which although functional, is rigid and fragile. Normally, the saying goes "if it ain't broke don't fix it", but in this case the poor coding style and lack of documentation makes the code unreadable (to me, the other developer, and our interns) and thus require extra time when adding features, tweaking things. Both my partner and I have deemed it essential for both our mental well-being as well as necessary if the development teams are to progress on the organization's schedule.
The problem is that our boss, who is also the head of the organization (biology phD, not a developer) thinks that the last guy was brilliant, and doesn't believe that a rewrite is necessary. Both my partner and I have attempted to contact the previous developer, but to no avail - it appears that he has disappeared off the face of the earth. How do I/we convince the boss the code is in dire need of a major rewrite?
Past Action:
- We've informed our boss the code is a mess
- We've showed him the code (he responds, "what's wrong with it?")
EDIT
I'm am almost completely certain a rewrite is needed. I apologize to all the non-pythonistas out there, but the code looks like this:
def index(request):
return render(request,'index.html',locals())
repeated for perhaps 20 of the 30 "view" functions in the code. For those of you who don't understand, this type of code essentially requires every member of the team to memorize what is used for each template, and makes it difficult to change the code without breaking anything. From what I could tell, the previous developer had no more than 1 year worth of experience coding, and perhaps none professionally. The code is quite buggy right now, and nobody can quite figure out where/why.
If it changes anything, this is a non-profit research organization so grabbing market share isn't that important, but since members generally stay for about a year or so (while doing their post-doc work) I think readability/ease of maintenance is probably the single largest thing we need (other than functionality).
software-industry professionalism communication
edited Apr 13 '17 at 12:48
Community♦
1
1
asked Jul 31 '13 at 21:06
Snakes and Coffee
358314
358314
closed as off-topic by Simon O'Doherty, CincinnatiProgrammer, jcmeloni, Telastyn, HLGEM Aug 1 '13 at 13:44
- This question does not appear to be about the workplace within the scope defined in the help center.
closed as off-topic by Simon O'Doherty, CincinnatiProgrammer, jcmeloni, Telastyn, HLGEM Aug 1 '13 at 13:44
- This question does not appear to be about the workplace within the scope defined in the help center.
6
Are you positive a rewrite is necessary? Smarter people than I have suggested that a full rewrite is rarely the correct approach. Is it impossible to update it bit by bit as you work on specific functionality? Is the current implementation causing specific issues beyond causing you difficulty in understanding the code?
– jmac
Aug 1 '13 at 1:33
5
More useful on programmers.stackexchange.com
– Simon O'Doherty
Aug 1 '13 at 6:53
@SimonO'Doherty I was wondering about this, but I think it's more relevant in workplace because I have no doubt in my mind that it needs a rewrite, the difficulty is in convincing my boss.
– Snakes and Coffee
Aug 1 '13 at 9:03
6
In most situations I found iterative refactoring the best course. Full rewrites are annoying, especially since you usually don't have a crystal clear specification.
– CodesInChaos
Aug 1 '13 at 11:12
YOu and your team mates need to read this: amazon.com/Working-Effectively-Legacy-Code-ebook/dp/B005OYHF0A/…
– HLGEM
Aug 1 '13 at 13:44
 |Â
show 2 more comments
6
Are you positive a rewrite is necessary? Smarter people than I have suggested that a full rewrite is rarely the correct approach. Is it impossible to update it bit by bit as you work on specific functionality? Is the current implementation causing specific issues beyond causing you difficulty in understanding the code?
– jmac
Aug 1 '13 at 1:33
5
More useful on programmers.stackexchange.com
– Simon O'Doherty
Aug 1 '13 at 6:53
@SimonO'Doherty I was wondering about this, but I think it's more relevant in workplace because I have no doubt in my mind that it needs a rewrite, the difficulty is in convincing my boss.
– Snakes and Coffee
Aug 1 '13 at 9:03
6
In most situations I found iterative refactoring the best course. Full rewrites are annoying, especially since you usually don't have a crystal clear specification.
– CodesInChaos
Aug 1 '13 at 11:12
YOu and your team mates need to read this: amazon.com/Working-Effectively-Legacy-Code-ebook/dp/B005OYHF0A/…
– HLGEM
Aug 1 '13 at 13:44
6
6
Are you positive a rewrite is necessary? Smarter people than I have suggested that a full rewrite is rarely the correct approach. Is it impossible to update it bit by bit as you work on specific functionality? Is the current implementation causing specific issues beyond causing you difficulty in understanding the code?
– jmac
Aug 1 '13 at 1:33
Are you positive a rewrite is necessary? Smarter people than I have suggested that a full rewrite is rarely the correct approach. Is it impossible to update it bit by bit as you work on specific functionality? Is the current implementation causing specific issues beyond causing you difficulty in understanding the code?
– jmac
Aug 1 '13 at 1:33
5
5
More useful on programmers.stackexchange.com
– Simon O'Doherty
Aug 1 '13 at 6:53
More useful on programmers.stackexchange.com
– Simon O'Doherty
Aug 1 '13 at 6:53
@SimonO'Doherty I was wondering about this, but I think it's more relevant in workplace because I have no doubt in my mind that it needs a rewrite, the difficulty is in convincing my boss.
– Snakes and Coffee
Aug 1 '13 at 9:03
@SimonO'Doherty I was wondering about this, but I think it's more relevant in workplace because I have no doubt in my mind that it needs a rewrite, the difficulty is in convincing my boss.
– Snakes and Coffee
Aug 1 '13 at 9:03
6
6
In most situations I found iterative refactoring the best course. Full rewrites are annoying, especially since you usually don't have a crystal clear specification.
– CodesInChaos
Aug 1 '13 at 11:12
In most situations I found iterative refactoring the best course. Full rewrites are annoying, especially since you usually don't have a crystal clear specification.
– CodesInChaos
Aug 1 '13 at 11:12
YOu and your team mates need to read this: amazon.com/Working-Effectively-Legacy-Code-ebook/dp/B005OYHF0A/…
– HLGEM
Aug 1 '13 at 13:44
YOu and your team mates need to read this: amazon.com/Working-Effectively-Legacy-Code-ebook/dp/B005OYHF0A/…
– HLGEM
Aug 1 '13 at 13:44
 |Â
show 2 more comments
4 Answers
4
active
oldest
votes
up vote
8
down vote
You need to convince him in the language that he understands.
Are you able to quantify the impact of "bad" code?
How much technical debt have you incurred, how it is impacting developer productivity, code stability, quality.
Are you able to give him a demo on the lines of
- Take the worst area of the code could be the buggiest,unstable or in extensible due to bad code.
- Choose a current metric - X number of hours to review code, Y number of bug currently in the code due to it being of poor standards, Z number of hours to extend current code to implement feature A
- Refactor or redesign it
- Reflect change and demonstrate how much time it takes now .....X1 , Y1, Z1
This won't be trivial effort and could be a mini project. But if you feel strongly about the situation and want to change it, dont ask permission and do it and show him the results.
add a comment |Â
up vote
4
down vote
First, 'needs a rewrite' is vague. You have to be able to draw boxes around offending code or definitions.
If the old developer wrote code that left the site exposed to SQL injection attacks, show your boss before and after (what you have, what it should be, and the consequences of the old style). Is the application simply forms with no classes for tables, no data services, no user controls, and no unit tests? Then show him how you go through 50 forms making in-situ code edits when a single column added to a table. Inconsistencies - show him Form A done one way and Form B done another, and why they should have more in common.
If that doesn't work, you'll have to show him badly structure biological systems, and explain why the code you have is equivalent to global warming and ocean acidification.
Given further details (Python and scattered global variable use) I would describe the present system in the following terms: 'Within this 200,000 line codebase there are definitions that 'visible' to any line of code, and these definitions are scattered at random in the files. If anyone changes or adds any of these definitions, then everyone involved in the project has to know about them before they make any modifications on their part. One programmer doing this by himself can keep this straight, but that's not how we're doing it. We need to designate certain places for things to be, certain rules for things to follow, and certain patterns that, if we know how one is done, we kind of know what to expect for all similar structures.'
Start paging down through the files while your boss is remoted in or looking over your shoulder, searching for the globals, and ask your boss to memorize each one. Then tell him you'll have to bring him up to speed any time anyone of the programmers changes or adds any of those variables. Have some kind of structural documentation that explains what your target is, and the minimum cost approach to reaching it.
Another approach: hint that you have a spreadsheet with 100 pages. Each page has 1000 rows times 100 columns of values. Within these 100 pages there are 100 'primitive' cells that have no formula - all other cells are calculated from these 100 'primitives'. His job is to know where all those 100 primitive cells are and keep in his head what they do to affect the spreadsheet calculations. Cells are in different locations in each spreadsheet and none have special highlighting, fonts, or backgrounds. Given this spreadsheet, ask 3 people to make structural changes (not simply data elements), which in some cases involves adding a few more 'primitive' cells. It's up to everyone on the team to make sure these changes are coordinated.
From our (me and the other project lead) assessment, the code is essentially unsalvagable, at least in part due to the abuse of python'slocals
andglobals
throughout the code. Essentially, the entire codebase was written by one programmer
– Snakes and Coffee
Jul 31 '13 at 22:01
@SnakesandCoffee - While I'm not familiar with Python, I can see a scenario where you get an error condition, and then have to figure out what is within scope at each potential debug point. Is your boss the kind of person what would sit and watch while you went through this exercise? Would this be persuasive?
– Meredith Poor
Jul 31 '13 at 23:56
Unfortunately, he's usually flying out somewhere to give a talk on something/meeting with professors, and so I rarely see him (he's in Michigan).
– Snakes and Coffee
Aug 1 '13 at 0:06
What I see here is an attempt to maintain the entire project 'symbol table' (every variable and constant in the system) in the heads of everyone on a team. One person can do this, but now you have multiple people that have to all know 'everything', including the new objects created by other people as quickly as they create them. Sounds very dangerous to me.
– Meredith Poor
Aug 1 '13 at 0:52
add a comment |Â
up vote
1
down vote
I have been in your situation many times before, and have had similar issues involving the inheritance of bad architecture and poorly maintained code in the past and present. Fortunately, in my current position, my boss does have a programming background and has encouraged me to do whatever I need to do to improve the quality from both a performance and change management perspective.
Because your boss lacks the technical expertise to fully comprehend what you mean, you are never going to get his/her buy-in on making wholesale changes to the code. The best you can hope to do is restructure an rebuild it piece by piece as you go along. Draft a master infrastructure plan and instruct the other developers that any future additions or revisions need to be implemented according to that plan. This way, everyone gets what they want--your boss gets to keep the water running and you get to install brand new pipes where they are most needed, instead of having to patch on top of patches. In addition, it will give you a little extra time to dig deeper into the existing requirements of the system and incorporate any "new" requests that have been sitting on the back burner because of the instability of the current system.
add a comment |Â
up vote
0
down vote
I experienced the same difficulty with my current boss. However, I sat with him and explained him why I thought that changing the code was necessary.
Since your boss doesn't have a programming background, maybe you should try to explain the problem to him with an analogy. Explain the problem as an everyday problem, for example: if we were building a car, said vehicle wouldn't work because of this and that problems of design, therefore we should redesign.
Maybe with a different approach your boss will understand more clearly why you should rewrite the code. I must stress that you shouldn't necessarily "blame" the author of the code for the evident deficiencies (even if he wrote it poorly in the first place), because it could give the wrong impression to your boss and cause you unnecessary problems. Instead, suggest ways to improve the code and explain why you believe that those are the way to go.
Analogy is a good idea. However, non-programming background doesn't necessarily mean non-technical. In some cases people's understanding is close enough that a programmer-to-programmer explanation works.
– Meredith Poor
Aug 1 '13 at 23:10
add a comment |Â
4 Answers
4
active
oldest
votes
4 Answers
4
active
oldest
votes
active
oldest
votes
active
oldest
votes
up vote
8
down vote
You need to convince him in the language that he understands.
Are you able to quantify the impact of "bad" code?
How much technical debt have you incurred, how it is impacting developer productivity, code stability, quality.
Are you able to give him a demo on the lines of
- Take the worst area of the code could be the buggiest,unstable or in extensible due to bad code.
- Choose a current metric - X number of hours to review code, Y number of bug currently in the code due to it being of poor standards, Z number of hours to extend current code to implement feature A
- Refactor or redesign it
- Reflect change and demonstrate how much time it takes now .....X1 , Y1, Z1
This won't be trivial effort and could be a mini project. But if you feel strongly about the situation and want to change it, dont ask permission and do it and show him the results.
add a comment |Â
up vote
8
down vote
You need to convince him in the language that he understands.
Are you able to quantify the impact of "bad" code?
How much technical debt have you incurred, how it is impacting developer productivity, code stability, quality.
Are you able to give him a demo on the lines of
- Take the worst area of the code could be the buggiest,unstable or in extensible due to bad code.
- Choose a current metric - X number of hours to review code, Y number of bug currently in the code due to it being of poor standards, Z number of hours to extend current code to implement feature A
- Refactor or redesign it
- Reflect change and demonstrate how much time it takes now .....X1 , Y1, Z1
This won't be trivial effort and could be a mini project. But if you feel strongly about the situation and want to change it, dont ask permission and do it and show him the results.
add a comment |Â
up vote
8
down vote
up vote
8
down vote
You need to convince him in the language that he understands.
Are you able to quantify the impact of "bad" code?
How much technical debt have you incurred, how it is impacting developer productivity, code stability, quality.
Are you able to give him a demo on the lines of
- Take the worst area of the code could be the buggiest,unstable or in extensible due to bad code.
- Choose a current metric - X number of hours to review code, Y number of bug currently in the code due to it being of poor standards, Z number of hours to extend current code to implement feature A
- Refactor or redesign it
- Reflect change and demonstrate how much time it takes now .....X1 , Y1, Z1
This won't be trivial effort and could be a mini project. But if you feel strongly about the situation and want to change it, dont ask permission and do it and show him the results.
You need to convince him in the language that he understands.
Are you able to quantify the impact of "bad" code?
How much technical debt have you incurred, how it is impacting developer productivity, code stability, quality.
Are you able to give him a demo on the lines of
- Take the worst area of the code could be the buggiest,unstable or in extensible due to bad code.
- Choose a current metric - X number of hours to review code, Y number of bug currently in the code due to it being of poor standards, Z number of hours to extend current code to implement feature A
- Refactor or redesign it
- Reflect change and demonstrate how much time it takes now .....X1 , Y1, Z1
This won't be trivial effort and could be a mini project. But if you feel strongly about the situation and want to change it, dont ask permission and do it and show him the results.
edited Aug 2 '13 at 8:46
Martin Schröder
1251110
1251110
answered Jul 31 '13 at 22:39
the_reluctant_tester
85548
85548
add a comment |Â
add a comment |Â
up vote
4
down vote
First, 'needs a rewrite' is vague. You have to be able to draw boxes around offending code or definitions.
If the old developer wrote code that left the site exposed to SQL injection attacks, show your boss before and after (what you have, what it should be, and the consequences of the old style). Is the application simply forms with no classes for tables, no data services, no user controls, and no unit tests? Then show him how you go through 50 forms making in-situ code edits when a single column added to a table. Inconsistencies - show him Form A done one way and Form B done another, and why they should have more in common.
If that doesn't work, you'll have to show him badly structure biological systems, and explain why the code you have is equivalent to global warming and ocean acidification.
Given further details (Python and scattered global variable use) I would describe the present system in the following terms: 'Within this 200,000 line codebase there are definitions that 'visible' to any line of code, and these definitions are scattered at random in the files. If anyone changes or adds any of these definitions, then everyone involved in the project has to know about them before they make any modifications on their part. One programmer doing this by himself can keep this straight, but that's not how we're doing it. We need to designate certain places for things to be, certain rules for things to follow, and certain patterns that, if we know how one is done, we kind of know what to expect for all similar structures.'
Start paging down through the files while your boss is remoted in or looking over your shoulder, searching for the globals, and ask your boss to memorize each one. Then tell him you'll have to bring him up to speed any time anyone of the programmers changes or adds any of those variables. Have some kind of structural documentation that explains what your target is, and the minimum cost approach to reaching it.
Another approach: hint that you have a spreadsheet with 100 pages. Each page has 1000 rows times 100 columns of values. Within these 100 pages there are 100 'primitive' cells that have no formula - all other cells are calculated from these 100 'primitives'. His job is to know where all those 100 primitive cells are and keep in his head what they do to affect the spreadsheet calculations. Cells are in different locations in each spreadsheet and none have special highlighting, fonts, or backgrounds. Given this spreadsheet, ask 3 people to make structural changes (not simply data elements), which in some cases involves adding a few more 'primitive' cells. It's up to everyone on the team to make sure these changes are coordinated.
From our (me and the other project lead) assessment, the code is essentially unsalvagable, at least in part due to the abuse of python'slocals
andglobals
throughout the code. Essentially, the entire codebase was written by one programmer
– Snakes and Coffee
Jul 31 '13 at 22:01
@SnakesandCoffee - While I'm not familiar with Python, I can see a scenario where you get an error condition, and then have to figure out what is within scope at each potential debug point. Is your boss the kind of person what would sit and watch while you went through this exercise? Would this be persuasive?
– Meredith Poor
Jul 31 '13 at 23:56
Unfortunately, he's usually flying out somewhere to give a talk on something/meeting with professors, and so I rarely see him (he's in Michigan).
– Snakes and Coffee
Aug 1 '13 at 0:06
What I see here is an attempt to maintain the entire project 'symbol table' (every variable and constant in the system) in the heads of everyone on a team. One person can do this, but now you have multiple people that have to all know 'everything', including the new objects created by other people as quickly as they create them. Sounds very dangerous to me.
– Meredith Poor
Aug 1 '13 at 0:52
add a comment |Â
up vote
4
down vote
First, 'needs a rewrite' is vague. You have to be able to draw boxes around offending code or definitions.
If the old developer wrote code that left the site exposed to SQL injection attacks, show your boss before and after (what you have, what it should be, and the consequences of the old style). Is the application simply forms with no classes for tables, no data services, no user controls, and no unit tests? Then show him how you go through 50 forms making in-situ code edits when a single column added to a table. Inconsistencies - show him Form A done one way and Form B done another, and why they should have more in common.
If that doesn't work, you'll have to show him badly structure biological systems, and explain why the code you have is equivalent to global warming and ocean acidification.
Given further details (Python and scattered global variable use) I would describe the present system in the following terms: 'Within this 200,000 line codebase there are definitions that 'visible' to any line of code, and these definitions are scattered at random in the files. If anyone changes or adds any of these definitions, then everyone involved in the project has to know about them before they make any modifications on their part. One programmer doing this by himself can keep this straight, but that's not how we're doing it. We need to designate certain places for things to be, certain rules for things to follow, and certain patterns that, if we know how one is done, we kind of know what to expect for all similar structures.'
Start paging down through the files while your boss is remoted in or looking over your shoulder, searching for the globals, and ask your boss to memorize each one. Then tell him you'll have to bring him up to speed any time anyone of the programmers changes or adds any of those variables. Have some kind of structural documentation that explains what your target is, and the minimum cost approach to reaching it.
Another approach: hint that you have a spreadsheet with 100 pages. Each page has 1000 rows times 100 columns of values. Within these 100 pages there are 100 'primitive' cells that have no formula - all other cells are calculated from these 100 'primitives'. His job is to know where all those 100 primitive cells are and keep in his head what they do to affect the spreadsheet calculations. Cells are in different locations in each spreadsheet and none have special highlighting, fonts, or backgrounds. Given this spreadsheet, ask 3 people to make structural changes (not simply data elements), which in some cases involves adding a few more 'primitive' cells. It's up to everyone on the team to make sure these changes are coordinated.
From our (me and the other project lead) assessment, the code is essentially unsalvagable, at least in part due to the abuse of python'slocals
andglobals
throughout the code. Essentially, the entire codebase was written by one programmer
– Snakes and Coffee
Jul 31 '13 at 22:01
@SnakesandCoffee - While I'm not familiar with Python, I can see a scenario where you get an error condition, and then have to figure out what is within scope at each potential debug point. Is your boss the kind of person what would sit and watch while you went through this exercise? Would this be persuasive?
– Meredith Poor
Jul 31 '13 at 23:56
Unfortunately, he's usually flying out somewhere to give a talk on something/meeting with professors, and so I rarely see him (he's in Michigan).
– Snakes and Coffee
Aug 1 '13 at 0:06
What I see here is an attempt to maintain the entire project 'symbol table' (every variable and constant in the system) in the heads of everyone on a team. One person can do this, but now you have multiple people that have to all know 'everything', including the new objects created by other people as quickly as they create them. Sounds very dangerous to me.
– Meredith Poor
Aug 1 '13 at 0:52
add a comment |Â
up vote
4
down vote
up vote
4
down vote
First, 'needs a rewrite' is vague. You have to be able to draw boxes around offending code or definitions.
If the old developer wrote code that left the site exposed to SQL injection attacks, show your boss before and after (what you have, what it should be, and the consequences of the old style). Is the application simply forms with no classes for tables, no data services, no user controls, and no unit tests? Then show him how you go through 50 forms making in-situ code edits when a single column added to a table. Inconsistencies - show him Form A done one way and Form B done another, and why they should have more in common.
If that doesn't work, you'll have to show him badly structure biological systems, and explain why the code you have is equivalent to global warming and ocean acidification.
Given further details (Python and scattered global variable use) I would describe the present system in the following terms: 'Within this 200,000 line codebase there are definitions that 'visible' to any line of code, and these definitions are scattered at random in the files. If anyone changes or adds any of these definitions, then everyone involved in the project has to know about them before they make any modifications on their part. One programmer doing this by himself can keep this straight, but that's not how we're doing it. We need to designate certain places for things to be, certain rules for things to follow, and certain patterns that, if we know how one is done, we kind of know what to expect for all similar structures.'
Start paging down through the files while your boss is remoted in or looking over your shoulder, searching for the globals, and ask your boss to memorize each one. Then tell him you'll have to bring him up to speed any time anyone of the programmers changes or adds any of those variables. Have some kind of structural documentation that explains what your target is, and the minimum cost approach to reaching it.
Another approach: hint that you have a spreadsheet with 100 pages. Each page has 1000 rows times 100 columns of values. Within these 100 pages there are 100 'primitive' cells that have no formula - all other cells are calculated from these 100 'primitives'. His job is to know where all those 100 primitive cells are and keep in his head what they do to affect the spreadsheet calculations. Cells are in different locations in each spreadsheet and none have special highlighting, fonts, or backgrounds. Given this spreadsheet, ask 3 people to make structural changes (not simply data elements), which in some cases involves adding a few more 'primitive' cells. It's up to everyone on the team to make sure these changes are coordinated.
First, 'needs a rewrite' is vague. You have to be able to draw boxes around offending code or definitions.
If the old developer wrote code that left the site exposed to SQL injection attacks, show your boss before and after (what you have, what it should be, and the consequences of the old style). Is the application simply forms with no classes for tables, no data services, no user controls, and no unit tests? Then show him how you go through 50 forms making in-situ code edits when a single column added to a table. Inconsistencies - show him Form A done one way and Form B done another, and why they should have more in common.
If that doesn't work, you'll have to show him badly structure biological systems, and explain why the code you have is equivalent to global warming and ocean acidification.
Given further details (Python and scattered global variable use) I would describe the present system in the following terms: 'Within this 200,000 line codebase there are definitions that 'visible' to any line of code, and these definitions are scattered at random in the files. If anyone changes or adds any of these definitions, then everyone involved in the project has to know about them before they make any modifications on their part. One programmer doing this by himself can keep this straight, but that's not how we're doing it. We need to designate certain places for things to be, certain rules for things to follow, and certain patterns that, if we know how one is done, we kind of know what to expect for all similar structures.'
Start paging down through the files while your boss is remoted in or looking over your shoulder, searching for the globals, and ask your boss to memorize each one. Then tell him you'll have to bring him up to speed any time anyone of the programmers changes or adds any of those variables. Have some kind of structural documentation that explains what your target is, and the minimum cost approach to reaching it.
Another approach: hint that you have a spreadsheet with 100 pages. Each page has 1000 rows times 100 columns of values. Within these 100 pages there are 100 'primitive' cells that have no formula - all other cells are calculated from these 100 'primitives'. His job is to know where all those 100 primitive cells are and keep in his head what they do to affect the spreadsheet calculations. Cells are in different locations in each spreadsheet and none have special highlighting, fonts, or backgrounds. Given this spreadsheet, ask 3 people to make structural changes (not simply data elements), which in some cases involves adding a few more 'primitive' cells. It's up to everyone on the team to make sure these changes are coordinated.
edited Aug 1 '13 at 23:17
answered Jul 31 '13 at 21:51
Meredith Poor
8,8661730
8,8661730
From our (me and the other project lead) assessment, the code is essentially unsalvagable, at least in part due to the abuse of python'slocals
andglobals
throughout the code. Essentially, the entire codebase was written by one programmer
– Snakes and Coffee
Jul 31 '13 at 22:01
@SnakesandCoffee - While I'm not familiar with Python, I can see a scenario where you get an error condition, and then have to figure out what is within scope at each potential debug point. Is your boss the kind of person what would sit and watch while you went through this exercise? Would this be persuasive?
– Meredith Poor
Jul 31 '13 at 23:56
Unfortunately, he's usually flying out somewhere to give a talk on something/meeting with professors, and so I rarely see him (he's in Michigan).
– Snakes and Coffee
Aug 1 '13 at 0:06
What I see here is an attempt to maintain the entire project 'symbol table' (every variable and constant in the system) in the heads of everyone on a team. One person can do this, but now you have multiple people that have to all know 'everything', including the new objects created by other people as quickly as they create them. Sounds very dangerous to me.
– Meredith Poor
Aug 1 '13 at 0:52
add a comment |Â
From our (me and the other project lead) assessment, the code is essentially unsalvagable, at least in part due to the abuse of python'slocals
andglobals
throughout the code. Essentially, the entire codebase was written by one programmer
– Snakes and Coffee
Jul 31 '13 at 22:01
@SnakesandCoffee - While I'm not familiar with Python, I can see a scenario where you get an error condition, and then have to figure out what is within scope at each potential debug point. Is your boss the kind of person what would sit and watch while you went through this exercise? Would this be persuasive?
– Meredith Poor
Jul 31 '13 at 23:56
Unfortunately, he's usually flying out somewhere to give a talk on something/meeting with professors, and so I rarely see him (he's in Michigan).
– Snakes and Coffee
Aug 1 '13 at 0:06
What I see here is an attempt to maintain the entire project 'symbol table' (every variable and constant in the system) in the heads of everyone on a team. One person can do this, but now you have multiple people that have to all know 'everything', including the new objects created by other people as quickly as they create them. Sounds very dangerous to me.
– Meredith Poor
Aug 1 '13 at 0:52
From our (me and the other project lead) assessment, the code is essentially unsalvagable, at least in part due to the abuse of python's
locals
and globals
throughout the code. Essentially, the entire codebase was written by one programmer– Snakes and Coffee
Jul 31 '13 at 22:01
From our (me and the other project lead) assessment, the code is essentially unsalvagable, at least in part due to the abuse of python's
locals
and globals
throughout the code. Essentially, the entire codebase was written by one programmer– Snakes and Coffee
Jul 31 '13 at 22:01
@SnakesandCoffee - While I'm not familiar with Python, I can see a scenario where you get an error condition, and then have to figure out what is within scope at each potential debug point. Is your boss the kind of person what would sit and watch while you went through this exercise? Would this be persuasive?
– Meredith Poor
Jul 31 '13 at 23:56
@SnakesandCoffee - While I'm not familiar with Python, I can see a scenario where you get an error condition, and then have to figure out what is within scope at each potential debug point. Is your boss the kind of person what would sit and watch while you went through this exercise? Would this be persuasive?
– Meredith Poor
Jul 31 '13 at 23:56
Unfortunately, he's usually flying out somewhere to give a talk on something/meeting with professors, and so I rarely see him (he's in Michigan).
– Snakes and Coffee
Aug 1 '13 at 0:06
Unfortunately, he's usually flying out somewhere to give a talk on something/meeting with professors, and so I rarely see him (he's in Michigan).
– Snakes and Coffee
Aug 1 '13 at 0:06
What I see here is an attempt to maintain the entire project 'symbol table' (every variable and constant in the system) in the heads of everyone on a team. One person can do this, but now you have multiple people that have to all know 'everything', including the new objects created by other people as quickly as they create them. Sounds very dangerous to me.
– Meredith Poor
Aug 1 '13 at 0:52
What I see here is an attempt to maintain the entire project 'symbol table' (every variable and constant in the system) in the heads of everyone on a team. One person can do this, but now you have multiple people that have to all know 'everything', including the new objects created by other people as quickly as they create them. Sounds very dangerous to me.
– Meredith Poor
Aug 1 '13 at 0:52
add a comment |Â
up vote
1
down vote
I have been in your situation many times before, and have had similar issues involving the inheritance of bad architecture and poorly maintained code in the past and present. Fortunately, in my current position, my boss does have a programming background and has encouraged me to do whatever I need to do to improve the quality from both a performance and change management perspective.
Because your boss lacks the technical expertise to fully comprehend what you mean, you are never going to get his/her buy-in on making wholesale changes to the code. The best you can hope to do is restructure an rebuild it piece by piece as you go along. Draft a master infrastructure plan and instruct the other developers that any future additions or revisions need to be implemented according to that plan. This way, everyone gets what they want--your boss gets to keep the water running and you get to install brand new pipes where they are most needed, instead of having to patch on top of patches. In addition, it will give you a little extra time to dig deeper into the existing requirements of the system and incorporate any "new" requests that have been sitting on the back burner because of the instability of the current system.
add a comment |Â
up vote
1
down vote
I have been in your situation many times before, and have had similar issues involving the inheritance of bad architecture and poorly maintained code in the past and present. Fortunately, in my current position, my boss does have a programming background and has encouraged me to do whatever I need to do to improve the quality from both a performance and change management perspective.
Because your boss lacks the technical expertise to fully comprehend what you mean, you are never going to get his/her buy-in on making wholesale changes to the code. The best you can hope to do is restructure an rebuild it piece by piece as you go along. Draft a master infrastructure plan and instruct the other developers that any future additions or revisions need to be implemented according to that plan. This way, everyone gets what they want--your boss gets to keep the water running and you get to install brand new pipes where they are most needed, instead of having to patch on top of patches. In addition, it will give you a little extra time to dig deeper into the existing requirements of the system and incorporate any "new" requests that have been sitting on the back burner because of the instability of the current system.
add a comment |Â
up vote
1
down vote
up vote
1
down vote
I have been in your situation many times before, and have had similar issues involving the inheritance of bad architecture and poorly maintained code in the past and present. Fortunately, in my current position, my boss does have a programming background and has encouraged me to do whatever I need to do to improve the quality from both a performance and change management perspective.
Because your boss lacks the technical expertise to fully comprehend what you mean, you are never going to get his/her buy-in on making wholesale changes to the code. The best you can hope to do is restructure an rebuild it piece by piece as you go along. Draft a master infrastructure plan and instruct the other developers that any future additions or revisions need to be implemented according to that plan. This way, everyone gets what they want--your boss gets to keep the water running and you get to install brand new pipes where they are most needed, instead of having to patch on top of patches. In addition, it will give you a little extra time to dig deeper into the existing requirements of the system and incorporate any "new" requests that have been sitting on the back burner because of the instability of the current system.
I have been in your situation many times before, and have had similar issues involving the inheritance of bad architecture and poorly maintained code in the past and present. Fortunately, in my current position, my boss does have a programming background and has encouraged me to do whatever I need to do to improve the quality from both a performance and change management perspective.
Because your boss lacks the technical expertise to fully comprehend what you mean, you are never going to get his/her buy-in on making wholesale changes to the code. The best you can hope to do is restructure an rebuild it piece by piece as you go along. Draft a master infrastructure plan and instruct the other developers that any future additions or revisions need to be implemented according to that plan. This way, everyone gets what they want--your boss gets to keep the water running and you get to install brand new pipes where they are most needed, instead of having to patch on top of patches. In addition, it will give you a little extra time to dig deeper into the existing requirements of the system and incorporate any "new" requests that have been sitting on the back burner because of the instability of the current system.
answered Aug 1 '13 at 7:47
Neil T.
5,01711826
5,01711826
add a comment |Â
add a comment |Â
up vote
0
down vote
I experienced the same difficulty with my current boss. However, I sat with him and explained him why I thought that changing the code was necessary.
Since your boss doesn't have a programming background, maybe you should try to explain the problem to him with an analogy. Explain the problem as an everyday problem, for example: if we were building a car, said vehicle wouldn't work because of this and that problems of design, therefore we should redesign.
Maybe with a different approach your boss will understand more clearly why you should rewrite the code. I must stress that you shouldn't necessarily "blame" the author of the code for the evident deficiencies (even if he wrote it poorly in the first place), because it could give the wrong impression to your boss and cause you unnecessary problems. Instead, suggest ways to improve the code and explain why you believe that those are the way to go.
Analogy is a good idea. However, non-programming background doesn't necessarily mean non-technical. In some cases people's understanding is close enough that a programmer-to-programmer explanation works.
– Meredith Poor
Aug 1 '13 at 23:10
add a comment |Â
up vote
0
down vote
I experienced the same difficulty with my current boss. However, I sat with him and explained him why I thought that changing the code was necessary.
Since your boss doesn't have a programming background, maybe you should try to explain the problem to him with an analogy. Explain the problem as an everyday problem, for example: if we were building a car, said vehicle wouldn't work because of this and that problems of design, therefore we should redesign.
Maybe with a different approach your boss will understand more clearly why you should rewrite the code. I must stress that you shouldn't necessarily "blame" the author of the code for the evident deficiencies (even if he wrote it poorly in the first place), because it could give the wrong impression to your boss and cause you unnecessary problems. Instead, suggest ways to improve the code and explain why you believe that those are the way to go.
Analogy is a good idea. However, non-programming background doesn't necessarily mean non-technical. In some cases people's understanding is close enough that a programmer-to-programmer explanation works.
– Meredith Poor
Aug 1 '13 at 23:10
add a comment |Â
up vote
0
down vote
up vote
0
down vote
I experienced the same difficulty with my current boss. However, I sat with him and explained him why I thought that changing the code was necessary.
Since your boss doesn't have a programming background, maybe you should try to explain the problem to him with an analogy. Explain the problem as an everyday problem, for example: if we were building a car, said vehicle wouldn't work because of this and that problems of design, therefore we should redesign.
Maybe with a different approach your boss will understand more clearly why you should rewrite the code. I must stress that you shouldn't necessarily "blame" the author of the code for the evident deficiencies (even if he wrote it poorly in the first place), because it could give the wrong impression to your boss and cause you unnecessary problems. Instead, suggest ways to improve the code and explain why you believe that those are the way to go.
I experienced the same difficulty with my current boss. However, I sat with him and explained him why I thought that changing the code was necessary.
Since your boss doesn't have a programming background, maybe you should try to explain the problem to him with an analogy. Explain the problem as an everyday problem, for example: if we were building a car, said vehicle wouldn't work because of this and that problems of design, therefore we should redesign.
Maybe with a different approach your boss will understand more clearly why you should rewrite the code. I must stress that you shouldn't necessarily "blame" the author of the code for the evident deficiencies (even if he wrote it poorly in the first place), because it could give the wrong impression to your boss and cause you unnecessary problems. Instead, suggest ways to improve the code and explain why you believe that those are the way to go.
answered Jul 31 '13 at 21:17


m-oliv
287610
287610
Analogy is a good idea. However, non-programming background doesn't necessarily mean non-technical. In some cases people's understanding is close enough that a programmer-to-programmer explanation works.
– Meredith Poor
Aug 1 '13 at 23:10
add a comment |Â
Analogy is a good idea. However, non-programming background doesn't necessarily mean non-technical. In some cases people's understanding is close enough that a programmer-to-programmer explanation works.
– Meredith Poor
Aug 1 '13 at 23:10
Analogy is a good idea. However, non-programming background doesn't necessarily mean non-technical. In some cases people's understanding is close enough that a programmer-to-programmer explanation works.
– Meredith Poor
Aug 1 '13 at 23:10
Analogy is a good idea. However, non-programming background doesn't necessarily mean non-technical. In some cases people's understanding is close enough that a programmer-to-programmer explanation works.
– Meredith Poor
Aug 1 '13 at 23:10
add a comment |Â
6
Are you positive a rewrite is necessary? Smarter people than I have suggested that a full rewrite is rarely the correct approach. Is it impossible to update it bit by bit as you work on specific functionality? Is the current implementation causing specific issues beyond causing you difficulty in understanding the code?
– jmac
Aug 1 '13 at 1:33
5
More useful on programmers.stackexchange.com
– Simon O'Doherty
Aug 1 '13 at 6:53
@SimonO'Doherty I was wondering about this, but I think it's more relevant in workplace because I have no doubt in my mind that it needs a rewrite, the difficulty is in convincing my boss.
– Snakes and Coffee
Aug 1 '13 at 9:03
6
In most situations I found iterative refactoring the best course. Full rewrites are annoying, especially since you usually don't have a crystal clear specification.
– CodesInChaos
Aug 1 '13 at 11:12
YOu and your team mates need to read this: amazon.com/Working-Effectively-Legacy-Code-ebook/dp/B005OYHF0A/…
– HLGEM
Aug 1 '13 at 13:44