Sacramento Software Development

A Farewell to SlickEdit

Posted by John Lockwood on May 29th, 2009

For most men, a mid-life crisis involves either some young bimbo, a motorcycle, or both. My own midlife crisis is unfolding somewhat differently.

In a couple of weeks, the age of fifty will come out to greet me, as the windshield greets the mayfly. The local bimbos being unforthcoming, and Harley Davidsons being too noisy, I am learning a new text editor.

For many years, my editor of choice has been Visual SlickEdit, with Brief emulation turned on. This worked fine for me, especially as long as I was coding web sites for my real estate business and not really feeling myself to be in the Programmer Swing of Things.

Over the years when I was in the Programmer Swing of Things, however, I had previously spent hundreds of dollars on SlickEdit upgrades. I can count no less than seven SlickEdit boxes here in the study, which tells me I’ve been through one Linux version and at least six versions of the Windows product. So naturally lately when I started to really get into Ruby on Rails, I thought I’d check out what kind of upgrade I’d be eligible for, so I could take advantage of the latest language support feature.

It turns out I’m not eligible for an upgrade. The SlickEdit site has a tool where you enter your license number, and the web site says, in effect: S-U-C-K-E-R! You want to develop on Linux and Windows and get the latest features after buying seven licenses already? Sorry, that’ll be six hundred dollars more.

They’re not Microsoft, but they’re in the same religion.

I decided at this point that VIM was really worth taking another look at. I’ve used it sporadically over the years, usually when connecting to an ISP on a shell account and needing to get something done in a hurry. In the last few weeks, I decided to start using it systematically, remembering from my Brief days that after a couple of weeks of pain I’d be liking the world again. Now I’m up to the point where I’m somewhat competent. Some things still go too slowly, but I’ve found that if I open up SlickEdit my fingers are already trying to make GVIM work, not Brief.

On the Ruby front, Tim Pope’s Vim Ruby Plugin is a solidly competent free tool for navigating Rails code and getting pretty much anything else done in Rails without resorting to the terminal (unless you happen to feel like resorting to the terminal, of course).

GVIM works great on Linux, of course, and with a minor wrinkle or two (like using CTRL-Q for “Visual Block” instead of CTRL-V), it works great on Windows, too. If you find it useful you’re asked to help the Ugandan Children, but outside of that it’s free.

So that’s my midlife crisis, in its nerdly nutshell. No harlot, no Harley: just me and my new editor, which I like very much, and a lot of useless SlickEdit boxes.

Posted in Software | 3 Comments »

Graphical Unit Testing for Ruby on Windows

Posted by John Lockwood on May 8th, 2009

In my last post I discussed some of the pros and cons of Ruby on Rails versus .NET. One of my complaints at the time was that Ruby lacks a good graphical unit test runner, because I’m a sucker for a green bar. I also complained that running tests is cumbersome on Windows.

Tonight I decided to see if there was a green bar to be had anywhere in the Ruby world, and the answer is this: well, yes, if you’re running on Linux, and if you’re running Windows, well, sort of. The good news is that Ruby does have a graphical test runner — in my case it lives in ruby\lib\ruby\1.8\test\unit\ui\gtk2. You can learn how to set up Ruby GTK on Windows here. Also even though the source clearly wants gtk2, and the web site warns that that’s not fully supported on Windows, it does appear to be working. I must say the treeview is a lot more primitive than NUnit’s, and you don’t get to see which tests passed — though of course you get the more important information about which ones failed and where. And most of all, you get the green bar. Sweet, beautiful green telling you the world is OK.

And in spite of what the docs say about ActiveSupport::TestCase being derived from Object, it’s not — it’s derived from ::Test::Unit::TestCase as it should be, at least in the code I’m looking at. Like I said before: Ruby documentation makes Jesus cry. And I’m not even religious.

Posted in Miscellaneous | Add a comment »