# Sunday, July 11, 2004

The more of his "Business of Software" articles I read, the clearer it is that Eric Sink just "gets it". I've read the BoS series on MSDN from the start, as well as his various weblog posts, and it's clear that he's spent a lot of time pondering what makes development really work. I also like that his advice obviously comes from someone who's been "in the trenches", understands real-world commercial development, and lives it each day. The series on the "22 Immutable Laws of Marketing" is a great example of his ability to break down software-business issues for the pocket-protector crowd.

This latest MSDN article is a good summary of things to look for when hiring developers into your team. What I really like is how he refers to "shrinkwrap qualities" -- those qualities that differentiate a good programmer from a good commercial-product developer.

My own experience is that there are lots of developers who pay lip service to OO design, architectural consistency, reuse, current documentation of all kinds, and so on -- but not all developers maintain that discipline day-in and day-out. And an even smaller percentage of those have the "shrinkwrap qualities" -- the ever-present understanding that what they're writing will eventually be in the hands of a paying customer. And while a well-designed, elegantly implemented software product is important (especially for the on-going maintenance and evolution of the product/product line), the end-user just wants an application that helps them get their job done and make their life easier.

Go forth and subscribe.

posted on Sunday, July 11, 2004 1:37 PM Mountain Daylight Time  #    Comments [0]
# Saturday, July 10, 2004

So I've had a seller's account on Amazon.com for years. Michelle and I often put up books we're done with or CDs we no longer want. You get an email when someone bought something from you (via the "Used & New" links on each product page) and then you have a couple of days to get it in the mail. Sometimes, after we've done some spring cleaning, that seller account can get up to a few hundred dollars.

Every 4-6 weeks or so, they transfer it to your bank account and send you a nice little summary of the transactions. Then you've got some side money with which to get more books, CDs, or movies... right? So where should you go to spend that money?

Well, what they DON'T offer is an option to just credit your regular Amazon.com account with the money in your seller's account. I don't get that... all they need is to provide a "Convert this balance to an Amazon.com Gift Certificate" option and they'd often get that money right back. Doing that leads to potentially three transactions that make money for Amazon -- My initial purchase of an item, their fee for me selling that item on their site later, and then another purchase using the proceeds from that sale.

I've emailed them about this before (have fun finding an email address on their site), but just got a boilerplate "thanks for your suggestion" response... so, what am I missing?

posted on Saturday, July 10, 2004 11:49 AM Mountain Daylight Time  #    Comments [0]

Andy Hunt and Dave Thomas, authors of The Pragmatic Programmer, did an interview with Artima last year and somehow I missed it until this afternoon. Great stuff here, but the part I enjoyed most was right up front when they talk about craftsmanship and how easy it is to fall into a trap of "I work on this piece and only this piece" on large projects. They refer to a quarry worker's creed -- We who cut mere stones must always be envisioning cathedrals.

The idea, of course, is that even those who work on small pieces of a much larger puzzle have to have the big picture in mind. Without that, the result is a finished project that lacks an overall, complete vision. Ok, so your part of the application is the database design, or the exception management, or the communications layer -- all are parts of a larger work that couldn't be built by any one person. Work on the stones but think of the cathedral. Take pride in your gargoyle.

The interview is well worth a read.

posted on Saturday, July 10, 2004 11:08 AM Mountain Daylight Time  #    Comments [0]
# Sunday, July 04, 2004

On that last post, I started to think about the similarities between my approach to code samples/mini-projects and my approach to organizing favorites/bookmarks. I'm pretty religious about "collecting" bookmarks for cool things I come across. With .NET articles, in particular, I've got about 15 different sub-folders under which I store bookmarks. Those sub-folders are for things like CLR, Exception Mgmt, WinForms, XML, SQL Server, Threading, Unit Testing, and so on.

I've got a pretty good collection of many different articles, from MSDN articles, blog articles, and other sources... the thing is that I'm really bad about going back and referencing them. Instead, when I'm on a project and need some info about a topic, I again go to Google.

Is storing all those favorites in Firefox a waste of time?

posted on Sunday, July 04, 2004 9:58 AM Mountain Daylight Time  #    Comments [0]

I really need to figure out a good way to organize code samples and little "test" projects. On my data drive, I have a folder called \download where Firefox puts all my downloads. Over time, that folder grows pretty large and I have no idea what some of the .ZIP files in there are. Often, I'm downloading code samples and utilities to look at but I need a good way to organize the stuff I want to keep.

I've started setting up a "Code Samples" directory structure, with sub-dirs for "WinForms", "WebServices", "XML", CompactFx", etc... but I'm not sure if that's going to be useful.

And a big part of me thinks I should just delete all but own little "test" projects... for all the little downloaded samples, there's always Google.

posted on Sunday, July 04, 2004 9:54 AM Mountain Daylight Time  #    Comments [0]
# Thursday, June 17, 2004

I just came across the blog of Alan Cameron Wills and had to subscribe in my feed reader. His first post, back in April, covers a development topic that is near and dear to me -- de-coupling components so that the parts of an application can be viewed independently. If you've done it well, adding/changing components to the overall system is trivial.

In the past, I've used the phrase "build a platform" to describe the approach, but the idea is the same -- rather than try to eat an elephant all at once (tackle a big project), take it in smaller bites (break the big project into small projects). View the app as a platform on which you can build components and capabilities.

Alan focuses his blog topic on the independence of those smaller projects (and says it all with far more clarity than I could). When you view a big project as a set of independent, smaller projects, it's easier to add other small projects (new components) later. If you go in with that thinking up front, your architecture is far more "pluggable" than if you view it as one big application and just start tackling it "a form/function/feature" at a time.

Good reading.

posted on Thursday, June 17, 2004 3:39 AM Mountain Daylight Time  #    Comments [0]
# Thursday, June 03, 2004

So I started using Mozilla Firefox about a month ago and I think it's official now -- it's my primary browser. It's got so many cool things that IE doesn't have (at least not yet). Things like tabbed browsing, quick searches for links in a page, a much nicer bookmarks/favorites manager, and built-in popup blocking.

The tabbed browsing thing alone is worth the switch, given that I very rarely have only one browser instance open at a time. More often, it's a handful of different articles, google search results, or news stories. I also like that you can save an entire set of tabs as one bookmark and return to them all via that single bookmark.

Another very cool feature is the ability to block images based on the domain in the IMG "src" element. I never see images now that come from the common banner ad servers. 

And the extensions/plugins being built are amazing. I use the GoogleBar (essentially the Google toolbar), a Flash blocker (it replaces Flash with a small logo that you can click if you want to view it), and a bunch of web development and related extensions.

Oh yea, it's also free.

So are there things I miss from IE? Sure... there are still a number of sites that don't work well in Firefox. IE's by far the most popular browser, so some designers don't bother to test their sites in other browsers. When I run across those pages, I use a Firefox extension that puts "View this page in IE" on my right-click menu.

posted on Thursday, June 03, 2004 4:26 PM Mountain Daylight Time  #    Comments [0]
# Wednesday, June 02, 2004
This little utility lets you paste a code snippet into an editor and it generates the HTML to display that code in roughly the same way as VS.NET. Don't like the default styles? Well, the download includes source! (Note: LGPL license)
posted on Wednesday, June 02, 2004 4:20 PM Mountain Daylight Time  #    Comments [0]
# Friday, May 28, 2004

Whoa, I nearly missed this... Mike Schinkel, who runs Xtras.NET is offering a free XDN membership to .NET bloggers during this month! He posted the offer on his personal blog, so get on over there if you're blogging about .NET development.

While you're there, check out Xtras.NET -- I just found out about it through Mike Gunderloy's site. Holy smokes, there's a lot of info there. They carry a ton of .NET components and tools, with lots of information about each -- and the prices look very competitive as well. The thing I really like, though, is the user-reviews. That's the toughest thing about buying components -- you can read all the marketing stuff, even try the evals for a few days... but nothing beats hearing about it from someone who's worked with a tool for months, day in and day out.

And a printed catalog? Sign me up!

posted on Friday, May 28, 2004 10:21 AM Mountain Daylight Time  #    Comments [0]

Scott Hanselman has been posting recently about his love for CodeRush. I couldn't agree more.

For nearly a year, I'd been using a combination of Visual Assist and C# Refactory. Both are useful, though sometimes rough around the edges tools, and I loved the productivity they added. An evening spent customizing VA's code expansions paid big dividends.

Then CodeRush shipped and I figured I'd give it a go. It came as a part of the DevExpress .NET subscription, so it was there for the installing. I installed the initial release build, played with it for an evening, and then uninstalled it. It was feature-rich, had a million settings in its Options dialog, and would clearly take some time to get productive with.

But I kept an eye out and read the CR group in the DevExpress newsgroups. About 6 weeks or so ago, I decided to give it another shot, based on all the excitement I was reading in the newsgroups. I figured I'd force myself to use it for a week, during which I'd shut down VA and C# Refactory, and then make a decision. At first I was slowed down and had to check the built-in User's Guide regularly. By the end of the week, though, it was clear I wasn't going back.

While many tools provide templates/code expansion, I've yet to find one that does all that CR does. For starters, it's templates are context aware. They behave differently depending on what you're doing, what's selected, etc. The 'r' key for example, has these expansions:

  • In an empty method, hit 'r' and space and you get return;
  • In a method/accessor that contains code, it looks at local variables, finds one that matches the type to be returned, and provides that:  return localVar;
  • If I select a number of lines of code and hit 'r', it's completely different -- the selected code gets #region/#endregion tags and the cursor is in place to name the new region. This doesn't fall into the "templates" category, but gives you an idea of how context-aware CR is.

Now imagine that for most keys and key-combinations on the keyboard.

Beyond templates, there are things like visualization tools -- each return statement has an arrow that you can hover over and it animates an arrow to the end of the code block you'll return from. Ditto for all other flow-control statements -- throw, break, continue, and so on. Regions get painted with lines that run the width of the editor to make it easy to see the blocks. And it's all very polished looking.

As you type, CR provides suggestions via "Intellassist", meaning you only type variable/member names once and it gets suggested as you type later on. Think "in-line Intellisense".

Then there's "Smart Paste" when you paste something into the editor, CR looks at what it's pasting and can paste something else altogether (all regex driven). While I haven't dug too deeply into this yet, it's clearly a powerful capability. The one I have used is with this scenario: Create a private field in your code (private int _someValue;) and copy it to the clipboard. Move down a line and paste it. You get:

public int SomeValue
{
    get { return _someValue
; }
    set { _someValue = value
; }
}

(note: I've customized this layout slightly from the default)

There's a configurable QuickNavigation window you get with CTRL+. -- you tell it what to show (based on members, types, and access/scope), how widely to look (solution, project, namespace, file, etc), and then start typing characters -- as you type, the matching symbols are displayed. You can use the arrows to select candidates (or keep typing) and ENTER takes you to the selected symbol. Very fast.

Smart Brackets/Parens auto-closes opening brackets and parens for you. If you're inside parens, it can optionally ignore additional closing parens... it has a "smart" semi-colon feature that recognizes that you're inside the parens and puts the semi-colon on the right of the closing paren. Even works with embedded parens.

Markers are VS.NET Bookmarks on steroids. Drop them wherever you want and ESC will take you to them in the order you dropped them. As it jumps you to a marker, you get a cool "targeting" visualization that draws your eye right to the correct place. Most of the templates/expansions CR provides have markers embedded in them... as an example, the 'tc' expansion creates a try{} -catch{} blocks, puts your cursor at the correct place for the first line of 'try' code, and each block has a marker. Enter your 'try' code, hit ESC, and you jump right to the correct place in the catch block to provide that code.

Even further, it has a CRAZY-RICH plugin architecture that lets you dive in and create your own CodeRush plugins to do virtually whatever you want with code. I've not touched that at all (yet), but I'm hoping for some cool stuff down the road. I imagine we'll see lots of refactoring plugins before long.

Despite the goodness, there are a few things I wish for:

I don't care for the Help/Online Doc they provide -- the content itself is great, but the format doesn't work for me. It's basically a custom VS.NET tool window that provides a treeview for the contents (including search) and then the contents themselves in another pane. I think they did it because it lets them provide links from the doc right to the CR user interface, but I'd still prefer it built into the standard "MSDN Docs" library (which the DevExpress UI components actually do). I also wish there was a PDF of the user's guide so I could print it and flip through it without having the guide window taking up screen space.

The auto-complete/template stuff doesn't work quite the way Visual Assist did -- basically, VA looks at everything in the current context and provided an intellisense-like listbox that narrowed as you type. The CR approach is to provide an in-line suggestion that changes as subsequent characters rule out other suggestions -- the point being you only see one suggestion at a time.

Also, VA displayed tooltips near the cursor when something you typed matched the macro that would expand a code block. For example, if you type 'if' with VA running, you get a tooltip that shows an if{} block nearby. You can continue typing to ignore it or hit ENTER to have it expand and create the full block for you. With CR, I haven't found a way to have it tell me when I've typed a template shortcut, so I have to guess. I often typed 'pu' and + SPACE, expecting it to expand to 'public', and instead I get:

private uint _propertyName;
public uint PropertyName
{
  get
  }
    return _propertyName;
  }
  set
  {
    _propertyName = value;
  }
}

CTRL+Z/Undo takes care of this and then I remembered that it's 'pub' that creates 'public' (it's now habit). And in fairness, it's all totally configurable so you don't have to get an unexpected expansion more than once. Still, it'd be cool if there was an indicator somewhere that let you know what a template would expand to -- or maybe a mini-guide window somewhere that could serve as a quick reference. Currently, you have to go into the Options dialog and search the hierarchy of templates. Do-able, but it's an extra step.

These are all small nits and the configuration options let you get around most very easily... so the features and productivity gain FAR outweigh any downside. In fact, the only REAL downside here is the learning curve. You just have to spend time trying things in the Options dialog, going back to the editor to check it out, and so on. Spending time in the online doc helps a lot as well, though I did wish for a 1-2 page quick-start guide that provided the basic features or the most common template shortcuts. Force yourself to really use this for a day, though, and you'll see some gains... the cool thing is that you'll "discover" new features for a long time to come.

Anyway, they have an evaluation download so you don't need me to babble on any longer. Go get it and see what you think.

posted on Friday, May 28, 2004 10:10 AM Mountain Daylight Time  #    Comments [0]