Top "Refactoring" questions

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

What's the best way to refactor a method that has too many (6+) parameters?

Occasionally I come across methods with an uncomfortable number of parameters. More often than not, they seem to be constructors. …

refactoring
How can I reduce the Cyclomatic Complexity of this?

I have a method that receives an Object and does something based on what type of object it detects: void …

java refactoring instanceof cyclomatic-complexity
Rename or refactor files in Xcode

Is it possible to rename/refactor a class file and have it rename the actual file on disk? If so, …

iphone objective-c xcode refactoring renaming
Unit testing for C++ code - Tools and methodology

I'm working on a large c++ system that is has been in development for a few years now. As part …

c++ unit-testing refactoring
Refactoring in Vim

Of course the fact that you can refactor on IDEs is priceless for many, I hardly ever do it when …

vim refactoring
When is a function too long?

35 lines, 55 lines, 100 lines, 300 lines? When you should start to break it apart? I'm asking because I have a function with 60 …

function refactoring coding-style
Is there a working C++ refactoring tool?

Does anybody know a fully featured refactoring tool for C++ that works reliably with large code bases (some 100.000 lines)? I …

c++ refactoring
How to Rename Files in Android Studio

Is there a way to change name of a file in Android Studio projects? I come from Visual Studio and …

android android-studio refactoring file-rename
Rename a class in Xcode: Refactor... is grayed out (disabled). Why?

Why is Refactor... grayed out (disabled) in Xcode? I'd like to rename a class.

iphone xcode refactoring
Visual Studio: Is there a "move class to different namespace" refactoring?

I'm doing some architectural cleanup that involves moving a bunch of classes into different projects and/or namespaces. Currently I'm …

visual-studio refactoring