Five Things
I won’t be shy about it. This blog chain mail thing is definitely dumb.
By participating, I fear I’m waiving my rights to disdainfully chide my mother when she forwards a dire warning about the kidney-theft epidemic. But when the guy who signs your paychecks tags you, well, that’s a different matter entirely. And hey, talking about yourself is easy. So for those of you who don’t know me personally, (and even some who do) here’s some things you might not know about me:
- One summer in high school I sailed from Long Island to Detroit with my dad and brother. It took around 8 weeks, I think. We had moved from New York the previous summer, and we were bringing the boat with us a year late. It’s a 1977 Ranger 33, which my dad restored beautifully, but it’s just about the smallest boat you’d consider taking such a long trip on. There were quite a few (mis)adventures. Back then, the boat didn’t have radar or GPS, so fog was scary whether we were in the Atlantic circumnavigating Nova Scotia or dodging gigantic tankers, sailing against the current in the St. Lawrence seaway. One stormy night my brother and I puked over the side 7 times, cumulatively. Good times. It’s one of those adventures that seems fantastic in hindsight!
- I jumped out of a perfectly good airplane near Jackson, MI with my college roommate one spring. It was a great experience. People are usually surprised to hear that you don’t perceive the ground rushing toward you. We jumped from 12,000 feet, and at that distance it’s so far away you can’t really tell you’re accelerating toward your death. It’s more like sticking your head out a car window. I didn’t get nervous at all, actually, until after the parachute opened. At that point everything slows down enough that you have time to look down at your dangling feet and ponder the fact that you’re 5,000 feet from sweet terra firma.
- Long ago I auditioned for and was accepted to The American Boychoir. I didn’t attend, mostly because going from public schools in St. Paul, MN to a highfalutin boarding school in Princeton, NJ was terrifying. Plus I was a little too old, too close to puberty, at which point you’re no good to them.
- In high school I ran a BBS in the 313 area code. (That directory is from 1987, but it lasted through my time: the early 90′s.) I paid for the phone line and various upgrades out of my Arby’s paycheck. It ran T.A.G. 2.6, which was written in Pascal by some Detroit-area hobbyists. I wrote a handful of door programs for it, first in Pascal and eventually in C. I credit landing my first computer-related job, in part, to the fact that during the interview we discovered that the interviewer frequented my BBS.
- In 1996, working as a summer intern, I wrote one of the first browser-based home banking systems. It had all the same features I use today at chase.com, and had cutting-edge HTML features, like frames! In those days, we installed servers at banks that included direct dial-in access because internet access was relatively scarce and direct dial-in was theoretically more secure. My employer’s primary product was audio banking systems, (“Press 1 to hear your account balance…”) and they’d been doing that for decades. Sadly, they only half-heartedly entered the newfangled internet market and lost to companies like Digital Insight. That was as close as I got to the .com mania in Detroit.
Because I’m late to the party, and in an (admittedly lame) act of protest against these sorts of things, I’m not tagging anyone.
More on CruiseControl.NET build serialization
Two other items of interest:
- There are some existing CCNet plug-ins (Sequential Task, Sequential Source, and Sequential Project) that provide locking.
- There is work underway to integrate named build queues within CCNet itself, described here.
For anybody whose build spends the vast majority of its time in NAnt (or MSBuild), I’d still recommend locking there, as I described last week, for faster build throughput.
Build serialization using a mutex from NAnt
A frequent topic on the CruiseControl.NET (CCNet) mailing list is how to serialize builds. Lots of people have multiple projects that build on one server, and sometimes dependency relationships between those projects are fairly complex. Solving the problem to everyone’s satisfaction without burdening everyone with its complexity is quite a challenge, which is probably why there’s no functionality in CCNet to accomodate this to date.
We don’t have to deal with dependencies for our builds at SourceGear, but we did have to resolve some serialization issues when we first set it up.
We have five projects currently built by CruiseControl.NET:
- Dragnet 1.0.x
- Dragnet Trunk
- Vault 3.1.x
- Vault 3.5.x
- Vault Trunk
For people whose build times run into hours, it’s important to build as little as possible to fully reap the rewards of Continuous Integration. Including all unit tests, Vault builds in about 45 minutes, and Dragnet less than that. We have a smaller set of tests that runs on every checkin to get Vault’s time down around 20 minutes. We essentially build all the code for every build on each of these projects, sparing us the dependency issues. Still, there are a couple of reasons we couldn’t just allow anything to build at any time:
- The unit tests require that the Vault server be installed and you can only have one instance of a Vault server installed on a machine. We can’t have multiple Vault builds trying to install the server willy-nilly.
- We use Wise for our installers, and strange things happen when multiple instances of it are running.
Initially, I cobbled up some modifications to CCNet to only allow one build at a time. This worked, but it sometimes made the wait for a build much longer than it had to be. In our configuration, when CCNet does a build it’s actually doing all these things:
- Clean out the source directory
- Get the latest source
- Build
- Create installers
- Install server
- Unit tests
- Uninstall server
- Label source
My modified version of CCNet essentially made the entire process one big critical section. It was effective, but far from optimal. At one point last fall someone on the mailing list mentioned that they had created a mutex script in NAnt that gave them finer-grained locking. John Hardin at CRS Retail Systems was kind enough to save me the effort of rolling my own and provided his script.
Adding this block to your NAnt script gives you the ability to add named mutexes as NAnt tasks. In our configuration, steps 3 through 7 are all performed within a NAnt script that CCNet kicks off. For the Vault builds, steps 5 through 7 are encapsulated by a mutex. Each build waits for it’s turn to install and test a server:
<mutex mutexName="VAULT_SERVER_MUTEX" />
<!--
Install Server...
Do Unit Tests...
Uninstall Server...
-->
<mutex mutexName="VAULT_SERVER_MUTEX" />
We did the same thing with a “Wise” mutex for the parts of the script that create the Wise installer.
The NAnt mutex method is just as effective as one huge lock from CCNet, but because we’re locking only when necessary, builds spend a lot less time waiting for others to finish. And we no longer need to run a customized version of CCNet.
Even if CCNet includes serialization features some day, I can’t imagine that this level of locking would be possible. Once you’re running NAnt (or MSBuild, or whatever) you’re outside CCNet’s control: locking within NAnt itself ought to be a useful trick for some time.
Cylons. Why debugging matters.
I’ve just recently been turned on to Battlestar Galactica. I’m just starting season 2 on DVD and definitely enjoying it.
This afternoon a coworker pointed out this banner ad at the show’s site, which I found amusing.
Fix for new projects in CCNet 1.1
Some Vault users discovered a bug in CruiseControl.NET 1.1 where working directories were not correctly set for new projects. Owen has committed a fix which is now available in build 1.1.0.2517.
CruiseControl.NET 1.1 Released
CruiseControl.NET 1.1 was released early today. This is the first official release that includes all the Vault-related fixes I described a few months ago.
As a quick reminder, to take advantage of the fixes in CCNet you also need Vault 3.1.8 or better, both client and server.
If you’re upgrading from 1.0, make sure to take a look at the Vault Source Control Block documentation, as a number of things have changed. In particular, you may need to change your useWorkingDirectory and workingDirectory settings to get the same behavior you had under CCNet 1.0.
Marketing Stunts
There’s a reason most developers don’t grok marketing: lots of marketing makes no sense. Literally. Apparently a good way to create buzz is to do something senseless.
I’ve been following Cambrian House for a couple of weeks now. My very limited understanding of their model is this:
- Solicit contributions from essentially anybody for product ideas.
- Solicit contributions from developers and graphic designers to produce those products. Contributors get points based on their contributions.
- If/when the product makes money, contributors are paid based on their points.
Anyway back to senseless marketing stunts. Today Cambrian House released a video on YouTube where they feed Googlers lunch by showing up unannounced with 1000 pizzas. Ostensibly they’re recognizing that they “stand on the shoulders of giants” and expressing their appreciation to Google for um, allowing them to stand on their shoulders, or something.
So yeah, it make no sense, but it’s fun. And here I am, helping generate that buzz. I best keep my day job.
The Power of the Marginal
“Work like a dog being taken for a walk, instead of an ox being yoked to the plow.” —Paul Graham, in his latest, The Power of the Marginal
I found this essay inspirational. It’s no great leap to consider SourceGear, a small software company out on the prairie, fitting Graham’s definition of marginal.
More on CodeRush/Refactor 2.0
CodeRush/Refactor is evolving into the tool I want to love, but it’s just not there yet. The templates are tremendously cool (and it’s obvious I’ve barely scratched their surface) but as a whole it’s lacking a number of Resharper features I find it hard to live without.
Some of these were previously mentioned, but this is my complete, updated wish list for CodeRush/Refactor:
- I need keyboard shortcuts for “Move Down Call Graph” (Go To Definition) and “Move Up Call Graph” (or List References, when there’s more than one possibility). Visual Studio 2005 has only halfhearted implementations of these. For example it doesn’t take overloaded routines into account and it frequently just doesn’t find some references. Visual Studio 2003 is totally lacking the List References/Find Symbol functionality, making this a huge win there. These are what I called “usage search tools” last week. This is a killer Resharper feature that I just can’t live without.
- I’d like a tool window showing my marker stack that allows visiting any marker with a double-click, without altering the stack. (Maybe add some right-click options and/or drag-n-drop to modify the stack. I could be persuaded that’s overkill.) This would make markers the perfect bookmark replacement, and I could forget about them altogether. As it is, I still have to use bookmarks if there’s a bunch of source locations I need to visit frequently in relatively random order.
- I’d like additional syntax highlighting options. In particular, I like being able to give colors to variables of different scope (member, local, parameter).
- I’d like a comprehensive list of keyboard shortcuts, including templates, navigation, embedding, etc. I know the vast majority are context sensitive, and this list would be huge, but I still want it and this is my list.
At the very least, bring the training panel (which is awesome) up-to-date. Shift-ESC, one of my favorites, isn’t even on there! Good thing I discovered it via the training video! - CodeRush needs to do smart overwriting of closing parentheses: another one I got used to in Resharper. With the default options, there are some strange gymnastics required to work around the automatically inserted closing parentheses. For example, attempt to type this line:
someStringBuilder.Append(someEnumValue.ToString());When you type the opening parentheses for ToString, a closing parentheses is added, so now both are in place. However, depending on the strength of your habits, you’re likely to add an extra parentheses or two. Even if you stop, you’ve now got to press End or cursor to the right before pressing enter. (Unless you have “Smart Enter” turned on, which is what I did, but that’s not the default.) Resharper recognizes that there are no more parentheses needed, and automagically overwrites them as you type. I don’t like that with CodeRush I have extra mental gymnastics to examine the parentheses situation at the end of some lines. Again, familiarity would probably make it better but I think Resharper’s solution is a good one: low impact to newbies without sacrificing power. I’m sure someone can point out that I’ve missed an option or “the right way” to type this line, but that’s exactly the point: Resharper doesn’t make me learn a new way to type code (or ship with options that do).
- The refactor hotkey should have more consistent behavior. You can assign a keyboard shortcut to the context-sensitive refactorings, which is great. The problem is that if there’s only one available refactoring for the current context, it’s automatically performed. For someone relatively new to the product, I’d prefer to see what’s going to happen first. Maybe I’ll change my mind as I get more familiar. Nevertheless, I’d make this an option and default it to the “just pop up, don’t perform” setting to accomodate newbies.
- I’m getting used to using CodeRush’s QuickNav, which is equivalent to Resharper’s CTRL-N (Go To Type) or CTRL-SHIFT-N (Go To File). The only thing I’d like is being able to change the search scope more easily with the keyboard. I still feel like I could get to ANY file/type quicker with Resharper because I never had to reach for the mouse. Also, Resharper’s list updates as you type, making everything feel snappier.
- Better availability for some refactorings. Want to “safe rename” a structure? Too bad, it’s not there! You’re stuck with Visual Studio 2005′s icky implementation, or you’re totally out of luck in VS2003.
- Resharper does background compilation, which lets you see any compile-time errors as you type and improves intellisense. I’m less of a rabid fan of this than many Resharper users, but it is cool. It’s yet another feature that’s less necessary if you work primarily in VS2005, but is killer for VS2003 users.
- Show me unused variables and unreachable code. Resharper does this.
- CodeRush lacks brace auto-completion, though it does auto-complete parentheses and square brackets.
- CodeRush needs contextual help for the options dialogue. There are a ton of options, and this is most definitely a Good Thing for this type of product. As you’d expect, many of these are not self-explanatory. The only way to figure them out, right now, is to experiment.
I’ll continue to keep an eye on CodeRush. Its got real potential, it’s definitely breaking new ground in the UI, but for me it’s not a Resharper replacement. My quick and dirty summary of the differences is this: If you spend most of your time writing lots of brand new code, CodeRush’s templates are very compelling. If you spend lots of time integrating your work with existing code, particularly code written by other people, Resharper’s analysis tools are the bigger win. Typically at my day job, I’m in the latter camp. If you’re an Eclipse zealot who is occasionally forced to work with .NET, you’re going to find Resharper strangely familiar. (I’m not, but I work with a few.)
I was surprised to see people on the DevExpress newsgroups reporting that CodeRush and Resharper can peacefully coexist. Sounds dangerous, but the possibility of having the best of both worlds is so compelling it’s worth a shot.
ReSharper vs. CodeRush: Part 1
Being as it’s the longest day of the year, I’d say I have time for a blog post! ;P
I’ve been a happy ReSharper user for almost a year now, but several recent events spurred me to investigate CodeRush:
- The DevExpress booth was just down the aisle from Vault at TechEd, and their demos were impressive.
- Scott Hanselman dropped by the Vault booth one afternoon and gave a passionate demonstration of why CodeRush rocks. And I do mean passionate.
- JetBrains recently released version 2.0 of ReSharper, in which they introduce support for Visual Studio 2005, which is good. What’s not so good is that they’ve also introduced a bunch of stuff I don’t need, and the product has gotten a bit top-heavy. I basically wanted Resharper 1.5 with support for Visual Studio 2005. Instead I got unit testing (TestDriven.NET works fine already) and ASP.NET support (which is probably a God-send for many, but not much use to me in my day job working on Vault). It’s still a fine product, but for my personal use these new features weren’t worth the performance hit.
So back at the office on Monday I uninstalled ReSharper 2.0 and installed the newly released CodeRush and ReFactor! 2.0. My impressions after a couple of days of use:
- I really miss ReSharper’s usage search tools. Being able to move up and down the call graph with a keystroke or two is really nice, and very conspicuously absent from CodeRush. If you spend a fair amount of time reading other people’s code, this is huge. With everything else CodeRush does, I can’t fathom why this feature is missing. In Visual Studio 2005 it’s tolerable, because Visual Studio has its own (admittedly lame) implementation of this, but I’m thoroughly crippled in Visual Studio 2003, where I still do a fair amount of work. I could go back to ReSharper for this reason alone.
- CodeRush’s stack-based “markers” (similar to VS.NET’s bookmarks) are tremendously cool. This is the way bookmarks should have been implemented. I can’t believe how often Shift-ESC (“collect” the top marker and paste) is useful.
- I miss the extra syntax highlighting options ReSharper gave me. This sounds trivial, but I got used to fields, locals, and parameters being different colors, and it made reading code easier.
- CodeRush’s templates are really, really powerful. They definitely have the edge over ReSharper here. This is how Visual Studio’s snippets should have been implemented.
- The selection-based “embedding” CodeRush features (e.g. embed the current selection in a region, embed the current selection in a try…finally) just don’t work on my installation. The shortcut keys do nothing. I’m not sure why. I can’t find anybody else reporting a similar problem, so I’m assuming it’s a peculiarity of my environment. I’ve installed and uninstalled several versions of ReSharper before installing CodeRush, for example.
- ReSharper has better documentation. I keep a single page hard copy of ReSharper shortcut keys on my desk, and there’s no CodeRush equivalent. CodeRush has a “training panel” which pops up context-sensitive shortcut key possibilities within Visual Studio, but it’s incomplete. There are a number of things I caught at TechEd demos and in DevExpress’s training videos that don’t show up in the panel. The training videos are cool, but what I really want is a comprehensive list of the keyboard shortcuts, even if it’s huge. Or at least bring the training panel up to date. With ReSharper I can also go into Visual Studio’s keyboard options and see all the assigned keboard shortcuts. It’s understandable that CodeRush didn’t go this route due to the (very cool) context-sensitive nature of its shortcuts, but it adds to the feeling of not really knowing what’s possible.
- Not yet being used to CodeRush, some features are suprising, if not downright frustrating. For example, yesterday I hit tab several times expecting to, you know, insert tabs in the source. Instead, the first tab behaved as expected. Tabs 2 though n jumped me to various (apparently significant in some way) locations in the file I was editing. I’m sure this was me failing to understand some contextual rule, but it was maddening for a newbie. It took me a minute or two to figure out how to just insert the #$%!-ing tabs.
- CodeRush’s complexity metrics are cool. I’m a big believer in Simpler Is Better, and having easily accessible, concrete measurements of a routine’s complexity is awesome.
- CodeRush’s huge array of built-in shortcuts are cool (as in, they demo well), but not tremendously useful, in my experience. It’s just not that hard, for example, to type “private bool x;[enter]” rather than “vb x[enter][enter]“. Maybe I’ll feel differently after a few weeks’ use when those shortcuts are second nature.
I’ll probably stick with CodeRush until my eval expires at the end of July, to fully give it a chance. Unsuprisingly so far, I prefer the product I’ve got months of experience with.