|
 Friday, August 10, 2007

SubVersion / TortoiseSVN Global Ignore Pattern

tortoisesvn_logo_hor468x64

A nice feature of TortoiseSVN that is often ignored is the Global Ignore Pattern. It allows your Tortoise client to ignore certain file types during the check in/update process.

I've worked at a few companies  who actually check in everything, including the kitchen sink. The teams would check in all dll's, exe's, pdb's, bin folders, compiled web site folders, everything. In my opinion, those files should never be in source control (with  a few minor exceptions).

Reasoning

Source control is just that - "Source Control". Is that compiled dll for your business layer object really "source"? No, its a binary file that has compiled code in it. Is that PDB really a source file? No. Its a file that assists with debugging. Is that exe really a source file? No, its a compiled application. These SHOULD NOT be in your source control.

Exceptions

The exceptions to this rule are when you use third party components. For example, maybe  you use a product such as MBUnit, NCover, NDepend, or Infragistics. These are dll's that your application must reference to perform a certain duty. At this point, having a dll or exe in your source is completely fine (IMO).

How to set your global ignore pattern

To set your global ignore pattern (with TortoiseSVN) right click Windows Explorer --> TortoiseSVN --> Settings.

Tortoise1

 

Once you click  on settings enter your global ignore pattern.

Tortoise2

 

My Global Ignore  Pattern 

The global ignore pattern I use is: */bin */obj *.bak *.*scc *.user *.suo *.webinfo bin obj *.dll *.pdb *.exe

I'm blocking everything in my bin folder, obj folder, anything that may have been named *.bak, user files, suo files webinfo dll's and pdb and exe files.

If I need to check in a 3rd party component (which is rare). I'll remove the pattern, paste it into Notepad++ to save it temporarily. Then I'll check in the third party component by selecting it exclusively and checking it in.  Then I'll re-add my global ignore pattern.

Now your source control can be free and clear of code clutter.

#    Comments [4] |
 Thursday, August 09, 2007

Windsor Links

windsor_rawlogo Every once in awhile I'll make a post that is for my own use, this happens to be one of them.

Ayende, put up a great post awhile back that I just bumped into. It has a bunch of good Windsor Container links/tutorials and he has labeled them as Windsor Patterns.

If you haven't used Windsor/MicroKernel for IoC, its best time you look into it. :)

#    Comments [0] |

DbDataReader Mishap

This is something that I'm almost afraid to admit to. *sheepish grin*

I was debugging a DbDataReader Unit Test and all of a sudden it started to fail. After  about 5 minutes of thrashing I saw that I had put the DbDataReader object into the Watch window (which was not pinned -- therefore I could not see it). I was checking a value of the DbDataReader and working with it in the watch window. Well, I forgot to remove that watch, and as soon as the unit test started again, it bombed bout because as soon as the DbDataReader was available it attempted to perform some work on it (before the Read method was called). Therefore when we did call anything on the DbDataReader later in the game, it blew up because it had already thrown  an exception in the watch window.

Ooops. :)

Moral of the story: Make sure you delete your watch variables when you're done. Oops. :) Perhaps I should be using the Auto's window instead. :)

#    Comments [0] |
 Monday, August 06, 2007

Portable Applications - A Life Saver on a USB Stick

Like many of you out there I'm straight up addicted to using Notepad++. If I can't use N++ I begin to have a productivity melt down. I have a ton of hot keys memorized, a bunch of formatters memorized, hell, it makes my life 10 times easier and I'm 10 times as productive with this tool. When its AWOL I feel, well, empty inside... Ok, not really... but you get the point. :)

There are times when  you're out at a client, or working on a server and you just need access to certain tools that are not normally accessible on the machine that you're working on. In consulting, this happens A LOT. Enter PortableApps.

Portable Apps allows you to put a lot of your common use applications onto a USB Stick so you can use them anywhere.

I have the following portable apps on my USB Stick:

You can choose from a list of apps on the site and build your own little custom set of programs. Here's what I do:

1. Create a folder called UTILS on your USB Stick

2. Create a folder called PORTABLE inside of the UTILS directory

3. Drop all the Portable apps into that directory and now you have a TON of great apps at your fingertips.

Caution though... not all apps run on all operating systems. Most apps will run, but check them here: Application Compatibility Page.

 

Furthering its use, you can even download the Application Suite which contains most of the above items listed as well as some others. The application suite gives you a nice little start menu type of interface and it even places itself in the task bar until you tell it to close. Once you have that running you can also install other portable apps into your application suite by visiting the applications page, downloading the app you want, and then choosing install from the options on the Application Suite.

Here is a shot of my portable app suite running on Vista Business.

portableappssuite

#    Comments [0] |
 Friday, August 03, 2007

Presenting at Arizona .NET User Group - Dependency Injection & Inversion of Control

I will be presenting at the AZ .NET User Group on August 14th. I'm going to cover how to use Dependency Injection along with Inversion of Control to decouple your applications. I will also demonstrate how these techniques can help ease unit testing.

When: August 14th

Time: 6pm

Location: Microsoft Corp 2929 N Central Ave # 1400 Phoenix, AZ 85012 (map).

See AZGROUPS.COM for more info.

See ya there!

#    Comments [2] |