gist JS

Wednesday, December 31, 2008

Top 17 Netbeans Ruby and Rails keyboard shortcuts

cmd-shift-1 show selected file in project
cmd-shift-f search whole project
ctrl-tab switch between files
ctrl-shift-o open file
shift-esc maximize view

ctrl-enter ooo... redoing blocks and logic is sexy.
cmd-space actually works. sometimes. meh. cmd-r rename

ctrl-shift right/left indentation
ctrl-g goto line

cmd-shift-w close all editors

shift-enter new line below this one (sexy!)

cmd-b goto works sometimes, but 1 million times better than aptana because if it's not going to work it fails fast and never just freezes up for 40 seconds.

cmd-shift down duplicate line
ctrl-shift down move line down

ctrl-shift . expand selection
ctrl-shift , retract selection

cmd / comment
ctrl-shift-f format

Now with 4 more!
cmd-shift t open test for file (or file for test)
cmd-shift a open action for controller
cmd + expand fold
cmd - collapse fold

Tuesday, December 30, 2008

NetBeans 6.5 vs Aptana RadRails

Well after finally losing my cool and pitching in the Aptana towel I decided to erase a couple years of Eclipse finger muscle memory and start again with Netbeans.

Before I did that, I did give UNA a 10 second look and actually liked a lot of the ideas. Logical keyboard shortcuts sounds brilliant and sane, and collaborative features sounds neato, but I'm not looking for flashy new relationships at this point of my life. So, NetBeans it is!

In general, coding in NetBeans is a good experience. For the most part it feels like it's focused on helping you get real development tasks done quickly (as opposed to pie in the sky GUI generator editors that I'll never use). The best bits are the slick little things like the functionality around inserting variables in a string by typing #. It's tough to pinpoint just how these things are better than Eclipse/Aptana, but they feel nice and have me thinking that NetBeans may yet win me over.

It's definitely opinionated software though and it takes a bit of getting used to. For me at least the icons aren't very intuitive and being a new user it's obviously a pain to get my fingers on the right shortcuts. Of course that brings up the main sticking point, which is the preferences system. Ouch. (Update: NetBeans FTW! NetBeans 7 totally fixes this!!) While Eclipse's preference window may feel labyrinthine the addition of the search bar makes finding things workable. On NetBeans, there may be fewer options, but they're organized in a illogical un-searchable heap that had me cursing. Can't win them all I suppose. At least my damnable home and end keys worked without having to fix them like I did in Eclipse.

Cool NetBeans Features:
  • Neat rake task browser
  • Neat db:migration tool
  • Integrated JavaScript debugging. Wow. Haven't used it in anger yet, but it is definitely sexy.

Sadly JRuby is dead to me, so I can't comment on that. I ended up running everything with MRI instead, which seems to work fine. While JRuby is cool and looks like it's almost as fast as Ruby 1.9, if it can't do native C stuff like sphinx / image magick it's of no use to me right now.

Overall, I think I'm going to be staying here a while. Netbeans certainly isn't an extension of my brain yet, but it doesn't freeze up and the search is fast so at least I feel like it isn't working against me. It also seems to handle Git switching branches beneath it much better. Aptana would freak out from time to time and force me to refresh the entire project. NetBeans just trundles along.

Anybody know if the NetBeans for Ruby and Rails book is worth getting? OMG there's a new Neal Stephenson book: Readme.

Miscellaneous thoughts:
Help -> Keyboard Shortcuts Card Is a great idea... but it doesn't know I'm on a Mac so it just spits up the PC versions and is thus rendered less useful. Worse, it doesn't actually take into account your keyboard shortcuts! It's just a static PDF. So, nice idea, but doesn't it kind of miss the whole point?
Bookmarking. Again, nice idea, but wtf it only works within one file? Fail.
Format and save on exit. Didn't see any way to do this in NetBeans. Loved it in Java/Eclipse-land.
Link file to project navigator. Command-shift-1 is a substitute I guess, but I do miss automatic linking. It's a pain switching between partials otherwise.(Update: NetBeans FTW! NetBeans 7 totally fixes this!!)
Can't copy paste from test result window into editor wtf? Totally annoying.
Awful Awful Awful keymapping UI. Want to add a keymapping for 'goto test'? It's hidden behind one of 25 doors. Is it in the door marked Ruby? Test? Navigation? I'm not telling because I gave up. Oh and each door has a list of 20 things to scroll through. Eclipse is 1000% better in this regards.(Update: NetBeans FTW! NetBeans 7 totally fixes this!!)
Test window is braindead. Clicking on show this test failure show me where in test_process it failed. Um.. I think I'd prefer to see the assertion kthxbai. (Maybe this is just shoulda throwing for a loop)
DB Service, right click on table -> view data. Automatically does a select * from table. Not so helpful when the table has a million rows. How about a default limit 100?

Finally, here's a list of my top 17 NetBeans keyboard shortcuts.

Finally, if you've read this far I figure it can't hurt to give a shout out to two killer tips that have been making me happy:

being able to use emacs or vi from within a irb session is out_of_control brilliant. Thank you utility-belt gods!

Monday, December 08, 2008

An Open Letter to Aptana, re: RadRails

Dear Aptana,
I just wanted to give you my $.02 about Aptana & RadRails.

I'm an eclipse guy from my java past, so radrails was my first stop looking for a rails editor.

I was pretty happy with the free version. It worked ok.

Everything was fine until HAML came along as the new hotness and I couldn't find a good HAML syntax highlighter.

Then somebody here bought Aptana and said that in the beta releases there was a HAML editor.

We bought 5 licenses for ~$500 total.

But me and the other guys are getting pretty close to tossing this whole stack.

  • Every time Eclipse freezes up 'Saving the Cloud model' I think about switching to textmate.
  • Every time I have to click away from the useless Rails Search to the slow as nuts Aptana search. I think of switching to I don't know what.
  • Every time there is a bug that doesn't allow me to type { to start a line, I assume that none of you actually uses this to develop rails apps on a day to day basis.
  • Will clicking f3 to go to the method declaration? Or will it freeze up for 2 minutes? It tough to predict.

I could not care less about rails helper GUI things that run script/generate for me. Or run my rake tasks. None of us could. We use the command line and it's fine.

I could not care less about 'the cloud'. Or Jaxster. Or pretty much any of the other features that you seem to be working on. Are you an IDE company or a hosting provider? I have a hosting provider. I have no idea what you are doing in this space.

What we want:
  1. Faster search.
  2. Awesome Git Support.
  3. Code completion that isn't brain dead. (I saw Josh Susser present some awesome ideas on how to make this happen! (registering observed classes with the meta callbacks that happen when you run tests))
  4. And as much refactoring support as you can make happen.
Code Editor + Git support + the standard eclipse outline, problems etc views.

We will pay for this. We paid $500 for HAML syntax highlighting for goodness sake, but I feel like what you're doing and what I want are diverging. Quickly. Maybe that's just the way it is and it'll be a better future for us both, but I can't say I understand it. I feel like you guys should be making the killer rails IDE but instead you're doing things that have no value (to me) and driving me away in the process.

Thanks for absorbing my rant. Personally, I know I appreciate hearing from users, even if they're frustrated and I figured it's more useful to send it your way than to grumble silently here.

good luck,