Linked Questions

7
votes
2answers
3k views

how to refactor many singletons

I have a medium-sized python program (~5000 lines of code), which I've built up over time, with no particular plan as I went ahead. The architecture I've ended up with consists of 5-6 large Singleton ...
13
votes
3answers
9k views

How would you test Google Maps “Get Directions” feature?

(I imagine this would be a good interview question, but in my case it's more pragmatic than that.) We have a large & complex application that models an extremely long and sophisticated chemical ...
15
votes
5answers
926 views

Should older code be updated to use newer language constructs, or should outdated constructs be stuck with?

I want to make some enhancements in some still-functional code that was written a long time ago, before the programming language it is written in grew in features. In theory, the whole project uses ...
6
votes
3answers
1k views

Writing clean code without knowledge on the programmed topic

Are there any tips that can help me create clean code when I'm working with something poorly documented and completely new to me? It is easy to write a clean code when we are writing something for ...
10
votes
3answers
2k views

What would help when refactoring a large method to ensure that I don't break anything?

I'm currently refactoring a part of a large codebase with no unit tests whatsoever. I tried to refactor code the brute way, i.e. by trying to guess what the code is doing and what changes wouldn't ...
13
votes
4answers
687 views

Is there any commonly accepted guidelines about how to write modern C?

I have a strong Java/Groovy background and I've been assigned to a team that maintain quite a big C code base for an administrative software. Some pain points, like dealing with blob in the database ...
10
votes
4answers
2k views

How can I update a large legacy codebase to meet specific quality standards?

There is a lot of information about tools and techniques for improving legacy codebases, but I haven't come across any successful real world case studies. Most advice is on the micro level, and while ...
4
votes
5answers
2k views

What is the best way to understand code in a project with null documentation?

It is our first game and we are a start-up. We had a programmer who suddenly is seeming to be a dead weight. Though we knew him personally we thought that he was as motivated as we are and hence I ...
3
votes
3answers
769 views

Refactoring previous intern's noodle code with future interns in mind [duplicate]

Background I've run across this problem as I am currently an intern at a large company's local software division. I have been given the task of extending a project that several previous interns have ...
3
votes
3answers
2k views

Effective way to estimate dead code removal?

I've been working in an application with about 100k LOCs and basically We have been reworking features to comply with a new architecture based on a new technology stack. This work is almost finished ...
2
votes
3answers
2k views

How do you debug a complex application? [closed]

I have an application that is returning the wrong output, when it is run with a particular input choice. I haven't been able to get anywhere near a diagnosis of the fault, despite spending about a ...
3
votes
2answers
4k views

Converting static utility class into singleton

In company where I work we have lots of "utility" classes, each has lots of code inside (thousands of lines), and they are all static. And one static methods call anothers. The problem here is that ...
-3
votes
3answers
817 views

inheritance and polymorphism decrease readability

Most of financial apps have complex calculations and over time have change in calculation methods. Then you mostly create a new version for your calculator class that extends previous calculator and ...
4
votes
4answers
626 views

Refactoring Bittersweet PHP: How can I make this less painful?

I've just been assigned a large project. The client has had multiple developers across different companies working on their (intended to be) large, MySQL driven eCommerce site. The DB schema is ......
8
votes
2answers
611 views

Is it wise to use Clang for personal code analysis in a project that builds with gcc?

I started to work on several C projects that are building using gcc. I believe this choice was made for several reasons: Had to cross-compile for arm very early on (I think). Performance is the first ...

15 30 50 per page