Pinching an inch off of code-bloat

0

Posted by Jaime | Posted in Coding | Posted on 21-03-2012

Tags: , ,

Here is a tool that looks quite interesting: SymbolSort

LLVM + Visual Studio = :)

0

Posted by Jaime | Posted in Coding, What's New | Posted on 16-03-2012

Tags: , ,


What!?

LLVM is available for Visual Studio? http://llvm.org/docs/GettingStartedVS.html

Productivity Power Tools by Microsoft

0

Posted by Jaime | Posted in Coding | Posted on 20-12-2011

Tags:

Microsoft has a plug-in for Visual Studio that adds a lot of nice little features that I never realized I needed… like triple clicking to select a whole line.

Cyclomatic Complexity

0

Posted by Jaime | Posted in Coding | Posted on 20-12-2011

Tags: , , , ,

I was introduced to Cyclomatic Complexity at Eric Rimbley’s course at Construx; I was facinated with the topic and found a tool that works with Visual Studio 2010 that gathers this metric: http://www.blunck.info/ccm.html

How to switch between a header file and implementation file in Visual Studio

0

Posted by Jaime | Posted in Coding, Tip | Posted on 25-04-2011

Tags: ,

Microsoft Visual Studio 2008
There used to be a button that would toggle you between the header file and implementation file that currently had the focus in Visual Studio.

For reasons unknown to me, that feature was taken out in Visual Studio.

Here is a macro though that brings that functionality back: I want my toggle button back!

Copying a project file to a known location

0

Posted by Jaime | Posted in Coding, Tip | Posted on 22-04-2011

Tags: , ,

Microsoft Visual Studio 2008
Within a Visual Studio C++ solution, you can copy a file to a known location as part of the build process.

To do that, you have so set the “Custom Build Step” parameters found in the Visual Studio project’s property page:

Command line: copy "$(InputPath)" "$(TargetDir)" > nul
Description: Copying $(InputFileName)
Outputs: $(TargetDir)$(InputFileName)

Note, the first line is the actual copy command. If you want to see the command without executing it, you can place @echo in front of the command.

Also note, the second line prints some text to the output screen, so you know what is going on.

For some projects, I have to run Visual Studio in adminstrator mode, otherwise the IDE is unable to copy the file to the restricted location.

I found instructions on how to run Visual Studio in administrative mode at: gottoknow dot com :

  1. Click the ‘Start’ button.
  2. Click ‘All Programs’
  3. In the menu, locate and click on the folder that says ‘Microsoft Visual Studio 2010’ (your version might be 2005, or 2008).
  4. Now right-click on the ‘Microsoft Visual Studio 2010’ program file, which will bring up the ‘Properties’ pop-up box.
  5. Select the ‘Compatibility’ tab, and then in the Privilege Level section, check the box next to “Run this program as an administrator”
  6. Click the ‘Apply’ button, then click the ‘OK’ button.
  7. Now each time you open Microsoft Visual Studio 2010, it will be running in (Administrator) mode.

References:
http://msdn.microsoft.com/en-us/library/b0bktkzs(v=vs.80).aspx

Detecting memory leaks in Visual Studio

0

Posted by Jaime | Posted in Coding, Tip | Posted on 02-03-2011

Tags: , ,

This is a good reference for me since I have to do this on occasion when I switch from my Mac to my PC to do some general coding work: Enabling Memory Leak Detection

Using regular expressions with Visual Studio

0

Posted by Jaime | Posted in Coding | Posted on 28-02-2011

Tags: ,

Today, I began using regular expressions to change a whole bunch of code. However, what I learned from using RegEx in TextMate was not the same as in Visual Studio.

So, for example, the parenthesis around regular expressions to indicate a backreference in TextMate:
    (\w+)
is represented by curly braces in VS:
    {\w+}

And to get the backreference in TextMate, you would use the $:
    $1
but in VS, you would use a backslash:
    \1

Useful Visual Studio Keystrokes

0

Posted by Jaime | Posted in Tip | Posted on 02-02-2011

Tags: , , ,

For the past 3 1/2 years, I have used Xcode almost solely for my development work, but, recently, I have switched over to Visual Studio to use some of the nifty tools that Intel has for performance profiling.

The folks over at Microsoft have some nifty bloggers and one of them have this cool chart on useful keyboard shortcuts for Visual Studio which I love!

Preventing Visual Studio from defining min and max

0

Posted by Jaime | Posted in Coding | Posted on 05-11-2010

Tags: ,

To prevent Visual Studio from defining it’s own min and max functions, include the following in the top of your implementation file:

#ifdef _WIN32
    #ifndef NOMINMAX
        #define NOMINMAX
    #endif
#endif

You can also define NOMINMAX in the Preprocessor Definitions option in the Common Properties->C/C++->Proprocessor property page.