Archives

Archives / 2011 / May
  • Record Visual Studio Web Test Using Fiddler

    Fiddler is a great tool for examining and working with HTTP requests.  If you’re a web developer, it’s one of those tools that you should definitely be at least aware of.  The most recent version has some nice new features, like being able to very easily isolate which window or process it’s recording, so you don’t end up with a lot of noise from messengers and other background HTTP requests.  The feature I want to describe for this post has actually been around for a while, so even if you’re using an older version of Fiddler, you can probably take advantage of it.  That is, you can easily export a Fiddler session as a Visual Studio Web Test (or Web Performance Test). … more

  • Log Method Name Helper

    Sometimes it’s handy to see the order in which methods are firing, or how long they’re taking, without having to attach a debugger.  Typically, you might write some code like this: public void Foo() { Debug.Print("Entering Foo"); // other stuff } public void Bar() { Debug.Print("Entering Bar"); // other stuff } This of course gets tedious after a while.  There are all kinds of things wrong with this approach.  It isn’t DRY.  It includes magic strings.  You’d almost never need it if you were following TDD.  Etc.  If you really need this kind of logging detail on a … more

  • Run Batch File as Scheduled Task

    I’ve had problems running batch files as scheduled tasks.  I’m not alone – over the past couple of weeks, while I’ve been trying to get a scheduled job to work on a new server (when it worked fine on the old one), I’ve done a fair bit of searching on this topic.  I’ve found long threads on how some folks cannot run batch file as a scheduled task, with suggestions such as using full UNC paths for all of the values (for the program name and start in folder).  I found a blog post explaining how batch files need to have a command window, and thus should be run with cmd.exe, in order for their output to be sent to a file for later examination.  I found a really long thread on … more

  • The 4 Stages of Learning Design Patterns

    Design patterns are general, reusable solutions that occur in software design, which can usually be adapted to fit into a number of different situations and applications.  Recently, I recorded a screencast interview with Carl Franklin on Commonly Used Design Patterns for dnrTV, and one of the things we discussed was the stages of learning design patterns.  I noted that, at least for myself, I’d found that I tended to go through four distinct phases during my learning process when it came to these patterns.  I’ve found it valuable to enumerate these stages, because if we can recognize where we are in our learning process, it can help us to evaluate whether our decision to use a … more