Skip to main content

Posts

Changing the TFS temp location

To optimize performance TFS uses a temp folder to get the files that you view. By default the location of that folder is %TMP%\TFSTemp. the TMP environment variable. Unfortunately there is no option in Visual Studio or Team Explorer to change this location. The only way I found to change it, is by changing the %TMP% environment variable itself: 1: set TMP=D:\Temp 2: set TEMP=%TMP% 3: md %TMP% Remark: Notice that it is possible that the same environment variable is used for other applications too. So be careful when changing this value.

The correspondence between examples and use cases

Most of time we use use cases to extract the domain model from the business people mind’s. As stated by the term itself, use cases should be created by the business user itself. But for a lot of persons(both analysts and business people), wrapping your head around the concept of a use case is very hard. Most of the time the only business persons you can ask for a use case have a technical background. So I think it’s better to take another approach and don’t ask for a use case, ask for an example. If a business person cannot give you an example, you’re talking to the wrong person. That implies that they are two different approaches to the same goal, both use cases and examples have their place in helping to understand and create the domain model.

Create random text in Word 2007

An almost unknown feature of Word 2007  is that you can insert lorem ipsum text into the document to create some random text.  Just type in =lorem() into your document, and hit the enter key… If you need more text, you can also use the following syntax:     =lorem(paragraphs,sentences) For instance, for 6 paragraphs of 20 sentences each, you would use:    =lorem(6,20)

Enable Intellisense for your custom config sections

Start by creating an XSD file that defines the format of the xml of your config section. You can easily do this in Visual Studio by opening an XML file and choosing XML –> Create Schema from the Toolbar menu. Imagine we have the following custom configuration 1: < CustomSettings name ="Something" > 2: < ApplicationName > SomethingElse </ ApplicationName > 3: </ CustomSettings > This will result in the following schema:   1: <? xml version ="1.0" encoding ="utf-8" ? > 2: < xs:schema attributeFormDefault ="unqualified" elementFormDefault ="qualified" xmlns:xs ="http://www.w3.org/2001/XMLSchema" > 3: < xs:element name ="CustomSettings" > 4: < xs:complexType > 5: < xs:sequence > 6: < xs:element name ="ApplicationName" type ="xs:string" /> 7: </ xs:seque...

Clearing a table: the fast way

Just something that can be handy: if you have to clear a table , I always used the following statement before 1: DELETE FROM TABLE Now if you have a table with a large amount of records, this can take a long time. A lot faster way is to use the following SQL statement instead: 1: TRUNCATE TABLE Remark: This is only for SQL Server. I have no idea if this is also true for other database systems.

jQuery Fundamentals

jQuery is a great library and it helped me a lot in starting to like web development. Abstracting away all the typical Javascript problems and giving a nice syntax instead, it makes web development fun again. Of course learning jQuery still requires some investment from your side, you still need to understand HTML, Javascript and CSS. To help you learn jQuery Rebecca Murphey wrote a free book about the jQuery Fundamentals. A must read for all web developers and a resource to keep close to you.

Powershell: Include other scripts in your Powershell script

I don’t used Powershell a lot before. But lately I’m starting to discover more and more of it’s richness and how it can make my life a lot simpler. One of the things that took me some time to figure was how to include other scripts inside your own Powershell script. Now doing is this is very easy(once you know it). One way to use functions from another script is to use the dot sourcing operator to run the script so that the functions from the script are part of the calling scope. To dot source the script, you use the dot source operator (a period) followed by the path to the script containing the functions you wish to include in your current scope. After you do this, you can call the functions from the other script directly. An example: PS C:\> . C:\scripts\ConversionFunctions.ps1 PS C:\> convertToMiles 6 6 kilometers equals 3.7266 miles