5 Things I like better about NetBeans than Visual Studio
I have recently started a new job which requires me to work in both Visual Studio 2008 and NetBeans 6.1. I love both IDEs and often wish I could get a mashup of the two. This points out to me how the IDE has become such an important part of modern software development. When I started programming in the mid-eighties programs where written in a text editor, or an interpreter that behaved a lot like a text editor, and then compiled (or interpreted) and ran separately. At that time everyone argued about what language was the most powerful and productive. I am starting to wonder if the language is losing its relevance and the IDE is what makes the programmer productive? Probably not yet.
I decided to make a list of the features I love in NetBeans that Visual Studio does not have. I plan to make a follow up list of things I like better about Visual Studio.
- Auto fix feature: When the IDE detects an error and it if it can suggest a fix, it will. One common fix I use all the time is when I use a class that I have not imported yet. The IDE will will present a list of imports that have that class defined in. All I have to do is select the proper library to import. I never manually type in an import anymore.
- Placing the edit caret over a variable, function call, or whatever will highlight all the occurrences: I find this feature particularly useful. In Visual Studio I often do a search to follow a variable through some code when looking for bugs. In NetBeans I just place the edit caret within the variable and all of its occurrences in the file will be highlighted. Making it quick to follow a variable through the code. This also works for curly braces and parentheses to find the matching one.
- Typing a left quote, parentheses, or curly bracket will automatically add the right one: I got into the habit in Visual Studio of typing quotes, curly braces, and parentheses in pairs so I knew I had them matched while writing code. NetBeans automatically does all this for me. I just type the left character and the IDE places the right hand character with after the edit caret.
- Adding a new file to the project will automatically add it to source control: The most common way I break a build in Visual Studio is when I create a new class but forget to add it to source control and then check in the dependent files and modified project. NetBeans will automatically add the new files to source control, so when I commit, the new files are also committed.
- The bar on the side of the editor showing me where the break points and code changes are in the whole file: On the right side of the editor in NetBeans there is a bar that represents the whole file. It has a little mark there the edit caret currently is. It also has lines that represent different traits in the file. Where the code is modified there is a green line in the bar. Break points are represented with a red line. If you have a variable selected there will be a tan line at every occurrence of the variable (or function). If you click on one of these lines the IDE will take you to the code automatically.
I am sure there are other cool, sophisticated features that can be powerful, but these are the features I used every day. I love these features and when working in Visual Studio I really miss them and can tell they affect my productivity. The same can be said about several features visual studio has that NetBeans does not, but I will cover that next time.