Verify MD5 or SHA-1 hash on Windows

Many large or important programs provide a MD5 or SHA-1 hash along with their installation file. To verify the hash on Windows, you need the File Checksum Integrity Verifier (FCIV) program. This can be downloaded here.

The FCIV installer extracts fciv.exe. Generating hash with FCIV is simple:

Ensure that the hash generated by FCIV matches the hash string provided online before you install the files.

Tried with: File Checksum Integrity Verifier 2.05

Python: Installing packages with easy_install

A lot of Python packages are available online at the Python Package Index (PyPI) repository. The advantage of using PyPI is that packages available there can be installed directly from the command-line. These packages can also be upgraded or uninstalled directly from the command-line.

To be able to do install directly from PyPI, one last package needs to be downloaded and installed manually: setuptools. Follow the installation instructions for setuptools from an Administrator command-prompt and remember to add the Scripts directory to the PATH.

After setuptools is successfully installed, its easy_install script can be used to install any package from the command-line. For example, to install a package named foobar from PyPI: easy_install foobar

Related: For information on installing downloaded packages go here.

Tried with: setuptools 0.6c11 and Python 2.7.3 64-bit

Floating windows of Visual Studio 2010

A cool feature of Visual Studio 2010 is that any window displayed in the IDE can be pulled out of the IDE as an independent floating window! Just click on the tab of the window and drag it out of the IDE. The window becomes undocked from the IDE and will now behave like an independent window.

I find it useful to use this trick along with the Windows 7 snap feature to have side-by-side code windows for comparison or collaboration. You can also pull a code window into another display in a multiple display setup. You are not limited to code windows, any other window in the IDE: solution explorer, output, call stack, or anything else can be pulled out. To dock back a floating window into the IDE, drag it back into the IDE space using its tab.

This feature is a huge leap over the older tiling and splitting methods of Visual Studio, which were quite onerous.

Reference: How to: Arrange and Dock Windows.

GridMove

The snap feature was an excellent addition to Windows 7. I use it all the time to put two related windows beside each other for collaboration or comparison.

On large widescreen displays and other scenarios, I feel like I need other windowing and tiling configurations. For example, I would like to have a Python editor window take 70% horizontal space and a PowerShell console take the rest 30%. Or some other time I would like to have one main window and two smaller windows stacked on each other by the side. GridMove is an excellent tool for all these work setups.

GridMove sees the display area as a grid of tiles. A template describes the tiles that make up a grid. Based on the currently chosen template (or grid), the user can snap an active window into any tile of the grid.

An active window can be snapped into any tile on the grid using either the mouse or the keyboard. For example, middle-click on the window titlebar and drag it to the tile you want. (The grid is displayed visually when you do this.) If you lift the mouse button, the window will be snapped to fill that tile. If you prefer the keyboard, press Win+G to see the grid and tile numbers. In an active window, press Win+2 to snap the window to tile 2, Win+3 for tile 3 and so on.

I find that GridMove is a must-have tool to make optimum use of widescreen displays. You can create your own custom grids easily. Examine the .grid files in the Grids directory of GridMove. You can modify these files to your own grid configurations and drop them into this directory with a .grid file extension.

Tried with: GridMove 1.19.62

Visual Studio Color Theme Editor

Starting with Visual Studio 2010, it is now possible to change the color theme of the IDE. The color theme refers to the colors of the chrome or the skin or the various widgets of the IDE. The color theme does not refer to the text content inside the editor window, which are changed using styles.

The easiest way to play around with Visual Studio themes is to install the Visual Studio Color Theme Editor. After installation, open the Theme menu of the Toolbar for applying, importing or customizing themes. At the time of this writing the extension shipped with 8 themes.

Tried with: Visual Studio Color Theme Editor 1.3 and Visual Studio 2010

CUDA in Visual Studio 2010

CUDA 4.0 and later versions work fine with Visual Studio 2010. The only noticeable change from Visual Studio 2008 is that Build Rules are replaced by Build Customizations in Visual Studio 2010.

Adding CUDA capability to any Visual Studio 2010 solution is easy:

1. Install the latest version of CUDA Toolkit.
2. Right-click the project name in Solution Explorer and choose Build Customizations.
2. The Visual C++ Build Customization Files dialog should display the one or more CUDA toolkits you have installed. Choose the one you want to use and click OK.
3. To change the CUDA compile options, in the project properties look for the section CUDA C/C++.

You should be able to build CUDA source files and run CUDA programs with these changes.

Tried with: CUDA 4.1 and Visual Studio 2010

Indent Guides in Visual Studio 2010

Indent guides are vertical lines drawn by the editor to show the levels of indentation at each line of source code. This can be quite useful to understand or edit code that has more than a handful levels of indentation. Indent Guides is a beautiful extension that adds this feature to Visual Studio 2010.

To customize the settings of Indent Guides, visit Tools → Options → Indent Guides. Settings like the style of the line (solid, dashed or dotted) and color can be changed here.

It would be convenient to have a keyboard shortcut to toggle the indent guides on or off. This can be done by assigning a keyboard shortcut to the command Edit.ViewIndentGuides.

Tried with: Indent Guides 11.0 and Visual Studio 2010

FMAD on CUDA

PTX instructions produced with FMAD off (left) and FMAD on (right)

If you are using CUDA to perform any sort of non-graphics floating-point computation, be aware of the FMAD (floating-point multiply-add) instruction. Since CUDA hardware needs to straddle not only the world of computation, but also graphics and gaming, it has lots of FMAD units. So, by default the CUDA compiler will try to replace as much of your floating-point computation code with FMAD instructions.

This is fine if you do not rely on the precision of your results. However, this can lead to hard-to-find bugs if you do rely on the precision. If you need the CUDA computation to mimic the floating-point computation on the CPU, then you are better off without the FMAD instructions.

The CUDA compiler (nvcc) is configured to produce FMAD instructions by default. To request it to stop producing FMAD instructions and use the normal floating-point instructions use the compiler directive --fmad=false

Note that turning off FMAD can hurt performance quite a bit. I found that the time spent on my computations increased by about 20% with FMAD turned off.

Tried with: CUDA 4.1