Showing posts with label Tools. Show all posts
Showing posts with label Tools. Show all posts

Tuesday, October 04, 2011

Uncrustify - Source Code Beautifier

Just came across a powerful tool for code beautification.

http://uncrustify.sourceforge.net/


Features

  • Ident code, aligning on parens, assignments, etc
  • Align on '=' and variable definitions
  • Align structure initializers
  • Align #define stuff
  • Align backslash-newline stuff
  • Reformat comments (a little bit)
  • Fix inter-character spacing
  • Add or remove parens on return statements
  • Add or remove braces on single-statement if/do/while/for statements
  • Supports embedded SQL 'EXEC SQL' stuff
  • Highly configurable - 400 configurable options as of version 0.58

Saturday, August 06, 2011

Changing diff/merge tool

I have been using Winmerge for years. Never expected that I would find any limitation with it. But it is failing to show diff view of c file modification in git repository with tortoise front end.

Moving to DiffMerge from SourceGear.

Though licensing is not so encouraging, it is a proving to be a good choice.

Shell integration is neat. No noise in diff view. Advantage with reference view and edited view.

So far so good.

Tuesday, November 03, 2009

Just installed VS2010 Beta2

Just installed VS2010 Beta2.

Though the general layout is not new, editor is not looking a bit sluggish. Personally I am impressed with emphasis given UML. But couldn’t understand what is that InstallShield 2010 doing in VS2010 rather I was expecting WIX there.

Yet to explore UML support completely. But first look is OK. It looks like there is way to generate code using extensions. I am still going to through the articles and yet to get a hang it. But I am amused to know the fact that MEF is playing a key role here.

Also I am liking Architecture views, especially the dependency (directed) graph by class and its analyzer features to check circular, hub and unreferenced nodes.

But I am not sure, what are improvements on metrics. I don’t see any changes.

And coming back to XML. New viewer is somewhat OK but I am really missing what we had in VS2005.

Thursday, March 26, 2009

Fxcop stylesheet

For some reason FxCop still points to a stylesheet from gotdotnet which is broken.

Today we had a requirement to generate static code analysis report in a simple tabular form.

Following snippet did the job. You can apply any css on this for better look. Or even set style for table, tr and td.

<?xml version="1.0"?>
<
xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<
xsl:template match="/">
<
html>
<
body >
<
table>
<
xsl:for-each select="//Issue">
<
tr>
<
td><xsl:value-of select="@Certainty"/></td>
<
td><xsl:value-of select="@File"/></td>
<
td><xsl:value-of select="@Line"/></td>
<
td><xsl:value-of select="../@FixCategory"/></td>
<
td><xsl:value-of select="@Level"/></td>
<
td><xsl:value-of select="."/></td>
</
tr>
</
xsl:for-each>
</
table>
</
body>
</
html>
</
xsl:template>
</
xsl:stylesheet>

Just thought of sharing it.

Friday, January 16, 2009

Google maps mobile update

Updated to new google maps for windows mobile.

Though street view is not so much facinating for Indian users, there are couple of things that are interesting.

1) Now application can be installed on storage card. Thus even application data can be stored on Storage card. No more limitation of phone memory.

2) My location can be triggered from map itself. No need to go to Menu.

I am more happy for first point.

Sunday, January 11, 2009

Updated to Windows Live Writer 2009

Updated to live writer 14 which is part new live update pack.

Notable changes

1) Preview

2) Segeo font

Monday, January 21, 2008

Visual Studio Task List feature - I regret for not knowing this earlier

Do you use Visual studio's Task List? Atleast I was't using it so far and I regret for not knowing this earlier.

How it works

It works like this, you might want to do something at code at later point in time, just add a comment in this syntax

//TODO: Add exception handling here

or you are doing code review and felt a message should have been logged here just add a comment like this

//LOG: recursive function, log depth of stack

or you might have felt a method has grown too big, it must be refactored, just add a comment where ever you felt like

//REFACTOR: break this part as a function

How to access

And visual studio has a window to search for all these comments and present them in a list.

To show task list select from View -> Task List

By default it shows user task, select for comments from combobox.

How to customize

You can set more tokens from Tools -> Options Check in image here. TODO, HACK, UNDONE and UnresolvedMergeConflict are default tokens in visual studio. I added LOG and REFACTOR.

Check how a

TODO: Clean up and Log Something in code is shown with. And it is a clickable target

Also you can sort all log messages or TODO's to attend once.

Also you can define user defined tasks too.

For that select User tasks option in Task List and add your taks.

I felt the option very handy and felt like sharing it.

Unit Testing for Native Code

As I am spending most of time in CLR sandbox these days, I couldn't realise that NUnit can't work for native code. But that is a bit disappointing, having spent those many years developing C++ code, I couldn't accept flag go down. YES there is a Unit testing framework available for native C++ too. It is called WinUnit and MSDN Febraury 2008 article Simplified Unit Testing for Native C++ Applications describes the details.

Salient features are

a) Its built as a regular C++ dll

b) You can run it from Command Line by passing dll name as argument to WinUnit.exe

c) You can integrate with Visual Studio Build process, so whenever you build the project Unit Tests are performed

Compared to NUnit:

a) It lacks UI

b) Lacks report generation features