MorleyDev
|
|
« Reply #1 on: April 12, 2015, 10:42:50 AM » |
|
The main advantages of Resharper are it basically adds the missing re-factoring features to Visual Studio.
A good way to get a feel for what it adds are to use the free community edition of IntelliJ for Java, and then look at the many refactoring options it adds to Java that Visual Studio lacks for C#. Almost all of those features are added by Resharper. I find it speeds up how quickly you can change code by several factors, which is vital for when you want to use best-practices like Red-Green-Refactor Test-Driven-Development. Or if you've inherited a set of legacy code and need to maintain it, since it makes refactoring the code much easier and not something you need to be as afraid of doing.
It also highlights where code can be simplified, such as where you can remove or invert ifs and loops to reduce nesting, or unused functions and variables. I've managed to, just by using ALT+ENTER, reduce 50 line functions to 10 lines. And then break those functions into two 5 line functions that are much more expressive, readable and testable than the previous code was. Then, for good measure, extract those functions into independent injected dependencies that I can easily write unit tests for. All of that almost entirely using keyboard shortcuts.
The for-to-linq isn't it forcing a conversion, it just highlights where it's possible. And it can unroll the linq into for statements too, if you want. Either way, it's something it just tells you it can do and you have to tell it to do. And you can turn it off if you like, so it won't even highlight where it thinks linq would be simpler than loops.
This is often useful because after you learn to read Linq functions (the .Where(x).Select(x)), it's often much more readable than for loops and for data processing you don't see much performance difference in the more complex cases. Or it's situations where the potential for performance increase isn't worth the readability-hit.
It also adds "Code Style enforcement" where it highlights where you break the specified coding style. Very useful for working in a team.
Is it worth the $250? Depends. For personal hobby development, probably not. For professional work, I consider it a good investment. It comes with a 30 day trial, so I'd recommend downloading it and seeing if you think it's worth it. Personally, after using it professionally for a year, I found coding in Visual Studio highly frustrating without it which made me go and buy it for personal use.
|