Skip to main content

Questions tagged [refactoring]

Refactoring is a disciplined technique for restructuring an existing body of code, altering its internal structure without changing its external behavior.

2 votes
2 answers
304 views

I have a data aggregation function that collects statistics from multiple sources. The problem is that whenever I add a new metric, I need to manually update the code in three different places, which ...
Tank's user avatar
  • 37
18 votes
7 answers
4k views

I'm preparing a lecture where I will start with a many-branched conditional statement and replace it with a table. For example, I could start with: function getMonthName(monthNumber) { if (...
Ellen Spertus's user avatar
2 votes
2 answers
2k views

I'm currently working on a large legacy project that tried to implement Clean Architecture combined with MVVM, but unfortunately didn't fully adhere to the principles. One major problem: The ...
developKinberg's user avatar
4 votes
1 answer
297 views

Edit: @Ben Cottrell's comment said this was similar to a question about spaghetti code. While both questions involve large codebases, mine addresses a specific technical pattern: manual memory ...
Arno's user avatar
  • 151
3 votes
5 answers
1k views

I work with a lot of Groovy code. One feature of the language is the "safe navigation operator" (?), which I think of as an inline null check. There are many things about Groovy that I like, ...
Gus Murphy's user avatar
0 votes
4 answers
291 views

Suppose I have an application with version 1.2.3. If I refactor my application to remove deprecated calls while maintaining the same functionality and API as in version 1.2.3, what version number ...
Rafael's user avatar
  • 19
2 votes
3 answers
241 views

According to https://softwareengineering.stackexchange.com/a/212130/432039, if a class asks another class for the state, and then call methods of that class, it is called "feature envy", eg: ...
wcminipgasker2023's user avatar
0 votes
1 answer
230 views

Our php codes base has 6 different ways to do INSERT … ON DUPLICATE KEY UPDATE. It happened over years because the php framework is evolving and my team members come and go, although I won't say we ...
Qiulang 邱朗's user avatar

15 30 50 per page
1
2 3 4 5
51