Top "Refactoring" questions

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

How to quickly change variable names in Vim?

I am using Vim to read through a lot of C and Perl code containing many single letter variable names. …

vim variables refactoring
Tools for PHP code refactoring

Are there any tools which support refactoring PHP code (renaming variables, extracting methods, finding method references, ...)? Thank you.

php refactoring
Simple way to reorder methods of a Java class in IntelliJ?

Is there a simpler way of reordering methods within a class source file in IntelliJ than cutting and pasting the …

java refactoring methods intellij-idea
Delete unused packages from requirements file

Is there any easy way to delete no-more-using packages from requirements file? I wrote a bash script for this task …

python pip refactoring pycharm requirements.txt
What keyboard shortcut is there to organize C# usings in Visual Studio?

Is there a way to organize C# usings (remove and sort, in separate or together) via a shortcut in Visual …

c# visual-studio visual-studio-2013 refactoring
find dead JavaScript code?

We are refactoring a legacy web app and as a result are "killing" quite a lot of JavaScript code but …

javascript refactoring dead-code
How to determine if a type is a type of collection?

I am trying to determine if a runtime type is some sort of collection type. What I have below works, …

c# collections types refactoring
Using mixins vs components for code reuse in Facebook React

I'm beginning to use Facebook React in a Backbone project and so far it's going really well. However, I noticed …

javascript refactoring mixins reactjs
Is there an elegant way to remove nulls while transforming a Collection using Guava?

I have a question about simplifying some Collection handling code, when using Google Collections (update: Guava). I've got a bunch …

java collections refactoring guava
How to find dead code in a large react project?

In order to refactor a client-side project, i'm looking for a safe way to find (and delete) unused code. What …

javascript reactjs refactoring dead-code