Tech Blog

Jay's Technical blog

CR/R! Wrap up

21 August 2008
Jay Kimble

[WARNING! This is an archived post and as such there may be things broken/missing here.. you have been warned.]

It’s been about a month since I took the challenge to replace ReSharper (R#) with Code Rush/Refactor! Pro (CR/R!). In that time I have adjusted well to CR/R!. There are a number of areas where I am MORE productive. Yep, I said that. There are a few things I miss (So Mark of DevExpress pay attention).

Code Analysis could improve

Code Analysis is a fairly new feature of CR/R! and as one would expect it’s not quite as strong as R#'s (I do expect this to get better, BTW). Sometimes it doesn’t find references to ASP.NET Server Controls from the Code Behind for instance which tends to make its analysis on ASPX CodeBehind files somewhat unpredictable. I also ran into some speed issues with JS code, but I think it was the network that day (because I haven’t had any issues since).

The other thing I love about R# is that not only does it analyze my code, but it gives me a convenient keystroke that helps me resolve the problem without having to leave where I am. CR/R! is building some of this stuff so we’ll have to wait and see what happens.


I still have a few embeddings that I would like to turn off (with no options to do so -- as far as I can tell)... I suspect I need to dig into the XML config files, but am scared to do so.

For the DevExpress Guys to note the main one I want to get rid of is called "Embed Not Parenthesis." What happens is that I’m in a long "if(...)" and I highlight the first "=" of an "==" (because I stupidly set it to "==" and not "!="), when I type "!" it translates my entry to "!(=)=" which would be nice is I had more than 1 character highlighted.

[If you don’t know what they are let me explain them. Basically with CR/R! if you have a section of code highlighted you can easily wrap that selection with say a region by typing CTL+3 (BTW, # = Shift+3 so the sequence makes sense); when you do that a #region/#endregion automagically wraps your selected code and drops you on the line to set the region text. ]

The embeddings in general could really benefit from a different set of key sequences. it’s too easy to highlight a section of code and accidentally type the single character that creates the embedding... I’d prefer a CTL sequence. Yes, I know I can change them myself, but the defaults make the product frustrating for newbies.

Wish List

Beyond what I have already mentioned I really have 1 wish. I want either an alternate set of keystroke shortcuts for things like Embeddings and single character templates [CR/R! has some single character templates that you type like "c{space}" and a class shell automagically appears] that I can set as the default (so choose something other than what has been the standard) or the ability to package up my settings and be able to easily share them...

Yes, Rory, I have thought about contributing an addin for your community project.

Script# Compatibility

BTW, CR/R! works with Script#! Well, I ran into a few minor difficulties, but I could use it with the product which is all I would have asked for. No crashes, and no real warts.

Final words

Well, the good news for the CR/R! crew is that I’m a convert. I waited too long for VS 2008 from R#, and in that time I realized that there is a different place to go to.

Finding that I can refactor all kinds of things (like HTML code and JS code as well as C# and VB code now if it only did Python... just kidding, Mark... I don’t need it) really sealed the deal.

If you are trying out CR/R! you should get the Rory’s latest zip file containing all the community plugins. You should especially install "Refactor_Resolve" from this zip file (You’ll want it!). This is the plugin that was written by Koen Hoefkens. BTW, these plugins I think all run with DXCore, so if you don’t have a license to any kind of Refactoring product then you might want to consider installing DXCore (it’s free) and then installing these plugins... they can make your life a little easier.

Red Gate & Reflector: My Concerns...

21 August 2008
Jay Kimble

[WARNING! This is an archived post and as such there may be things broken/missing here.. you have been warned.]

Ok, before I start off I want to note that Red Gate is one of our "Friends of TRT," so they show up on just about every page of the site (and would appear in every RSS if I had the time to figure out how to do it). I also want to note that I know that I am breaking a rule with this post and may alienate a vendor, but this needs to be said (and sometimes I can’t resist).

I love Red Gate tools. Their commercial stuff is absolutely awesome, and I mean that. If you don’t own at least their SQL Data/Compare tools, then you should. Their software engineering is without much fault (as far as I have seen). I love how they help the community (hence they are in our "Friends" program).

I was chatting with JP (John Papa) when I caught the news in the latest bulletin from them (it might have been old), and went from casual talk about John’s skin on his blog (see here) to "Crap! Red Gate just bought Reflector..." JP doesn’t necessarily agree with me, but I wanted to at least spit out what I’m bugged by.

Red Gate also owns the addin for VS2005 (and maybe it now works with VS2008). When you click on the web site to get the addin you are prompted for an email address and are informed that you will be getting ANTS Profiler 3 and Exception Hunter 1 as well... so they bundled 2 trials with a free product... products that you may already have licenses to.

Not only that but every couple days you start getting spammed by their marketing department (it’s one of those... 2 days, 5 days, 1.5 weeks, 3 weeks, and after about a month they finally leave you alone). The bigger problem is that they don’t check their DB to see if you are already a registered licensee of a product (beyond the fact that you went there for a FREE PRODUCT).

So everyone is wondering if .NET Reflector will continue to be free. I know that it will... It will just be bundled with some stuff that you may or may not want... and then you’ll be marketed to for a couple weeks after... That would be my big complaint. I hope that they choose to do otherwise (right now you can still download just .NET Reflector... but the marketing guys haven’t had time yet to figure out what they want to do... so we’ll see what happens).

BTW, I hope I’m wrong about all this ... I really do. Red Gate is a company I really do like (I just don’t always like the way they have handled "free" products in the past)... I hope they continue to have a single download to the free product.

TRT Welcomes Back Dana Stevens

13 August 2008
Jay Kimble

[WARNING! This is an archived post and as such there may be things broken/missing here.. you have been warned.]

My friend Dana Stevens has decided to rejoin us (he was one of the original TRT members who never got a post up... I said he was just paranoid about being fired, but that’s me <grin />).

He already beat me to the punch and started blogging, so check him out.

Dana is a recovering "Pocket Protector" (Developer) who has sometimes masqueraded (in the past) as a "Black Turtleneck" (Designer). His expertise seems to be eclectic (much like my own), but he is specifically knowledgeable in matters of WCF, Services, and WPF (although he’ll probably be writing on the whole spectrum of software development subjects). In fact he and I often discuss REST versus WCF (I think that WCF can be overkill for what I can do with MS MVC + MVCContrib/RESTFul Services)... but enough of that...

Welcome Dana! Glad to have you back!

Review: Gurock SmartInspect

12 August 2008
Jay Kimble

[WARNING! This is an archived post and as such there may be things broken/missing here.. you have been warned.]

About a year ago, I was blogging at CodeBetter and I was given a product in hopes that I would review it. In fact I had won a copy of this product in the past. I promised and promised that I would take a look at it, but I never got around to it.

Mainly because I didn’t have a use (or thought I didn’t have a use) for a logging product at the time. Logging isn’t really all that "sexy" and I was trying to dive deep into all kinds of things.

Well, with my day job we ran into a some problems that after I analyzed the errors I realized that I was missing an important piece of the puzzle... So I started thinking about what I might need. Enter that product that I hadn’t had a chance to review...

Logging isn’t "sexy" or is it?

It’s only "sexy" when you NEED it. And when you need it you need something good. SmartInspect is really, really cool, and IMO after finally taking a day with it, I can say it’s also "sexy." It really brings your logging to life.

I’m an ASP.NET guy, so what I need is to be able to track a user through a site and see there path up to the error. SmartInspect allows you to create "sessions" of logs that follow a user via their session. You can also use a default session (if you are using something more single-processed/threaded).

You can colorize different things in the log and can even see the properties of an object that you throw into the log (you simply tell it to log the full object passing just the variable).

The best part for me was it was pretty simple. I did a fairly advanced thing with it in relatively short order (Sessions, logging our SQL calls), and it really wasn’t that much work. The code that you have to inject into your app (yes, you have to inject code into your app) is pretty trivial.

Remote Logging viewing

What I really liked was that the SmartInspect log console feels like VS and is a TCP/IP server which means that you can point an app at a machine to log via TCP/IP. The version that I was given even included source for the logging library (and I think everything else). Yes, you can log to a file and other more traditional log destinations... but the TCP/IP server is so "sexy."


Anyway, my workplace will be purchasing a copy of it... and it’s a tool you’ll probably need at some point. Here’s the web site (go check it out for yourself) -

BTW, it’s for Delphi, and Java, too.

Writing Better JS Components

12 August 2008
Jay Kimble

[WARNING! This is an archived post and as such there may be things broken/missing here.. you have been warned.]

Perry (my boss... a developer/manager... he codes and manages) and I have been having a recurring conversation lately. One that keeps bringing to my mind a product that I knew about when I worked for ZAC Catalogs (way back in the day). I would daresay that none of you had even heard of it (although we did pick it up as a result of Xtras carrying it, so maybe a few of you knew about it). I believe it was a called "MFC DataGrid Wizard" or something like that. Anyway what it did was build a custom DataGrid component for you based on selections in a wizard. You selected what features you needed and then it would take it’s full-featured Grid source code (which came with the component) and would dynamically generate a full blown component for you with just the features you needed.

There are two reasons this has become a topic for discussion for me. The first is that we are currently struggling with a set of third party components that a prior developer/manager pushed all over our main site. The components are ones that you have probably heard great things about them and they are pretty cool. The problem is when you shove these components everywhere! We are having ViewState issues among other things... One of the components is a full-featured Grid control (client-side) that while nice we usually only use as a glorified listbox (we use it for selecting an item). As a result I built a specialized DataGrid for our company (one that I’ll be doing a walkthrough on its codebase at the first TUX user group meeting next month)

The other reason is this post from Bertrand LeRoy where he talks about a simple grid for ASP.NET. Here’s my problem with Bertrand’s post. The grid he talks about as being simple really doesn’t sound all that simple to my ears. Let me list a couple features:

  • Column drag/drop
  • Different column types
  • Data Sorting/Paging
  • Inline editing

Now mind you these are awesome features if you need them all then you would want to use something like this, but a lot of times what we need is something simpler. You could use the aforementioned grid for this, but the grid will probably still use ViewState (because it needs it maintain state for the paging, sorting, and editing features). It might need several more scripts or <shudder /> it’s script might be 500-1000 lines longer because of the added features.

A Better Way

I have been thinking about a better way to "do" script components. We really need to have a wizard that asks us what we will be needing in the components and then the main script file can be customized (as can the server side code) to remove certain things. It could be done really easy with templates for the script. You need a template for the main file, and additional includes based on features. The server side would work pretty much the same way. I know that no company really wants to give away their source, but even if they were able to do this for script code that would make our lives a lot easier.