0
votes
0answers
61 views

On the process of replacing an internal framework by a public one [duplicate]

I am working on several applications which depends on a framework which was developed by a prior engineer in the company. The framework was mainly developed and maintained in the early 2000s, and ...
17
votes
4answers
1k views

How to convince/prove my manager that a rewriting is needed rather than a refactoring [duplicate]

My manager wants me to refactor a gigantic amount of terribly-coupled, macroed, full of private namespace methods, hierarchy-perverted (even 10+ levels of inheritance) code which hasn't been (indeed) ...
0
votes
0answers
107 views

Should I start refactor this messy project even if I know I won't have the time to completely refactor everything? [duplicate]

I have this older project (1st release 2005-ish) I've inherited that a customer asks me to fix or add something to now and then. It's a bit of a mess architecture-wise. Basically it's an ASP.NET ...
2
votes
4answers
211 views

Considerations before rewriting a software component from scratch? [duplicate]

A piece of software is a patchwork of old and undocumented efforts. There are no comments, no documentation, and the code is hairy -- it involves Unix shell scripts that check for dummy files and then ...
0
votes
1answer
894 views

Introducing Fowler's Table Data Gateway to refactor poorly designed systems

I am developing an application, which currently has about 150,000 lines of code. The previous developer didn't really use any discipline when writing code. Application is in production but is ...
1
vote
2answers
137 views

How to handle product rebranding in code in a short time frame

We've all been there - a product feature is called "gold", and then a week before launch they decide it is to be called "platinum". Luckily, you had some nous about you so the UI code is easy to ...
2
votes
2answers
150 views

Starting a recurring project from scratch [duplicate]

We have a project that keeps recurring. The client expects us to run a website twice a year and this is happened for the last year and a half. I took the last working copy and based our latest website ...
41
votes
10answers
2k views

Is it a good idea to schedule regular time to clean up code? [closed]

I'm managing a small team of developers. Every so often we decide we're going to spend a day or two to clean up our code. Would it be a good idea to schedule regular time, say 1 week every 2 months, ...
11
votes
3answers
418 views

How do you break out of the role of a code maintainer? [closed]

In my last three jobs, I was a code maintainer. In all three cases, I was hired after the majority of the code for the project was already written. I'm a self taught programmer. Before I ever started ...
3
votes
2answers
93 views

Handling fast growing multi-function services

My team has been developing a web business application for more than a year. It started quite small, but now it is growing bigger and bigger. I think it's time for refactoring. Looking at the code, I ...
8
votes
2answers
490 views

How do you call the process of taking a part of a function and making an individual function of it?

I know there was a technical term for this. I'm just can't remember what it was. If the title needs clarification, here is what I mean; If this is the old code: Result foobar(Param1,Param2,Param3) { ...
3
votes
1answer
112 views

How should I write new code when the old codebase and the environment uses lots of globals in PHP

I'm working in the Wordpress environment which itself heavily relies on globals and the codebase I'm maintaining introduces some more. I want this to change and so I'm trying to think how should I ...
2
votes
7answers
667 views

After how much line of code a function should be break down?

While working on existing code base, I usually come across procedures that contain Abusive use of IF and Switch statements. The procedures consist of overwhelming code, which I think require ...
20
votes
13answers
2k views

When is it acceptable to NOT fix broken windows?

In reference to broken windows, are there times when refactoring is best left for a future activity? For example, if a project to add some new features to an existing internal system is assigned to a ...
3
votes
3answers
169 views

To reorganize code, what to choose between library and service?

I want to reorganize a large application with lot of code duplication into multiple components. Plus, some code is also duplicated over other applications. The common set of functionality that can be ...
81
votes
8answers
5k views

What is the most effective way to add functionality to unfamiliar, structurally unsound code? [duplicate]

This is probably something everyone has to face during the development sooner or later. You have an existing code written by someone else, and you have to extend it to work under new requirements. ...
31
votes
7answers
1k views

Code maintenance: keeping a bad pattern when extending new code for being consistent, or not?

I have to extend an existing module of a project. I don't like the way it has been done (lots of anti-pattern involved, like copy/pasted code). I don't want to perform a complete refactor for many ...
10
votes
4answers
307 views

What are good approaches to cleaning up old projects?

I've got some software that I wrote around 2 years ago and needs some features added to it. I've realised that it's in an awful mess, and I have the urge to move everything around, tidy up, etc. I've ...
14
votes
11answers
410 views

Should you fix preexisting defects while working on something else?

Conundrum: During the course of working on a new feature or fixing a defect, you find a legacy problem in code. What should you do? Fix it and risk altering the behavior of the code. It has either ...
11
votes
4answers
395 views

Code duplication with no obvious abstraction

Have you ever encountered a case of code duplication where, upon looking at the lines of code, you couldn't fit a thematic abstraction to it that faithfully describes its role in the logic? And what ...