VS is BS December 8, 2005
When it comes to Integrated Development Environments (IDEs), I am a knowledgeable critic. Having used quite a few (Borland C++ 5x, Visual Studio 6, Eclipse, NetBeans, Visual Studio .NET, 2003, 2005, etc), I know what features I like and expect. My day job consists of me primarily using a Visual Studio of some sort, and lately it's 2005 (Whidbey). So, the statement that I am about to make is absolutely true. It sucks.
When I first heard about it, I heard that it would have features like "Refactoring", a cool debugger, "smart" IntelliSense (I know, it's called IntelliSense, yet it's incredibly unreliable), and... you know, I really don't know all the features. Having used 2003 for so long, and now using 2005, it doesn't seem to be that different. However, hearing some cool tech terms like "refactoring", I became excited that, finally, work might go faster, I could get more done in shorter amounts of time, finish projects early by factors of weeks, get 15% annual pay increases, and retire by the time I'm 30. However, none of this will be happening. It sucks.
In my free time, I primarily use Eclipse. I must say, a bazillion times, that it's the best IDE out there.
Let me define refactoring. Refactoring is taking existing code and doing stuff with it, whether it be renaming a class, variable or a function (and automatically updating all references to it), generating properties for member variables, and stuff that generally has to do with renaming, but it can also be quite advanced. Say you have a class with a few public functions in it. Refactoring could mean taking that class and extracting an interface out of it. Refactoring could also entail creating a variable out of a "String" constant in your class, and externalizing it to a file, so that you could then change it without having to recompile each time. You can have a bunch of lines of code that you could foresee yourself using over and over, so you would want to extract those lines and put them into a function, and the function signature would include any variables (and their types) that the code is using to be passed in as parameters. This is also refactoring.
VS 2005 simply fails in what I need it to do most. At the top of that list is generating properties from private member variables. Most, particularly good, object oriented programmers who like to save time in the long run will follow "patterns". Google "Gang of Four" for examples of what I mean. Three patterns that save a lot of time are the following:
Business Object Pattern.
Data Object Pattern.
Data Access Object Pattern.
Business Objects perform business logic on a data object (which holds data) and these are stored and retrieved to/from a database through the data access object. Simple. The one of these patterns that will have a lot of properties is the Data Object. These hold the data, and as such, you should be able to find out what the data is that it's holding, and you should be able to set those fields to different values.
If you have access to these two IDEs, try the following experiment. Copy these two classes into your IDE as new classes, do a refactor, and get it to generate all of the properties (in Java, getters and setters) for the variables in the class, and see which one is quicker.
Java code:import java.util.Date;
public class DataObject {
private Integer id;
private String name;
private String description;
private Date modified;
private DataObject parent;
private DataObject[] children;
}
C# code:public class DataObject {
private Int32 id;
private String name;
private String description;
private DateTime modified;
private DataObject parent;
private DataObject[] children;
}
You'll find that Eclipse's goes faster, simply because you can right click, then click "Source -> Generate Getters and Setters", click the "Select All" (or Select "getters" or "setters" [giving the option of making every property read only or write only]) button, and click "OK". Done.
You'll find that VS 2005 is F@$^%ING RETARDED!!! You have to highlight a certain field, one field at a time, click "Encapsulate Field", then you get no option to only generate the get or set parts of the property, and it comes with the option to "Update References" of either just the external references or all of them. You know where I'm going with this. If it's a PRIVATE FIELD, THERE ARE NO EXTERNAL REFERENCES!! Not one. You can just see the lack of care put into this aspect of the product. Why even include it? I just type them now, because the project I'm working on has 37 (THIRTY SEVEN!!) projects that it would have to search to encapsulate ONE lousy field to update references to A PRIVATE VARIABLE. And it takes forever on my machine, AND you can't F@#%%&@ turn OFF the "Update References" option?!!?!!
It's really retarded.
Some other gripes. Intellisense isn't any smarter. At first, I thought it was, but it's not. Say I have a class like this:public class Mulder { // x-files rules
public Mulder(){
this. /* <---- at this point, it drops down a list of accessible variables, which would include "memberVariable", but it doesn't! This is because it's defined *BELOW* the point at which you are typing (the constructor in this case), and VS 2005 has no idea that it's even there!! Try it yourself. */
}
private String memberVariable;
}
I have other smaller gripes on Intellisense, like it not selecting a String or a function that returns String when you are assigning something to a String variable.String scully = this. /* <-- doesn't go to the first string */
This is somewhat understandable though, as every object in .NET has a "ToString()" function on it, which is really just used for debugging. It doesn't perform any better with other object types though.
Anyway, I love Eclipse and open source, but knowing of these great features just spoils every "feature" that Microsoft comes out with.