Sunday, October 30, 2011

Quotes

I'm a great believer in luck and I find, the harder I work ,the more I have of it. ~ Thomas Jefferson
While faith makes all things possible, it is love that makes all things easy. ~ Moody, Dwight L.
If a man hasn't discovered something that he would die for, he isn't fit to live. ~ Martin Luther King Jr.

Tuesday, September 20, 2011

++9 = 11

C++0x specification was initially expected to be published before 2010 but eventually came out on 2011 hence named it as C++11.

Sunday, May 15, 2011

(Win)Unit Test Native Code

Came across a tool called WinUnit, from Microsoft, for unit testing native (unmanaged) C/C++ code on windows through an article "Simplified Unit Testing for Native C++ Applications" by Maria Blees.

Introduction
As per CodePlex, WinUnit is:
.NET languages have great unit testing tools such as NUnit or MSTest, but native C/C++ developers have fewer and less convenient options. WinUnit is a project that brings NUnit-like testability directly to native code. With WinUnit, you focus on just your test code and WinUnit takes care of the rest. It comes with a complete library that makes creating tests simple, and a runner program to run them.
WinUnit Vs BOOST Vs CPPUnit
BOOST.Test and CPPUnit were couple of other widely known/used tools. There are lot other existed but WinUnit was picked among all, with one main reason - No test runner to be implemented. One can focus only on writing tests without bothering about the test runner and that reduces (considerable) coding effort too.

Some of the advantages in using WinUnit are:
  • Writing Tests and running them are made easy.
  • Integration with Visual Studio is easy and includes macros to setup your projects to use WinUnit. Also, to run tests.
  • No separate test runner is required comparing with other BOOST.Test/CPPUnit tools.
  • Also, code coverage statistics (% or Count of lines covered or not covered) can be generated easily as if NUnit/MSTest does in .Net Applications.
Downloads
Binaries and Samples are @ http://winunit.codeplex.com/
Source is @ http://msdn.microsoft.com/en-us/magazine/cc164218.aspx

Friday, May 6, 2011

Order of Installation

On my machine, While TFS (Team Foundation Server) items are being accessed (in the sense, clicking on any work item to view it's details), The VS 2008 Team Explorer is showing the below error:  
Could not load type 'Microsoft.TeamFoundation.WorkItemTracking.Client.WorkItemTypeDeniedOrNotExistException' from assembly 'Microsoft.TeamFoundation.WorkItemTracking.Client, Version =9.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'.
Seems that the order of the installation that I did was wrong - Installed VS 2008 SP1 before Team Explorer and should actually be other way round. Re-installing the VS 2008 SP1 in such cases, shall resolve the issue.

Order of installation must always be - Visual Studio 2008 > Team Explorer > Visual Studio 2008 SP1.

Sunday, April 10, 2011

time(NULL) in C#

As per MSDN, In C++/C time(NULL) function returns the time elapsed in seconds since midnight, January 1, 1970, which is Coordinated Universal Time (UTC) according to the system clock - is the current time, precisely.  To achieve the same in C#, code should look something similar like as below:

Monday, February 21, 2011

atlcom.h errors

After installing Visual Studio 2008, It is recommended to run Windows Updates to ensure whether the below updates have been installed? If not then one should install them.

Microsoft Visual Studio 2008 Service Pack 1 ATL for Smart Devices (KB973675)
Microsoft Visual Studio 2008 Service Pack 1 (KB971092)
Microsoft Visual Studio 2008 Service Pack 1 (KB972222)
Otherwise, It will throw compilation errors as listed below when you compile your source code.

Sunday, February 13, 2011

Top 50


Made into Visual C++ Brain bench Top 50 scorers in India, it was very less score though. But had attempted this some time in 2004 as I remember but not sure why is it showing as 2010? However happy to reminiscence :).
(Click image to view Transcript)

Also, had gotten Master in C++                              (Click image to view Transcript)