About Me

Training

Nothin But .Net Developer Bootcamp

Navigation

Search

Categories

On this page

Current Hardware/Software Setup for OSX
Screencast – Git Part 2
Bye Bye Arrow Keys
VMWare Fusion vs Parallels 4.0
The fallacy of the standardized developer machine/image
RubyMine on Windows 7
Streamlining a GIT Push
Running Things between multiple machines while maintaining the database
How Wise Are You Being With Your Work Time?
Are You Missing Your Accessor Keys (TortoiseSVN)
Getting syntax highlighting for your powershell scripts (take 2)
Screen capture in OSX
I’m not on Jetbrains payroll
Creating an Ubuntu 8.10 Desktop VM on VMWare Fusion
ReSharper 4.5 – Red Bull for VS
Digital Productivity Strategies For Developers
What’s up with my VS2008 install?
ReSharper Helper – AutoHotkey Script
Credit where credit is due
developwithpassion.bdd
ReSharper 4.5 EAP
Interesting Collaboration Tool To Check Out
Update To BDDDoc
VMWare Fusion 2.0 - Get It Now!!
Getting Syntax Highlighting For You Powershell Scripts (GVim)
Vimperator Teaser Screencast
Firefox + vimperator + gvim + ItsAllText
BDDDoc
NHibernate 2.0 GA
What Do I Love Most About TortoiseSVN 1.5?
ReSharper 4.0 Goes To RC Phase!!!
Running On The Trunk
Look Ma' More Displays!!
BDD AutoHotKey Script Update - Take 2
BDD AutoHotKey Script Update - Take 1
So Long BDD Macro - Hello Autohotkey!!!
ReSharper 4.0 Beta
Score 1 For Eliminating your hands flight path
Gettin' Jiggy With VIM
Hooked on VIM
ReSharper 4.0 Nightly Builds
Another Handy Shortcut Combination (Shift + F10)
code.google.com/p/jpboodhoo!!!
Update To VS2008 Issue
VS2008 - Bringing Attention To An Issue
Downloading VS2008
ReSharper Templates
Update - (Taking a short break from)Typing With The Datahand
ReSharper 3.0 Beta - Get it while its hot
ThoughtWorks Studios Is Busy!!
(Automated Build Script + ReSharper Solution Wide Error Analysis) == The Bomb
Help Improve ReSharper
Copying files with Powershell
VSTS Unit Testing With ReSharper
What OSS Software Do You Use?
Visual C# 2005 Keyboard Shortcut Poster
Powershell For Vista - Get It While It's Hot
So long (SlickRun) and thanks for all the fish
Windows Developer Tools Day
ReSharper 2.5 Released
ReSharper 2.5 -EAP Released
I forgot my mouse today.....big deal!!
Hot off the press!!
Clean up your (NAnt) build files by taking advantage of fileset references
Tips for becoming a more effective developer
Error Accessing Outlook Address Book When Composing a Message
My New Favorite Blog Code Highlighter
For All You ReSharper Keyboard Junkies
Hanselman Updates His Awesome Tools List
First Post From Windows Live Writer
Also Switched To Notepad++
NMock2 Download
ReSharper Updates
Sample CC.Net Configuration Section
Automating Your Builds With NAnt - Part 8 (Enter CruiseControl)
Unlocking Files With Ease
IE Tab In Firefox
Use SlickRun To Detach a Database
Automating Your Builds With NAnt - Part 7
SpeedFiler and Sql Prompt
ReSharper 2.0 Is Officially Here!
NAnt Starter Series
Running all of the sql files in a directory
Automating Your Builds With NAnt - Part 6
ReSharper 2.0 Beta Has Officially Begun
Automating Your Builds With NAnt - Part 5
Automating Your Builds With NAnt - Part 4
Automating Your Builds With NAnt - Part 3
Automating Your Builds With NAnt - Part 2
Automating Your Builds With NAnt - Part 1
Finally Added Feedburner feed
ReSharper 2.0 Build 229 Available
NMock2 CVS Checkout Information
BlogJet Rocks

Archive

Blogroll

 Agile Developer Venkat's Blog
 Ayende @ Blog
 B#
 Barry Gervin's Software Architecture Perspectives
 Boy Meets World
 Brad Abrams
 Canadian Developers
 Christopher Steen
 Claritude Software News
 Clemens Vasters: Enterprise Development and Alien Abductions
 Coding Horror
 Coding in an Igloo
 Dare Obasanjo aka Carnage4Life
 Darrell Norton's Blog [MVP]
 David Hayden [MVP C#]
 Don Box's Spoutlet
 Eric Gunnerson's C# Compendium
 EZWeb guy: Jeffrey Palermo [C# MVP]
 Fear and Loathing
 Generalities & Details: Adventures in the High-tech Underbelly
 Greg Young [MVP]
 Greg's Cool [Insert Clever Name] of the Day
 IanG on Tap
 Ingo Rammer's Weblog
 ISerializable - Roy Osherove's Blog
 James Kovacs' Weblog
 Jason Haley
 Jean-Luc David
 Jeremy D. Miller -- The Shade Tree Developer
 JetBrains .NET Tools Blog
 Jimmy Nilsson's weblog
 John Bristowe's Weblog
 John Papa [MVP C#]
 Jon Skeet's Coding Blog
 JonGalloway.ToString()
 Jump the Fence or Walk Around
 Lambda the Ultimate - Programming Languages Weblog
 Larkware News
 Lutz Roeder
 Marquee de Sells: Chris's insight outlet
 Martin Fowler's Bliki
 Mike Nichols - SonOfNun Technology
 MSDN Magazine - .NET Matters
 MSDN Magazine - All Articles
 OdeToCode Blogs
 Onion Blog
 Planet TW
 Raymond Lewallen [MVP]
 Rockford Lhotka
 RodMan's Corner
 Roger Johansson's blog
 Sahil Malik - blah.winsmarts.com
 Sam Gentile's Blog
 Scott Bellware [MVP]
 Scott Hanselman's Computer Zen
 ScottGu's Blog
 secretGeek
 Service Station, by Aaron Skonnard
 Signum sine tinnitu--by Guy Kawasaki
 Stephen Toub
 Steve Eichert's Blog
 Steven Rockarts
 The Blog Ride
 The Coding Hillbilly
 The Daily WTF
 TheServerSide.net: News
 Tim Gifford
 Vance Morrison's Weblog
 you've been HAACKED

Disclaimer
The opinions expressed herein are my own personal opinions and do not represent my employer's view in anyway.

RSS 2.0 | Atom 1.0 | CDF

Send mail to the author(s) E-mail

Total Posts: 519
This Year: 28
This Month: 0
This Week: 0
Comments: 1593

 Thursday, June 24, 2010
Thursday, June 24, 2010 7:36:35 AM (Mountain Standard Time, UTC-07:00) ( Mouseless Computing | Tools )

A couple of people have asked about my current dev setup on twitter, so I thought I would take the time to share how I currently have my machines setup for my dev work.

Here are the hardware specs for the 2 machines that I run:

  • Desktop: Mac Pro - 16GB - Dual Quad Core
  • Laptop : Macbook Pro - 4GB - Dual Core

Anyone that knows me will attest to how much of a keyboard freak that I am. I am constantly on the lookout for integrating more tools into the toolkit that allow me to both not use the mouse, and stay as close to home row as possible!! To that end, here is the current set of software that I use purely from a OSX perspective. When it comes to my windows VM's, I am pretty sure that I have documented their configuration elsewhere, but since I have not been spending a lot of time in the windows environment for the last while, I thought it would make sense to focus on the tools I have installed for my Mac:

Hopefully this list of tools gives you a good start to enjoying the mouseless lifestyle in OSX. If you are a keyboard ninja and have tools/utilities that you would like to share, please comment on this post and share with everyone!!

Develop With Passion!!

Comments [2] | | # 
 Friday, April 23, 2010
Friday, April 23, 2010 2:00:00 PM (Mountain Standard Time, UTC-07:00) ( ScreenCasts | Tools )

Having thought that I had figured out my publishing issues, this should have been published last Friday!

Here we are with the 2nd part to getting started with git. This time around the focus is on using git in a collaborative scenario with the aid of github. Some of the topics covered are as follows:

-Configuring remote repositories
-Cloning from a remote repository
-Pushing changes back to a remote repository
-Pulling changes from a remote repository
-Brief overview of dealing with an actual merge conflict

As before, any feedback that you would be willing to offer would be greatly appreciated.

You can view the screencast here:

Git Part 2

Develop With Passion!!

Comments [3] | | # 
 Wednesday, January 27, 2010
Wednesday, January 27, 2010 5:00:00 PM (Mountain Standard Time, UTC-07:00) ( Mouseless Computing | Tools )

One of the great things about being able to teach people from all over the world is the amazing tricks and techniques that you can pick up that can improve all aspects of your life (not just the dev realm).

Being the ever aspiring keyboard ninja, last July I picked up an autohotkey script from Rob Henry. Rob is a vim wizard. Having a year of vim under my belt, I was always on the look out for people who could teach me how to use it more proficiently. One of the things you "will" experience if you ever take the time to learn vim is that you will quickly miss some of its basic navigation features in lots of you other programs. One of the biggest things that I missed in all of my applications was not being able to use vim style navigation to get around, instead having to resort to the use of the arrow keys.

As soon as I started using vim I wrote a quick autohotkey script that would allow me to remap my caps key to escape. During the course in July, Rob made a great observation - "What a waste of a perfectly good control key". He promptly showed me an autohotkey script he had written to use the caps key as another control key that could be used to simulate simple vim style navigation anywhere in windows.


What does this mean? It means I pretty much never need to use the arrow keys!! That's right, being the home row nut that I am, this allowed me to cut out the flight to the arrow keys. This is especially significant for me when using tools like R#!!
Unfortunately, there was a slight problem with the autohotkey script (actually its not the script). When running VMWare Fusion on a Mac, the use of the Caps Lock keycode could not be combined with another keycode to accomplish what I wanted. I wrote a second version of Robs script that remapped my Caps Lock to the LWIN key. This means that when I hit my Caps lock key on its own, the windows menu pops up.


Of course, I am rarely hitting the caps lock key on its own, I am usually hitting it in conjunction with one or more other keys to save my hands the flight path. Here are a couple of examples of some combinations and what they simulate:

CAPS + E - Esc
CAPS + J - Down Arrow
CAPS + K - Up Arrow
CAPS + L - Right Arrow
CAPS + H - Left Arrow
CAPS + F - Cycle forward through task switcher apps
CAPS + D - Cycle backward through task switcher apps

One of the switches that I needed to make adjusting to this new scheme was to make sure that I was actually hitting CAPS in conjunction with another key as not to have the windows launcher pop up. I also realized that because I had previously only used the CAPS lock to get back into command mode in Vim, my pinky was not used to being stretched that far all the time. I know, I know, you are thinking to yourself that it is not that far at all, but the muscle memory in that finger was not used to using it so heavily at all, so after the first week, the left side of my hand was sore from the stretch. After the 2nd week it was totally normal.


As well as Robs script, I have updated a whole bunch of my resharper autohotkey scripts so that I can use the caps lock key to pull off some resharper goodness. I can't even remember what the "default shortcuts" are anymore, I have heavily customized those scripts for the way that I work and the way that I use the keyboard.

Download the zip containing the files here.

Develop With Passion!!!

Comments [8] | | # 
 Tuesday, September 22, 2009
Tuesday, September 22, 2009 4:03:00 PM (Mountain Standard Time, UTC-07:00) ( Productivity | Tools )

A couple of weeks ago I installed a copy of Parallels Desktop for mac. The main driver at the time was that it would allow me to play typing of the dead!!I have been using it since the first week in August. I think parallels is a great product, but I just recently switched back to VMWare Fusion as it was a clear winner in performance (my perceived performance). Parallels also seems to be somewhat of a resource hog. When I first had it installed I installed Windows 7 on a vm allocated 2GB of memory (my MBP has 4GB). I was also running an Ubuntu VM on vmware fusion that serves as my git repository. After about 30 minutes of running the Windows 7VM the Ubuntu VM would error saying that it could not allocate enough memory to continue operation (keep in mind that this Ubuntu VM was only allocated 256MB of RAM).

After switching back to VMWare fusion I can run both vm's quite happily and I am keeping the Windows 7 parallels vm kicking around so I can fire up typing of the dead every once in a while.

Develop With Passion!!

Comments [2] | | # 
 Thursday, July 02, 2009
Thursday, July 02, 2009 2:00:00 PM (Mountain Standard Time, UTC-07:00) ( Tools )

One of the discussions that comes up with a lot with other developers that I talk with is the question of "How productive I would be if I were not able to use the tools/frameworks that I use to make me a much more productive software developer." The basis answers is: "much less". Having worked in environments where people can be forced to use "standardized" developer images with a common toolset that give no room for individual customization, I can tell you that the observations I have made are a couple of the following:

-Unwilling acceptance of substandard tooling to get the job done
-Potential ,in reality very often often, loss of individual developer productivity
-Developer frustration on a daily basis with the "policing" rules that are in place
......

I stopped the list short as it can really go on and on.

The reason that the standardized developer machine cannot work is that every developer "wields their lightsaber differently". The tools and customizations that I have made to my machine are the steps I have taken that allow "me" to achieve great levels of productivity. I have to stress these are the tools that make me productive. They make me productive because I know how to use them, I have taken the time to hone my ability to use them. I can't expect that another developer who comes onto my machine would be as productive if they were not familiar with the tools/techniques.

Of course if I were to bring another developer to pair with me on my machine and they were not proficient in using these tools, they would be just as unproductive (initially). It is more likely that they have a set of tools/customizations that they have made to their machine that allows them to work extremely effectively. The point is that they are able to make the modifications to their individual machine that allows them to become more productive.

What are your thoughts on approaches to machine/software configurations in teams?

Develop With Passion!!

Comments [5] | | # 
 Wednesday, July 01, 2009
Wednesday, July 01, 2009 2:00:00 PM (Mountain Standard Time, UTC-07:00) ( Ruby | Tools )

Since I moved everything over to Windows 7 the last program that I had not yet installed was RubyMine (JetBrains awesome IDE for Ruby coders). After I completed my installation I fired up the program and was presented with a great exception dialog:

image

A quick search proved that the issue is with some settings in the idea properties file:

# path to IDEA config folder. Make sure you're using forward slashes
idea.config.path=${user.home}/.RubyMine10/config

# path to IDEA system folder. Make sure you're using forward slashes
idea.system.path=${user.home}/.RubyMine10/system

# path to user installed plugins folder. Make sure you're using forward slashes
idea.plugins.path=${user.home}/.RubyMine10/config/plugins
(on my system in : C:\Users\Jean-Paul Boodhoo\.RubyMine10

More specifically, RubyMine was not able to write to those folders as they were marked as readonly after install. I quickly changed the folder permissions and RubyMine was able to start up with no problems.

Develop With Passion!!

Comments [3] | | # 
 Tuesday, June 30, 2009
Tuesday, June 30, 2009 2:00:00 PM (Mountain Standard Time, UTC-07:00) ( git | Tools )

So you are using git you've done some work on your branch, everything is committed and you want to do a push to a remote repository. If you have used simple defaults to configure your repository then it is very possible that you will receive this message when you attempt to do a git push without any arguments:

image

The reason for this is because by default git tries to push all matching refspecs which is not usually what you want to do. There are a couple of places you can configure this if you do not want to receive this message. You can configure this at a repository level by running the following command from the shell (in the repository folder):

git config push.default [setting]

Where [setting] is one of the following values:

- nothing
- matching
- tracking
- current

Currently the setting that I find myself using the most is current. By setting this setting it allows me to do a push by simply running git push without any arguments.

Of course, if this is your default then you can create a fallback setting in your .gitconfig file that will be used in the event that a repository you are working in has not got a push.default configured. To do this just add the following entry into your .gitconfig file:

[push]
  default = current

This ensures that if you happen to be working in a repository that does not explicitly have push.default set, then when you do a push without any arguments it will not attempt to push all matching branches, only the current branch you are working on.

Develop With Passion!!

Comments [0] | | # 
 Monday, June 29, 2009
Monday, June 29, 2009 2:00:00 PM (Mountain Standard Time, UTC-07:00) ( Tools )

Since I use virtual machines very extensively (thanks Terry) it is pretty important for me to be able to drop onto a new machine and be able to launch my main VM's and be able to carry on working. I have recently moved my vm's onto an external hard drive, so I can literally jump onto a new machine install  VMWare Fusion / Workstation and I'm good to go.

Unfortunately some of the other programs that I like to install on the host os (Mac) are:

-QuickSilver
-Things
-ITunes

Up until now I had not taken the time to figure out how to get Things running between different machines. If you go to the following URL you can see how to make Things work between multiple computers:

Syncing Things on multiple computers

Armed with this information I just copy the entire Things database onto the external drive that I place my virtual machines on:

Picture 1 

I also make sure to copy the things app onto the external hard drive so that I can quickly copy it into the applications folder on the target machine. With this configuration I can flip between my Mac Pro and MacBook Pro, having both of them using the same Things database without any issue.

Develop With Passion

Comments [0] | | # 
 Thursday, June 25, 2009
Thursday, June 25, 2009 5:27:00 PM (Mountain Standard Time, UTC-07:00) ( Productivity | Tools )

Are you able to take the Timesnapper challenge?

One of the recurring themes that often comes up when I talk with people is how they mention how little time they feel they have to accomplish tasks in their day to day jobs. They also get discouraged when they can't seem to find time to explore new techniques, tools, apis etc. Outside of having a company that supports your ability to do self directed learning and exploration, you are also ultimately responsible for how you spend your time at work.

One of the most difficult aspects of teams that start to adopt pair programming is that now people are held up to a level of accountability that they may not be initially comfortable with. "Turn of your instant messenger", "Don't respond to that email", "twitter can wait". All of these are common phrases that can be uttered if you are in an environment where you spend a large part of your day working directly with another person beside you. Aside from the benefits of accountability, pair programming has many other benefits that can allow it to greatly streamline a teams development efforts. This post, however, is not about pair programming. It is about the sole task of getting people to realize where they actually spend their time at work and more specifically, as developers in front of their computers.

I am going to make the assumption that you don't have someone who can sit beside you and prompt you every time that you are misusing your time at work. I am going to challenge you to embark on an exercise that can allow you to greatly streamline your personal development efforts at work (and by development I mean "coding effort"). Download the tool Timesnapper and make a commitment to run it on your desktop for the next 2 weeks. I am not going to go into a discussion about the tool as the website itself does a great job of that. What I will say is that used properly it can be a way to help you analyze your habits while you are in front of the computer. It is a completely unbiased judge of where you spend your time. If you run the report at the end of the day and are not completely happy with your results you can use it as a calibration tool to make adjustments as you try to figure out a way to maximize that 8 hour day. Small improvements made over time are the things that can reap huge benefits.

Can you take the Timesnapper challenge?

Develop With Passion

Comments [9] | | # 
 Sunday, June 07, 2009
Sunday, June 07, 2009 12:02:00 AM (Mountain Standard Time, UTC-07:00) ( Tools )

For those of you who have upgraded to the latest versions of TortoiseSVN and are also big keyboard junkies, you are probably quick to notice that most of the accessor key support has disappeared across most of the dialogs. In case this has caused you grief and you are looking for an older version to download (with no success). You can download the 1.5.4 version from right here!

Develop With Passion!!

Comments [6] | | # 
 Tuesday, March 24, 2009
Tuesday, March 24, 2009 2:00:00 PM (Mountain Standard Time, UTC-07:00) ( Tools )

Since I just had to recently get my machine scaffolded again, I had a chance to revisit this item. I think this time I got it figured out a little better!!

For reference this is what my vim folder looks like:

image

Download the following files (I place them in the appropriate folders in my vimfiles folder:

http://www.vim.org/scripts/script.php?script_id=1327 (Syntax File)

http://www.vim.org/scripts/script.php?script_id=1815 (Indent File)

http://www.vim.org/scripts/script.php?script_id=1816 (File Type Plugin)

Once I had copied those files into the appropriate folders:

vimfiles\syntax

vimfiles\indent

vimfiles\ftplugin

I edited my _vimrc file and have the following section (just before the syntax on command):

image

With that done I can open up a powershell file and get syntax highlighting.

Unlike in the last post, this solution will also allow me to upgrade my version of Vim without issues as I am now placing custom plugins in my vimfiles folder (under version control, so I can quickly rebuild a machine if needed!!), as well as the fact that I am making use of my _vimrc file to enable the custom plugin.

Develop With Passion!!

Comments [0] | | # 
 Monday, March 23, 2009
Monday, March 23, 2009 7:20:00 PM (Mountain Standard Time, UTC-07:00) ( Tools )

Great article outlining the built in screen capture mechanisms on the mac : http://graphicssoft.about.com/od/screencapturemac/ht/macscreenshot.htm

Overview (copying to clipboard):

  • Entire desktop: Command–CTRL-SHIFT–3
  • Windows: Command-CTRL-SHIFT-4, press space, select window
  • Selection:Command-CTRL-SHIFT-4, select area

 

Develop With Passion!!

Comments [2] | | # 
Monday, March 23, 2009 2:11:00 PM (Mountain Standard Time, UTC-07:00) ( Tools )

The last post resulted in a great comment that I thought deserved some blog time:

“Given that you sometimes give out ReSharper licenses when you present, and often give it such glowing attention, I wonder if you have ever addressed the question of your relationship, if any, with JetBrains.
I have always assumed that you just value R# so much that you magnanimously want everyone to know about it and be productive to their greatest potential (there's that "passion"), but to the uninitiated it can certainly seem that you have some sort of a sponsorship/endorsement deal with JetBrains. I have no issues with it, either way--I'm hooked on R#.
In the interest of transparency, though, perhaps you could address this in a separate post and just prepend a link to it in posts like this one, so everyone is clear about the extent to which your accolades for R# are or are not a paid advertisement.”

I value R# a lot and want to expose as many people as I can to it, as I believe it can truly become a killer tool in a C# developers arsenal. Of course, this year is also going to be the year that I will be raving about Vim, ViEmu etc, and the same holds true in the case of those tools. I will be talking, and blogging about them as they are tools that help me achieve a great amount of coding productivity. I am a big fan of honing a sharp dev toolkit, pruning the fat when necessary, and always being on the lookout for better way to do things, be that leveraging new development tools or otherwise.

JetBrains does provide me with a free R# license for each public presentation that I do, but this is also the case for most people who take the time to get in contact with them and ask (of course, you need to be using the product!!). They also are very helpful in providing a discount to me when purchasing "full" licenses for the course (because of the volume of licenses). In both cases, they were very open and gracious to my requests for both. There is no agreement that states that I need to name drop the tool every "x" times in order to maintain either of these collaborations.

So the short answer is that I am just a developer who loves a coding productivity tool that I am happy to share with anyone who wants to listen/watch!!

I just wanted to make sure that people who feel that I am marketing the product for my own personal monetary gain can see that I am not; that I am just a coder, who loves to write code, and loves to use the best tools that allow me to produce code with the least amount of friction possible!!

Develop With Passion!!

Comments [5] | | # 
Monday, March 23, 2009 11:59:00 AM (Mountain Standard Time, UTC-07:00) ( Tools )

This guide is mostly for me to remind myself how I got my current ubuntu 8.10 desktop edition installed.

I want to quickly make it very clear that I am “not” an experienced linux user, so this is my account of how I got my current install going. Any suggestions on how to repeat the process in a much more streamlined way will be greatly appreciated!! And now that I have been using it for a couple of months (sparingly), I know how to repeat the process for a server only installation, I just have not had the need to switch my vm as of yet.

Here it is:

  • Download Ubuntu desktop (the cd image)
  • VMware Fusion – File –New
  • Click continue without disk

 

Picture 1

  • Choose the “use operating system installation disk image file” option and choose the disc image you downloaded, click continue.

Picture 2

  • Use the defaults on the following screen

Picture 3

  • On the following screen you can choose whether you want the VM to be able to access your home folder (I chose not to). I also provided the Easy Install information

Picture 4

  • On the last screen you will have the option to customize settings for the VM, when you click the “Customize Settings” button you will be prompted for a save location for the VM file.

Picture 5

  • Then the VM cutomization dialog will pop up:

Picture 6

 

  • The only customization I made was to change the RAM from 512MB to 256MB (after I have finished installing everything, I drop it to 128MB)
  • Start up the VM (you should see the Ubuntu loading dialog & progress bar)
  • Once the desktop is loaded it should start the install process automatically, it will restart and login automatically if you chose the easy install option (above)

Picture 7

 

Post Install Steps (setting up tools)

In the following commands, don’t type out the ESCAPE/ENTER keys!!

General Tools

    • Open  a terminal window (Applications –> Accessories –> Terminal)
    • sudo apt-get update<ENTER>
    • sudo apt-get install vim<ENTER>
    • sudo apt-get install firefox<ENTER>

Setting up subersion

    • Open  a terminal window
    • sudo apt-get install subversion<ENTER>
    • sudo vim<ENTER>
    • isvnserve –d –r /repositories<ESCAPE>
    • :wq /etc/init.d/subversion<ENTER>
    • You should now be back at the terminal
    • The previous vim jazz created a file that will be used on startup to get the subversion daemon started, before that can happen we have to make the file executable
    • sudo update-rc.d subversion defaults<ENTER> (prepares the subversion file to be run at startup)
    • sudo chmod +=rwx /etc/init.d/subversion<ENTER> (this change the file modifiers to read/write/executable, needs to be executable to fire up at startup)
    • sudo mkdir /repositories<ENTER> (creating the folder that will be watched by subversion)
    • At this point, you now have a basic subversion installation that can be administered using regular subversion means (I’m assuming familiarity with subversion command line tools). To create a new repository, you can drop to the terminal and create a new repo as follows:
      • sudo svnadmin create /repositories/[new_repository_name]

Develop With Passion!!

Comments [2] | | # 
 Friday, March 20, 2009
Friday, March 20, 2009 6:56:00 PM (Mountain Standard Time, UTC-07:00) ( Tools )

If you happen to be one of the many developers who are still coding up a storm in a Vanilla visual studio installation. This post is for you.

ReSharper is for many developers, myself included, a killer app and absolute necessity for staying productive while coding inside of visual studio. It is a coding productivity addin that adds a whole host of features that, if you are working in a plain VS install, you may not even realize how much you are missing.

A small bullet list of key features you may like are:

  • Smart Code Navigation
  • Refactoring
  • Solution Wide Error Analysis

Those three bullet points actually expand out into a ton of features that would take way too much time to talk about!!

I have been working with ReSharper ever since it's first EAP builds were available a couple of years ago. Let me tell you that it has become a deal breaker for me with potential clients if I am requested to work on a machine without this tool. It is truly hard to express in mere words how much more productive you can become as a code writer when making use of this tool.

I won't bore you with too many details as the best advice I can give is to go an download a copy of Resharper and give it a test run for a couple of weeks. You really need to commit to a 2 week stint with significant coding time, if you really want to see what it could do for you. Even then, you really need to see it in action being utilized by someone who is extremely proficient in it, before you can really appreciate what it might be able to help you with.

Another thing that I need to stress is the responsiveness of the Jetbrains team in dealing with errors you may run into. The ability for them to interact and deal fast to issues that are raised by the community is truly amazing. I have had several issues in the last week that were resolved and integrated into latter builds very fast.

The current version is 4.1, though I recommend installing the 4.5 beta and giving it a whirl. Download Scott's awesome build updater and stay in sync without having to manually check!!

Develop With Passion!!

Comments [7] | | # 
 Wednesday, March 18, 2009
Wednesday, March 18, 2009 10:40:00 PM (Mountain Standard Time, UTC-07:00) ( General | Tools )

Back in December I recorded a podcast with Craig Shoemaker of the Polymorphic Podcast. We had a discussion about tools and techniques that I used to stay productive while on the road. Even if you don't find yourself doing a lot of travelling, lots of the tricks/tools we discussed could be things that you may find useful.

Develop With Passion!!

Comments [1] | | # 
Wednesday, March 18, 2009 4:40:00 PM (Mountain Standard Time, UTC-07:00) ( Tools )

This is a request for help, as I don’t want to have to reinstall studio unless I really have to. I’m not sure if I accidentally changed a font setting for dialogs in studio, but all of my dialogs look like this now:

image

My ide font is fine, and everything else seems to be ok, but any VS dialog that I bring up is having the text rendered the same way. I done a repair of the installation, but it’s still there. I wondering if I accidentally changed a font setting in VS that I was not aware of.

Any ideas would be greatly appreciated!!

Comments [7] | | # 
 Thursday, March 12, 2009
Thursday, March 12, 2009 6:08:00 PM (Mountain Standard Time, UTC-07:00) ( Tools )

In my quest to keep my fingers as close to home row as possible, I am publishing the script I used to allow me to hit most of the ReSharper shortcuts I use by staying on home row. To run this you will have to:

  • Run AutoHotkey
  • Not worry about having different Resharper keyboard shortcuts than most!! (you can still use the original ones if you want!!)

Here is the script:

;==========================
;Initialise
;==========================
#NoEnv
SendMode Input
SetWorkingDir %A_ScriptDir%
SetTitleMatchMode 2

;==========================
;Process Move Down A Method
;==========================
$!J::
    Send, !{Down}
return

;==========================
;Process Move Up A Method
;==========================
$!K::
    Send, !{Up}
return

;==========================
;Process Move Method Up
;==========================
$^+!K::
    Send, ^+!{Up}
return

;==========================
;Process Move Method Down
;==========================
$^+!J::
    Send, ^+!{Down}
return

;==========================
;Process Go to next usage
;==========================
$+!J::
    Send, ^!{Down}
return

;==========================
;Process Go to previous usage
;==========================
$+!k::
    Send, ^!{Up}
return

;==========================
;Process Generate Code
;==========================
$!I::
    Send, !{Insert}
return
;==========================
;Highlight Current Usages
;==========================
$!8::
    Send, ^+{F7}
return
;==========================
;Find Usages
;==========================
$!9::
    Send, !{F7}
return
;==========================
;Next Error In Solution
;==========================
$!0::
    Send, !{F12}
return

Comments [1] | | # 
Thursday, March 12, 2009 3:00:00 PM (Mountain Standard Time, UTC-07:00) ( Tools )

A couple of people have been contacting telling me about how much they are enjoying using the developwithpassion.bdd library. I just wanted to point out that the syntax for the library was completely inspired by the work I saw done in Machine.Specifications (MSpec).

My main reason for developing developwithpassion.bdd was to have something that had the same syntax, that I could drop into my existing MbUnit projects and have them work side by side. This allowed me to take advantage of the existing unit runners (MbUnit Gui, MbUnit Console, Icarus, as well as TestDriven.Net), more importantly, it allowed me to slowly evolve my test writing style without having to revisit all of the tests that I already had in place. Of course, the library (being something that I use personally) has adopted a lot of things such as my naming conventions, as well as a fairly significant set of base classes that allow me to significantly cut down the noise in the tests/specs.

The Eleutian boys did a great job with MSpec, and I just wanted to make it very publicly clear as to where this project got its inspiration!!

Develop With Passion

Comments [0] | | # 
 Friday, March 06, 2009
Friday, March 06, 2009 9:52:00 PM (Mountain Standard Time, UTC-07:00) ( Tools )

A good friend suggested that “seeing your name at the top of all my tests is weird”!! To that end I am rebranding all of my common libraries to be prefixed with the develop with passion label. I have really put this framework through its paces and am really happy with the way that it allows me to write tests.

You can read about it on the following blog posts (just replace every occurrence of jpboodhoo with developwithpassion!!):

Develop With Passion!!

Comments [1] | | # 
 Wednesday, February 25, 2009
Wednesday, February 25, 2009 4:31:00 PM (Mountain Standard Time, UTC-07:00) ( Tools )

If you have not yet downloaded a copy of the 4.5 EAP I suggest that you go now and give it a whirl.

So far everything is looking good. One of my favorite additions so far is the modified naming style page:

 

image

Notice how most of my Entity kinds settings are set to “all_lower”. This is awesome, because now ReSharper will suggest underscored member names for me all over the place. It is a small addition but great.

 

Develop With Passion!!

Comments [3] | | # 
 Tuesday, December 23, 2008
Tuesday, December 23, 2008 3:42:00 PM (Mountain Standard Time, UTC-07:00) ( Tools )

My good friend Scott just pointed me in the direction of a really great (and very affordable) collaboration tool with excellent Skype support. Check it out at:

 

https://www.yugma.com/

 

Develop With Passion!!

Comments [3] | | # 
 Tuesday, November 25, 2008
Tuesday, November 25, 2008 5:15:00 PM (Mountain Standard Time, UTC-07:00) ( Tools )

In the Las Vegas edition of Nothin But .Net my TA  Scott Cowan made some updates to BDDDoc. BDDDoc is a tool I wrote that you can use to quickly generate a simple HTML report based on your test classes. Scott added an update to integrate with the test results of MbUnit (currently the tool can report against any codebase regardless of the testing framework being used). Now the report also shows coloring red/green depending on whether a given observation is passing or not. Here is a screenshot of a portion of what the new report looks like:

image

The tool currently takes advantage of my current naming style to generate natural sentences from the names of the concerns and observations.

Develop With Passion!!

Comments [2] | | # 
 Tuesday, September 16, 2008
Tuesday, September 16, 2008 7:00:15 AM (Mountain Standard Time, UTC-07:00) ( Tools )

I guess I have been a little too heads down in coding frenzy mode to realize that I missed the release of VMWare Fusion 2.0 4 days ago.

This release adds a whole bunch of stability enhancements along with some killer features that now make it a much more feature complete offering:

  • Virtual Hard Disk Resizing
  • Multiple Snapshots and decent snapshot manager
  • Multiple monitor support!!

There are so many new features that I would not be able to do it justice by bullet pointing it here, so head over here and check it out and download it if you are still using V1.0!!

Comments [0] | | # 
 Friday, September 12, 2008
Friday, September 12, 2008 7:00:03 AM (Mountain Standard Time, UTC-07:00) ( Tools )

I was asked this question at my last course so I thought I would share the answer with everyone!!

To get syntax highlighting for the powershell scripts that I edit I first downloaded a set of syntax files provided by Peter Provost. You can download the files from here:

http://www.vim.org/scripts/script.php?script_id=1327 (Syntax File)

http://www.vim.org/scripts/script.php?script_id=1815 (Indent File)

http://www.vim.org/scripts/script.php?script_id=1816 (File Type Plugin)

Once I had copied those files into the appropriate folders:

$VIMRUNTIME\syntax

$VIMRUNTIME\indent

$VIMRUNTIME\ftplugin

I had to edit my $VIMRUNTIME\filetype.vim and add the following line:

" Powershell
au BufNewFile,BufRead *.ps1            setf ps1

With that done I can open up a powershell file and get syntax highlighting.

Question for the long time Vim users. Can I not just place the files in the appropriate folders and have gvim automatically pick them up without having to edit the filetype.vim file?

Develop With Passion!!

Comments [6] | | # 
 Tuesday, September 09, 2008
Tuesday, September 09, 2008 7:00:27 AM (Mountain Standard Time, UTC-07:00) ( Tools )

 

As promised, I have created a quick <5 minute screencast that demonstrates the use of Vimperator to achieve mouseless browsing.

This is my first screencast recorded using ScreenFlow and I have to say that I am extremely impressed with the product!! I made sure to turn on the displaying of all keys and CTRL keys so that you could see exactly what I was pressing!!

Right now there is problems publishing comments to my blog, so if you have any feedback to provide please direct it to my email address at:

jp@jpboodhoo.com

Some of the other tools that you see used in the screencast are:

While watching the video keep in mind that I did not interact with the mouse for the entire movie!!

The movie is in QuickTime format, and you can download it from here:

Develop With Passion!!

Comments [6] | | # 
 Wednesday, August 27, 2008
Wednesday, August 27, 2008 5:14:19 PM (Mountain Standard Time, UTC-07:00) ( Tools )

The title spells out the latest set of tool combinations that take me one step closer to a richer mouseless browsing and editing experience. If you read the earlier post I am currently back running FireFox 2.0 and the older version of Vimperator as the "feature" did not present itself in that combination of tools.

I currently use vimperator to offer a mouseless browsing experience. I just stumbles upon ItsAllText which is a great add on that  lets me fire up gvim as my editor for textarea elements. I configure it to use gvim as my external editor and when I am in a textarea I can hit a hotkey to launch my external editor. I enter in the text I want and then I save and exit the editor (:wqa in gvim). This takes the contents of the vim buffer and sticks it into the textarea that I launched from.

 

If there is enough interest I would be glad to do a quick 10 minute screencast on mouseless browsing with all of the tools that I just mentioned. If there are enough responses then I will do up the screencast quick and get it out by the end of the week!!

 

Develop With Passion!!

Comments [3] | | # 
 Monday, August 25, 2008
Monday, August 25, 2008 9:42:24 PM (Mountain Standard Time, UTC-07:00) ( Tools )

For the last couple of courses I have been using a tool to generate simple natural language reports using  simple BDD Naming Styles. Just so everyone knows, the insipiration for this tool came from Scott Bellware and his tool SpecUnit. The only different between the tools is bdddoc is really just a categorization/reporting tools for your tests.

People who are already trying to adopt a more BDD oriented approach to writing their tests will find the tool useful for generating natural english reports from the testfixtures in your project.

If you run the tool against the prep exercise that I posted a while ago, you would get the following report.

To use the tool you simply add a reference to the bdddoc.dll from the project that contains your test. There is only one attribute that means anything of significance:

using System; namespace bdddoc.core { [AttributeUsage(AttributeTargets.Class)] public class ConcernAttribute : Attribute { public Type concerned_with { get; private set; } public ConcernAttribute(Type concern) { this.concerned_with = concern; } } }
 

With this attribute in hand all you have to do is mark up your test fixtures with the Concern attribute. Here is an example of one full test fixture.

using bdddoc.core; using bdddoc.spechelpers; using Observation = MbUnit.Framework.TestAttribute; namespace bdddoc.domain { [Concern(typeof (ConcernFactory))] public class when_a_concern_factory_is_told_to_create_a_concern_from_a_type : ContextSpecification<IConcernFactory> { private IConcern concern; private IObservationSpecification observation_specification; protected override void establish_context() { observation_specification = dependency<IObservationSpecification>(); observation_specification.setup_result(x => x.IsSatisfiedBy(null)).IgnoreArguments().Return(true); sut = create_sut(); } protected override void because() { concern = sut.create_concern_from(typeof (when_a_decimal_is_told_to_subtract_itself_to_another_number), observation_specification); } [Observation] public void should_create_a_concern_with_the_correct_bdd_style_name() { concern.name.should_be_equal_to(typeof (when_a_decimal_is_told_to_subtract_itself_to_another_number).Name.as_bdd_style_name()); } [Observation] public void should_create_a_concern_populated_with_all_of_the_observations_satisfied_by_the_specification() { concern.total_number_of_observations.should_be_equal_to(3); } protected override IConcernFactory create_sut() { return new ConcernFactory(); } } }

Don't be too put off by the naming style. Notice how I am making use of aliasing to alias the TestAttribute to use the word Observation. This eliminates the need to add another attribute to the bdddoc assembly. This also means that once you have placed the concern attribute on your test fixtures (keep in mind that the type argument for the constructor is the System Under Test) you will be able to run bdddoc again nunit, mbunit, or others (so far it has only been tested with mbunit and nunit).

When bdddoc is run (assuming that the class above was the only test fixture in the assembly, you would get the following output:

Concerns: 1 - Observations: 2

  • Behaviour of: ConcernFactory [ 1 Concern(s) , 2 Observation(s) ]
    • when a concern factory is told to create a concern from a type
      • should create a concern with the correct bdd style name
      • should create a concern populated with all of the observations satsified by the specification

This post is not going to talk about how I currently organize my contexts and observations (fixtures/tests respectively). After either the next course in London or the one in Dusseldorf in September, I am going to update the google code project for the Nothin But .Net store project to demonstrate some more complex tests that make use of mock, separating contexts etc.

Here is the build task that I use to run the report for my projects:

<target name="run.test.report" depends="setup.test">
    <exec program="bdddoc.console.exe"
        basedir="${third.party.tools.dir}\bdddoc\bin"
        workingdir="${build.artifacts.dir}"

        >
        <arg file="${build.artifacts.dir}\${nothinbutdotnetprep.lib}"/>
        <arg value="TestAttribute"/>
        <arg file="${build.artifacts.dir}\SpecReport.html"/>
    </exec>
</target>

 

The source code for the project can be downloaded here. I am going to place it up on my google code space, but currently I have having trouble with the account.

This project was built very quickly in a top down fashion, at the end of the day it is simply reflection and text writing. I just find working top down a very quick way to solve a problem, with the side effect of potentially more players brought into the mix (see the interfaces and classess!!). You can take a look at a lot of the tests to get a feel for how I am making use of AAA style testing and extension methods everyone to support more fluent testing. Feel free to change the code anywhere you see fit. If you add anything cool, please try and get it back to me to share with the rest of the community. Right now the actual report writer (SimpleHtmlReportWriter) is just that, very simple!! If anyone feels like submitting a writer that uses some XSL and some nice stylesheets, it would be great!!

To build the project just point a command prompt to the build folder and type the following command: build package. This will place the console runner and dll into the following folder build\latestpackage.

If you just want to get the binaries download this file and extract.

Develop With Passion!!

Comments [0] | | # 
Monday, August 25, 2008 3:08:50 AM (Mountain Standard Time, UTC-07:00) ( Tools )

If you have not yet at least spiked an application written with NHibernate, now is the time to at least give yourself a 30 minute block to spike it out.

Download from here and give yourself a couple of lunch hour breaks to see one way to free yourself from the shackles of 90% of your DB code.

 

Develop With Passion!!

Comments [1] | | # 
 Saturday, July 12, 2008
Saturday, July 12, 2008 5:06:11 PM (Mountain Standard Time, UTC-07:00) ( Tools )

ALT-F-V actually brings me to the main tortoise menu (see screenshot below)!!! I am not sure if this was a 1.5 addition to add the accessor under the V. On my matching, for prior versions of TortoiseSVN that shell item did not have an accessor!!

image

Develop With Passion!!

Comments [1] | | # 
 Tuesday, June 03, 2008
Tuesday, June 03, 2008 6:21:34 PM (Mountain Standard Time, UTC-07:00) ( Tools )

If you have been on the fence, now is the time to truly jump onto the ground and start running again in VS!!

ReSharper 4.0 RC is now available!!

I cannot stress enough the awesomeness that is this tool!! It has gotten to the point (I was there a long time ago) where I will not code at a machine that does not have ReSharper installed. It becomes a deal breaker for me with new clients that I engage if they are not willing to install ReSharper on the client machines (of course, there is the old ask for forgiveness, not permission route for this one also!!).

If you are still coding in Visual Studio using Raw Visual Studio then all I can say is that ignorance has to be bliss, as you truly cannot comprehend the productivity enhancements that can come once you have a truly powerful editor in your hands. For me the sweet spot seems to be ReSharper + VIEmu.

If you happen to be a user group leader/attendee and want to see what ReSharper can really do when opened up full tilt, get in contact with me and I would be happy to come and give a live coding demo!! Or you could just check out a session of the tool in action recorded by ReSharper Jedi Master : Ilya Ryzhenkov.

Are you ready to walk the path of the ReSharper Jedi??

Develop With Passion!!

Comments [5] | | # 
Tuesday, June 03, 2008 3:30:01 PM (Mountain Standard Time, UTC-07:00) ( Tools )

 

Seeing as how my daily work ritual for the last couple of months has been to startup my machine and pull down and install the latest version of ReSharper, I found it pleasantly surprising to see the addition to the install dialog this morning:

 

image

Tools Matter!! I could not agree more!!

Develop With Passion!!

Comments [5] | | # 
 Friday, May 30, 2008
Friday, May 30, 2008 9:47:41 PM (Mountain Standard Time, UTC-07:00) ( Tools )

VMWare Fusion 2.0 Beta just released and they finally have support for something I have been missing for a while since switching to the wonderful world of WOM (Windows On Mac), multi-monitor support.

Finally I can run my VM and stretch it across an many displays as my mac can physically handle!!! Now realistically, for me that just means my Monitor and the MacBook Pro LCD, but it is still better than nothing!!

Check out more information here: http://blogs.vmware.com/teamfusion/2008/05/more-displays-m.html

Comments [0] | | # 
 Wednesday, May 28, 2008
Wednesday, May 28, 2008 10:56:54 AM (Mountain Standard Time, UTC-07:00) ( Tools )

I think I now have a version of the script that I love. With some additions made by Aaron Jensen the script now watches for whenever the Enter/Escape key are pressed. Whenever those keys are pressed test naming style will turn off until it is reenabled again. I also modified the script so that when you are in test naming mode and you hit enter/escape it will disable that mode as well as send the keystroke (this is handy when you are in a dialog box, you enable the script, type in the natural name of the class/field,etc and hit enter. Without the modification you will have to hit enter twice!!

Aaron also made a tweak to ensure that the script is only live when VS is active. I find myself using this all over the place, so my version of the script omits that check.

Here is the new version of the script:

;=======================================================================================
;BDD Test Naming Mode AHK Script
;
;Description:
;  Replaces spaces with underscores while typing, to help with writing BDD test names.
;  Toggle on and off with Ctrl + Shift + U.
;=======================================================================================

;==========================
;Initialise
;==========================
#NoEnv  ; Recommended for performance and compatibility with future AutoHotkey releases.
SendMode Input  ; Recommended for new scripts due to its superior speed and reliability.
SetWorkingDir %A_ScriptDir%  ; Ensures a consistent starting directory.

enabledIcon := "testnamingmode_16.ico"
disabledIcon := "testnamingmode_disabled_16.ico"
IsInTestNamingMode := false
SetTestNamingMode(false)

;==========================
;Functions
;==========================
SetTestNamingMode(toActive) {
  local iconFile := toActive ? enabledIcon : disabledIcon
  local state := toActive ? "ON" : "OFF"

  IsInTestNamingMode := toActive
  Menu, Tray, Icon, %iconFile%,
  Menu, Tray, Tip, Test naming mode is %state% 

  Send {Shift Up}
}

;==========================
;Test Mode toggle
;==========================
^+u::
  SetTestNamingMode(!IsInTestNamingMode)
return

;==========================
;Handle Enter press
;==========================
$Enter::
  if (IsInTestNamingMode){
    SetTestNamingMode(!IsInTestNamingMode)
  }
  Send, {Enter}
return

;==========================
;Handle Escape press
;==========================
$Escape::
  if (IsInTestNamingMode){
    SetTestNamingMode(!IsInTestNamingMode)
  }
  Send, {Escape}
return

;==========================
;Handle SPACE press
;==========================
$Space::
  if (IsInTestNamingMode) {
    Send, _
  } else {
    Send, {Space}
  }

Having used this for the past 2 days now, I am convinced that AHK is the way to go to allow for much more fluidity when trying to write your tests in a more natural english style.

Develop With Passion!!

Comments [3] | | # 
Wednesday, May 28, 2008 3:45:44 AM (Mountain Standard Time, UTC-07:00) ( Tools )

Hot on the heels of my announcement about switching to use AutoHotKey, Dave posts an example overhaul that demonstrates just how powerful autohotkey is!! My brain is definitely brimming with ideas on how I can leverage this new tool in the toolbox!!

He has created a script that allows you to toggle BDD naming on/off with the same key sequence. The script also adds a customized tray icon which shows whether the script is currently enabled or not!! This is much better than mine, as you only have to use one keyboard shortcut to do the toggling.

I modified his script slightly as I did not want the TrayTip popping up whenever I switched between modes. I also wanted my toggle to be the CTRL-SHIFT-U keys instead of CTRL-ALT-U.

The following zip file contains the modification:

You can find the original here on Dave's post.

Thanks for taking the time to improve the script and let me know Dave!!

Develop With Passion!!

Comments [3] | | # 
 Tuesday, May 27, 2008
Tuesday, May 27, 2008 1:14:35 PM (Mountain Standard Time, UTC-07:00) ( Tools )

Well, it has been a good run and the BDD Macro has served its purpose to help me get into the swing with going down the BDD path, but now I find myself wanting a little bit more!!

After a quick email from Dave I thought I would take a quick look at AutoHotKey to see how it could help me accomplish my end result much simpler. Here are the 2 autohotkey scripts that I created to accomplish the end result:

replace_spaces_with_underscores.ahk:

#SingleInstance force
Space::_

spaces_back_to_spaces.ahk:

#SingleInstance force
Space::Space

 

In my main autohotkey script (which is located in My Documents) I added the following lines of code:

^!u::Run C:\utils\autohotkey\jpscripts\replace_spaces_with_underscores.ahk
^+u::Run C:\utils\autohotkey\jpscripts\spaces_back_to_spaces.ahk

The first line tells autohotkey that whenever the CTRL-ALT-U combination is pressed that it should run the replace_spaces_with_underscores.ahk to enable underscores being placed whenever I hit the space key.

The second line tells autohotkey that whenever the CTRL-SHIFT-U combination is pressed that it should run the spaces_back_to_spaces.ahk to switch the space key back to its normal behavior.

Autohotkey starts up at Windows start up, so I can use these commands no matter which application I am in. I have attached the script files. I also recorded a quick screencast, but I cannot currently upload it to my FTP server (issues). I have a feeling that me and AutoHotKey are going to become fast friends!!

Develop With Passion!!

Comments [4] | | # 
 Friday, May 23, 2008
Friday, May 23, 2008 7:12:39 AM (Mountain Standard Time, UTC-07:00) ( Tools )

I might be late of the presses making the announcement, but I am sure that I am one of the few who has been updating their build of ReSharper almost daily for the last couple of moths (except when it is a not recommended build). I just can't understate the awesomeness of this amazing tool!! I plan to do a ReSharper Jedi coding session with music and all in the next couple of weeks where I am going to go full tilt with Viemu and ReSharper 4.0. I think that the best way to sell people on the value of code productivity tools is to show them in action.

If you feel like living on the edge, go and download the latest nightly build from here.

Develop With Passion

Comments [0] | | # 
 Tuesday, April 15, 2008
Tuesday, April 15, 2008 3:59:41 AM (Mountain Standard Time, UTC-07:00) ( Programming | Tools )

For the last couple of weeks, I have been integrating Vim and a complementary set of tools into my development toolkit. I am firmly on board with what the pragmatic programmers say:

"Learn a good editor, and learn it well!!"

I am thoroughly impressed with Vim, Viemu etc. Last week I was recommended a registry hack that would allow my Caps Lock key to have the same behaviour as the ESC key. This results in a much smoother experience when using Vim.

So far, I am loving the reg hack and much prefer the need to not have to move my hand to hit the ESC key. Here is the text of the reg file:

Windows Registry Editor Version 5.00

[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Keyboard Layout]
"Scancode Map"=hex:00,00,00,00,00,00,00,00,02,00,00,00,01,00,3a,00,00,00,00,00

[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Keyboard Layout\DosKeybCodes]
"00000804"="ch"
"00000408"="gk"
"00010408"="gk"
"00020408"="gk"
"00050408"="gk"
"0001041f"="tr"
"0000041f"="tr"
"00000423"="us"
"00000402"="bg"
"00000419"="ru"
"00010419"="ru"
"00000c1a"="us"
"00010c1a"="us"
"00000422"="us"
"00010402"="us"
"00020402"="bg"
"00030402"="bg"
"00020422"="us"
"00000412"="ko"
"00000425"="et"
"00000426"="us"
"00010426"="us"
"00000427"="us"
"00000411"="jp"
"00000404"="ch"
"0000041C"="us"
"0000041a"="yu"
"00000424"="yu"
"00000405"="cz"
"00010405"="cz"
"0000040e"="hu"
"0001040e"="hu"
"00000415"="pl"
"00010415"="pl"
"00000418"="ro"
"00010418"="ro"
"00020418"="ro"
"0000041b"="sl"
"0001041b"="sl"
"00000442"="tk"
"00000813"="be"
"0000080c"="be"
"00001009"="us"
"00000c0c"="cf"
"00010c0c"="cf"
"00000406"="dk"
"00000413"="nl"
"0000040b"="su"
"0000040c"="fr"
"00000407"="gr"
"00010407"="gr"
"0000040f"="is"
"00001809"="us"
"00000410"="it"
"00010410"="it"
"0000080a"="la"
"00000414"="no"
"00000816"="po"
"00000416"="br"
"0000040a"="sp"
"0001040a"="sp"
"0000041d"="sv"
"0000100c"="sf"
"00000807"="sg"
"00000809"="uk"
"00010409"="dv"
"00030409"="usl"
"00040409"="usr"
"00020409"="us"
"00000409"="us"
"00000452"="uk"
"0000046e"="sf"

[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Keyboard Layout\DosKeybIDs]
"00010408"="220"
"00020408"="319"
"0001041f"="440"
"0000041f"="179"
"00010415"="214"
"00000442"="440"
"00000410"="141"
"00010410"="142"

Create a reg file and copy the contents into it, then merge the file into your registry. Make sure that you want to not have normal use of your caps lock key.

Develop With Passion!!

Comments [11] | | # 
 Thursday, March 13, 2008
Thursday, March 13, 2008 5:37:10 AM (Mountain Standard Time, UTC-07:00) ( Tools )

Well you can officially call me a Vim junkie now!! Having spent the last couple of weeks working with it I can definitely say that I would not work at a machine that did not have it. That's right, that is the same claim I made, and still make, about ReSharper. I still trip myself up in ReSharper with VIM a couple of times, but nothing worth writing home about. To ensure a complete immersion, I have purchased a copy of Vimemu that integrates with:

  • Visual Studio 2008/2005
  • Microsoft Word
  • Microsoft Outlook

As well as now using gvim as my primary text editor (notepad++ is still in the picture) I just recently installed Vimperator which plugs into firefox to give me a whole world of Vim goodness.

There is only one problem with getting used to this tool - You will start wishing you had Vim integration into all of your applications!!!!!

For those of you who are curious, you might get a kick out of the following article:

Why, oh WHY, do those #?@! nutheads use vi?

As soon as I have time I am going to give a screencast on using all of these tools.

Comments [8] | | # 
 Friday, February 22, 2008
Friday, February 22, 2008 3:25:56 AM (Mountain Standard Time, UTC-07:00) ( Tools )

After watching the first screencast that Aaron presented on Vim, I thought I would check it out. The first day was a little uncomfortable, 2 weeks later I am happy to report that I concur with Aaron's statement, which is also what I say to people who were not using ReSharper:

"I could not use studio without it"

ReSharper + Viemu is the ultimate killer combo for increasing your keyboarding productivity. The fact that you can keep your hands on home row to do the majority of your navigation is a huge plus. The core command set does not take a lot of time to learn, you just have to stick with it so that it becomes second nature. Once it does you will be "yanking", "pasting", "changing" ..... up your code in ways that now make studio seem extremely cumbersome.

As with picking up any new tool/technique there is a period of ramp up that you have to go through. It was a 2 week road trip where I could not use my mouse, that forced me to learn all of the keyboard shortcuts that I needed to get around windows, studio etc with efficiency. After that 2 week period I realized that there were very few things that I actually needed to reach for the mouse for (game playing aside).

To dive in full force, I also purchased the Vim integration that works in Outlook and Word. That way I can completely immerse myself in the Vim experience.

I encourage you to check it out and give it an honest and open attempt. You might surprise yourself with the results.

Comments [7] | | # 
Friday, February 22, 2008 3:11:53 AM (Mountain Standard Time, UTC-07:00) ( C Sharp | Tools )

Ever since the nightly builds for ReSharper 4.0 went live, being the REA (Resharper early adopter) that I am, I downloaded it and have been using it on my C# 3.5 projects. I am happy to report that even though it is in the pre EAP phase, it is extremely solid and a joy to work with.

The support for the new language features such as extension methods, automatic properties ... is great. So far I have had only one exception dialog pop up. For those of you who have braved prior EAP's for ReSharper (remember ReSharper 2.0 EAP!!!) you have probably already developed a thick skin for the exception dialogs that typically pop up during EAP. So far this is not the case.

In all honesty, those of us who love ReSharper would be more than willing to put up with multiple exception dialogs as, let's face it, studio without ReSharper == "I won't use it".

So what are you waiting for, head over and download the latest nightly build. Keep in mind that results may vary between use as well as different nightly builds!!

Develop with Passion!!

Comments [1] | | # 
 Tuesday, February 12, 2008
Tuesday, February 12, 2008 9:57:41 PM (Mountain Standard Time, UTC-07:00) ( Tools )

I might be a little late on this one, but I just learned a new shortcut that will definitely save me time when I am working in my VM on my mac. I love to use the keyboard. And when I use my natural keyboard it is fairly easy to access context menus (right click) by using the context menu key on the keyboard. My MacBook does not have such a key. This meant that up until yesterday (when I learned the shortcut) I had to have a mouse plugged in any time I wanted to access the context menu.

Shift-F10 is actually a keyboard shortcut that accomplishes the exact same thing as the context menu key / right click.

Thanks to Jay Smith for pointing this out for me.

 

Comments [3] | | # 
 Wednesday, November 28, 2007
Wednesday, November 28, 2007 11:01:52 PM (Mountain Standard Time, UTC-07:00) ( .Net 2.0 | .Net 3.0 | Agile | C Sharp | Continuous Integration | Patterns | Programming | Tools )

I finally set up a googlecode project to host source code for the various things I have been doing over the last year. The first major significant contribution is of course the code drop that I promised a week ago now!!

The application is the start of what I hope will evolve to be a great learning resource for lots of things related to .Net development. The application does not currently cover any of the “extra” topics that I did not have time to get covered in the course. This is perfect because as request come in from people (including past students) asking how to tackle a certain problem, I will use this application as the demonstration area where I can tackle the problem, and update the code base, and you will be able to update your local copy and carry on.

I am currently in the midst of a large Smart Client application that I am hoping to be able to harvest pieces of code out and do the exact same thing except for the smart client realm. I have much more experience developing in the smart client realm and that is where I feel most comfortable, so I am looking forward to be able to do another code drop (for a different application) in a couple of months.

I am going to write up another post about the Web Application as it is built very differently from traditional .Net based web applications. In following with the theme for my courses, there are currently no 3rd party frameworks (other than log4net) that have come into play. My goal with this web app is to demonstrate to people how far we can push raw .Net. The goal being that expanding their knowledge of how to creatively leverage .Net, they will be better prepared to jump into frameworks that they may currently feel daunted by. As time goes by, I will swap pieces of the application out with components that people are asking to see meaningful samples on:

  • NHibernate
  • Castle
  • Prototype
  • JQuery
  • ..*

As the app stands right now I see it as the beginning of what will shape up to be a pretty mean machine!!

I am going to post a screencast that will show people how to get started working with the web application. For people who are eager to get going right now, here are the quick and simple steps without a lot of explanation (that will come in the next post):

  • Anonymously checkout the trunk from the google code repository using the following svn command line:
    svn checkout http://jpboodhoo.googlecode.com/svn/trunk/ jpboodhoo-read-only
  • Navigate to the checkout folder
  • Go into the build folder
  • Copy local.properties.xml.template and paste it into the same directory, then rename the copied file to local.properties.xml
  • Open up the local.properties.xml file with your favourite text editor.
  • Modify any of the settings in the file that are different on your machine.
  • Open up a command prompt and navigate to the build directory of the code.
  • type: build load.data and hit enter.
  • type: build test.all.woc
  • type: build run
  • The last task should fail (I haven’t automated everything yet)
  • Create a virtual directory called nothinbutdotnetstore that points at the following location (this location is created after you attempt to run the build run task) : ${checkoutfolder)\build\deploy\web\app
  • After successfully creating the virtual directory try the build run task again.
  • If the web browser pops up pointed at a web page (for the app) you are in business. Feel free to click through the first set of pages that are implemented (only 3 pages are currently implemented).

As far as what I have planned to implement in the web app (that is currently not implemented):

  • Build out a more extensive domain model that encompasses some more advanced scenarios of the application (especially around order processing).
  • Unit Of Work for the service layer
  • Implement a lightweight OR/M layer
  • Integrate some UI frameworks like prototype
  • Eliminate Master Pages completely and switch to a much more elegant template view pattern.
  • Introduce a more robust container (as the current one is a simple dictionary wired up in a simple procedural fashion).
  • Introduce the concepts of lifecycles for the items in the container. Right now, everything wired into the container is essentially a singleton.
  • Introduce CSS based layout for the web pages (working with a designer on this one).
  • Bring security concerns into play
  • Demonstrate how to effectively manage sessions
  • ……lots,lots,lots more!!!

Obviously I will be leaning on people checking out the code and playing around with it and submitting requests for things they would like to see.

There are a couple of things that you will immediately notice about the application:

  • Clean front controller implementation with ASPX pages as the template views. There are no code behind pages in this web application. All web requests are handled by command objects that interact with the service layer, push the details into a “ViewBag” and then choose which view to render.
  • Logical layers in the project are separated using simple folders and namespaces (not full blown projects)
  • Build automation is its own project in the solution (props to Jay Flowers for this inspiration)
  • The current container implements (CustomDependencyContainer) is very simple and is handled by a big procedural application startup task.
  • Compile time support for the database layer. A couple of classes ago I introduced the concept of a generic TableColumn<T> type. In England after introducing this concept Scott Cowan leveraged his knowledge of MyGeneration to automatically generate strongly typed table definitions that we could leverage to do mapping (trust me when I say, this is nothing like datasets). Until moving into OR/M concepts deeper this gives a good place to start as the generation of the TableDefinitions is linked to whenever the SQL files change, so you will get compile errors if column types are now mismatched etc…

There are lots of other things I could talk about, but this code really is the start of what I see being a long running conversation between myself and other people wanting to learn. In all honesty for all of the emails I have not paid attention to this year, hosting code through google will allow me to answer peoples questions in a much more meaningful way as I can point them at this site to see the implementation of the code they had questions about.

I am going to be placing all of the code for presentations that I have done for the last year as well as continue to update it with the source code that comes out of new courses that will be coming out in the new year, and the DNRTv episodes.

Once again, the application is currently in its infancy, but as people start sending in the requests I now will have a venue and example to add upon to answer questions in a much more timely fashion!!!

 

Develop With Passion!!!

 

 

Comments [12] | | # 
 Friday, November 23, 2007
Friday, November 23, 2007 10:02:01 AM (Mountain Standard Time, UTC-07:00) ( Tools )

Thanks to everyone for all of the feedback. In the end, the first response that I tried was to install the latest copy of VisualSVN (I was running a slightly older version).

After installing the latest version of VisualSVN everthing is functioning as expected.

Comments [3] | | # 
 Thursday, November 22, 2007
Thursday, November 22, 2007 11:00:26 PM (Mountain Standard Time, UTC-07:00) ( Tools )

Well, today I installed VS2008 on my machine. Setup went great and completed with no errors.

This was a fresh install on a machine that had no prior beta bits installed whatsoever. So I did not anticipate anything weird happening.

Fired up VS2008 for the first time and  it went through its normal first time setup deal. So there I was, in a blank IDE with my C# RSS Feed showing from the help page.

I go to add a new project and I’m presented with this wonderful dialog:

Ok…. So I try a few (lot) more menu items and the same thing happens. So, I think to myself, just exercise the standard Windows remedy. Get out, get back in, and see if it is better!!

I would do that, if I could exit Studio!! Even hitting the big red x in the top right corner of VS2008 pops up this dialog. The only way to shut this down is to kill the devenv process.

I am currently running XP with SP2 and an existing installation of VS2005. Again, let me stress that I have not installed any beta bits of VS2008.

After un installing and reinstalling to no success (same result) I quickly googled. I happened to stumble into an MSDN forum where people are having the same issue and are also not sure how to go about resolving it.

Has anyone else ran into this issue? How did you fix it?

Comments [4] | | # 
 Monday, November 19, 2007
Monday, November 19, 2007 2:39:19 PM (Mountain Standard Time, UTC-07:00) ( General | Tools )

The title says it all. Looks like I will be prepping a new VMWare image in a couple of hours!!

Now the JetBrains people have a good target to aim at with getting a release out that supports the RTM of VS2008!!

Develop With Passion

Comments [2] | | # 
 Tuesday, November 13, 2007
Tuesday, November 13, 2007 1:55:06 PM (Mountain Standard Time, UTC-07:00) ( .Net 2.0 | .Net 3.0 | C Sharp | General | Tools )

Since I have been asked for these quite a few times, I thought I would oblige and give these out. You can find below the links for both my Resharper Live Templates and File templates.

Enjoy:

Comments [1] | | # 
 Friday, July 06, 2007
Friday, July 06, 2007 8:34:56 AM (Mountain Standard Time, UTC-07:00) ( Tools )

As you can see from the title. I am currently not using the datahand to type right now. This is due in large part to the immediate needs of a client and my personal frustration with going from being able to type fairly fast on a natural keyboard to not very fast at all on a DataHand.

During the 2 weeks that I used the DataHand, I personally found the learning curve to be fairly low. In fact, the need to not have to reposition your fingers around the home row keys was a big plus. If you are a fairly proficient touch typer, you would probably have no problems making the transition to the datahand. I think it would be even more beneficial if you are not already a fast typer, as I think that in the long run, the speed improvements to be gleaned from the datahand far outweigh what you could gain from regular keyboards on the market.

I was hoping that the DataHand would be able to become a mouse replacement for me also. Alas, the mouse on the datahand is pretty weak, and I think I would still resort to reaching for my mouse at the times that I absolutely had to.

An interesting experience using the DataHand came into play when I had to switch to using studio combined with ReSharper. The keyboard shortcuts definitely took less effort to pull off. It did require me to remember to “mode switch” in order to be able to pull off certain refactorings and navigation. I think it will take a bit of time to make this “mode switching” automatic.

It was ultimately the slowdown inside of studio that caused me to switch temporarily back to a natural keyboard, as I am unfortunately in a heavy delivery mode right now.

The effort involved to operate the keyboard is definitely much less than any keyboard I have ever worked on. Your wrists and hands will feel the difference almost immediately.

One other big negative that I had not even counted on was the actual size of the unit. It is fairly beefy. I currently tote my natural keyboard with me wherever I have to type. Granted, it is not the smallest of keyboards, but it is slim and can fit nicely into a suitcase or backpack with no problem. On the other hand, the DataHand is a fairly bulky unit. Just a little wider than a natural keyboard, but considerably thicker. Unhooking this, and transporting it between work and home is a little annoying (which is why I have 3 natural keyboards, one at work, home, and one for presentations). Obviously, having more than one DataHand is a little ridiculous from a price perspective.

There is one last final negative that I have to mention, one that I did not even think about. There are lots of times in the morning, when I am working from home, when our youngest son runs into my office and wants me to hold him on my shoulder. This leaves me with one hand available to type. On any regular keyboard, you can get away with pecking away at the keyboard to get some stuff written down, this is not really the case with the datahand. To use it, you really need to have both hands available. I know this is of little concern to most people, but it is one of those little details that I did not even think about.

I am going to take some time off from work near the end of the year, to truly immerse myself in the datahand unit. Where I can devote a full 2 weeks to learn the device well without the pressures of deadlines looming. If you are thinking about buying this device, you need to be sure you have the time to allow yourself to get comfortable with it. Because I spent 2 weeks completely isolated to the DataHand, I got an opportunity to learn it without confusing myself. This allows me to go home, and do the practice exercises on the unit without getting confused between my natural keyboard and the unit.

I would strongly recommend the DataHand as an alternative to the regular keyboards that are on the market. You just have to keep in mind the caveats that I listed in conjunction with the rampup time required to get proficient with the device.

Comments [1] | | # 
 Thursday, May 31, 2007
Thursday, May 31, 2007 7:24:05 AM (Mountain Standard Time, UTC-07:00) ( Tools )

I’ve been using ReSharper 3.0 EAP for quite some time now, and I’m loving it. The beta just released (yesterday I think), so what are you waiting for:

  • Solution Wide Error Analysis
  • C# Code Analysis
  • Unit Test Explorer
  • XAML Support
  • More…

Download it right now and start developing with pleasure!!

Comments [3] | | # 
 Thursday, May 17, 2007
Thursday, May 17, 2007 8:46:31 AM (Mountain Standard Time, UTC-07:00) ( Tools )

Looks like TW Studios just released a new offering to the general consumer public.

CruiseContol Enterprise is an interesting offering from TW that looks to add interesting support and consulting features as well as some interesting additions to the actual tool itself.

I could duplicate information and screenshots, but you are better off just taking a look at it!!

Comments [0] | | # 
 Monday, April 30, 2007
Monday, April 30, 2007 5:19:59 PM (Mountain Standard Time, UTC-07:00) ( Tools )

Using ReSharper 3.0 for the last week and a bit has been an awesome experience. It is currently in the EAP phase, but so far it is proving to be the most solid eap of the product they have released to date (in my opinion).

Of all of the features that have been brought into the mix, I am particularly pleased with:

  • Solution wide error analysis
  • TODO Explorer
  • Member reordering

I asked for solution wide error analysis as a feature several months ago, I am pleased that other people must have also asked to ensure that it got brought into the mix.

The title of the post has to deal with the fact that coupled with the solution wide error analysis, I can now truly not need to do my compiles using studio at all. During this last week, I held another iteration of my Nothin But .Net coding bootcamp (1 10 hour day, 4 14 hour days!!). Aside from 2 times that I accidentally built in studio, the app evolved over the course of the week, and there was no need for me to use studio once to do a build.

The nice thing about the solution wide error analysis, is that I can deal with my error quicker than doing a NAnt compile, looking for the error, fixing, and repeating. I can just hit ATL-F12 to take me to the next error in the solution, fix the code, ensure that I am good to go solution wide, then I can do my build in NAant.

Cheers to the Jetbrains team for continuing to evolve a stellar product for .Net developers.

 

Comments [2] | | # 
 Wednesday, April 18, 2007
Wednesday, April 18, 2007 6:30:02 AM (Mountain Standard Time, UTC-07:00) ( Tools )

David Stennett over at JetBrains is soliciting existing users of ReSharper to pipe up and tell them about things they could do to improve the killer product we all know and love (all of us who use it that is!!).

Take a couple of minutes out of your busy day and fill out this survey which should arm them with more information with which they can continue to improve the single biggest productivity booster to grace Visual Studio.

Comments [1] | | # 
 Thursday, March 08, 2007
Thursday, March 08, 2007 3:20:11 PM (Mountain Standard Time, UTC-07:00) ( Tools )

For those of you getting started with powershell here is a simple example for you to cut your teeth on, file copying.

I had to quickly copy some assemblies out of the gac to another location, specifically I had to copy all of the Assemblies for ActiveReports into a single directory. If you take a look at the GAC from the command line, you will notice there is a bit of a tree there. To make it simple I wrote this quick powershell script to do the heavy lifting for me :

get-childitem C:\windows\assembly\gac * -Recurse -Include act*.dll | foreach-object -process{copy-item $_FullName - destination O:\efc}

Notice how I am piping the results of the get-childitem cmdlet into the foreach-object cmdlet, the most powerful thing is that I am piping around objects, not simple strings, I love it!!

I know there are ways to do this using the plain old command promtp, but it gives me another reason to sharpen my Powershell skills. If you have not started playing with Powershell, I encourage you to give it a try.

Comments [2] | | # 
 Tuesday, March 06, 2007
Tuesday, March 06, 2007 10:24:28 AM (Mountain Standard Time, UTC-07:00) ( Agile | Tools )

I am not sure where he finds the time, what with home schooling 2 kids, consulting and speaking, but James Kovacs has managed to write a plugin to allow running VSTS unit tests from within ReSharper. If you happen to be one of those people who has to use the VSTS unit test, and you also have the joy of using ReSharper, head over and download it and give him some feedback!

Comments [5] | | # 
Tuesday, March 06, 2007 9:14:32 AM (Mountain Standard Time, UTC-07:00) ( Tools )

Yesterday Jeremy Miller asks the question : Do you use OSS tools for .Net development. My answer is an obvious and resounding Yes!!

Here are some of the tools I currently use:

I am sure I am missing a few, but the above list definitely covers the brunt of them!!

What OSS tools do you want to use today!!

Comments [8] | | # 
 Tuesday, January 30, 2007
Tuesday, January 30, 2007 9:19:09 PM (Mountain Standard Time, UTC-07:00) ( C Sharp | Tools | VS2005 )

If, like me, you are a keyboard junkie wanting to sharpen you keyboarding skills in VS 2005 you might appreciate this PDF that contains the default keybinding for Visual C# 2005. Thanks to Lucio Assis for providing me with the link!!

This is a great place to start getting more proficient navigating around studio without the mouse. If you really want to take your keyboarding skills in studio to the next level do yourself a favour and pick up a copy of JetBrains ReSharper, then you can really start to fly.

Comments [1] | | # 
Tuesday, January 30, 2007 4:58:50 PM (Mountain Standard Time, UTC-07:00) ( Tools )

Looks like the Vista installer for Powershell got finished up, which is good news for those of us waiting for a fully supported Powershell for Vista. Head over to this link to download a copy. Powershell is da bomb.

Comments [0] | | # 
 Monday, January 29, 2007
Monday, January 29, 2007 8:49:40 PM (Mountain Standard Time, UTC-07:00) ( Tools )

My good friend Terry Thibodeau just posted about a new version of Launchy that allows me to finally remove SlickRun from my machine so I don't need to run them both. I won't go into the details, check out his post.

As an aside, keep an eye on his blog as this guy is a storehouse of tech/dev knowledge, and he has only just started blogging.

Comments [4] | | # 
 Friday, January 19, 2007
Friday, January 19, 2007 3:35:49 PM (Mountain Standard Time, UTC-07:00) ( Tools )

Thanks to Igloo Coder for reminding me that today (Jan 19th) is the unofficial "Windows Developer Tools Day".

I have a lot of tools in my utils folder, the ones that I use almost everyday are:

If you are on the lookout for a crazy list of tools, check out Scott Hanselman's ultimate tools list!!

Comments [1] | | # 
 Monday, December 11, 2006
Monday, December 11, 2006 1:36:21 PM (Mountain Standard Time, UTC-07:00) ( Tools )

What else can I say!! Rush over here and download a copy of this phenomenal tool.

Comments [1] | | # 
 Tuesday, December 05, 2006
Tuesday, December 05, 2006 9:35:21 AM (Mountain Standard Time, UTC-07:00) ( .Net 2.0 | Tools )

If you like to play with the latest and greatest that JetBrains has to offer, then head here to download the EAP version of ReSharper 2.5. If you have already been using the EAP version, then there is not much I can say about it that you have not already seen.

If, on the other hand, you have not been using the 2.5 release then you are in for a few surprises. Along with tightening up the user interface (which looks really nice now), there are a number of new features that ReSharper users will welcome with open arms.

Instead of me duplicating information, check out the RoadMap for the product here.

Develop with pleasure!!

Comments [1] | | # 
 Monday, November 20, 2006
Monday, November 20, 2006 11:17:04 PM (Mountain Standard Time, UTC-07:00) ( Tools )

I love coding, consulting, teaching, and presenting (in that order too!). One of the things I get a big kick out of is giving a presentation and having people remark about how fast I can navigate around windows without the mouse!! I have to admit, I can't take the credit. While I am pretty pleased with my typing speed; it is the small, fast, targeted utilities that allow me to slice through windows like a hot knife through butter.

What's my point? I showed up at work today without my mouse ( I have a laptop with a trackpad, how I loathe trackpads) and realized that I was going to have to work the day without the mouse.

Aside from the odd tasks that are a bit of a pain to accomplish without a mouse (resizing windows, moving windows etc) I realized that I do not use my mouse much at all anymore.

My mouse of choice currently is the Logitech MX Revolution:

 

The MX is a phenomenal mouse with an extremely small transmitter and rechargeable battery, it also has a wicked free spin mode that allows you to traverse long documents extremely fast.

 

OK, enough of the advertising, I'll get back to how you can become more effective using the keyboard. I'll highlight some tools and techniques that you can start using today to slowly make yourself more in a less mouse reliant state!!

  • Develop your touch typing skills. You don't need to become a fast typer. You just need to become more effective at using all of your fingers on all of your hands, without looking at the keyboard. Even if you make mistakes, your errors will be corrected faster as you are always looking at the screen. Look at downloading a good, fun, typing tutor and spend a couple of minutes in the morning and afternoon going through some exercises. Don't try to tell me that you don't have the time!!
  • Drop your mouse for a week. That's right, I actually said 'drop' your mouse for a week. There is nothing like going cold turkey to force you to learn the keyboard shortcuts you need to learn to navigate around windows properly. This March, I forced myself to not use my mouse for a 2 week period. It was during this period that I developed the baseline of my mouseless computing experience. Trust me, it will be a big investment, with bigger rewards.
  • The ALT key is your friend. Learn to use the ALT key to navigate your menu items and you will fly through windows, sure lots of apps have other shortcuts that allow you quicker access to some options, but ALT is universal throughout windows. If you are stuck in a scenario where you can't find a predefined shortcut key hit ALT and start working your way through the menus. If the menus are built properly you should be able to navigate through the menus without using the arrow buttons. Example, if you are in a list view in windows explorer and you want to create a new item (folder,text document etc) just hit ALT -> F -> W -> Pick the item you want to create, hit enter if you just want to create a new folder, as that is the first item in the list.
  • Download some launcher utilities. The 2 I am currently running on my system are SlickRun and Launchy. SlickRun is an awesome floating command prompt.
  • I used to use SlickRun to launch all of my programs, but now that I am using Launchy for that, I now use SlickRun to navigate quickly to folders on my machine, as well as for configuring MagicWords that are basically little macros that can execute by typing in the name of a command. I just hit the hotkey for SlickRun start typing and it fills in as I go!!
  • Launchy is another floating command prompt style application that allows you to quickly launch any executable it has been configured to recognize. Unlike SlickRun, I can configure Launchy to look at any directory I want (at all .exes), and when I hit the hotkey to launch Launchy it presents me with a floating dialog which I can start typing into for it to filter a list of applications:
  • Once it finds the application that I want, I can hit enter and it launches it. Launchy can launch almost anything you can think of. Administrative Tools, display, any program under program files, any program under your custom utils folder (as long as you tell it to). Launchy also comes with a bunch of awesome skins and,like SlickRun, you can customize the hotkey so that it and SlickRun play well together.
  • If you are a Visual Studio Developer, and if you read this blog it is probably safe to say that you are. You should invest and take a look at purchasing either ReSharper or CodeRush. My personal favorite is ReSharper. Being a test driven developer ReSharper just seems to be a bit more fluid for me. From folks that I have talked to who use CodeRush, they also have nothing but awesome things to say about it. I cannot stress enough how much ReSharper has revolutionized my coding experience inside of studio. If ignorance is bliss, then lots of VS developers are in heaven!!! What I mean is, you do not realize how bad an editor studio is until you code with ReSharper for a while and then try to disable it and code with plain old studio. Don't take my word for it, download a copy and follow along in one of my Applied TDD Videos. I am planning to make some ReSharper specific posts sometime in the near future.
  • Last on the short list of essentials is Firefox 2 coupled with the Hit-A-Hint extension. Hit-A-Hint coupled with Firefox 2 has become my way to achieve completely mouseless browsing!! When you load up a web page, you can hit and hold down the space bar and numbers will appear next to every link on the page (including images). Type in the number of the link you want to click and release the space bar. Voila, you are off:

There are definitely other tips and tricks I could dish out for getting rid (almost) of your mouse, but hopefully this information gives you some ideas to chew on. Happy 'mouseless' computing!!

Comments [10] | | # 
 Wednesday, November 08, 2006
Wednesday, November 08, 2006 1:19:59 PM (Mountain Standard Time, UTC-07:00) ( Tools )

The company that continues to build butt kicking tools for .Net developers has just released version 2 of their insane profiler for .Net applications. DotTrace is my personal unreserved choice for profiling in .Net. With the introduction of version 2 they have added a host of new features the most notable being the addition of memory profiling.

If you are an existing license holder, then the price for upgrading is a big "0.00". That's right, version 2 is free if you already have a license for version 1. Do these guys know how to license or what?

If you haven't taken the time to give DotTrace a whirl, I encourage you to go and download the latest trial and take it for a spin.

While you are there pick up version 1 of UnitRun (if you already have ReSharper, you already have UnitRun).

Comments [2] | | # 
 Wednesday, November 01, 2006
Wednesday, November 01, 2006 8:17:07 PM (Mountain Standard Time, UTC-07:00) ( Agile | Tools )

Imagine you have a buildfile and you have the following compile element that makes use of a couple of third party assemblies:

 

        <csc target="library" output="${dist.dir}\${app.library.name}" debug="${debug}">
            <sources>                
                <include name="${app.src.dir}\**\*.cs" />                
                <exclude name="${app.src.dir}\**\AssemblyInfo.cs" />
            </sources>    
            <resources>
                <include name="${config.dir}\mapping\*hbm.xml"/>
            </resources>
            <references>
                <include name="${lib.dir}\filehelpers\DotNet 2.0\FileHelpers.dll"/>
                <include name="${lib.dir}\binsor\Castle.Windsor.dll"/>
                <include name="${lib.dir}\log4net\log4net.dll"/>
                <include name="${lib.dir}\nhibernate\NHibernate.dll"/>
            </references>
        </csc>
 

Pay close attention to the references element. Notice how I am explicitly including the names of libraries that I want to  that "references" fileset.

Most people who are using NAnt are familiar with the concept of a fileset. Essentially it is a set of files that belong to a logical unit that you can make use of during the NAnt build process.

Assume I have another target that needed to perform a similar compile. I could just copy the references element, but that would be unnecessary duplication. What I can do is create a fileset that can be later referenced and used by other targets/tasks in the build file.

 

I'll start by creating the filset near the top of my build file (before any targets):

 

    <fileset id="deploy.lib.fileset">    
        <include name="${lib.dir}\filehelpers\DotNet 2.0\FileHelpers.dll"/>
        <include name="${lib.dir}\binsor\Castle.Windsor.dll"/>
        <include name="${lib.dir}\log4net\log4net.dll"/>                
        <include name="${lib.dir}\nhibernate\NHibernate.dll"/>                                
    </fileset>

 

Notice how I have changed the element to be of type filset vs references. The references element is a special subclass of fileset reserved for the csc task. You will also notice how I have given the fileset an id. It is this id that will allow me to reference this fileset elsewhere. I can now replace the fileset I was originally using in the csc task with a reference to the fileset that contains all of the references that should be used for the compile task:

 

        <csc target="library" output="${dist.dir}\${app.library.name}" debug="${debug}">
            <sources>                
                <include name="${app.src.dir}\**\*.cs" />                
                <exclude name="${app.src.dir}\**\AssemblyInfo.cs" />
            </sources>    
            <resources>
                <include name="${config.dir}\mapping\*hbm.xml"/>
            </resources>
            <references refid="deploy.lib.fileset"/>                
        </csc>

  

You can see now that the references element in the csc task now uses the refid attribute to link back to a fileset that I have already defined elsewhere in the build file. Think how many filesets you may take advantage of when building your apps using NAnt:

  • sources
  • references
  • resources

And that is just a small sample. Streamlining and refactoring the build file is just as important as refactoring and improving the code base of the app that the build file is building.

Hopefully this has given you one more tool with which you can go and clean up some duplication that may exist in your build file.

Comments [3] | | # 
 Friday, October 27, 2006
Friday, October 27, 2006 8:36:19 AM (Mountain Standard Time, UTC-07:00) ( Tools )

At the last couple of presentations I have delivered I have been asked the question “How do I find the time to keep up with all this stuff?”. A lot of time I think this is a pretty funny question as the answers seem like common sense. Here is my short bullet point (with some brief descriptions) on how to maximize your development day:

  • Wake up early (shoot for 5AM if possible) – I just started at a new contract a couple of months ago, and I have definitely fallen off the wagon with this one. Our house is currently undergoing renovation so currently all 6 of us are sleeping in the same room. This has definitely thrown me off my game!! When things are normal schedule I usually try to be up at 5:00AM and hit the gym for a refreshing workout that gives me the energy I need to challenge the day head on. As a personal practice, I also try as much as possible to spend some time in the morning in prayer and reflection, giving thanks to my Lord Jesus Christ for all the blessings he has brought into my life. Starting the day early can give you an extra edge (and time) when it comes down to fitting in other activities into what would seem like an impossible schedule.
  • Check your email in the morning and then turn if off – Ok, that may seem a little extreme, but it is definitely possible. I usually only check my email once or twice during a work day, and even then it is just to see whether I have anything I “need” to respond to. My mentality is, if someone really wants to get a hold of me they can give me a call.
  • MSN What? – I could probably win an award for least amount of time spent instant messaging. I am not sure why, but I have never really got into it. Occasionally I will chat with someone about a topic, but for the most part my MSN is off for most of the work day, and usually most of the day period. Again, if someone wants to talk to me they will phone me.
  • Ditch The Mouse – I concur 100% with Jeremy Millers point. There was a 2 week period in the last year where I purposefully did not attach a mouse to my laptop (my main computer). Initially it was a bit painful but I learned a whole bunch of awesome keyboard shortcuts for all sorts of apps under windows. And I have gotten to the point where it pretty much such beside my keyboard unused for most of the day. Because I spend most of my day in VS2005, ReSharper has become an invaluable addition for allowing me to achieve near mouseless computing. The keyboard is to developers what the command line is to administrators. Sure you can achieve the same result using the mouse, but you will definitely get to the end result faster if you use the keyboard (almost always).
  • Don’t be afraid of utilities – Scott Hanselman maintains his “Ultimate Tools List”. If you have not already checked it out, stop reading this and go there right now. I can guarantee that you will find utilities that will allow you to achieve greater productivity in your development day.
  • Upgrade your computer – It is no good having all the fastest utilities and IDE’s in the world if your computer can’t run them. Don’t let your computer be a bottleneck for your productivity.The cost of hardware is so cheap right now that there should be no good justification for not providing developers with the tools they need to do their job properly.
  • Strive for at least a 5 hour day – What I mean by that point is that as a developer, if you are not finishing the end of your day feeling mentally taxed, then you probably did not push yourself as hard as you could have. Too many people surf the net for a while, check email, messenger etc. If they redirected their energies into ensuring that they got a solid 5 hour coding stint in (within a 8/9 hour work day) they would definitely leave work feeling a lot more satisfied, with a greater sense of accomplishment.
  • Take your lunch break - Even if it just a short walk around the block to get some fresh air, you will be doing yourself a favour.
  • Pair for focus – This is not something that is applicable for everyone, but if you find that you spend a lot of idle time at your computer, find someone to pair program with and you will lose the opportunity for unnecessary down time.

That’s it for now!! I hope you find some of these practices useful.

Comments [6] | | # 
 Wednesday, October 25, 2006
Wednesday, October 25, 2006 9:43:31 PM (Mountain Standard Time, UTC-07:00) ( Tools )

Since I have decided to start using my blog as a personal scratch pad.  I thought I would log this in case I needed it for future reference. I was composing a new email in Outlook 2003 and I got the following error message when I tried to add a contact from my address book:

 The address list could not be displayed. The Contacts folder associated with this address list could not be opened; it may have been moved or deleted, or you do not have permissions. For information on how to remove this folder from the Outlook Address Book, see Microsoft Outlook Help.

Of course Google to the rescue!! I found the document that helped me figure out the solution here: http://support.microsoft.com/kb/319901.

Hope this helps!!

Comments [0] | | # 
 Friday, October 20, 2006
Friday, October 20, 2006 2:03:37 AM (Mountain Standard Time, UTC-07:00) ( Tools )

For the longest time I have been using Actipro Code Highlighter to do my code highlighting for my blog posts. It is free and it does an awesome job. Lately I have been using a Live Writer plugin written by Douglas Stockwell. Now it is as easy as copy my code in visual studio and pasting it into Live Writer (with the use of a menu item).

Just download the zip file and extract it to your Windows Live Writer plugins directory, and you are off to the races. Thanks Doug.

Comments [6] | | # 
 Sunday, October 08, 2006
Sunday, October 08, 2006 9:56:30 PM (Mountain Standard Time, UTC-07:00) ( Tools )

This took me a lot longer to figure out than it should have. I try to almost exclusively use the keyboard for a lot of my development tasks (and other tasks in windows). Obviously, when ReSharper came out (oh so long ago) I was thrilled that I could up my productivity in Visual Studio by taking advantage of the wealth of keyboard shortcuts that it offered. For the longest time, one thing bugged me about ReSharper (trust me, it is hard to find something that does with this product). I was sure that you had to use the mouse to close the Unit Test Runner dialog. The standard CTRL - SHIFT - F4, ReSharper shortcut, worked on all of the other ReSharper popup dialogs except the Unit Test Runner dialog. I tried ALT-F4, but that just closed down all of studio.

I emailed the Jetbrains guys and told them that it would be awesome to include a keyboard shortcut that allows you to close the Unit Test Runner dialog without using the mouse. At that time, they informed me that it was something they were going to be looking into.

Last Friday, I was coding up a storm and taking advantage of the Unit Test Runner, and I was annoyed that I had to reach for my mouse to close it. I started randomly hitting keys on the keyboard and then all of a sudden a thought popped into my head – “Hit Shift-Esc”. There is nothing in the ReSharper default keymap that suggests that this key sequence does anything. Sure enough, after I ran a test with the unit test runner dialog, Shift-Esc closed it down for me.

Again, I am not sure if this has been there the whole time, or if is a new shortcut that has been added to recent releases of the product. Whatever then answer, I am glad I finally found it!!!

Comments [3] | | # 
 Tuesday, August 29, 2006
Tuesday, August 29, 2006 9:16:48 AM (Mountain Standard Time, UTC-07:00) ( Tools )

For those of you who are not aware of Scott Hanselman's Ultimate Developer and Power Tool List for Windows, I strongly encourage you to head over there as quick as possible and see what you have been missing in your developer toolkit.

I have been using many of the tools on Scott's list for a long time and they have definitely helped me achieve a greater level of productivity in Windows.

The only tool that Scott doesn't mention which I think should absolutely be considered as an alternative to CodeRush is ReSharper.

I think that both CodeRush and ReSharper are excellent products. As a heavy proponent/practitioner of Test/Behavior Driven Development I feel that ReSharper works with me a lot more naturally than CodeRush.

If you want to see ReSharper in action (in the context of TDD) take a look at Part 1 of my Applied Test Driven Development for Web Applications flash video.

Thanks Scott for taking the time to build up and provide this list of tools for the developer/power user community.

Comments [5] | | # 
 Tuesday, August 22, 2006
Tuesday, August 22, 2006 10:58:23 PM (Mountain Standard Time, UTC-07:00) ( Tools )

Just thought I would fire up Windows Live Writer and give it a quick whirl. The installation was a snap and my first impression of this editor is awesome. Obviously, MS is doing one of the things they do best. Taking an existing product, rebranding it as their own and trying to make it a lot better. This is unfortunate for competitors, but ultimately it is great for us as consumers/developers.

I can't speak too soon about it's level of functionality compared to BlogJet, though I am going to try using it for the next little while just to get an idea for it's capabilities.

I already have a license for BlogJet, so I am really just undertaking this out of curiosity to how it compares as a product.

Comments [0] | | # 
Tuesday, August 22, 2006 5:10:04 PM (Mountain Standard Time, UTC-07:00) ( Tools )

Thanks to Jon Galloway I have also deserted Notepad2 in favour of Notepad++. Like so many other tools in my utility folder, it is lightweight, effective, and free!!

I encourage you to give it a try as I am sure that you will not be disappointed.

Comments [7] | | # 
 Monday, August 21, 2006
Monday, August 21, 2006 12:57:35 PM (Mountain Standard Time, UTC-07:00) ( C Sharp | Tools )
A couple of people have been interested in grabbing the latest build of NMock2 so that they can give this "Mock Object Thing" a whirl. There is also a bit of confusion about where the NMock2 codebase actually resides.

If you want to download the latest build you can go here for more information.

Comments [5] | | # 
 Friday, June 23, 2006
Friday, June 23, 2006 9:06:06 AM (Mountain Standard Time, UTC-07:00) ( Tools )

In the event that you are a ReSharper 2.0 user. Make sure you stay posted to the following url : http://jetbrains.net/confluence/display/ReSharper/Download to ensure that you can download the latest updates to the program. The main download link for the release product is currently at build 249. The latest version is actually 253 which you can download from the link above.

Develop with pleasure!!

Comments [3] | | # 
 Thursday, June 15, 2006
Thursday, June 15, 2006 2:03:53 PM (Mountain Standard Time, UTC-07:00) ( Agile | Tools )

As one of my readers kindly reminded me. I mentioned in the CC.Net video that I would make the CC.Net configuration section for the project demo available.

Here it is:

<cruisecontrol>
 <project name="AdventureWorks">
    <workingDirectory>C:\root\development\citools\cruise\checkouts\adventureworks</workingDirectory>
    <artifactDirectory>C:\root\development\citools\cruise\builds\adventureworks\artifacts</artifactDirectory>
    <webURL>http://localhost/ccnet</webURL>
    <modificationDelaySeconds>10</modificationDelaySeconds>
    <publishExceptions>true</publishExceptions>
    <triggers>
      <intervalTrigger seconds="60" />
    </triggers>
    <state type="state" directory="C:\root\development\citools\cruise\builds\adventureworks\state" />
    <sourcecontrol type="svn">
  <trunkUrl>file:///C:/root/development/svnrepo/playground/adventureworks</trunkUrl>
  <workingDirectory>C:\root\development\citools\cruise\checkouts\adventureworks</workingDirectory>
 </sourcecontrol>
 <tasks>
      <nant>
        <executable>c:\root\development\citools\nant\bin\nant.exe</executable>
        <baseDirectory>C:\root\development\citools\cruise\builds\adventureworks</baseDirectory>      
        <buildFile>cruise.build</buildFile>
        <targetList>
          <target>all</target>
        </targetList>
        <buildTimeoutSeconds>300</buildTimeoutSeconds>
      </nant>
    </tasks>
    <publishers>
      <merge>
        <files>
          <file>C:\root\development\citools\cruise\checkouts\adventureworks\build\*Test-Result.xml</file>
        </files>
      </merge>
      <xmllogger />
    </publishers>
 </project> 
</cruisecontrol>

Of course, you will need to ensure that you replace any occurrence of C:\root\development with a location that you want to use on your own machine.

Comments [0] | | # 
 Thursday, June 08, 2006
Thursday, June 08, 2006 6:39:48 PM (Mountain Standard Time, UTC-07:00) ( Agile | ScreenCasts | Tools )

Last time we left off adding in the compilation of the web project to our build process. If you remember back to when we introduced the database we brought in the concept of template files and replacement tokens that could be used to allow for multiple developers on a project with disparate machine configurations to build using the same build file without any changes required. What we want to do now is go the final step and take our standalone build file that is currently being used by individual developers (whether or not they are on a team), and use it to centralize the build process. We are going to set up an environment that a multi developer team can use to introduce a CI process into their environment. CI (for those of you that don’t know) stands for Continuous Integration. Let me stress something very important here. CI is a process, not a tool.  If you want to read a concise definition of CI, check out Martin Fowlers article on the subject. That being said, there are a lot of tools that can aid you in introducing CI into your developer environment. We have already been taking advantage of a couple of these tools:

  • NAnt
  • NUnit

The new tool that we are going to introduce today is CruiseControl.Net. CC.Net is basically an automated build server. You would typically set it up so that at regular intervals it would poll the source code repository and see if there are any changes, if there are it would:

  • Update it’s local copy of the source code from the latest version in the repository.
  • Perform a build against it’s local code base
  • Run all unit tests, acceptance tests etc
  • Generate status reports on the health of the build

Obviously, this is a very high level description of some of the things CC .Net can do. 

This blog post could turn out to be huge, so to save my wrists I am going to try something a little bit different. I am posting a screencast that demonstrates the entire process required to:

  • Place a project under source control using Subversion
  • Installing CC.Net
  • Configuring CC.Net to build a project.

The video is available here. Enjoy. (warning – it is close to 1hr, commercial free!!)

kick it on dotnetkicks.com
Comments [7] | | # 
 Wednesday, June 07, 2006
Wednesday, June 07, 2006 10:27:50 AM (Mountain Standard Time, UTC-07:00) ( Tools )

How many times are you working on your local copy of the source code and you want to quickly blow away your working copy and get a fresh set of code from your source code repository? Chances are that if you are an ASP.Net developer, there are many times when the inetinfo or ASP.Net processes lock the contents of one of your development folders so you are prevented from deleting all of the files/folders with ease. So what do you normally do? I bet you start bringing up the task manager and killing processes until the folder is able to be deleted. Your time is precious, don’t waste it anymore. Unlocker is the utility that you need to install. It runs in the tray and offers many quick ways to unlock files/folders that may have processes that may still have a lock on them. You can follow these steps (taken from the unlocker site) to unlock a file/folder:

    1. Simply right click the folder or file and select Unlocker




    2. If the folder or file is locked, a window listing of lockers will appear




    3. Simply click Unlock All and you are done!

     

It actually gets better though. If you try to delete a folder that has a lock on it, unlocker will automatically pop up and allow you to perform an unlock or a kill process. This short video should demonstrate it well!! Enjoy.

kick it on dotnetkicks.com
Comments [0] | | # 
 Monday, June 05, 2006
Monday, June 05, 2006 11:38:47 AM (Mountain Standard Time, UTC-07:00) ( Tools )

For those of you who love to run firefox but have to work in environments where you are developing for IE, don’t fret. The IE Tab plugin is a great way for you to have your cake and eat it too. After installing this plugin you can open a new tab using CTRL-T and navigate to a site (okay so far nothing is new). Let's say that the site can only render/function correctly is IE (Microsoft Update for example). If I know this, I can right click on the tab and get access to a new context menu item:

ContextMenu

If I switch the rendering engine. The new tab will now use IE to render the page!! No more switching between firefox and IE!! Better yet, instead of having to manually switch rendering engines everytime I visit an IE only site. I can change the options for the IE Tab plugin and give it a list of pages that should always render using IE if visited. If I open a new tab and navigate to one of these IE only sites, firefox will automatically switch the rendering engine for me!

Comments [3] | | # 
 Saturday, June 03, 2006
Saturday, June 03, 2006 7:46:31 AM (Mountain Standard Time, UTC-07:00) ( Tools )

If you are a command line junkie like me, I strongly suggest you check out Bayden Systems SlickRun. It is a wicked floating command prompt that you can customise with things called MagicWords that allow you to open programs/perform tasks by simply typing in the magic word. I thought I would give a simple example of how to go about detaching a database using SlickRun. If I go to the setup for SlickRun and hit ALT-N (new magicword) I will be prompted with the new magic word dialog:

NewMagicWord

The following screenshot shows the settings that I require to detach a db from the slickrun prompt:

DetachDB

Notice that I am making use of the osql.exe (the command line utility for SQL Server). I am also making use of the parameters field to specify which parameters to send to the OSQL.exe program. I am using the -E argument to specify integrated windows authentication, and the -Q option to specify that I just want to execute a query from the command line. The query I want to execute is the sp_detach_db stored procedure, which requires the name of the database that I want to detach. I want to be able to use this MagicWord to detach any database, I do that by using the $I$ parameter. This is a placeholder for a user provided value. If I save this magicword,bring up SlickRun and type in the word detachdb I will be prompted with a dialog:

Parameter

If I enter in the name of the database I want to detach and hit the enter button, a command prompt will flash, detach the db and the command prompt will disappear.

 

You can use the same technique to write other magicwords that can save you a ton of mousing/keyboard time!!

 

Comments [2] | | # 
 Thursday, May 25, 2006
Thursday, May 25, 2006 8:14:51 AM (Mountain Standard Time, UTC-07:00) ( .Net 2.0 | C Sharp | Tools )

It has been quite a bit of time since the last installment of the NAnt Starter Series. We left off being able to successfully compile and test the main libraries of our application, and we progressed to bringing the database into the fold and looked at ways to manage the database in a multiple developer environment. In this installment we are going to talk about compiling and distributing the web portion of the application. Specifically, we are going to write a NAnt target that will build and deploy our entire web application into a directory that can be immediately deployed to a remote server if need be. Take a look at the current solution structure that is set up:

SolutionStructure

As you can see from the diagram, in this example I am going to be using the web-site project model, as opposed to the newly available Web Application Project model. You will quickly see that the only file that exists in this project is the ViewCustomers.aspx file. I am not using any of the new directories like the App_Code, App_Data etc. My web project should be extremely simple, consisting of purely UI elements like:

– Web Pages

– User Controls

– JavaScript Libraries

– Styles and Templates

 

By limiting the amount of code that is placed in this project, I can write unit tests against the real objects that will actually get work done. These objects , of course, live in projects separate from the web application. You might be asking yourself “Where is the web.config file?”. That file is actually a template file that will have pre-processing done on it during the build process. The contents of that file before processing look as follows:

<?xml version="1.0"?>
<configuration xmlns="http://schemas.microsoft.com/.NetConfiguration/v2.0">       
 <appSettings>  
  <add key="DatabaseConnection" value="SqlServer"/>
 </appSettings>
 
 <connectionStrings>
  <add name="SqlServer"
   connectionString="@CONFIG_CONNECTION_STRING@" 
   providerName="System.Data.SqlClient"
  />
 </connectionStrings>
 <system.web>
  <compilation debug="true"/>
  <authentication mode="Windows"/>
   <authorization>
       <deny users="?" />
   </authorization>
  <customErrors mode="Off" />
  <sessionState mode="Off" />  
 </system.web> 
</configuration>

If you look at the connectionStrings element, you will notice that the SqlServer connectionString is set up as a replaceable token in the Web.config.template file. Again, this is to ensure that at deploy time, the connectionString will be replaced with the appropriate string based on the environment that is getting deployed to.

Ok, let’s turn our attention to the process of building and deploying the application. Take a look at a new target that will compile our web application from inside of NAnt:

 <target name="asp.compile" description="Compiles the webapp" depends="init, compile">
        <delete dir="build\dist" if="${directory::exists('build\dist')}" />
       
        <loadtasks assembly="tools\nant\NAnt.Contrib.Tasks.dll" />
 
 <delete>
     <fileset basedir="build\aspprecompile">
  <include name="**\*" />
     </fileset>
 </delete>
        <copy todir="build\aspprecompile">
            <fileset basedir="src\app\DotNetRocks.Web.UI">
                <include name="*" />
                <include name="images\**\*.*" />
                <include name="javascript\**\*.js" />
            </fileset>
        </copy>

        <copy todir="build\aspprecompile\bin">
            <fileset basedir="build">
                <include name="*.dll" />
            </fileset>
        </copy>

        <mkiisdir dirpath="build\aspprecompile" vdirname="aspprecompile" />
        <exec program="C:\WINDOWS\Microsoft.NET\Framework\${framework.version}\aspnet_compiler.exe"
  useruntimeengine="true">
            <arg value="-p" />
            <arg value="build\aspprecompile" />
            <arg value="-v" />
            <arg value="aspprecompile" />
            <arg value="build\dist" />
        </exec>
        <deliisdir vdirname="aspprecompile" />       
    </target>

Whoa, there is a lot going on here so let’s break it down piece by piece. We are making use of the “depends” attribute to ensure that the asp.compile target cannot be run until all of the supporting libraries have been compiled:

                         target name="asp.compile" description="Compiles the webapp" depends="init, compile"

Don’t worry about the deletes that are happening at the beginning of the target, they are just ensuring that cleanup happens from a prior build process. The first step to compiling the ASP application is copying all of the files that the ASP.Net precompiler will require for compilation into a transient build directory (I don’t want to affect my main web project directory in any way whatsoever):

<copy todir="build\aspprecompile">
            <fileset basedir="src\app\DotNetRocks.Web.UI">
                <include name="*" />
                <include name="images\**\*.*" />
                <include name="javascript\**\*.js" />
            </fileset>
</copy>

I continue by copying all of the assemblies that the web project uses into an appropriate bin directory under the aspprecompile directory. Again, I am just pulling from the build directory any dll’s that would have been created during the running of the compile target:

 <copy todir="build\aspprecompile\bin">
            <fileset basedir="build">
                <include name="*.dll" />
            </fileset>
 </copy>

If I were to stop the target there my build directory would look as follows:

BuildDirectory

The aspprecompile directory would look like this:

AspprecompileDirectory

And the aspprecompiles bin directory would look like this:

AspPrecompileBinDirectory

You will see that I am copying pretty much all of the files from the DotNetRocks.Web.UI directory into this transient precompile directory. That’s right every file, including code-behind files. Notice how at the beginning of the target I used the loadtasks task :

<loadtasks assembly="tools\nant\NAnt.Contrib.Tasks.dll" />

LoadTasks will load any custom NAnt tasks that are contained in the named assembly and make them available to you for use during the build process. The NAntContrib library, is an open source library that contains a plethora of tasks that you can make use of during your own build processes. The ones that I need specifically are the ones that let me manipulate IIS Virtual Directories. I create a new virtual directory called aspprecompile that will point to the build\aspprecompile directory:

 <mkiisdir dirpath="build\aspprecompile" vdirname="aspprecompile" />

All right the stage is set. The last time we compile a project we used the standard NAnt csc task that would compile a set of C# class files into a library. Even though there are cs files in the aspprecompile directory we cannot use the csc task to compile the web project. I need to take advantage of the ASP .Net precompiler to compile the web application for me. With .Net 2.0, you could actually deploy all of your *.cs files for the project into the web directory and the ASP.Net runtime would compile the cs files dynamically when the pages are requested. I am not a fan of this approach, I would rather just keep my source files out of the web directory completely. To allow you to do this, you have to take advantage of the ASP.Net precompiler. If you are not familiar with the ASP.Net precompiler you can read some more information about it here. I use the NAnt exec task to shell out to the asp.net precompiler to compile my site in place:

<exec program="C:\WINDOWS\Microsoft.NET\Framework\${framework.version}\aspnet_compiler.exe"
  useruntimeengine="true">
            <arg value="-p" />
            <arg value="build\aspprecompile" />
            <arg value="-v" />
            <arg value="aspprecompile" />
            <arg value="build\dist" />
        </exec>

 Notice I am using a modified method to pass parameters to the aspnet_compiler executable. The full commandline would expand to this:

aspnet_compiler.exe -p “build\aspprecompile” -v “aspprecompile” “build\dist”

The meaning of each of the arguments is a follows:

  • -p : Specifies the full network path or local disk path of the root directory that contains the application to be compiled. This option must be combined with the -v option.
  • -v : Specifies the virtual path of the application to be compiled
  • targetdir : This is not a named argument but if provided, specifies the directory to which the asp_compiler will place the final files for deployment

After running the target the build\aspprecompile directory looks no different that the before the compilation happened, but notice that a new directory has been added to the build directory:

DistDirectory

     The following screenshots show the contents of this directory:

    DistDirectoryContents   DistBinDirectoryContents

    Take a look at the interesting names that the aspnet_compiler generates for us!! Notice also, that although the aspprecompile directory contained a .cs file the the ViewCustomers.aspx page, the dist folder has no source files whatsoever!! The dist folder now contains everything that we would need to deploy to a production server. With the compilation safely taken care of I can go ahead and remove the temporary virtual directory I created for asp precompile purposes:

     <deliisdir vdirname="aspprecompile" />

    Again, the deliisdir task lives is a task that is defined in the NAntContrib library.

    To wrap it up, I can quickly add a target that will deploy the application to a local directory on my machine :

     

    <target name="deploy" depends="asp.compile">
            <deliisdir vdirname="DotNetRocks" failonerror="false" />
            <delete>
                <fileset basedir="deploy">
                    <include name="**/*" />               
                </fileset>
            </delete>
            <mkdir dir="deploy" />
            <copy todir="deploy">
                <fileset basedir="build\dist">
                    <include name="**\*" />               
                </fileset>
            </copy>
            <copy file="config\Web.Config" tofile="deploy\Web.config" /> 
            <mkiisdir dirpath="deploy" vdirname="DotNetRocks" authntlm="true" defaultdoc="Default.aspx" />
        </target> 

     

    I am not going to break this target down, as you have already seen all of the tasks that I am using. At the end of this target running I will be able to navigate to the ViewCustomers.aspx page by opening up my browser and typing in : http://localhost/DotNetRocks/ViewCustomers.aspx which brings me to:

    ViewCustomers

     

    TODO
    Comments [9] | | # 
    Wednesday, May 24, 2006 11:00:16 PM (Mountain Standard Time, UTC-07:00) ( Tools )

    I have been using SpeedFiler for the last couple of weeks and love the productivity it has provided with regards to managing my email. After reading the Igloo Coder mentioning SQL Prompt, I thought I would download it and give it a whirl. I won’t say no to intellisense for SQL!! It was shortly after this that I started noticing issues with SpeedFiler. I would go to file an item using the CTRL-SHIFT-V shortcut and the standard outlook Move-To dialog would pop up. The same applied for SpeedFilers “Go To Folder” command. I could however, successfully invoke these commands if I explicitly used the SpeedFiler menu items that activated the custom dialogs. I was emailing back and forth with the founder of SpeedFiler (that’s right, he truly stands behind his product) for a little while and he was offering lots of good tips to ensure that I was not messing anything up. It never even dawned on me that SQL Prompt could be the problem. Until, 20 minutes ago I realized that the only thing that differed between my machine configuration of today to yesterday was the installation of SQL Prompt. I fired up the options dialog of SQL Prompt :

    SqlPromptOptionsWindow

    By default, SQL Prompt runs “Enabled” in the tray. When I changed the status to “Off”, bang, speedfiler worked again like a charm. I mailed Itzy and let him know that this may be an issue to look into. But for now, I’ll know to turn SQL Prompt off, when I’m not doing any DB work.

    Comments [0] | | # 
     Tuesday, May 23, 2006
    Tuesday, May 23, 2006 9:06:59 PM (Mountain Standard Time, UTC-07:00) ( Tools )

    Rs2banner

    Well, it is finally official (I am late with this post, as my blog has been having issues). ReSharper 2.0 is now unleashed for public “stable” consumption. What is ReSharper? In my opinion, one of the most kick-butt tools for code-centric .Net 2.0 developers. The list of features of this product is fantastic, for me the top of the list are :

    • Refactorings (too many to name)
    • Move type to new namespace
    • Code Generation features inline with TDD developers
    • Find Usages - Rocks
    • Go To Type – CTRL -N (start typing and list will filter to match types with name)
    • Go To File – CTRL – SHIFT – N (start typing and list will filter)
    • Integrated unit test runner
    • Live Templates (extremely easy template syntax for creating your own Live templates)
    • File Templates
    • NAnt and MSBuild intellisense

    I could go on and on, but the list of features that I use on a given day are too many to mention here. Download the trial and give it a whirl!!

    Comments [0] | | # 
     Wednesday, May 10, 2006
    Wednesday, May 10, 2006 6:09:06 AM (Mountain Standard Time, UTC-07:00) ( Agile | Tools )

    Currently some of my links in dasblog are not working correctly and some people are having problems with accessing the entire NAnt series of posts. To ensure that everyone can read them in their entirety here are the links to the current 6 posts:

    Enjoy.



    TODO
    Comments [6] | | # 
     Thursday, May 04, 2006
    Thursday, May 04, 2006 5:21:37 PM (Mountain Standard Time, UTC-07:00) ( Agile | Tools )

    Just got asked a question by Scott Cowan :

    Q:  is there a way in nant to run a call for each .sql file in a dir ?

    A: If you wanted to execute the scripts for a whole directory of sql files (and the order of the files running is not important), then you can take advantage of the NAnt <foreach> task.   Here is an example of a target that you could set up to run all of the sql files in a specific folder:

    <target name="exec.sql.folder">
        <foreach item="File" property="filename">
           <in>
              <items basedir="${folder}">
                 <include name="*.sql"/>     
              </items>
          </in>
          <do>
              <property name="target" value="${filename}"/>
              <call target="exec.sql.template"/>
          </do>  

    </foreach>

    </target>

    Notice that you would want to call this target from another target that sets the folder property to execute against:

    <target name="exec.all.sql">

         <property name="folder" value="sql"/>

        <call target="exec.sql.folder"/>

    </target>

    Hope this helps.

    JP

    Comments [0] | | # 
    Thursday, May 04, 2006 12:04:16 PM (Mountain Standard Time, UTC-07:00) ( .Net 2.0 | C Sharp | Tools )

    Ok, it's been a few weeks since my last post on automating your build with NAnt. We left off being able to compile and run all of the unit tests for the code. This is an essential step to be able to perform quickly. When solution sizes get bigger and the codebase gets larger, you will be glad that you spent the time automating the build process. There is a large difference between the time required to perform build activities at the command line using NAnt vs Studio. So far, we have not even talked about the database. As most of us are building applications with some sort of database back-end, it is essential that we can also automate the steps necessary to prep the database for use in our builds. Remember back to folder structure for our root directory?

    folderstructure1

    It is now time to shift our attention to the “sql” directory. In this post, I am making the assumption that the schema you will be creating will be your own (ie. You are not needing to deal with 3rd party databases that you need to integrate with. That is a story for another day). Let’s take a quick look at the contents of the sql directory. Here are the files that I have set up so far:

    • data.sql.template – File containing any seed data that is required to actually run the application.
    • nwind.sql.template – File containing the sql necessary to recreate the database,tables,indexes etc
    • security.sql.template – File containing the sql necessary to add roles,grant roles, add users etc to the database
    • storedProcedures.sql.template - File containing the CRUD procedures for data access
    • views.sql.template – File containing any views required by the application

    As you can see. This list is pretty short, and you could add files for different responsibilities very easily.

    You are probably asking yourself what the .template extension is for? Take a look at the first couple of lines in the nwind.sql.template file (pay attention to the items that have the red boxes around them):

    StartOfSqlScript All of the items that are surrounded by the @ symbol will actually get replaced at build time by values that NAnt retrieves from a local settings file for the user. This is what will allow multiple developers on the team to build the database to whatever location they want on their own hard drives, as well as naming the catalog for the database whatever they want. This allows for a lot of flexibility when it comes to how individual developers configure their workstations and dev environments. With this (and the other sql files in place), I need to add a target(s) to actually build the database using NAnt.

    The first thing I am going to do is add a couple of new properties to the top of the build file:

        <!-- environment-specific properties -->   
        <property name="osql.exe" value="C:\program files\microsoft sql server\90\Tools\Binn\osql.exe" />
        <property name="osql.ConnectionString" value="-E" />   
        <property name="env.COMPUTERNAME" value="${environment::get-variable('COMPUTERNAME')}" />
        <property name="aspnet.account" value="${env.COMPUTERNAME}\ASPNET" />   
        <property name="framework.version" value="v2.0.50727" />   

    Notice that I have specified values for the location of osql and the connection string with which to connect to OSQL. Now of course, I can’t assume that everyone on my team has loaded SQL to the default location. In which case, their path to SQL will be different. I also can’t assume that all of the developers on my team have integrated windows authentication enabled on their sql server install. If they don’t the -E switch for OSQL won’t work. Let me stress a point I am about to make “All Developers On A Team Regardless of machine configuration, should be able to utilise the build file without changing it”. Now as you can see, if I relied solely on the properties that I have created in the buildfile, I would be constraining the machine configurations of my team to have to use the exact same settings. This is where local property files come into play. Notice in the root directory I have a file named local.properties.xml.template. LocalPropertiesXmlTemplate

    The local.properties.xml.template file contains all of the properties that could possibly differ on each individual developers workstation. The template file is actually a repository artifact. So when a new setting gets introduced that could potentially be different of each persons machine, it is added to the template file. Take a look at the contents of the template file:

    <?xml version="1.0"?>
    <properties>
      <property name="sqlToolsFolder" value="C:\Program Files\Microsoft SQL Server\90\Tools\Binn"/>
      <property name="osql.ConnectionString" value="-E"/>
      <property name="initial.catalog" value="Northwind"/>
      <property name="config.ConnectionString" value="data source=(local);Integrated Security=SSPI;Initial Catalog=${initial.catalog}"/> 
      <property name="database.path" value="C:\root\development\databases" />
      <property name="osql.exe"  value="${sqlToolsFolder}\osql.exe" />
    </properties>

    Notice that it is a well formed xml document. You should also notice that the names of some of the properties are named identically to the names of properties that already exist in the build file (osql.ConnectionString, osql.exe). When a developer performs a fresh check out or the template file is changed, they will copy the template file into the same directory as the template file and rename it to local.properties.xml. Once renamed, the developer will open up the local.properties.xml file (not under source code control), and change the value of any of the properties that they need to, to reflect the configuration of their own machines. Ok, so this is great, but how do the settings in this file make integrate themselves into the actual build file? If I switch back to my build file, I will now add a check to include the settings from the local.properties.xml file, if the file is present:

    <!-- environment-specific properties -->   
        <property name="osql.exe" value="C:\program files\microsoft sql server\90\Tools\Binn\osql.exe" />
        <property name="osql.ConnectionString" value="-E" />   
        <property name="env.COMPUTERNAME" value="${environment::get-variable('COMPUTERNAME')}" />
        <property name="aspnet.account" value="${env.COMPUTERNAME}\ASPNET" />   
        <property name="framework.version" value="v2.0.50727" />    
                
        <if test="${file::exists('local.properties.xml')}">
            <echo message="Loading local.properties.xml" />
            <include buildfile="local.properties.xml" />
        </if>

    Notice I am telling NAnt to include an external file into the buid file. If the developer has created and modified their local.properties.xml file, then all of the settings they specified in that file will overwrite the default values of the properties that were already in the build file. Voila, multi-dev setup taken care of.

    Now it is time to focus on performing activities with the database. The first thing we need to take care of is changing the template files in the sql directory into the appropriate .sql files. Remember, as I said before. The .template files are the files that actually get placed/versioned in the repository. The .sql files will get automatically created by NAnt but not get stored in the repository. Let’s add a new target that will be able to convert a .template file into a file that can actually get worked with.

    <target name="convert.template">
            <copy file="${target}.template" tofile="${target}" overwrite="true">
                <filterchain>
                    <replacetokens>
                        <token key="INITIAL_CATALOG" value="${initial.catalog}" />                   
                        <token key="ASPNETACCOUNT" value="${aspnet.account}" />
                        <token key="OSQL_CONNECTION_STRING" value="${osql.ConnectionString}" />
                        <token key="CONFIG_CONNECTION_STRING" value="${config.ConnectionString}" />                   
                        <token key="DBPATH" value="${database.path}"/>
                    </replacetokens>
                </filterchain>
            </copy>
        </target>

    The convert.template target will copy a file with the .template extension to a file without the .template extension. At the same time, I am taking advantage of NAnt ability to apply filters during the copy process. In this scenario I am using the replacetokens filter to replace any occurrence of a token in the file (tokens in NAnt are specified by surrounding the item with the @ symbol), with a specific value. If you look back to the beginning of the nwind.sql.template file you will see that there are several tokens that will be replaced with settings pulled from my local settings file:

    • All instances of @INITIAL_CATALOG@ will be replaced by the value of the initial.catalog property (“Northwind”)
    • All instances of @DBPATH@ will be replaced by the value of the database.path property (“C:\root\development\databases”)

    Some of the other files in the sql directory make use of some of the other tokens. Some of the tokens do not exist in any of the sql files, but exist in other template files that I will talk about in future posts. With the “convert.template” target in place. I now want to create a target that I can use to execute a sql script:

     <target name="exec.sql.template">
            <call target="convert.template" />
            <exec program="${osql.exe}" commandline="${osql.ConnectionString} -n -b -i ${target}" />
     </target>

    Notice that the exec.sql.template is taking advantage of the fact that each developer could have a different location and connection specifics for osql. For the astute reader, you will note that if you were to just call exec.sql.template on its own, nothing would happen as the convert.template target assumes that a ${target} property has been set up before being invoked. You will notice that the exec.sql.template does not provide a value for the ${target} property, it is also attempting to make use of a ${target} property that should have already been assigned. For this reason, the exec.sql.template target is meant to be called from a target that will actually execute the scripts for db creation in the correct order. And here it is:

    <target name="builddb">
            <property name="target" value="sql\nwind.sql" />
            <call target="exec.sql.template" />
        
            <property name="target" value="sql\views.sql" />
             <call target="exec.sql.template" />

             <property name="target" value="sql\storedProcedures.sql" />
             <call target="exec.sql.template" />
                    
             <property name="target" value="sql\security.sql" />
             <call target="exec.sql.template" />
    </target>

    Notice that the builddb target knows the correct order in which to execute the sql scripts. Also notice the use of the call task that can be used to invoke targets from other targets. You will see that before the execution of the exec.sql.template target, the builddb target will set the value for the ${target} property for the file to act against next. Remember, first time builddb is run there will be no .sql files in the sql directory only .sql.template files. The convert.template target knows to tack on the .template extension and copy/transform accordingly.

    After running the builddb target, the database will be completely rebuilt from scratch (it will be deleted if it exists already). Again, something that I haven't talked about is the usefulness of keeping all of the db in .sql files. They are easy to maintain in the repository. When another developer on your team adds a table,view etc (making sure that they make changes to the .template files not the .sql files). You just need to update your sql directory and run your builddb target again. If 2 or more of you have made changes to the same table, worst case scenario you will need to use your merge/diff tool to see the differences. Best case scenario, your files will merge together seamlessly with all of your combined changes. Once the application has been deployed to production you can create subdirectories under the sql directory corresponding to each release/db update. These folder would only contain alters/new table additions. Once you have deployed to production you will want to leave the existing scripts under the sql directory as is. That way when you do a builddb, your database will get deleted created from the original sql scripts, and then all of the alters that have been applied in production will be applied against your local database. This is a much better process that changing the original sql files, as your DB’s probably don’t have the luxury of tearing down/recreating the database whenever a change goes into place. It also makes providing sql for the DB’s easy as you can just send them the alter file that you will also have in your repository. Of course, I can post about strategies for maintaining DB’s for deployed apps another time. After the builddb target runs, the sql directory will now look like this:

    SqlDirectoryAfterBuildDb

     

     

     

     

     

     

     

     

     

    As you can see, NAnt took care of copying the files and renaming them as necessary. If you take a look at the first couple of lines in the nwind.sql file (pay attention to the items in the red boxes) StartOfSqlScriptAfterTransform.

     

     

     

     

     

     

     

     

     

     

     

     

     

    You will notice that what use to be tokens are now concrete settings specific to my machine!! Feel free to ask questions, provide feedback etc. Enjoy automation.

     

     

    TODO
    Comments [3] | | # 
     Tuesday, April 25, 2006
    Tuesday, April 25, 2006 8:02:42 AM (Mountain Standard Time, UTC-07:00) ( Tools | VS2005 )

    For all of you who are not too keen on installing EAP software, the wait is finally over. Jetbrains has now announced the official beta for ReSharper 2.0. In case you are not aware of ReSharper, it is an add-in that dramatically improves the usability of Visual Studio, from a coder’s perspective. Basically, once you are used to developing with ReSharper you will find yourself hard pressed to go back to plain old VS2005. If you have not yet given ReSharper a try, I encourage you to download a copy of the beta and give it a whirl!! There is also an incentive to purchase a copy of 1.5 now, and get a free upgrade to 2.0 when it becomes officially available in May.

     

    Rs20beta1._bg

    Comments [0] | | # 
     Monday, April 17, 2006
    Monday, April 17, 2006 4:09:57 PM (Mountain Standard Time, UTC-07:00) ( Tools )

    I left off talking about building and compiling the NUnit tests for the application. Of course, what good are tests if you can’t run them and see results! Time to shift our attention toward running the tests in an automated fashion so that we can get feedback on the health of the application. All of the tests that are currently in the application were written with the aid of the great NUnit testing framework. Typically I utilize the NAnt exec task to shell out to the NUnit console application to run all of the tests defined in an assembly. I prefer this to the actual nunit task and its variants as my build file is not affected in any way when I upgrade to a newer version of NUnit. Last time we left off with 2 compiled assemblies in the build directory. One assembly for the code to be tested, and one assembly for the tests themselves.

    BuildDirectoryPreTest It’s time to add a new target to the build file that will allow for execution of the tests:

    <target name="test" depends=”test.compile”>
    </target>

    Notice that by again taking advantage of the “depends” attribute, we can ensure that the tests have been compiled prior to test execution.The first thing you need to see is if there are any objects that you are going to be testing that require a dependency on a .config file. If they do then you first need to copy the web/app.config into a file that NUnit can work with. It is always the same file name format “[ProjectName].Test.[OutputExtension].Config”. In our scenario, because the project name is DotNetRocks, the config file would get copied to the file :

    DotNetRocks.Test.dll.config

    To keep everything in one place (highly recommended) I am going to copy the config file (using the new name) to the build directory. To accomplish this I can make use of the copy task.

    <target name="test" depends=”test.compile”>
        <copy file="config\Web.Config" tofile="build\${nant.project.name}.Test.dll.config" />

    </target>

    Of course, you would change the location as necessary to pull the Web.Config file from wherever it may reside in your directory structure (typically with the web/win project itself). With the config file taken care of, I now need to copy to the build directory any libraries that will need to be in the build directory for the tests to work. In this particular scenario I need to copy the NUnit and NMock2 libraries into the build directory. Once again, I can take advantage of the copy task to accomplish this:

    <target name="test" depends=”test.compile”>
           <copy file="config\Web.Config" tofile="build\${nant.project.name}.Test.dll.config" />
            <copy todir="build" flatten="true">
                <fileset basedir="tools">
                    <include name="**\NMock2.dll" />
                </fileset>
            </copy>
             <copy todir="build" flatten="true">
                <fileset basedir="tools\nunit\bin">
                    <include name="*.dll" />
                </fileset>
            </copy>
                  
        </target>

    As you can see, because the tests make use of both the NUnit and NMock2 frameworks, I need to copy all of the relevant dll’s from those frameworks into the build directory before the tests can run. NUnit is an interesting one, because sometimes you can get away (by sheer fluke) with this step and NAnt will fallback to using the NUnit version that is installed in the GAC (if you installed NUnit on your machine). This is problematic though. If you upgrade the version of NUnit in your tools directory and build your tests against that version of NUnit, you will only be able to run the tests using the GAC version if it matches the one in your tool directory. If the versions are different, you will get an error when you try to run your test. Again, getting back to the principle of  “keeping everything you need to run the project in one place” it is best to avoid reliance on the GAC for NUnit and the like. This is why all of the necessary dlls from both frameworks are being copied into build directory. If I were to stop there, the build directory would look like this after running the test target:

    BuildDirectoryPreTest2

    As you can see all of the files we actually are responsible for generating/maintaining are at the top of the directory (notice the config file with the correct NUnit naming convention), all of the other 22 dlls (that list could be streamlined by changing the filter for the fileset) are purely there for running the tests.

    With the supporting files all in place it is time to run the tests. To accomplish this, it is time to use a new task. The exec task. Again, I am not going to go into all of the details, attributes etc for the exec task, as the NAnt docs do a good job of that. I’m going to focus on using it to run NUnit. I’ll need to update my test target:

    <target name="test" depends="test.compile">
      <copy file="config\Web.Config" tofile="build\${nant.project.name}.Test.dll.config" />       
           
            <copy todir="build" flatten="true">
                <fileset basedir="tools">
                    <include name="**\NMock2.dll" />
                </fileset>
            </copy>
           
            <copy todir="build" flatten="true">
                <fileset basedir="tools\nunit\bin">
                    <include name="*.dll" />
                </fileset>
            </copy>
                                          
            <exec basedir="tools\nunit\bin"
                  useruntimeengine="true"
                  workingdir="build"
                  program="nunit-console.exe"
                  commandline="${nant.project.name}.Test.dll /xml=${nant.project.name}.Test-Result.xml" />
               
           
        </target>

    Pay attention to 2 of the key attributes : basedir and workingdir. basedir is the directory that the program I want to execute is in. workingdir is the directory in which the program will execute (hence the need to copy all required dlls,config files etc to the build directory). The program attribute is self explanatory, and finally the commandline attribute is the argument string to invoke the program with. Notice I am telling nunit to execute against the test library I have place in the build directory (DotNetRocks.Test.dll), and I want the results of the tests to be placed in a file named DotNetRocks.Test-Result.xml (this file will be placed in the build directory). If I run my test target now I will get the high level results output to the console, consoleoutputas well as a xml file containing detailed tests results placed in the build directorytestresults. As a quick heads up for things to come, I will talk about how you can integrate the results that are spit out by the NUnit console into a continuous build engine (CC.Net), for analyzation and integration of the results into the build process.

     

    Hopefully this will get you started on the way to integrating automated tests into your build infrastructure. Next up, let’s bring the DB into the picture!






    TODO
    Comments [0] | | # 
     Tuesday, April 11, 2006
    Tuesday, April 11, 2006 3:15:45 PM (Mountain Standard Time, UTC-07:00) ( .Net 2.0 | C Sharp | Tools )

    In the last post I talked about compiling the main supporting assemblies for the web/win project. Let’s shift focus now to talk about building the associated unit tests for the application. The solution I was working with SolutionStructureactually had a 1–1 (almost) correspondence of Test projects per deployable projects. In my opinion, this structure is a lot better than placing the tests in the same project that you are testing as it makes separating the files from test/deployment builds a lot simpler, as you don’t need to worry about naming your files in a special way to exclude them from the build process. I have already successfully compiled each of the assemblies that needs to be tested, using NAnt I compiled all of the source from the 8 projects into a single assembly.

    Before I can run my tests (in an automated fashion from the command line), they need to be compiled. It stands to reason that the NAnt xml required to accomplish this task is very similar to compiling the non-test projects:

    <target name="test.compile">
            <csc target="library" output="build\${nant.project.name}.Test.dll" debug="${debug}">
                <sources>
                    <include name="src\test\**\*.cs" />
                    <exclude name="src\test\**\AssemblyInfo.cs" />
                </sources>                                                                            
                                                                 </csc>
                                                         </target>

    Everything looks good, right? I should be able to switch to the command line and run the “build test.compile” command. If I do that right now I will run into a few problems. I won’t even show you the screenshot for what the errors look like, as it will take up too much space. The long and short of it is that I cannot compile the test project without preserving references that are essential to allow the dll to be built. Wait, why was this not an issue for the last time I compiled? This was because the only things the other dll depended on were System assemblies that are automatically resolved by NAnt. The fact that all of the code from the 8 projects was being compiled into a single assembly eliminated the need to duplicate project level references. Unfortunately, as picture 2 shows, most (if not all) of the test projects Referencesneed to have a reference to the actual projects that they are testing as well as 2 third party utilities (NMock and NUnit).

    Of course, I took care to ensure that when I created these references in Visual Studio that I pointed to the correct location of the tools within my tools folder (for NUnit and NMock2 that is). As far as the project references, all I had to do was add a standard project reference. Unfortunately, when I am in NAnt it knows nothing about these things. I have to set it up manually. Let’s make a small change to the test.compile target to compensate for this:

    <target name="test.compile" depends=”compile”>
            <csc target="library" output="build\${nant.project.name}.Test.dll" debug="${debug}">
                <sources>
                    <include name="src\test\**\*.cs" />
                    <exclude name="src\test\**\AssemblyInfo.cs" />
                </sources>                                                                            
            </csc>
     </target>

    Remember, the “depends” attribute for a target ensures that any targets listed for the value of that attribute have to run before this target can run. I am ensuring that the code to be tested has been compiled before I can compile the tests. Of course, I am still going to get compilation errors if I try to compile, as I have still not taken care of the references needed to build the test library. I’ll take care of NUnit and NMock2 first by making use of the references element:

    <target name="test.compile" depends=”compile”>
            <csc target="library" output="build\${nant.project.name}.Test.dll" debug="${debug}">
                <sources>
                    <include name="src\test\**\*.cs" />
                    <exclude name="src\test\**\AssemblyInfo.cs" />
                </sources>

                <references>
                    <include name="tools\nunit\bin\nunit.framework.dll" />
                    <include name="tools\nmock\NMock2.dll" />                               
                </references>
                                                                            
            </csc>
     </target>

     

    The references element is used by the csc task, to tell the compiler where to look for references required to build the project. As mentioned before, I don’t need to worry about framework libraries as NAnt resolves those for me. Again, note how referencing “references” becomes simpler when everything you need is located within your checkout directory!! Ok, I’m one step closer, but I still cantCompileError compile as it still cannot see classes that live in the assembly that should be being tested. As you have probably already guessed, I can fix this quickly by just adding another reference. But wait, what do I reference? Now you will see the important of having the “build” staging area, if you remember the compile target :

    <target name="compile"
                depends="init"
                description="compiles the application">
            <csc target="library" output="build\${nant.project.name}.dll" debug="${debug}">
              <sources>
                <include name="src\app\**\*.cs" />
                <exclude name="src\app\DotNetRocks.Web.UI\*.*" />
                <exclude name="src\app\**\AssemblyInfo.cs" />                                
             </sources>                        
            </csc>

    </target>

    I already know where the dll that I need to reference is going to get placed, so I can just add a reference to it!!:

    <target name="test.compile" depends="compile">
            <csc target="library" output="build\${nant.project.name}.Test.dll" debug="${debug}">
                <sources>
                    <include name="src\test\**\*.cs" />
                    <exclude name="src\test\**\AssemblyInfo.cs" />
                </sources>           
                <references>
                    <include name="build\${nant.project.name}.dll" />
                    <include name="tools\nunit\bin\nunit.framework.dll" />
                    <include name="tools\nmock\NMock2.dll" />                               
                </references>
            </csc>
        </target>

    With that change in place, I can now run the test.compile target, which will result in a new dll being placed in the build directory!! Next up, I’ll talk about running the tests in an automated setup, that will prepare us for when we start talking about CC.Net integration!!

    TestCompile

    TODO
    Comments [3] | | # 
     Friday, April 07, 2006
    Friday, April 07, 2006 1:03:58 PM (Mountain Standard Time, UTC-07:00) ( .Net 2.0 | C Sharp | Tools )

    Ok, last time we left off being able to clean/create a staging area for the build. Let’s now work on actually compiling the projects in the solution. If you take a quick look at the solution structure SolutionStructure you will notice that there are 16 projects. More than half of these projects are test projects, and one of them is a web project. To be more specific, I am using the standard VS2005 web project model to organize my web project. Some of you may not be aware but there is another model called the Web Application Project model, that basically looks and behaves very similar to the way web projects worked pre VS2005. More on that another day!! Today I will focus on just building the supporting assemblies for the web project. Right now, I am talking about a build for test, not for deployment. These are 2 quite different animals. When I am doing a build for test I can choose to take a very simple route and just compile all of the code from the 8 supporting projects into a single dll, as opposed to compiling them the way studio does. This also keeps the build file a lot simpler. More often than not, as developers we utilize projects as a way to logically organize the application. Whether or not each of the individual projects actually resolves to one deployable unit is a choice that you have to make as a project team. Personally, once you have an automated deployment scenario in place, it really does not matter. As deploying becomes (almost) as simple as running a NAnt target.

    Let’s get back to actually building the 8 projects we are interested in. It stands to reason that some of the projects in the solution have dependencies on other projects in the solution ProjectReferences. Obviously these projects will not be able to build properly unless those references are maintained and obligated within the build file. A better question to ask is how do you actually go about compiling the 8 projects using NAnt? If you have been taking a look at the NAnt NAnt Task Reference reference you will notice that one of the tasks in there is the csc  task. This is a dedicated task with the sole responsibility of compiling C# programs. It stands to reason that this would have to enter the mix somewhere!!

    I am not even going to try and attempt to cover all of the attributes/flags that can be used in conjunction with the csc task. I believe an example will speak louder than words and get you going in the right direction. Let’s switch back to the build file and start working on adding in the compile task. In case you forgot what the build file currently looks like, here it is:

    <?xml version="1.0"?>
    <project name="DotNetRocks" default="all">

        <property name="debug" value="true" />

       <target name=”all”/>

       <target name="clean" description="remove all build products">
            <delete dir="build"  if="${directory::exists('build')}" />
        </target>

        <target name="init">
            <mkdir dir="build" />
        </target>

    </project>

    I’ll add the entire compile target and then discuss and dissect for the remainder of the post:

    <?xml version="1.0"?>
    <project name="DotNetRocks" default="all">

        <property name="debug" value="true" />

       <target name=”all”/>

       <target name="clean" description="remove all build products">
            <delete dir="build"  if="${directory::exists('build')}" />
        </target>

        <target name="init">
            <mkdir dir="build" />
        </target>

        <target name="compile"
                depends="init"
                description="compiles the application">
            <csc target="library" output="build\${nant.project.name}.dll" debug="${debug}">
                <sources>
                    <include name="src\app\**\*.cs" />
                    <exclude name="src\app\DotNetRocks.Web.UI\*.*" />
                    <exclude name="src\app\**\AssemblyInfo.cs" />                               
                </sources>                       
            </csc>
        </target>

    </project> 

    First point of interest is the use of the new “depends” attribute in the compile target. This tells NAnt to ensure that the “init” target has been run before the compile target runs. If the init target has not already been executed in this NAnt session, then NAnt will ensure that the init target is run before it carries on processing the compile target. NAnt processes dependencies from left to right so you can have a target depend on multiple targets using comma-separated lists such as : depends = “clean,init”. If you have a dependency on a target that also has a dependency on init, NAnt will make sure that the init target is only executed once, as not to waste execution cycles. The rest of the target deals with the actual csc task itself.

    First off, I tell NAnt that I am going to be compiling a “library” (dll) and that it should place the resulting dll in the build directory. What’s with the ${nant.project.name} syntax? This is the way you access properties in NAnt. We did not, however, define that particular property in our build file. This is because ${nant.project.name} is one of many predefined NAnt properties that we can make use of during the build process. The value of the ${nant.project.name} property will resolve to the name you give your project in the project element of the build file:

    <project name="DotNetRocks" default="all">

    So when this dll is compiled it will actually be compiled to : build\DotNetRocks.dll.

    Finally I have to tell the csc task, what files (sources) to include in the compile process. The sources element is actually just a NAnt fileset. I can include/exclude files from the fileset. Notice how I am excluding everything in the Web.UI project? Why, this is because I am using the WSP model and a lot of the code for web projects, when using this model, is dynamically generated. In a future post, I will show one way to compile the Web.UI project. I am also excluding any AssemblyInfo.cs file from the list of sources. If I did not do this, the compiler would choke because there would be multiple classes of type AssemblyInfo attempting to be compiled into the assembly. MultipleAssemblyInfos When I usually compile multiple projects into a single assembly, I usually create a single AssemblyInfo file for that group of projects, and include that AssemblyInfo file into the compile process.

    With that target completed, I can run the compile target from the command line and see the result placed into my build directory.BuildDirectoryWithNewAssembly 

    Next up is testing the assembly!!

     





    TODO
    Comments [2] | | # 
     Wednesday, April 05, 2006
    Wednesday, April 05, 2006 2:41:19 PM (Mountain Standard Time, UTC-07:00) ( .Net 2.0 | Tools )

    In the previous post we covered off solution structure and physical directory structure. It’s time to move on to talk about the actual build process. What does it mean to build? A “build” means different things to different people. For me building consists of the following crucial steps:

    • Cleaning up the results of a previous (if any) build process.
    • Creating a build area (folder)
    • Rebuilding databases (optional)
    • Compiling all project/solution related files
    • Compiling all test related projects
    • Running unit tests

    Of course there are other activities that can occur in a build process, but the ones listed above are key. Notice that the “Rebuilding databases” step is optional, as there are lots of applications that do not require the use of database engines. I’ll break the process down step by step, so you can follow along if you desire. Before we can begin putting the steps in motion we are going to make use of a tool that will allow us to automate this process. Having some form of an automated build process is the key to enhancing your productivity as a developer. Getting back to a point I keep stressing, “A Developer should be able to do a fresh checkout and be able to hit the ground running.”.  As a developer, I would much rather do a fresh checkout and run some command at the command prompt to assert that my world is set up ok. As opposed to:

    • Checking Out
    • Opening the Solution file
    • Waiting for studio to load up
    • Building the solution
    • etc,etc,etc

    In order to automate your build process you can take advantage of NAnt. NAnt is the open source, more mature, equivalent to MSBuild. Let me say that I think it is great that MS has introduced an automated build tool into the mix, and I am sure that eventually I will be able to retire NAnt and utilize it. In its current implementation, I definitely feel that NAnt is more feature rich out of the box, and a little easier to work with.

    Setting Up The Build File

    A NAnt build file, just like an MSBuild file, is nothing more than an xmldocument that is interpreted and executed by the NAnt runtime. Most of my build files start with the following basic skeleton:

    <?xml version="1.0"?>
    <project name="DotNetRocks" default="all">

        <property name="debug" value="true" />

        <target name=”all”/>

    </project>

    That’s it. This is the start of your build file. All these couple of lines of XML are telling NAnt is that this build file represents the project named “DotNetRocks” and that there is a global property called “debug” that has its value set to true. Most important is the “default” attribute. This attribute tells NAnt that the default target to execute is the “all” target. What is a target? More on that later. Think of properties defined at the top of the build file as variables that can be accessed (using the ${propertyName} syntax) during the build process.

    So far this build file does not do much of anything, let’s take care of the first item on the build to-do list.

    Cleaning up the results of a previous (if any) build process

    Now of course, there are currently no unwanted artifacts to clean up, as I have not even completed a successful build yet. Don’t worry about that. The first thing you need to decide is where you want all of your build artifacts to go. When I say build artifacts, I am talking about dll’s, exe’s etc that result from compiling your projects. The following screenshot shows how I will augment my directory structure to support the build process:

    BuildDirectory

    There is one important thing you should realize about the “build” directory. It is created by the build process and is a completely transient directory. It exists solely for facilitating the placement of files and artifacts related to building and testing the project. As a side note, this directory would also not be under source control. Which means you would have to make sure that it is “ignored” from checkins/commits. The main executable unit for NAnt files is the <target> element. You can think of <targets> as subroutines that can be invoked to perform a series of tasks. Let’s change our build file to clean/recreate the build directory:

    <?xml version="1.0"?>
    <project name="DotNetRocks" default="all">

        <property name="debug" value="true" />

        <target name=”all”/>   

       <target name="clean" description="remove all build products">
            <delete dir="build"  if="${directory::exists('build')}" />
        </target>

    </project>

    Notice that the target element has attributes such as “description” that can be used to provide descriptive information about the targets contained in the build file. What about the nested element? The <delete> element is one of many NAnt tasks that can be composed within targets to provide the functionality contained within a target. Here I am using a conditional to tell NAnt to delete the build directory if it already exists. Within a NAnt build file, unless explicitly stated, all directory references are relative to the location of the build file itself. Which means when I tell NAnt to delete the ‘build’ directory, it will attempt to delete a subfolder named build in the folder where the build file itself is contained. I am not going to dive in depth into the ins and outs of each of the NAnt tasks, as the task documentation provides lots of good information that you can use. As long as you can read/write xml, you should be set!!

    Creating a build area

    Ok, I’ve ensured that a build directory does not exist, so now I want to create one that will be used in the build process. I do this by adding the following to the build file:

    <?xml version="1.0"?>
    <project name="DotNetRocks" default="all">

        <property name="debug" value="true" />

       <target name=”all”/>

       <target name="clean" description="remove all build products">
            <delete dir="build"  if="${directory::exists('build')}" />
        </target>

        <target name="init">
            <mkdir dir="build" />
        </target>

    </project>

    Again, here I am making use of the mkdir task provided by NAnt to create a subdirectory named build in the directory where the build file is located. Ok, I now have a NAnt file with three targets that know nothing about each other. Of course, all this XML means nothing if I can’t actually run something that will make use of it. Let me take a quick time-out to talk about utilizing NAnt to execute targets in the build file.

    Running NAnt

    The advantage of having everything related to your build process in one directory (the trunk) means that performing build tasks becomes much simpler. Remember back to where NAnt would actually live in my proposed directory layout:

    ToolsDirectory

    Remember, NAnt is just an executable with a bunch of supporting dll’s. To run it I have to run the exe file. Because I typically run NAnt from the command line on my local machine, it would be a bit of a pain to have to open up the command prompt and execute NAnt for my build file using the following command line:

    Tools\nant\bin\NAnt.exe -buildfile:dotnetrocks.build all

    The arguments tell NAnt that the build file to run is the dotnetrocks.build file and that the all target should be executed. Again, this would be a pain to have to type every time, so let’s make use of a good old trusted pal. The bat file!! Create a file called build.bat that will live in the same directory as your build file. The contents of the bat file are as follows:

    @echo off
    cls
    Tools\nant\bin\NAnt.exe -buildfile:dotnetrocks.build %*

    The most important aspect of this bat file is that it allows us to execute it and pass in extra arguments to be interpreted by the build file (using the %*). So, if I wanted to execute the clean target that exists in my build file, I would just have to open up a command prompt and navigate to the directory my build file is located (use Command Prompt Here for convenience) and run the command – build clean, which would result in the following console output:

    NAnt 0.85 (Build 0.85.2139.0; nightly; 11/9/2005)
    Copyright (C) 2001-2005 Gerry Shaw
    http://nant.sourceforge.net

    Buildfile: http://www.jpboodhoo.com/dotnetrocks.build
    Target framework: Microsoft .NET Framework 2.0
    Target(s) specified: clean

         [echo] Loading local.properties.xml

    clean:


    BUILD SUCCEEDED

    Total time: 0.2 seconds.


    D:\Development\dotnetrocks\2006\testDrivenDevelopment>

    With this setup in place I can quickly execute any of the targets in my build file with ease. Ok, I am quickly seeing that all of this information is probably going to be too much for this one blog post, so I will span this over a couple of more entries. Tomorrow we’ll pick up the process by compiling the application and linking targets!!

     

    TODO
    Comments [11] | | # 
     Monday, April 03, 2006
    Monday, April 03, 2006 12:28:09 PM (Mountain Standard Time, UTC-07:00) ( .Net 2.0 | Tools )

    After a couple of discussions with Ben Scheirman . I decided that I should post some information about automating your build process using NAnt. This is the first in a 3 part post that describes my recommendations for all things related to automating your build process. I should note that this is a process that I use even if I am working on a project for myself, where no other developers are involved. Having an automated build process can streamline your development efforts dramatically. I am making the assumption that you already have a source control repository in place. Let’s take a look at a common directory structure that I use for projects:

     

    FolderStructure

     

    This may or may not be a structure that you are familiar with. The first thing to notice is the location of the solution file (DotNetRocks.sln) with respect to all of the projects under the solution. The solution file lives right in the root of the (trunk) directory. I’ll explain as necessary the purpose of each of the folders. The first and most important thing I want to stress about this proposed build structure is this: After a fresh checkout a developer should be able to do all project related tasks with solely the contents of the combined folders.

    This means, that a new developer coming onto to the team should be able to boot up their computer, do a fresh checkout, and be able to build the project without any problems. We’ll dive further into how this can be accomplished by talking about some of the core directories that are crucial to the build process.

    The lib Folder

    Take a look at the following screenshot that shows the contents of this particular lib folder:

    LibFolder

    Each subdirectory in the lib folder will be named after a third party library that also needs to go along with the deployed application. This could be things like a logging library (log4Net), Infragistics etc. The point is, without the files contained in these folders, the application could not be compiled or deployed. Typically, the majority of files that live in these folders are dll’s or exe’s. One key point about this folder. All project references to third party software from within the solution are made to point into folders in this directory.

    The tools Folder

    Take a look at a screenshot for the tools folder:

    ToolsFolder

    Each subdirectory in the tools folder contains utilities, libraries etc, that are essential to the building and testing of the application. A key distinction between this and the lib folder is that files in the tools folder do not get deployed with the production application. They are only necessary to facilitate the build process itself. The NAnt folder contains all of the NAnt assemblies including the NAntContrib assemblies. I will talk more about NAnt later, as it is a great tool to facilitate automating your build process. A common folder that is seen in tools directories everywhere is the nunit folder. This folder, obviously, contains all of the dll’s and exe for NUnit, which is used to write and run automated unit tests for the application.

    The src Folder

    The source folder obviously holds the most important artifacts for the application (the source code files). There is a slight twist to this source directory as you will see from the following screenshot:

    SrcFolder

    All projects for the solution are stored under the respective directory. Any project that is part of the build for distribution will live under the app directory. All projects related to testing live under the test folder.

     

    This would be a good place to actually talk about the solution and project hierarchy itself.

     

    VS Solution Setup

    The following screenshot shows what a typical solution would look like mapped to the above directory structure:

    SolutionLayout

    As you can see, studio flattens out the actual physical structure that the projects are mapped to. Any project with a .Test extension would live under the src\test directory. Other projects would live under the src\app directory. All references to third party libraries would point to either folders under the tools/lib folder, depending on the type of reference. Notice that almost every “app” project in this solution has an accompanying “Test” project. This is an optimal setup to allow for quick building/segragation of the test and app portions of the application. In this scenario, the only project that does not have a Test project is the Web.UI project. This is the project where all of the .aspx,.ascx files etc live. As such, and this is a topic for a later discussion, code that lives in that layer is kept to a minimum as it is difficult to test without running the application or using WATIR or alternatives.

    Next up we’ll talk about building this application using NAnt.


    TODO
    Comments [13] | | # 
     Friday, March 31, 2006
    Friday, March 31, 2006 11:23:32 AM (Mountain Standard Time, UTC-07:00) ( Tools )

    For anyone who actually points themselves in the direction of this blog!! I have added a feedburner feed to the left side menu. For convienience you can subscribe by clicking this link also.

    Enjoy.

    Comments [2] | | # 
     Tuesday, March 28, 2006
    Tuesday, March 28, 2006 8:21:06 AM (Mountain Standard Time, UTC-07:00) ( Tools )
    That’s right. The good folks at Jetbrains continue to keep this product moving forward. Yes, there is not an official release yet, but the build keeps getting better and better. If you haven't used ReSharper, I seriously recommend you download  the latest build and give it a whirl.
    Comments [1] | | # 
     Tuesday, March 21, 2006
    Tuesday, March 21, 2006 10:23:02 AM (Mountain Standard Time, UTC-07:00) ( Tools )

    I have had a lot of questions for people asking where they can download NMock2. As it is not yet an official drop, you have to retrieve it using your CVS client. I use TortoiseCVS and I thought I would post the following screenshot that shows the TortoiseCVS checkout dialog for retrieving NMock2 from sourceforge:

     

    Chekcout

    Happy checkouts.

    Comments [3] | | # 
     Friday, January 13, 2006
    Friday, January 13, 2006 9:50:16 PM (Mountain Standard Time, UTC-07:00) ( Tools )

    Well I just downloaded and installed BlogJet and I am hooked. This great little utility makes posting to your weblog a breeze. It supports all of the major blogging engines right out of the box and it has a very simple intuitive UI that allows you to create and post rich posts without having to use clunky HTML editor. If you are a blogger I highly recommend that you download this tool and start using it to make your blogging life a whole lot easier.

    Comments [0] | | #