I'm going to be adding some new functionality to an existing program.
So you just got a few important arguments arising out of that duty :-)
Ask yourself and (after getting a clear overview of those details in your head) ask your boss if the added functionality shall be:
- secure (both ways: against attackers, keep system integrity)
- error handling (fast debugging)
- reusable (fast further development, short development periods)
- easy to maintain (uptime)
- easy to expand to further functionality (secure investment)
- fast running at a nice (customizable) level (saving money in above places shouldn't cause a need for 'bigger' hardware)
- What could (and what should at least) be done to make the code to be added to 'act' in such way?
- Would you need to 'adjust' other code to speed up your developement or to achieve above named goals or can you assure above objectives in any other way, eg. is some functionality meanwhile provided by modules on CPAN and do they do a better job (more powerfull, more flexible, even if only more heavy stress tested - thats an argument for a module from CPAN :-) )?
- Could other code gain any of above named points, especially reusability, ease of maintenance and expansion if modified?
At a company I worked once the developers group was cut down twice and of 35 people only 7 now actually do still work there now. But the first thing they did was a code review, and there where about 120 modules to be reviewed (yes, all inhouse products, they even wrote their own (btw. really cool) templating system). The measurement was about the same as above but also covered "coding style" to assure a monolith architecture and to reduce the amount of code in general in the way that further abstraction in the end did not redruce the number of modules, but reduced the amount of code dramatically.
The entire application was partially rewritten to be OO and to run under mod_perl. (35 web servers behind 7 load balancers) So they approved that good coding practice is the base for any kind of efficiency.
Msg me if you want proof.
Have a nice day
All decision is left to your taste