Take the 2-minute tour ×
Programmers Stack Exchange is a question and answer site for professional programmers interested in conceptual questions about software development. It's 100% free, no registration required.

Possible Duplicate:
How do you explain refactoring to a non-technical person?
How to justify code refactoring time?

My supervisor is the CTO of the company that I work at, he is the jack of all trades master of none. I have inherited a codebase of about 400,000 lines of PHP from 2 previous developers. The state of the code could be compared to that of a dumpster behind an italian restaurant, a mess and full of spaghetti.

I have been in my current position for about 7 months and have been trying to get approval to refactor parts of the codebase as I am given bugs/features to work on. My attempts to get permission to dedicate time to this task has been met with little more than a passing 'no' in response.

What are some steps that I can take to explain to my superior why we need to clean up this spaghetti mess of a codebase and see if we can't get it refactored into a manageable, scalable, and secure state.

I am looking more for how to explain the need to someone who will say they understand, but truely have no idea so they shoot it down to avoid trouble later.

share|improve this question

marked as duplicate by Kate Gregory, Robert Harvey, superM, JB King, gnat Jan 9 '13 at 21:05

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

    
yet another possible duplicate: Quantifying the value of refactoring in commercial terms –  gnat Jan 9 '13 at 21:07
    
Kind of a duplicate yes, but not exact. I am looking more for how to explain it the need to someone who will say they understand, but truely have no idea so they shoot it down to avoid trouble later. –  Jeremy1026 Jan 9 '13 at 21:09
1  
@Jeremy1026 Read the two duplicates and their answers thoroughly, and if you don't feel your question is answered in them, then please edit it to tell us exactly how it's different from the duplicates and flag for moderation attention so we can review your edits and re-open. –  Yannis Rizos Jan 9 '13 at 21:14
    
I never ask for permission. I just do it. It's part of the job. When they ask, "Why did you change this?" I tell them that it was part of the changes needed to implement feature/bug fix #X, as the checkin comment shows. Over time, the reduction in bugs and improved maintainability of the code becomes obvious. –  Jeff Grigg Jan 10 '13 at 8:43
add comment

1 Answer

I had the same issue here. My manager however is a developer himself and he actually initiated the re-factoring.

He's biggest argument to the management is that working on a spaghetti code takes much more time, and is much less effective then working with a proper codebase.

The amount of time-to-completion and cost effectiveness would greatly imrpove. (As well as the moral of the development team) getMyThing() as apposed to getthisthingThanThAt($getgrht().whatisthis().@$that->what ? "this":that)->NOW();

share|improve this answer
add comment

Not the answer you're looking for? Browse other questions tagged or ask your own question.