Showing posts with label netbeans. Show all posts
Showing posts with label netbeans. Show all posts

23 March 2009

Netbeans usability

UPDATE:
The netbeans community solved my problem in 24 hours!!! It was a bug due to a problem of deserialization ... Deleting the ~/.netbeans folder solved the problem. Check out http://www.netbeans.org/issues/show_bug.cgi?id=161070

One of thing I enjoy the most in life is cooking. I distrust most of the products processed by the food industry - gm, transfat, the list is too long... - and try to cook with local, raw and organics ingredient (when available at a fair price). The kitchen utensils I use must be of very good quality: the knifes must cut without effort, the pan must not contain carcinogen material, etc... As the whole cooking experience becomes slightly stressful if I have to cook with other utensils, I tend to bring my best knifes with me on holidays ;-)

To stick with the cooking metaphor, I see the code as the ingredients, the IDE being the kitchen utensils and the working and tested software the resulting meal.
A lot of my productivity and the joy I feel crafting a beautiful software depends on my interaction with an IDE.

I have been using Netbeans since february 2007, following its long path to become a mature IDE for Ruby on Rails. Most of the time, I have used the latest build, reported some issues and it has been a fun and productive experience.

However, I am feeling a bit frustrated now, because of some recent changes in the behavior of the Output Window(CTRL+4) . I rely highly on Autospec to run my unit tests. With Netbeans 6.5, I have the code on one widow and I use an undocked Output window on the right side in order to check out the tests results and open classes in 1 click. This is very handy because Netbeans opens the guilty class in the main window, at the exact location of the guilty line of the backtrace. This makes the whole development cycle "super" productive!



Since Netbeans latest build 23rd of March 2009 (7.0?), this behavior has changed. It seems that the Output window behaves like any other window. By default, it opens in a normal tab, forcing you to constantly CTRL+TAB to switch between classes and output. If you undock it and you click on a backtrace, it will open it in the same undocked window as the Output!!!

So unless you move theses windows to the main IDE, there is no way you can compare the tests output and the class itself. As far as I am concerned, this is a serious usability issue and I'd like to discuss it with other netbeans users and netbeans IDE developers. In the following screenshot, you can see that every time I click on a backtrace, it opens the window in a tab next to the Output window ....


Please, please rollback the Output Window to its previous behavior!

A last tip about running autospec. The netbeans Autospec implementation is flawed: output is polluted by zillions of %RSPEC_SUITE_FINISHED% and the constant scroll bar at the bottom is very distracting. The solution is to run autospec with a simple "Run File" (shit +F6) of the script/autospec. This is much more productive and faster than the RSpec runner built into Netbeans and always works!

In the future, I'd love to see a feature which would allow us to split the IDE in 3 vertical windows.
If you look at Jon and Sandro on Pair Programming hashrocket video, you'll see that they have split their screen in 3: a class, the test class and autotest. Always take inspiration from the best!

06 November 2008

Trick for Netbeans 6.5 latest build and Autospec

On one hand, Autotest is a definitely great idea. Since I am using it with RSpec, I have saved a lot of times with it because it runs my tests automatically .Link

On the other hand, the Netbeans ruby IDE is getting better and better:

  • the auto-completion definitely rocks,
  • it's quite quick to open files and to Go to types (CTRL +O)
  • the Refactoring "Rename" is very handy (although cover you back with tests to make sure!)
  • Debugging rocks even if it's broken in 6.5 (see bug report)
RSpec is the test framework I use since 2007. I did embrace the whole BDD, "describe MyClass, it "should behave like ...." jargon because it feels so much natural than "assert_equals" ...

These 3 tools combined together should make me the most productive Agile Rails programmer but unfortunately if you live on the edge:
  • Netbeans-trunk-nightly-200811060201-ruby-linux.sh
  • RSpec 1.1.11
  • ZenTest 3.11.0
The right menu "Autotest" won't work ... It's probably the 4th or 5th time it happens to me so I am used to it ;-) Even if I find it ironic that such tools written by TDD people should work a bit better.

Fortunately, the solution is simple:
1. Update to the latest rspec-rails gem
[sudo] gem install rspec-rails
ruby script/generate rspec
It will generate a script/autospec file. Just open it, and run it with SHIT + F6 as a normal Ruby program. One caveat, why you press the "stop" button, it won't kill the autotest spawned by this script. You'll have to kill it manually ...

As a screencast is better than 1000 blog posts, I have made one to explain the netbeans software engineers and you what's the problem and how to solve it, just click here to watch it.

The only thing missing from Netbeans is official "git support" but I guess it should not take long as there is already an open source version http://nbgit.org