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.
Author: Matthew
-
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.
-
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.
-
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.
-
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.)
-
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 -
From Wikipedia to Wikibooks
Wikibooks is an online repository of textbooks that can be accessed, copied, edited, and distributed for free. Co-founder Jimmy Wales says that his service aims to make it possible to get the textbooks needed to study any subject (including software development) online for free.
-
Wiki on your thumb
Yesterday I began getting irritated with my Instiki install on my PC at home. Don’t get me wrong, I like Instiki itself, but having to start it from the command line was getting annoying and I haven’t yet had time to figure out how to set it up as a Windows service. Add to that the fact that I want to have access to my Wiki from other computers and yet not open up my home network to the world, and you’ll see the dilemma I was facing.
The ideal thing for me would be to store my Wiki on my USB thumb drive. Instiki’s data files could theoretically be stored there I suppose, but where would that leave me if I wanted to update my Wiki on a different computer which didn’t have Instiki installed? My thumb drive is too small to host a copy of Ruby/Rails on it. In desperation, I ran a Google search for “wiki on usb drive” and, behold, TiddlyWiki appeared.
TiddlyWiki is an experimental “micro-content” Wiki designed by Jeremy Ruston. It’s written in HTML, CSS, JavaScript… and that’s it. No web server whatsoever is required to run this thing. It’s basically a self-updating HTML file. Clever! And useful. I can store the HTML page on my thumb drive and access it from any computer with a reasonably up-to-date browser. Theoretically, I could even go a step further and embed the Firefox browser itself on my thumb drive, complete with a custom profile and bookmarks.
I highly recommend you check out TiddlyWiki if only for the novelty. The install is dead-easy (just save a file to disk) and I found the non-linear navigation structure based on “tiddles” (small chunks of information) to be quite logical. I haven’t seen something this cool since I was first exposed to AJAX!
-
Pair Programming at SAS
What is pair programming? PairProgramming.com defines it as:
Two programmers working side-by-side, collaborating on the same design, algorithm, code or test. One programmer, the driver, has control of the keyboard/mouse and actively implements the program. The other programmer, the observer, continuously observes the work of the driver to identify tactical (syntactic, spelling, etc.) defects and also thinks strategically about the direction of the work. On demand, the two programmers can brainstorm any challenging problem. Because the two programmers periodically switch roles, they work together as equals to develop software.
Pair programming has traditionally been a practice of XP (eXtreme Programming). That doesn’t mean you have to do XP to pair program, however. Developers seem to fall into several camps on pair programming:
- Some swear by it and feel naked when they’re not with a pair
- Some are comfortable with it, but would prefer not to do it constantly
- Some hate it with a vengeance and wouldn’t be caught near a pair
Each camp has its own strengths and weaknesses, just like the practice of pair programming itself. My preference, though, falls somewhere between loving it and liking it. I don’t think constant pairing is either productive or enjoyable, but there are times when pairing can be quite beneficial.
My formative years as a developer were spent in an XP studio which practiced pair programming 24/7. Being in such an environment taught me the value of collaborative development and good communication. Pair programming supports (one might even say forces) both of these goals.
It goes without saying that moving from an XP shop to SAS was somewhat of a shock for me initially. I was used to a work environment in which all of the developers on a team shared a common work space. Now I was isolated, not in a lab or a cubicle, but in an office with a thick, heavy door!
In my next post, I’ll discuss how I was able to work out getting a monitor splitter and a second monitor, keyboard, and mouse in my office and I’ll give some examples of how my fellow developers and I have used pair programming to our advantage on several recent development projects. Don’t touch that remote.
-
Ruby collections
Martin Fowler’s latest Bliki post is about the programmatic uses of closures. It’s an interesting read for its own sake, but I found his examples of one-line manipulations of Ruby collections even more useful.