Getting Things Done, On Time
Today I implemented refactoring support for a DSL.
Basically, it is Extract Business Condition, and it was explicitly modeled after the way R# handles Extract Variable. It even share the same shortcut, ctrl+alt+v.
I also took a stub in implementing automatic pattern recognition, so when the system recognize a common usage pattern, it will automatically refactor it to a high level abstraction. It works, although I think that I can make it even more flexible than it is now.
Now, if someone from the Resharper team is actually reading this, they would know that I am lying. There is no way of doing something of this magnitude in just one day, not even if you have an extremely helpful compiler.
And they would be right. I didn't try to tackle a feature of this magnitude. What I did do was to find the most common scenario for this feature and nail that.
I am taking this approach explicitly and deliberately. With the end result that I get to show value very rapidly. And yes, the customer is made aware of the limitations of this approach. I also tell them that they can get the feature by tomorrow, with error message if they are trying to do something that is not supported.
Trying to support 100% is hard, trying to support just 20% turn out to be (not quite) easy. And now you get to nitpick it to death, I won't respond for about a day, since I am just about to board a flight.
Comments
Very nice. The possibilities of creating other types of refactoring functionality beyond your DSL's 'Extract Business Condition' are indeed endless.
All great things must start small. It is amazing how developers, managers, customers, marketers, sales people, etc. (the list goes on...) get locked in with the "all or nothing" mentality. ("We can not ship until all the features are complete".) Providing incremental value to users is how you make everyone happy.
Do you mean you created ReSharper plugin, VS macro, or what? I'd like to see some screenshots :) And no, it is entirely possible to create refactoring stub in one day. It takes weeks later on, when you use it and understand that it could be smarter, smarter, smarter...
Ilya,
It is not on VS, it is on my own custom app.
Comment preview