Friday, March 18, 2005

I've seen plenty of hype about this product over the past months and today I decided to give in and give it a try.  I frequently hear people recommending that I run a spyware utility to make sure that my system is not infected with spyware, but haven't done it for one reason or another.

I downloaded and installed the utility.  I don't run my machine as an administrator, so in order to install it I had to run it as an administrator.  Rather than running the application as THE administrator account, I temporarily promoted my account to the Administrators group (through a slick tool by Aaron Margosis).  Interestingly, the application errored out upon first run as me as well as when I attempted to run it as Administrator.  I had to run it as me promoted to the Administrators group (I suspect that this is because the default owner of the application was me as an admin rather than the Administrators group).  Once I successfully started it, I performed an analysis of my system and I'm happy to see that I had ZERO spyware applications and registry keys/values on my machine.

I can now go along happily and feel even more secure in my computing ;)

Friday, March 18, 2005 8:52:00 AM (Mountain Standard Time, UTC-07:00)  #    Disclaimer  |  Comments [0]  |  Trackback
 Thursday, March 17, 2005

As I have mentioned before, I very much enjoy working with ReSharper by JetBrains.  We recently purchased version 1.5 and I really like it.  It does have some interesting quirks when dealing with compilation directives.  It seems that ReSharper, in providing its own custom Intellisense, continues to evaluate compilation blocks that are excluded from the current build.  For example, ReSharper gets confused when you have something like this:

#if ( DEBUG )
   public class DevstoneTestControlBase : UserControl {
#else
   public abstract class DevstoneTestControlBase : UserControl {
#endif
      // actual class implementation here...
   }

I periodically decorate my classes this way (especially control-based, UI components) so that in a design, debug environment I can use a designer (which relies on publically creatable classes in order to render the UI) but to mark the classes as abstract when compiled in a 'Release' form so that the proper behaviors are enforced.

When you do this, however, ReSharper throws fits because it cannot resolve protected or public members in the derived class back to the base class.  However, with just a bit of cleverness you can overcome this ReSharper shortcoming and still have your cake and eat it too.

#if ( !DEBUG )
   abstract
#endif
   public class DevstoneTestControlBase : UserControl {
      // class implementation here...
   }

This way, the 'Release-only' modifiers are moved out of the declaration (but still valid when evaluated) and only class declaration exists.  While there are still other nuances with how ReSharper evaluates compilation directives (having different using clauses conditionally, or declaring variables within them, for example), I'm glad to be able to overcome this one.

Thursday, March 17, 2005 5:54:00 PM (Mountain Standard Time, UTC-07:00)  #    Disclaimer  |  Comments [0]  |  Trackback
 Wednesday, March 16, 2005

I just updated to the latest CAPTCHA control 1.3 by Miguel Jimenez  from version 1.2.   The upgrade was EXTREMELY seamless, just dropped the .dll in the \bin folder and removed the HttpHandler from the web.config...that was it!

It's great to see other .NET developers contributing such quality stuff to the community.  I was experiencing the error in which the HttpHandler would cause the browser to prompt to save a file rather than allowing a user onto the site...nice to see that one fixed.  This is great stuff Miguel!

Wednesday, March 16, 2005 9:42:00 PM (Mountain Standard Time, UTC-07:00)  #    Disclaimer  |  Comments [0]  |  Trackback

Within the ASP.NET framework there is built-in support for what is commonly known as Forms Authentication.  Forms Authentication provides a mechanism for the pages within the website to authenticate the caller by validating data (i.e. credentials, PIN, etc) against some data store (such as a database).  I won't bore anyone with a discussion on Forms Authentication as there are many references to be found and it's a pretty well-known topic.  I will, however, entertain another related thought.

When using Forms Authentication, an unauthenticated user will be directed to a designated login page.  ASP.NET will, in the request querystring, identify the page that was initially requested in the ReturnUrl variable thus:

http://localhost/myweb/login.aspx?ReturnUrl=%2fmyweb%2findex.aspx

Upon successful validation of the users credentials the login page will typically call the FormsAuthentication.RedirectFromLoginPage() method.  This method will redirect the user to the page designated by the ReturnUrl property.  Usually this is the desired and anticipated behavior.

There may be times, however, when you want to force a particular application to always (or at least to conditionally) redirect to a designated starting page regardless of the ReturnUrl value.  Probably the best way to accomplish this goal is to utilize an HttpModule that performs simple url rewriting.  The HttpApplication associated with the website in question has an event called AuthorizeRequest which is the prime location to perform the url rewriting.  You could add a handler for this event within the global.asax's Global class (and there's really nothing wrong with this approach) but I prefer to create my own HttpModule to isolate the functionality and compartmentalize it.  This is basically what it comes down to in its simplest form:

public class LoginRewriter : IHttpModule {

   void IHttpModule.Dispose() { }

   void IHttpModule.Init(HttpApplication app) {
      app.AuthorizeRequest += new EventHandler(authorizeRequest);
   }

   private void authorizeRequest(object sender, EventArgs e) {
      rewriteLoginPath(sender as HttpApplication);
   }

   private void rewriteLoginPath(HttpApplication app) {
      if ( !app.Request.IsAuthenticated ) {
         app.Context.RewritePath(“~/Login.aspx?ReturnUrl=~/StartPage.aspx“);
      }
   }

}

This simple module alters the requested path for all non-authenticated requests to point to StartPage.aspx page.  Therefore, despite the request (valid or invalid), upon successfully authenticating, the user will always be redirected to StartPage.aspx.  The last remaining step is to wire the module up in the web.config file:

<httpModules>
   <add type=”MyWeb.LoginRewriter, MyWeb” name=”LoginRewriter” />
</httpModules>

And there you have it...easy as pie!

Wednesday, March 16, 2005 9:23:00 PM (Mountain Standard Time, UTC-07:00)  #    Disclaimer  |  Comments [0]  |  Trackback
 Monday, March 14, 2005

Last month I posted an entry in which I identified my musical preferences while writing code.  I happened to browse some referrers today and noticed an interesting link.  Apparently if you enter the terms weird and programmers into Google, my blog (that post in particular) is #1 on the list.  While I don't entirely disagree with the results,  I thought it was pretty funny.

...the things people search for while surfing ;)

Monday, March 14, 2005 12:11:00 PM (Mountain Standard Time, UTC-07:00)  #    Disclaimer  |  Comments [0]  |  Trackback

This one might cause an interesting discussion, but I thought I'd throw it out there anyway.

Over the past several months I've toyed (without yet purchasing) a few 'productivity tools', namely ReSharper by JetBrains and CodeRush by DevExpress.  Honestly I was extremely pleased with both tools.  Each tool seamlessly integrates with Visual Studio .NET as an add-in.  Each provides mechanisms to quickly refactor code, perform syntax checking, efficiently navigate around the code base, and much more.

I found CodeRush to be extremely powerful.  Its feature set is so extensive, exhaustive, and customizable that it's bind-moggling.  I absolutely love its powerful code templates.  In just a few minutes I had created a template called singleton that upon typing the text 'singleton' it would automatically expand to provide me with code properly formatted, structured, and named (according to the template).  CodeRush has some pretty innovate and stylish features.  I very much like how it highlights code blocks, identifies method and switch exit points with the smooth animations, template usages with the semi-transparent arrows, and much more.  CodeRush has a lot going on.

I feel, however, that the sheer extensiveness of CodeRush's capabilities is overwhelming.  I feel, also, that it's just a little too helpful in an invasive way.  Maybe it's just me and how I enter my code, but I'm constantly having to go back and correct times when it would insert templated text erroneously.  In fact, I spent about 3-4 hrs (I might be low-balling that estimate) tweaking it and adjusting each of the templates to a) my coding standards and conventions and b) run at the appropriate times and not unexpectedly.  Even then I wasn't able to fully fix the issues.  All in all, I am very impressed with CodeRush, but for me it gets in the way too much and I end up spending too much time undoing its helpfulness.  (I'd be interested to see how people compare/contrast CodeRush's helpfulness to Microsoft Word's same inclination...I know people that curse products that do this (especially if they come out of Redmond) whereas they don't hold the same opinions for other products...interesting ;))

ReSharper, on the other hand, is a much simpler tool (not nearly the # of gizmos, shortcuts, and templates) but indeed powerful.  ReSharper provides its own intellisense that I really liked (it can pick up changes in other projects in a multi-project solution, for example).  Also, ReSharper has some very nice inline enhancements; for example it will identify unused using statements, insert using clauses as necessary, et al.  ReSharper also enhances the IDE by providing some functionality that will be present in Whidbey such as 'Close all' and 'Close all except...' context menu options.

It wasn't without its idiosyncrasies, however.  I frequently utilize conditional compilation directives in my code and it has a hard time understanding variables and types declares within directive blocks (e.g. #if DEBUG...).  I'm not sure if this (lacking) capability has been fixed in 1.5 or slated for 2.0+.  Also, sharing ReSharper settings among developers on a team is a bit cumbersome (involving copying a directory containing settings).

At the end of the day I would personally recommend ReSharper (I plan on purchasing it here shortly) as it is much less invasive, allowing me to code to my personal style and taste while still providing me with advanced (and time-saving) enhancements.  I was noticing today that JetBrains is (for a limited time) providing a free upgrade to 2.0 when it becomes available with a purchase of ReSharper for $99....sounds like a deal to me!

Monday, March 14, 2005 6:42:00 AM (Mountain Standard Time, UTC-07:00)  #    Disclaimer  |  Comments [1]  |  Trackback
 Thursday, March 10, 2005

We had our monthly .NET User Group meeting tonight and it was great!  We had a good turnout as well which is always exciting.  This month's meeting was sponsored by DRIVE Development out of Ogden, Utah.

  • Scott Golightly won the coding contest, receiving a copy of Infragistics NetAdvantage Volume 2003 w/Subscription
  • Justin Long was nominated and elected our new User Group secretary.
  • Clint Lord (I don't know if Clint has a blog) gave a great presentation on O/R Mapping.

All in all, a great event!  Thanks all for coming.

Thursday, March 10, 2005 3:03:00 PM (Mountain Standard Time, UTC-07:00)  #    Disclaimer  |  Comments [0]  |  Trackback

Now that I'm back home and semi-settled in (I arrived home last night after an 11-day trip) I finally had the chance to get my new rating control (ver 1.0.1.0) up on my blog.  What was reassuring was that it went in seamlessly...not a single hitch.  I simply ran the db script against the server, copied in the new .dll and updated the web.config and just like that it was up and running (in total, it took about 3 minutes).  I also took the time to put the 'Top Rated Posts' control on the home page.  Because I have so few rated articles I set the minimum # of votes to 1, but over time, I'd like to have to increase that number.

Don't forget, the control is free and available for use on your .Text blog site.

Thursday, March 10, 2005 2:55:00 PM (Mountain Standard Time, UTC-07:00)  #    Disclaimer  |  Comments [0]  |  Trackback
 Tuesday, March 08, 2005

This isn't something I would normally blog about, but in this case I can't really make an exception.

Tonight we went out to eat and had what was perhaps the best meal that I've ever had...period.  We went to a small Italian restaurant called Buon Appetito on India Street in San Diego.  I had the cheese and spinach ravioli and the house salad.  Bar none both were fantastic!  I have never had such delicious ravioli in my life and the salad was perfect (love the dressing).

The next time I'm in San Diego I will undoubtedly make the stop again.

Tuesday, March 08, 2005 4:28:00 PM (Mountain Standard Time, UTC-07:00)  #    Disclaimer  |  Comments [0]  |  Trackback
 Saturday, March 05, 2005
Well, here we are at the Microsoft Partner Briefing Convergence 2005 conference.  It's pretty exciting.  Last year we debuted our product offering at the Microsoft Partner Briefing in Toronto, Canada and it was a blast.  It was so very exciting to see the energy behind CRM.  We've had TONS of excitement behind our product offering since and we're expect the same or more from this conference in San Diego.  In you're in town attending the conference don't forget to stop by booth #717!
Saturday, March 05, 2005 9:34:00 AM (Mountain Standard Time, UTC-07:00)  #    Disclaimer  |  Comments [0]  |  Trackback
 Thursday, March 03, 2005

Getting back in the groove...

I've been out of town for a week now (one more to go :)) so I haven't had much of a chance to get on and blog - though I've had a ton of thoughts and things I've wanted to blog about...but that's for another time.

This time, however, I wanted to get online and present an update to my .Text Blog Rating control.  As readers may already know, several weeks ago version 1.0.0.0 of the rating control was made available for the general populace.  I've (finally) taken the time to update it to version 1.0.1.0 and add several capabilities to it (I'll be getting it up on my blog momentarily - as soon as I get a chance!).

Of the new features these are the most notable:

1.  A 'Top Rated Posts' control that presents up to the top 20 highest-rated posts on the site.  This control behaves like an ASP.NET Repeater (in fact, it derives from it), so you can designate header, item, footer, etc templates.  The properties you can bind to include Id, AvgRating, DateAdded, NumRatings, Title, and Url.  Simply use the standard <%# DataBinder.Eval(Container.DataItem, “propertyname“) %> syntax and you're set...there are, of course, alternatives to this approach.  The TopRatedPosts control has a property called MinVotes that allows you to filter the list based on posts that have received a certain # of votes.  For example:

<devstone:TopRatedPosts runat=server minvotes=2>
   <headertemplate>
      <div class=listtitle>Top Rated Posts</div><ul class=list>
   </headertemplate>
   <itemtemplate>
      <li class=listitem>
         <%# DataBinder.Eval(Container.DataItem, "AvgRating", "{0:0.00}")%> - <a class=listitem href=<%# DataBinder.Eval(Container.DataItem, "Url")%>><%# DataBinder.Eval(Container.DataItem, "Title")%></a>
      </li>
   </itemtemplate>
   <footertemplate>
      </ul></div>
   </footertemplate>
</devstone:TopRatedPosts>

2.  A 'View Comments' link on rated controls.  This will popup a small window (akin to the rating window) with a bar graph illustrating the rating distribution and comments associated with the ratings.  Once aspect of the rating control that is somewhat unique is that it provides a mechanism for users to rate other users' comments and trackbacks.  However, until this release you could not see those comments - that's now been remedied.

3.  Miscellaneous enhancements.

There are some tweaks to the database and they are included in the database script.  These changes alter a few stored procedures and create a few new ones.

The web.config file will also need to undergo a small change in the <HandlerConfiguration/HttpHandlers /> section.  Those changes are also documented within the download.

Therefore, I present to you version 1.0.1.0.  Feel free to provide feedback and input as I'd love to make this product better in any way.

Have fun!

Thursday, March 03, 2005 6:11:00 AM (Mountain Standard Time, UTC-07:00)  #    Disclaimer  |  Comments [4]  |  Trackback
 Thursday, February 24, 2005

Ok, I'm kind of a sucker for these kinds of tests - it's always interesting how people compare and, with a little introspection, see how accurate or off-base the results are.  In my case, I'd say it's pretty close, at least after one take.

Cattell's 16 Factor Test Results
Warmth |||||||||||||||||||||||| 74%
Intellect |||||||||||||||||||||||||||| 86%
Emotional Stability |||||||||||||||||| 54%
Aggressiveness ||||||||||||||||||||| 66%
Liveliness ||||||||||||||| 50%
Dutifulness |||||||||||||||||||||||||||| 86%
Social Assertiveness |||||||||||||||||||||||| 78%
Sensitivity ||||||||| 30%
Paranoia ||||||||||||||| 50%
Abstractness ||||||||||||||| 50%
Introversion |||||||||||||||||| 54%
Anxiety ||||||||||||||||||||| 62%
Openmindedness ||||||||||||||||||||| 66%
Independence ||||||||||||||||||||| 70%
Perfectionism ||||||||||||||||||||| 70%
Tension |||||||||||| 34%
Take Cattell 16 Factor Test (similar to 16pf)
personality tests by similarminds.com
Thursday, February 24, 2005 5:10:00 AM (Mountain Standard Time, UTC-07:00)  #    Disclaimer  |  Comments [0]  |  Trackback