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]

Some cool new add-ins being bounced around the .NET world this week...

Alex Papadimoulis has a "SmartPaste" add-in that adds the ability to paste text from the clipboard as a region, a string, into comments, etc.

Gaston Milano added some new options to the context menu in VS.NET's file tabs.

Other stuff I've got running:

VSMouseBindings -- Surfing code with the trackbal's back/forward buttons. Solves the problem I posted about last week...

VS Window Manager -- Save/Restore your various window layouts. Especially useful if you go from dual displays to single displays with a laptop.

CodeRush -- It's been a couple of weeks now, but this one deserves its own post.

posted on Friday, May 28, 2004 9:09 AM Mountain Daylight Time  #    Comments [0]
 Saturday, May 22, 2004

So it looks like MSFT has decided not to include the ObjectSpaces O/R technology in Whidbey (just can't call it VS.NET 2005 yet). Note: at the time of this entry, it's also mentioned on the main MSFT Data site.

Does that suck? Maybe if you're the guy who was responsible for getting it done, but I don't see a reason to worry about it. In fact, I see a few reasons to feel pretty OK with it:

  • There are plenty of third-party tools out there that do this already. We've been using Olero's ORM.NET product and it's been great for us. There are even some open-source O/R tools that get pretty high marks.
  • Maybe by binding ObjectSpaces to WinFS, they're looking past just mapping a relational database to objects. Maybe they're looking at an O/S (Object/Storage) implementation that's not just hooked into SQL Server, but is also aware of the common entity types being talked about with WinFS (person, company, document, etc). Or maybe not. But given the dramatic changes to storage for Longhorn, there's no question that they have to be looking at a OO interfaces for that storage today.
  • Many of the people complaining now about the schedule slip would be similarly complaining if it DID ship with Whidbey and sucked. I'd rather have it late and stable than sooner and not production-ready.
posted on Saturday, May 22, 2004 8:27 AM Mountain Daylight Time  #    Comments [0]
 Friday, May 21, 2004

Gerrard Lindsay posted a request for browser-style navigation through code in VS.NET 2003. I tried to use the Comments functionality there, but it didn't want to work for me.

Anyway, I think we've got this now with the "Navigate Forward" and "Navigate Backward" options under the View menu. I'm not sure if it's the default mapping or not, but my machine has them assigned to CTRL+- (backward) and CTRL+SHIFT+- (forward).

Here's the thing that's bugging me... it seems like the back/forward buttons on my trackball no longer do the same thing. They used to, but I'm not sure if that was because an add-in provided it (I recently moved from Visual Assist to CodeRush which came with our DevExpress subscription). I haven't looked into it yet, but I should see if I can get those buttons working with VS.NET again.

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

Soccer season's over for the kids... We finished 6-1, outscoring opponents 22 to 7. It was a strange season with all the weather cancellations, delays from other teams, etc. It was fun, but I'm also glad to have the summer off. Yard work, lounging around, enjoying the weather... and then we do it again in the fall, with that also being Allie's first season.

On the Rapids front, mediocrity continues to rule the day. Freddy Adu comes to town tomorrow night and they're saying that Mile High will have about 30K because of it. 14 year old phenoms aside, the Rapids need a victory so let's hope Freddy doesn't choose tomorrow night to finally earn some of that salary.

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

In a 4-2 match against their cross-town rivals, the Westminster Raptors defeated the Westminster Kickers. Defense was still lackluster, but the attack exploded out of the gate to provide a 2-goal buffer.

In other news, the Colorado Rapids played to a 0-0 draw against the New England Revolution. Unfortunately, the Revs couldn't play their usual role of slumpbuster to break the Rapids out of their (typical) slow start to the season.

Two more Raptors games today, a Tivo full of MLS, and a head/chest cold that won't go away.

posted on Saturday, May 08, 2004 3:14 AM Mountain Daylight Time  #    Comments [0]
 Thursday, May 06, 2004

Why wait for Whidbey? Gaston Milano created an add-in that includes some useful IDE shortcuts.

http://weblogs.asp.net/gmilano/archive/2004/05/05/126491.aspx

posted on Thursday, May 06, 2004 5:32 AM Mountain Daylight Time  #    Comments [0]
 Sunday, May 02, 2004
Bleh. It'd be great to be able to have seen the game and have some idea on why the Rapids got shutout, despite being a man down in the entire second half. Unfortunately, the new owners have seen fit to NOT broadcast all of the away games. That leaves the details-hungry fan with recycled wire reports or the word of gloating KC fans.
posted on Sunday, May 02, 2004 3:00 AM Mountain Daylight Time  #    Comments [0]
 Saturday, May 01, 2004

So let's get this party started. I've been using a firewalled corporate blog for a while, but decided it's finally time to get something publicly-accessible up and running.

About Me

I'm your basic mid-30s software geek, currently working with .NET (primarily WinForms) and keeping busy at work. I'm the proud father of a 4-year old girl, Allie, and try to spend as much time as possible with her and my wife, Michelle, when I'm not working. For fun, I play soccer weekly (when my knee will let me), coach a youth soccer team, and we're season-ticket holders for the Colorado Rapids. I'm also a musician, primarily keyboards and drums, and I enjoy home recording as a hobby.

I've been doing software development in one fashion or another for nearly 13 years now, with forays into a number of languages along the way. I was a 6-time Microsoft MVP for Visual FoxPro and also wrote a monthly "Best Practices" column. Later, my development focus changed over to Java around 2000 and then to .NET in early 2003. I specialize in reusable components, framework development, and distributed software architecture.

About This Blog

So, what can you expect to find here? Well, if you read the two paragraphs above, it should be pretty easy to guess. A wide variety of technical ramblings, some code, miscellanous family/personal shout-outs, maybe the occasional book/music/movie review, and even a rant now and then. If any of these aren't your cup of tea, you'll be glad to note that you can view/subscribe-to the web log entries by category.

As far as frequency goes... we'll play that by ear. It'll probably be several a day sometimes, other times once a week, but one thing's certain -- it'll be irregular.

Want to send me email about something? Use the Contact page, or jeff@THE-TRASHdonnici.com (just take out THE-TRASH for it to work).

posted on Saturday, May 01, 2004 12:06 PM Mountain Daylight Time  #    Comments [0]