Pelargir

Musings on software and life from Matthew Bass.

November 28th, 2005

Sails: Simplifying Java web apps

Sails: a dynamic, open-source web framework for Java designed in the spirit of Rails.

The top 5 reasons to use it?

1. Created using test-driven development (no, seriously, it was!)
2. Controllers are testable (oh yeah)
3. Leans heavily on convention over configuration (Rails anyone?)
4. Binds URLs to Actions on Controllers and renders their templates (sure wish Struts would do this sans XML)
5. Converts objects into Strings and Strings into objects (sure, Struts does this, but Sails does it better)

Born out of a software project some of my old co-workers from RoleModel Software are currently working on, this framework appears to be quite slick, but is still in its infancy. My experience with it so far has been limited, but I like what I see. I encourage you to at least poke around the Sails web site and read up on the framework.

November 23rd, 2005

Cleaning up on the web with AJAX

Forbes.com hops on the AJAX bandwagon with a brief overview of what some new businesses are using it for. I found the point at the end about AJAX impacting Nielsen/NetRatings statistics particularly interesting.

November 15th, 2005

Decoding COM HRESULT error codes

As I mentioned in a previous post, I’m currently slogging through the melancholic mire of testing .NET/C# code. In the process, I’ve been receiving exceptions which give an HRESULT code in hex (i.e. 8×80020005) and not much else. That got me to wondering what these HRESULTs are and how to decode them. This wondering led me in turn to this page which has an excellent overview of what HRESULTs are and why they matter. I also uncovered a link to a freeware tool called HR Plus which can decode HRESULTs and give you a (usually helpful, sometimes vague) idea of what they mean. Both the page and the tool have been extremely handy to have around. I hope they prove handy for you too.

November 8th, 2005

Vanderburg on building teams for Rails

Glenn Vanderburg’s latest blog entry is a good one. Much of what he says can be applied to building teams for XP as well. XP is awesome and I really enjoyed my days on an XP team, but it takes discipline from each developer to make it work.

November 8th, 2005

Eclipse, Visual Studio, and Ward Cunningham

As Rich Main blogged in mid-October, Ward Cunningham recently left Microsoft for a job at the Eclipse Foundation. I found this especially fascinating considering that, after over 4 years of developing with Java, a job change recently required me to begin using C# for automated testing. The pain of doing so has surprised me.

For some odd reason, I assumed that a product like Visual Studio made by a giant like Microsoft (and with a whopping $350+ price tag) would be at least comparable to, if not superior to, Eclipse (which, of course, is free). I was woefully incorrect. Some of the best features of Eclipse, such as auto-refactoring, are just not available. Other features have been implemented, but in a castrated form. It’s almost as if Visual Studio tries too hard to make things easy to do, and in the process destroys a great deal of the flexibility which made Eclipse so pleasant to use.

After using Visual Studio for a week or so, I gave up on it and have switched back to Eclipse and an open-source C# plugin which I found. The plugin offers syntax highlighting and not much else, so I’m essentially writing C# in a souped-up version of Notepad, but it’s still better than trying to make my way around VS. Maybe I just haven’t inculcated the Microsoft way of doing things yet, but I’ll take Eclipse and Java back any day. I’m sure Visual Studio is useful in many cases, but for writing automated tests against APIs it just stinks.

Ward must feel the same way.

November 8th, 2005

Discriminate against mice… use AutoHotkey

Let’s face it, mice are slow. Mice are very slow. And mice cause bad things to happen to your wrist.

Keyboards, on the other hand, are fast. And you barely have to move to get things done on them.

Discriminate against mice. Use AutoHotkey.

AutoHotkey is a free utility which allows you to define global hotkeys to do all sorts of nifty things. Using AutoHotkey scripts (which are outrageously easy to write) you can script everything from iTunes to your automated tests. For example, I currently have my system setup so that when I press Windows-G, a new browser window is opened and sent to Google. When I hit Windows-F9, a random image is selected from a specific folder and set as my Windows background. When I hit Windows-T, the automated test suite for the current product I’m testing is executed.

Time savings? Yep. Less stress on your wrist? Absolutely. Big kewlness factor? Booyah.

Visit AutoHotkey’s web site to download the utility. You can also visit the message board for free scripts which do all sorts of nice things. For example, I’ve found this iTunes script to be quite useful.

November 8th, 2005

Ruby QuickRef

Need a “cheat sheet” for Ruby? Check out Ruby QuickRef. An excellent place to go when you just can’t remember that funky little automatic variable containing the program args. (It’s $* by the way.)

November 8th, 2005

Ham radio gets a wiki

The web is really going places: ham radio operators now have their own wiki. Whoda thunkit?

HamWiki’s goal is to serve as a conduit for more experienced hams (Elmers) to share practical information (both technical and non-technical) with newbie operators. I’m tickled pink, purple, and green to have this resource available now (although eHam.net has always been a useful resource).

So how about it? I know of a couple other hams who are also computer geeks, but that’s about it. There’s plenty of room in the hobby for more enthusiasts, and a hobby dealing with AC reactance, antenna theory, and techniques of single-sideband modulation would seem to fit perfectly with the debate over statically versus dynamically typed languages

The ARRL’s web site is the definitive source of information about the hobby. It’s so much more than just CB on steroids. The tests are quite easy to pass if you’re willing to do a little studying. There are also several active radio clubs in the local area (see RARS for one).

The most immediate benefit, though, is that during North Carolina’s next ice storm, you’ll still be able to “phone home” even when your cell phone is rendered useless by power outages and falling towers.

73s,
Matt / AG4TS