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.
oooo! I get to be the first guy to say “ReSharper adds all (most?) of this to Visual Studio!” Beating the rush, and all that.
Seriously, go download the eval of R# 4.0 and live with it for a while. It definitely does #1, #2 I’m not sure about (never noticed but I *think* it can?) #3 yes, #4 um, ok no, but if you use the VS & source integration doesn’t visual studio already do this? and #5 – again, doesn’t VS2008 already do this? If not then R# must have added it in.
Anyway, go get ReSharper, it makes using Visual Studio almost pleasant.
Trasa covered most of it; I’ll clarify that Visual Studio does automatically add files to source control and show changed lines, but only if you’re using Team Foundation System. Once you go Microsoft, you’ve gotta go all Microsoft and spend money on things like Resharper for the features they forgot 😛
Has anyone used NetBeans for large PHP applications? Hacking Gallery2 in PHP Eclipse is always a bit awkward because of certain naming conventions…
If you use Visual SVN for source control using subversion files added to the project are automatically added to source control
Definitely, VS without Resharper simply sucks! It’s a totally different experience altogether. The only little problem is that once you install Resharper, you’ll find things that appear twice, like refactoring. The plus is that you can turn things on and off, and do a little bit of mix and match. I myself go with Resharper implementation of pretty much everything and turn off VS’s, but it all depends on what you like. NetBeans is definitely great, but I would love to have something like Resharper for it, although things are improving with each and every version. And BTW, no, IntelliJ simply doesn’t do it for me. It simply hides too much by default and gets too much in the way.
Nice review 😉 Probably, you would like to see more over related content here-
http://nbguru.wordpress.com/proj-netbeans/quest-for-a-better-ide/
I agree on #1 especially – it’s great to have your machine figure out your imports for you.