January 2008 - Posts

Subversion: Changing log messages

At home, I use Subversion for source control of a small website I maintain for a client.  When I commit changes, I always enter a log message that describes the changes I made along with a comment on how long the changes took (for billing purposes).  Today, after commiting a change, I realized I had forgotten to enter a duration for the change.

"No big deal", I thought.  I used Tortoise SVN's "show log" command to list the log entries.  Right-clicked on the entry I needed to change, selected "Edit log message...", entered my new message and received the following error.

Repository has not been enabled to accept revision propchanges; Ask the administrator to create a pre-revprop-change hook.

After doing a google search, I found this page (from the SVN redbook) explaining what a pre-revprop-change hook was along with where it should be located (in the "hook" directory -- imagine that!).  I then found this blog entry that showed a pre-revprop-change hook (i.e. "script") that would allow changes to log entries.  After a quick copy-paste the hook was installed and I was able to change my log entry.  Just remember that subversion doesn't version log comments so you'll loose whatever was previously in the log comment.

Technorati tags: ,
Posted by psteele with no comments

MonoRail: Accessing built-in helpers from a custom helper

MonoRail comes with a number of "helpers" that assist you in generating views for your controller's actions.  Some examples are: FormHelper, which helps you build HTML forms; URLHelper, which helps you build links to other controllers and actions;= and AjaxHelper, which helps with Ajax calls.

You can also build your own helpers by inheritng from MonoRail's AbstractHelper.  Sometimes, it may be handy to use one of the existing helpers inside your own helper.  To do this, you can access the Helpers dictionary off the Controller.  If you wanted to use MonoRail's FormHelper, you could do the following:

FormHelper fh = (FormHelper)Controller.Helpers["FormHelper"];

Pretty handy!

Technorati tags:
Posted by psteele with no comments

SRT Hosts 4-day C# Jam in April

SRT (the company I work for) is hosting a 4-day C# Jam at our headquarters in Ann Arbor, Michigan.  SRT co-counder and Microsoft Regional Director Bill Wagner will be co-instucting with Bruce Eckel and Jamie King.  Registration is limited to 30 participants so register now to guarantee a seat.  See Bill's post with all of the details.

Posted by psteele with no comments

CodeMash in the news

Seems that CodeMash has attracted the local press as well as bloggers.

Technorati tags:
Posted by psteele with no comments

CodeMash v2.0.0.8 A Success!

Another CodeMash has come and gone.  It was another spectacular event.  While I didn't win any of the big prizes, my ticket did get pulled for a free book.  I looked around at all of the .NET books but instead settled on "Programming Python" (all 1600 pages of it!).  I visited a couple of sessions on Python and it looks like an interesting language that I'd like to learn.  Then again, I also downloaded and installed "Ruby on Rails" during Brian Sam-Bodden's "Rails: A Peek Under the Covers" session.  I'm a huge fan of MonoRail (I'll never do a webforms app again unless I absolutely have to) and wanted to see the language that provided much of the inspiration for MonoRail.

Speaking of MonoRail, I have one follow-up to my vendor session on MonoRail.  While talking about Areas, I had forgotten the attribute for defining an attribute.  I was trying to use "Area", but the correct attribute is ControllerDetails with a parameter called Area.  Here's a sample:

using Castle.MonoRail.Framework;

[ControllerDetails(Area="admin")]
public class UsersController : Controller
{
    public void Index()
    {
    }
}

My slide deck should be available soon (either through the CodeMash site or right here).  I just wanted to tweak a few things and add notes to the slides.  I (pretty much) abandoned the usual "bulleted-list" format in favor of a more graphical approach, so there's not a lot of "meat" in the slides -- it was all from the speaker.  :)

I hope everyone who attended enjoyed the presentation.  I only have 30 minutes so I went pretty fast and ended right at the 30 minute mark (including a couple of questions).  I'd love to expand it to a full hour of MonoRail fun in the future.  If any local user groups are looking for a presentation on MonoRail, let me know!

Technorati tags:
Posted by psteele with no comments

Scott Hanselman @ CodeMash

CodeMash was able to snag Scott Hanselman for this afternoon's keynote.  As Steven Smith pointed out, Scott's intro slide deck was absolutely hilarious.  His main talk on IIS7 was equally good.  It's a great talk for those of us who've always thought of IIS as simply a web server.  Scott showed us how much IIS7 has improved and should now be considered more of an application server -- for more than just Microsoft technologies (think PHP, Python, Ruby).  Very cool.

Technorati tags:
Posted by psteele with no comments

Sold Out!

At this mornings CodeMash announcements, Josh Holmes informed us that not only did CodeMash have a 40% increase over last years attendance, but that we've sold out the Kalahari -- the first time the hotel has ever been sold out!  CodeMash is an awesome event at a great price.  Kudos and thanks to all of those who work so hard to put it together.

Technorati tags:
Posted by psteele with no comments

Finally!

I've arrived at the Kalahari resort for CodeMash and after about 20 minutes of fiddling (and moving around the room), I finally found a spot that will hold on to a WiFi connection -- albeit slowly: 5mb transmit and 6mb receive.  At least I can get my RSS feeds downloaded!

Let's hope it's a little better down at the convention center where I'll be spending all of my time tomorrow.

Posted by psteele with no comments

CodeMash is almost here!

CodeMash v2.0.0.8 is almost here.  I plan on spending tomorrow tweaking my slides and sample code (I'm doing "An Introduction to MonoRail" in the Friday vendor session -- Room D).  I've only got 30 minutes and I'd like to include time for questions so if you're really interested in MonoRail, don't forget to check out Jay Wren's "Introducing Castle".  He'll be discussing the entire Castle Project (of which MonoRail is just one part) in more detail.

Taking a cue from Bill Wagner, here's my tenative schedule (via Silverlight):

http://www.codemash.org/sessionscheduler/scheduler.html?1=2&2=30&3=4&5=38&6=9&7=22&8=37

I'm starting with the Silverlight talk because I need to learn more about this technology.  Next, I'm going to sit it on Jay's Castle talk.  I know a decent amount about MonoRail and ActiveRecord, but I haven't touched the Windsor Container or the MicroKernel.  After lunch, I'm going to catch Bill's talk on implementing IQueryProvider.  Seeing that done in 70 mins will really push my brain to it's limit!  I'm still undecided on the last session.  Right now I'm leaning towards Dustin's F# talk.  I've never looked at F# (or any other functional language for that matter) and Dustin is such a great speaker.

On Friday, I have to see Bruce Eckel's Python talk.  I saw some python code about 8 years ago and it took me a while to realize code blocks were defined by the indent level.  Yikes!  I hated it.  So now I want to know why Bruce likes it so much.  Next up will be Neal Ford's DSL talk.  After that, I'll probably go to the RESTful Web Services talk -- or maybe Software Design Patterns in Python (depending on my interest level in Python after Bruce's talk).  Finally, I think I'll check out Josh Holmes' DLR talk.  But I'm such a fan of MonoRail, I might check out "Rails: A peek under the covers".  So many great topics...

Now I need to spend time making sure I bring all the right cables, chargers, adapters, etc...  According to CodeMash organizers, we should be able to get WiFi throughout the convention center this year.  The rooms should get it too, but they'll also have a network port so don't forget a CAT5 cable!  :)

Posted by psteele with no comments

Screen Recording for free

I was helping a client out with a problem yesterday.  They had a spot in their web application where an Ajax request was made and the browser would hang.  They could not do anything in the browser until the request had completed -- despite the fact that it was an asynchronous request.

After setting up VPN software so I could connect directly to their webservers and poke around, I was unable to reproduce the problem.  I fixed a small CSS bug in relation to a progress message, but that was just cosmetic.  Even without the fix, my browser would not hang during the Ajax request.  I even added a forced delay in the Ajax request by doing a Thread.Sleep(5000) -- no difference.  I could continue to enter data while the Ajax request was doing its thing.

I bouced a few emails back and forth with the client but I really wanted to show them it was working as they had designed.  An online meeting wouldn't work since the refresh was a little too slow to appreciate what was going on.  I had used Camtasia Studio many, many years ago for some product documentation, but I don't currently own it.  I decided I'd look and see if there was an open source/free alternative for my simple needs.

I came across CamStudio.  This looked like exactly what I was looking for.  On the CamStudio site, I found a link to the Official CamStudio blog.  While browsing the entries, I came across this:

Camtasia Studio 3.1 Legally For Free!

Sure, 3.1 is a very old version, but I read the directions, followed the links and within an hour or so had a fully legal (licensed from TechSmith) version of Camtasia Studio!  Spent about 10 minutes figuring out how to capture and less than 30 minutes later had sent off a small AVI to the client showing them how it works on my machine.  They were impressed (and excited) to see the app running as it was intended!

I still downloaded CamStudio but haven't installed it yet.  It's on my to-do list...

Posted by psteele with no comments

Multiple web sites on Windows XP

I had a problem this past holiday weekend with a small website I was working on.  I was doing some Forms Authentication (custom Forms Authentication in Monorail) and couldn't get part of the code to work unless my website was the "root" website (i.e. http://localhost).  Currently, the project is sitting in a virtual directory (http://localhost/virt1).

I only found this out because I was so sure I was doing everything right the only thing I could think might be wrong was that some of the code I was using expected the website to be running as the root website.  I reconfigured the Default Website's home directory to my small site and everything started working (yay!! my code was doing it right!).  Later, through more debugging, I discovered a small bug that I later fixed and allowed the code to run whether the website was inside a virtual directory or was the root website.

But this little snafu led me to research the possibility of having multiple websites under IIS in XP.  A couple of google searches later and I learned that IIS under XP does support multiple web sites, but you can only have one running at a time (not a big deal) and the MMC snap-in for IIS doesn't allow you to create new web sites (that's a big deal!).

Enter IISAdmin.NET!  This super-cool utility allows you to manage multiple websites in IIS under XP.  It lets you easily set up and switch between multiple websites.  Check it out!

image

Posted by psteele with no comments

Thank You Microsoft!

What a great way to start the new year.  Tuesday morning (well, afternoon really) I checked my email and saw the following subject:

Congratulations!  You have received the Microsoft MVP Award

I've received the MVP award in C# for 2008!  I'm very excited about being an MVP again.  I was previously an MVP from 2001 - 2006.  Since I was so busy in 2006 becoming an independent contractor, my community efforts took a back seat and consequently, my contributions we're not up to the level that the MVP award reflects.

As my consulting work became steady and things were running smoothly, I could dedicate more time to the .NET community (both local as a Vice President of a user group and globally as a member of the INETA marketing team).  Thanks again to Microsoft and especially my MVP Lead Rafael Munoz!

Posted by psteele with no comments