Friday, May 22, 2009

DevTnT 5 - SlickEdit Gadgets for Visual Studio

The SlickEdit Gadgets for VS is a collection of more or less nice to have features the dev guys from SlickEdit give away for free. They integrate with VS 2005 & VS 2008.

It consists of four parts:

Editor improvements
  • Line ruler - highlights the line where the cursor is.
  • Indentation guide - a line that highlights the current line's indentation.
  • Auto-copy selection - allows to auto-copy text selected with the mouse. (as known from irc clients)
  • Editor graphics - put images and animated graphics as your editor background.

The "Command Spy" tool

Tracks all commands you execute in Visual Studio and lists them with key-bindings configured to the certain command.

The "Data Object Analzyer" tool

Shows the data and data type that is currently "copied" to the clipboard.


SLOC reporting

Generates a Lines-of-Code report indicating the rate between source code, comments and white spaces.

For more information and download go to http://www.slickedit.com/content/view/441

DevTnT 5 - Use the "Terminals" for Working with Several Remote Sessions

Terminals as the title says allows you to control most of the remote connections i.e. RDP (Microsoft’s Remote Desktop aka Terminal Services), VNC (Virtual Network Computing), VMRC (Virtual Machine Remote Control), RAS (Remote Access Service), Telnet (Telecommunication Network) SSH and ICA Citrix from a Tabbed interface making you task easier by not wasting time on looking which connection is open where. You can manage more than 100 connections of different type without any issues.

It is a open source software developed in CodePlex and is supported for Windows Server 2008 , Windows Vista, Windows Xp. Check out http://www.codeplex.com/Terminals

DevTnT 5 - Multiple Monitors in Remote Session

We regularly use two monitors at our customer's site, and remote desktop at home or in the office. Some applications, which persistently remember the window location will be hidden on startup because they are off the screen.

The question: how to move one or more window(s) onto the screen? There are several solutions:

  • If you are using Windows XP, you can CTRL+left click on more than one taskbar button, then right click on one of the selected taskbar buttons to cascade, tile, etc.
  • Select the application in the taskbar, ALT+SPACE, "m" (for move) and then hold down the right arrow until the desired window appears in the current window.
  • Disable the second display when you are remoted in and then re-enable it when you get back to the customer. It's not many clicks: show desktop - right-click - properties - display - screen two - uncheck "extend desktop" - Ok.

DevTnT 5 - CTRL+ALT+DEL in a Remote Desktop Session

The Keyboard option of a Remote Desktop Session controls the Windows shortcut keys (ALT+TAB etc.). This allows you to set how you want the behavior to be while you are connected. You can choose whether to execute the keystrokes for those special combinations at the local computer, the remote computer or only on the remote computer when in full screen mode.


When connecting to the other machine, depending on your settings just about all keyboard actions are transmitted to the remote machine, i.e. pressing Enter, typing, pressing the Windows key, etc. However, that is not the case for some key combinations: so, by default, CTRL+ALT+DEL will only work for the local computer - even in full screen mode.

  • CTRL+ALT+END – Display the Task Manager (CTRL+SHIFT+ESC is the local command)

There are a bunch of other keyboard shortcuts you can use in Remote Desktop in non-full screen mode:

  • ALT+INS – Cycle through the programs in most recently used order (ALT+TAB is the local command)
  • ALT+HOME – Brings up the Start menu on the remote computer
  • CTRL+ALT+ (+) Plus/ (-) Minus – Minus takes a snapshot of the active window and plus takes a snapshot of the entire remote desktop window.
  • CTRL+ALT+BREAK: Switch the remote computer between a window and a full screen

Saturday, May 16, 2009

DevTnT 3 - File Comparer Tools

When digging after some changes in a larger software project in your source control system, comparing files is one thing you'll face yourself doing on a regular basis. But also with other tasks the quick and effective comparison of textual content may be helpful.

So, here we present a non-inclusive list of file comparer tools that we use in the company (a separate post on BeyondCompare will follow.)

Note:

All of these tools can be integrated into Visual Studio as tool for compare and/or merge operations (refer to dodo's post on that topic).

Overview

For an overview see the following image:
(Sorry, I did not manage it to fit the HTML table itself into the current blog layout. )

Microsoft DiffMerge (Visual Studio's default)

Download: None (comes with Microsoft Visual Studio)

Pro
  • It's just there when you use Microsoft Visual Studio
Con
  • Cannot ignore differences in whitespaces (oh man!)
  • No font sizing or other change of the font
  • No highlighting of line differences
  • No user-interface for choosing files
    DiffMerge can only be started from the command line. That is totaly enough for what the tool was made for - as the out-of-the-box tool for comparing text files from within Visual Studio.


WinMerge

Download: http://winmerge.org/

Pro
  • Can get input via clipboard. With WinMerge, you cannot only compare to files from the file system. You even can paste both sides of a comparison session from the clipboard. Very easy.

Con
  • A single hit of the ESC-key leaves the application up and running.
    If you hit the ESC key only one time after you're done with comparing, this just closes the compare panes within WinMerge, but not the application (WinMerge is an MDI-application). Especially when you integrate WinMerge as tool for comparing files in Visual Studio, you probably will end up with several instances of WinMerge, because you just hit the ESC button once.

Perforce P4Merge

Download: http://www.perforce.com/perforce/downloads/component.html

Pro
  • Intuitive presentation (it's cool!)
  • Handy Shortcut Ctrl+1, Ctrl+2 for next/previous difference (left hand only, no wrenching necessary, can keep your right hand on the mouse)
Con
  • No syntax coloring
  • No overview
  • No zooming But you can change the font via the preferences dialog
  • Imperfect mouse/keyboard cooperation
    Clicking somewhere within one of the text blocks to compare does not move the position of the currently selected difference. So, if you scroll down, click somewhere between let's say difference 5 and 6 and then press Ctrl+1 (for "next difference") for the first time you will end up on difference 1, although you maybe would have expected difference 6. That can be very annoying.

PSPad

Download: http://www.pspad.com/de/download.php

Pro
  • Can extract just the different lines

Notepad++ Compare-PlugIn

Download: http://sourceforge.net/project/showfiles.php?group_id=189927&package_id=244011.
For Notepad++ see dodo's post on file editors.

Pro
  • Integrates within my favorite text editor :)
Con
  • Zooming using Ctrl+Scroll does not apply to both sides.
    So, although both windows scroll synchronously, the match in the alignment of the lines on both sides gets out of sync the more you scroll down.
  • Redundant line counter for both files with identical values in all lines wastes horizontal space (but, do you mind that on your super-duper wide screen display?)
  • No highlighting of line differences
  • No possibility to switch back from compare mode to normal mode (or am I missing something?)

KDiff3

Download: http://kdiff3.sourceforge.net/

Pro
  • Can compare/merge up to 3 files
  • Manual alignment for better comparison results

Friday, May 8, 2009

DevTnT 4 - Copy Path of a File to the Clipboard in Windows 7 or Vista

All you have to do is hold down the shift key, and right-click the file:


Choose the Copy as Path from the menu. Here's an example of what's on the clipboard after clicking that: "C:\autoexec.bat". This will also allow you to copy the path of a folder to the clipboard.

Note: In Windows XP there is no built-in functionality for that. But have a look at http://www.winhelponline.com/blog/add-copy-as-path-option-to-the-context-menu-in-windows-xp/, there are two alternative methods discussed how to provide it even so.

DevTnT 4 - Use Custom Tools in Visual Studio

Have you ever missed you favorite tool for comparing or merging files in Visual Studio? There is a way to tell Visual Studio which tools should be used for these operations:

Select Tools - Options - Visual Studio Team Foundation Server - Configure User Tools... - Add... Then enter the extension for the files to be affected (type .* for all file types), choose the operation (Merge, Compare) and provide the application incl. path.