<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" media="screen" href="/~d/styles/rss2full.xsl"?><?xml-stylesheet type="text/css" media="screen" href="http://feeds.feedburner.com/~d/styles/itemcontent.css"?><rss xmlns:feedburner="http://rssnamespace.org/feedburner/ext/1.0" version="2.0"><channel><title>Reflections of my thoughts...</title><link>http://codereflect.com</link><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="self" type="application/rss+xml" href="http://feeds.feedburner.com/SharingMyThoughts" /><description>on programming tips and trending topics...</description><language>en</language><lastBuildDate>Fri, 01 Jun 2012 23:38:58 PDT</lastBuildDate><generator>http://wordpress.org/?v=3.3.2</generator><sy:updatePeriod xmlns:sy="http://purl.org/rss/1.0/modules/syndication/">hourly</sy:updatePeriod><sy:updateFrequency xmlns:sy="http://purl.org/rss/1.0/modules/syndication/">1</sy:updateFrequency><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="self" type="application/rss+xml" href="http://feeds.feedburner.com/SharingMyThoughts" /><feedburner:info uri="sharingmythoughts" /><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="hub" href="http://pubsubhubbub.appspot.com/" /><feedburner:emailServiceId>SharingMyThoughts</feedburner:emailServiceId><feedburner:feedburnerHostname>http://feedburner.google.com</feedburner:feedburnerHostname><item><title>Seeking help isn’t the sign of the weak</title><link>http://feedproxy.google.com/~r/SharingMyThoughts/~3/VvDlOYmm3Ao/</link><category>essays</category><category>Tips</category><category>best practices</category><category>Software Engineering</category><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">@sarat</dc:creator><pubDate>Fri, 01 Jun 2012 22:52:10 PDT</pubDate><guid isPermaLink="false">http://codereflect.com/?p=2095</guid><content:encoded xmlns:content="http://purl.org/rss/1.0/modules/content/"><![CDATA[<p>Often the knowledge we acquire from school isn&#8217;t really sufficient enough to meet the demands of a quality product. Lot of companies give training on tools, process, technology etc. to make their employees productive and competent.</p>
<p>The right experience of any craftsman in the world is acquired over the years. They polish their skills, learn the best way (practices) to work, pick up the right tools to accomplish things faster and with right  quality. This is a never ending process. This is the place where the competence takes over the professionalism.</p>
<p>Seeking help is often overrated. Some people believe that it&#8217;s the sign of the weak. But I would say seeking help form senior, mentor or even to a junior isn&#8217;t at all a sign of weak.</p>
<p>I have seen people who sits more than 12-14 hours a day, work in the weekend. I came across the situations where people unnecessarily wasting time with their ignorance and specifically because of the lack of attitude to seek help. Sometimes a problem can&#8217;t be solved by sheerly throwing hours at it. Just take the help sort out problem, learn better aspects of it. Next time, the problem and the solution is yours!</p>
<p>Some poor managers and companies gives too much credit for people who tends to work hard though they&#8217;re not really productive. There are situations where you need to spend extra hours at office. But the spending-for-impression isn&#8217;t good at all. Either you&#8217;ve to correct yourself or to escape from the wrong hands you&#8217;re in. This kind of wrong assessment could create wrong attitude in the people and end of the day, they will be simply frustrated.</p>
<p>Fortunately I worked with some extremely good folks in the initial days of career. They were so knowledgable on what they do. Once the project lead told me a fact, please don&#8217;t sit with a problem more than an hour, it may spoil your energy and at times it could others as well. Always speak out if you&#8217;re stuck with something. Seek out for opinions and help for the problems you&#8217;re facing.</p>
<p>This reminds me of a problem, which we faced couple of years back. The project ran in to a tough mathematical problem. The guys in the room were the experts and experienced but there was a clear gap in their mathematical knowledge. Most of them are facing a tough mathematical problem for the first time. </p>
<p>The meetings were getting. Once-a-tiger guys were started talking about the obvious as if others in the rooms are fools. On the other hand, the mathematical experts were explaining complex formulas as a solution for the problem. Eventually some people tend to escape to hide their ignorance. </p>
<p>I was frustrated and as a technical lead of the project I told the project manager that the junior most girl in our team is really good at math and it&#8217;s good if she can join us. I heard a BIG NO. &#8220;You&#8217;re sitting with the experts. If you&#8217;ve problem in understanding what they&#8217;re speaking about do your groundwork but this is impossible&#8221;. But I was adamant about it and finally managed to get this girl in to the discussion. She really helped us to translate the problem between domains. If I had went back to my old math book, it could have taken time to solve the problems.</p>
<p>Seeking help from others isn&#8217;t a sign of weak. This could be risk sometimes but it&#8217;s important to develop the emotional quality and increase the mental capacity to take more things.</p>
<p>It&#8217;s equally important to seek the help in the right way</p>
<p>- Don&#8217;t sit with a problem for a long time. This could affect several things and you might need help to sort out the problems.<br />
- Ask the right questions to the people. People tends to be busy and when we seek their time, it&#8217;s important to have basic groundwork before getting in the discussion. Sometimes a mere Google search can solve your problem.<br />
- Know about the technology and problems you&#8217;re working on. There could be several best practices, caveats on using some languages/technology/process. Continuously improve your knowledge to accomplish things faster and better.<br />
- Don&#8217;t walk for multiple times to sort out the problems. Reduce this as much as possible, it shows your quality of the attitude and the way you approach the problem.<br />
- Seek a review/suggestion for the solutions as well. The solution you found might work well but there are some expert people who can give better suggestions or find edge cases in your solution.<br />
- Finally, find the right guy to talk your problem. Some people are really bad by pushing their ignorance and handicapped solutions just for the sake of giving and answer or being a responsible senior to provide a solution.</p>
<p>Closing this post with a most important advice I ever received. Once I asked how we distinguish my work from others, especially juniors. He replied &#8220;It&#8217;s your knowledge, attitude, alternatives distinguishes you from others&#8221;</p>

<p><a href="http://feedads.g.doubleclick.net/~a/2f6-sM-1BSlxIgm5-qn1trRJPAQ/0/da"><img src="http://feedads.g.doubleclick.net/~a/2f6-sM-1BSlxIgm5-qn1trRJPAQ/0/di" border="0" ismap="true"></img></a><br/>
<a href="http://feedads.g.doubleclick.net/~a/2f6-sM-1BSlxIgm5-qn1trRJPAQ/1/da"><img src="http://feedads.g.doubleclick.net/~a/2f6-sM-1BSlxIgm5-qn1trRJPAQ/1/di" border="0" ismap="true"></img></a></p><div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/SharingMyThoughts?a=VvDlOYmm3Ao:9Ip0cAhIBts:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/SharingMyThoughts?d=yIl2AUoC8zA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/SharingMyThoughts?a=VvDlOYmm3Ao:9Ip0cAhIBts:gIN9vFwOqvQ"><img src="http://feeds.feedburner.com/~ff/SharingMyThoughts?i=VvDlOYmm3Ao:9Ip0cAhIBts:gIN9vFwOqvQ" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/SharingMyThoughts?a=VvDlOYmm3Ao:9Ip0cAhIBts:qj6IDK7rITs"><img src="http://feeds.feedburner.com/~ff/SharingMyThoughts?d=qj6IDK7rITs" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/SharingMyThoughts?a=VvDlOYmm3Ao:9Ip0cAhIBts:dnMXMwOfBR0"><img src="http://feeds.feedburner.com/~ff/SharingMyThoughts?d=dnMXMwOfBR0" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/SharingMyThoughts?a=VvDlOYmm3Ao:9Ip0cAhIBts:Uw9eXibygTk"><img src="http://feeds.feedburner.com/~ff/SharingMyThoughts?i=VvDlOYmm3Ao:9Ip0cAhIBts:Uw9eXibygTk" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/SharingMyThoughts/~4/VvDlOYmm3Ao" height="1" width="1"/>]]></content:encoded><description>Often the knowledge we acquire from school isn&amp;#8217;t really sufficient enough to meet the demands of a quality product. Lot of companies give training on tools, process, technology etc. to make their employees productive and competent. The right experience of &amp;#8230; &lt;a href="http://codereflect.com/2012/06/02/seeking-help-isnt-the-sign-of-the-weak/"&gt;&lt;em&gt;Continue&amp;#160;reading&amp;#160;&lt;span class="meta-nav"&gt;&amp;#8594;&lt;/span&gt;&lt;/em&gt;&lt;/a&gt;</description><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://codereflect.com/2012/06/02/seeking-help-isnt-the-sign-of-the-weak/feed/</wfw:commentRss><slash:comments xmlns:slash="http://purl.org/rss/1.0/modules/slash/">0</slash:comments><feedburner:origLink>http://codereflect.com/2012/06/02/seeking-help-isnt-the-sign-of-the-weak/</feedburner:origLink></item><item><title>C#: How to convert hexadecimal string with 0x prefix to integer?</title><link>http://feedproxy.google.com/~r/SharingMyThoughts/~3/NiODxZhwAT0/</link><category>C Sharp</category><category>code</category><category>C++</category><category>Code</category><category>tups</category><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">@sarat</dc:creator><pubDate>Fri, 01 Jun 2012 01:50:00 PDT</pubDate><guid isPermaLink="false">http://codereflect.com/?p=2093</guid><content:encoded xmlns:content="http://purl.org/rss/1.0/modules/content/"><![CDATA[<p>int.Parse function can help us out to convert the string to integer. But the function throws an exception if you&#8217;re trying to convert a string in hexadecimal format with &#8220;0x&#8221; prefix. The following snippet allows you to accomplish it.</p>
<pre>static void Main(string[] args)
{
    string str = "0x0013D";
    int value = (int)new System.ComponentModel.Int32Converter().ConvertFromString(str);
    Console.WriteLine(value);

    value int.Parse(str, NumberStyles.HexNumber); // Exception
    str = str.Remove(0, 2); // REMOVED 0x
    value = int.Parse(str, NumberStyles.HexNumber); // OK
    Console.WriteLine(value);
}</pre>

<p><a href="http://feedads.g.doubleclick.net/~a/cnvJjeKgZdOBMZMK-btU5kPIGIc/0/da"><img src="http://feedads.g.doubleclick.net/~a/cnvJjeKgZdOBMZMK-btU5kPIGIc/0/di" border="0" ismap="true"></img></a><br/>
<a href="http://feedads.g.doubleclick.net/~a/cnvJjeKgZdOBMZMK-btU5kPIGIc/1/da"><img src="http://feedads.g.doubleclick.net/~a/cnvJjeKgZdOBMZMK-btU5kPIGIc/1/di" border="0" ismap="true"></img></a></p><div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/SharingMyThoughts?a=NiODxZhwAT0:wcQpjfl8jKM:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/SharingMyThoughts?d=yIl2AUoC8zA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/SharingMyThoughts?a=NiODxZhwAT0:wcQpjfl8jKM:gIN9vFwOqvQ"><img src="http://feeds.feedburner.com/~ff/SharingMyThoughts?i=NiODxZhwAT0:wcQpjfl8jKM:gIN9vFwOqvQ" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/SharingMyThoughts?a=NiODxZhwAT0:wcQpjfl8jKM:qj6IDK7rITs"><img src="http://feeds.feedburner.com/~ff/SharingMyThoughts?d=qj6IDK7rITs" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/SharingMyThoughts?a=NiODxZhwAT0:wcQpjfl8jKM:dnMXMwOfBR0"><img src="http://feeds.feedburner.com/~ff/SharingMyThoughts?d=dnMXMwOfBR0" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/SharingMyThoughts?a=NiODxZhwAT0:wcQpjfl8jKM:Uw9eXibygTk"><img src="http://feeds.feedburner.com/~ff/SharingMyThoughts?i=NiODxZhwAT0:wcQpjfl8jKM:Uw9eXibygTk" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/SharingMyThoughts/~4/NiODxZhwAT0" height="1" width="1"/>]]></content:encoded><description>int.Parse function can help us out to convert the string to integer. But the function throws an exception if you&amp;#8217;re trying to convert a string in hexadecimal format with &amp;#8220;0x&amp;#8221; prefix. The following snippet allows you to accomplish it. static &amp;#8230; &lt;a href="http://codereflect.com/2012/06/01/c-how-to-convert-hexadecimal-string-with-0x-prefix-to-integer/"&gt;&lt;em&gt;Continue&amp;#160;reading&amp;#160;&lt;span class="meta-nav"&gt;&amp;#8594;&lt;/span&gt;&lt;/em&gt;&lt;/a&gt;</description><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://codereflect.com/2012/06/01/c-how-to-convert-hexadecimal-string-with-0x-prefix-to-integer/feed/</wfw:commentRss><slash:comments xmlns:slash="http://purl.org/rss/1.0/modules/slash/">0</slash:comments><feedburner:origLink>http://codereflect.com/2012/06/01/c-how-to-convert-hexadecimal-string-with-0x-prefix-to-integer/</feedburner:origLink></item><item><title>Being a prioritization machine!</title><link>http://feedproxy.google.com/~r/SharingMyThoughts/~3/fc0SISFJBcU/</link><category>essays</category><category>Project Management</category><category>Software Engineering</category><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">@sarat</dc:creator><pubDate>Sat, 19 May 2012 01:57:27 PDT</pubDate><guid isPermaLink="false">http://codereflect.com/?p=2089</guid><content:encoded xmlns:content="http://purl.org/rss/1.0/modules/content/"><![CDATA[<p>Everyone loves priority. It helps us to make things happen. Without proper priorities, every project is kind of boat which is lost the direction.</p>
<p>Again I am going to talk about a story.</p>
<p>One of the products which I have been working was being integrated and tested. It was also released to the other peers for their integration. Also the specification owners were verifying whether everything is at right place as defined. </p>
<p>The team was overloaded with huge number of bugs in hand, a mix of critical and minor issues.</p>
<p>The best thing had happened was the customer was an amazing guy who loves to prioritise the task. The priority sheet which contain several things in including the features, bugs, some sort of requirement stuffs etc. </p>
<p>The sheet was revisited almost every day. Sometimes twice in a day depends on the realignments and change in plans for the entire products, integration testing issues, resource availability etc. </p>
<p>The issues which could potentially affect the other resource were given high priority, the regression issues came second and the prioritised bug list of the products came after these. Anyway these are well connected and used clearly well.</p>
<p>Before he comes for the meeting mostly I used to have the list of the burning issues in hand and since we had a decent number of resources, it&#8217;s implicit that we should take up more issues. So there could be always more than one Priority 1 issues. Again to avoid the questions about the quality of our development, it was equally important to fix the lower priority issues as well just for the sake of numbers.</p>
<p>I just sat down for two three days and nailed almost all the low priority bugs. We used to demonstrate all the bug fixes and features before merging to the mainline. Along with few high priority issues I had demonstrated lot of non critical issues which I had fixed just for the sake of reducing numbers.</p>
<p>He was totally unpleasant with the demo. The question immediately echoed in the walls of the testing lab &#8220;Who asked you to fix the junk issues?&#8221; I replied &#8220;These issues were there in the list for a while and thought of closing it. Though it won&#8217;t help the product much but I feel it&#8217;s easy to focus on few things in our hand and the numbers actually make me uncomfortable&#8221;. He was silent for a while, then smiled and asked me to finish the merge.</p>
<p>As soon as I sent the merge mails to the whole product development group, he immediately called up for a meeting at my desk.</p>
<p>&#8220;Sarath-san, any time if I give this product to some good testers, they could fill up the bug list with the kind of issues you have fixed. You might be thinking that these issues are over but the fact is that we can find N number of issues like these. We are not reporting or I am filtering this in these kind of issues from you to make your life simpler. If you see the list of issues in the bug tracking tool, the numbers can drive you uncomfortable even worse. That&#8217;s the solid reason I am bringing up a single list even we have the bug tracking tool. I just want you guys to focus on the important issues. The issue which we were fixed was high priority few days or weeks back and our priorities have changed and we focused on other important issues. </p>
<p>He continued, &#8220;I can understand that you&#8217;ve fixed these things just to close all the loopholes in the product and also to reduce the numbers&#8221;</p>
<p>He opened the priority sheet which was nothing but a plain excel sheet. &#8220;Yeah I made a mistake. I shouldn&#8217;t have put these lower priority bugs in the main sheet. Just think your software is bug free (free of the low priority issues)&#8221; on saying this, he made the fixed issues in to the closed state and moved all the low priority issues to another tab and asked me to foget about it.</p>
<p>I was relieved and he said &#8220;Just make sure that you&#8217;re working on the highest priority issues.&#8221; Your team might be working on N number of issues but that even should aligned to the priority list we&#8217;ve&#8221;</p>
<p>Once after this incident, I learned how clearly the priorities could help us to achieve what we want and to focus on the issues which is most important to the product.</p>
<p>After this incident, I always focused on the most critical things to deliver. There are people who violates the priorities and focused on the pet stuffs, there are people who never had given information to re-align the priorities and risks. Just hunted them down in a good way.</p>
<p>Making priorities and sticking on it is never micro-managing people. It&#8217;s about sharing the same vision and the most critical things we need to achieve to reach the right quality to ship the product.</p>
<p>The transparency about work is very important. What the going on with everyone helps to identify how one work relates to other and then to derive the critical paths. Identifying the critical path can help us to weigh the priorities and put them in the right order.</p>
<p>Often people ends up with too many high priority issues which could easily spoil the list. It&#8217;s important reflect the priorities in the questions we ask, the meetings we hold and the things people working on.</p>
<p><a href="http://www.scottberkun.com/blog/2012/how-to-make-things-happen/">I&#8217;d like to take Scott Berkun&#8217;s Amazing article to help me with some conclusions. </a></p>
<p>The key take aways from these experiences are<br />
- Priorities simply make things happen. The goals, requirements and must be grouped, aligned and prioritised well. Group the other activities whenever required.<br />
- The priorities list must organised in to groups and prioritised well. You can make list of things like Features, Bugs, Requirements etc.<br />
- Priorities are dynamic in agile environment. This has to focused and revisited everyday. The priorities could change because of the internal or external factors.<br />
- Make sure that the whole team is shared and aligned to the priorities and most of the time the priorities are aligned and cascaded down from the senior management to meet certain business objectives.<br />
- Learn to say &#8220;No&#8221;. Several people had problem saying NO to people because this can be misinterpreted or contextual.<br />
- Saying no is not a straightforward activity, it must be the result of a quality thinking considering the various factors like business objectives, schedule, budget, technical skills, learning curve of the product or technologies etc.<br />
- It&#8217;s equally important to have a comfortable atmosphere within the team. Then it&#8217;s quite easy to pitch the ideas and convince the people to align to the same direction.<br />
- Be a prioritization machine.</p>

<p><a href="http://feedads.g.doubleclick.net/~a/YH5aN-KQ66A694OW7ZDcda3Ddb8/0/da"><img src="http://feedads.g.doubleclick.net/~a/YH5aN-KQ66A694OW7ZDcda3Ddb8/0/di" border="0" ismap="true"></img></a><br/>
<a href="http://feedads.g.doubleclick.net/~a/YH5aN-KQ66A694OW7ZDcda3Ddb8/1/da"><img src="http://feedads.g.doubleclick.net/~a/YH5aN-KQ66A694OW7ZDcda3Ddb8/1/di" border="0" ismap="true"></img></a></p><div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/SharingMyThoughts?a=fc0SISFJBcU:K9kIoYGUwz4:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/SharingMyThoughts?d=yIl2AUoC8zA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/SharingMyThoughts?a=fc0SISFJBcU:K9kIoYGUwz4:gIN9vFwOqvQ"><img src="http://feeds.feedburner.com/~ff/SharingMyThoughts?i=fc0SISFJBcU:K9kIoYGUwz4:gIN9vFwOqvQ" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/SharingMyThoughts?a=fc0SISFJBcU:K9kIoYGUwz4:qj6IDK7rITs"><img src="http://feeds.feedburner.com/~ff/SharingMyThoughts?d=qj6IDK7rITs" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/SharingMyThoughts?a=fc0SISFJBcU:K9kIoYGUwz4:dnMXMwOfBR0"><img src="http://feeds.feedburner.com/~ff/SharingMyThoughts?d=dnMXMwOfBR0" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/SharingMyThoughts?a=fc0SISFJBcU:K9kIoYGUwz4:Uw9eXibygTk"><img src="http://feeds.feedburner.com/~ff/SharingMyThoughts?i=fc0SISFJBcU:K9kIoYGUwz4:Uw9eXibygTk" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/SharingMyThoughts/~4/fc0SISFJBcU" height="1" width="1"/>]]></content:encoded><description>Everyone loves priority. It helps us to make things happen. Without proper priorities, every project is kind of boat which is lost the direction. Again I am going to talk about a story. One of the products which I have &amp;#8230; &lt;a href="http://codereflect.com/2012/05/19/being-a-prioritization-machine/"&gt;&lt;em&gt;Continue&amp;#160;reading&amp;#160;&lt;span class="meta-nav"&gt;&amp;#8594;&lt;/span&gt;&lt;/em&gt;&lt;/a&gt;</description><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://codereflect.com/2012/05/19/being-a-prioritization-machine/feed/</wfw:commentRss><slash:comments xmlns:slash="http://purl.org/rss/1.0/modules/slash/">0</slash:comments><feedburner:origLink>http://codereflect.com/2012/05/19/being-a-prioritization-machine/</feedburner:origLink></item><item><title>How to change AnkhSVN Merge and Compare Tools?</title><link>http://feedproxy.google.com/~r/SharingMyThoughts/~3/GIwi7FEt7rQ/</link><category>Tips</category><category>tools</category><category>ankhsvn</category><category>kdiff</category><category>source control</category><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">@sarat</dc:creator><pubDate>Fri, 18 May 2012 01:20:56 PDT</pubDate><guid isPermaLink="false">http://codereflect.com/?p=2083</guid><content:encoded xmlns:content="http://purl.org/rss/1.0/modules/content/"><![CDATA[<p><a href="http://ankhsvn.open.collab.net/" target="_blank">AnkhSVN</a> has an excellent integration with almost all version of Visual Studios even the latest VS11 beta as well. But you might find that the default compare and merge tools aren&#8217;t sufficient enough to control it.</p>
<p>It&#8217;s very easy to change. Navigate to <strong>Tools-&gt;Options-&gt;Source Control-&gt;Subversion User Tools</strong></p>
<p>There you can see the list of most famous comparison tools in the list and the status of availability. This makes your life simpler.</p>
<p><a href="http://codereflect.com/assets/vsoptions.png"><img class="size-full wp-image-2085 alignnone" title="vsoptions" src="http://codereflect.com/assets/vsoptions.png" alt="" width="757" height="440" /></a></p>
<p>If you want to configure something which isn&#8217;t there in the list, you have to configure by clicking on the browse (&#8230;) button next to the each of the options which popup a handy dialog with the predefined place holders.</p>
<p><a href="http://codereflect.com/assets/command-editor.png"><img class="size-full wp-image-2084 alignnone" title="command editor" src="http://codereflect.com/assets/command-editor.png" alt="" width="747" height="318" /></a></p>

<p><a href="http://feedads.g.doubleclick.net/~a/whjScBqDHktYRKbYSv3IzmepDk8/0/da"><img src="http://feedads.g.doubleclick.net/~a/whjScBqDHktYRKbYSv3IzmepDk8/0/di" border="0" ismap="true"></img></a><br/>
<a href="http://feedads.g.doubleclick.net/~a/whjScBqDHktYRKbYSv3IzmepDk8/1/da"><img src="http://feedads.g.doubleclick.net/~a/whjScBqDHktYRKbYSv3IzmepDk8/1/di" border="0" ismap="true"></img></a></p><div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/SharingMyThoughts?a=GIwi7FEt7rQ:04Xez5SuXUQ:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/SharingMyThoughts?d=yIl2AUoC8zA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/SharingMyThoughts?a=GIwi7FEt7rQ:04Xez5SuXUQ:gIN9vFwOqvQ"><img src="http://feeds.feedburner.com/~ff/SharingMyThoughts?i=GIwi7FEt7rQ:04Xez5SuXUQ:gIN9vFwOqvQ" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/SharingMyThoughts?a=GIwi7FEt7rQ:04Xez5SuXUQ:qj6IDK7rITs"><img src="http://feeds.feedburner.com/~ff/SharingMyThoughts?d=qj6IDK7rITs" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/SharingMyThoughts?a=GIwi7FEt7rQ:04Xez5SuXUQ:dnMXMwOfBR0"><img src="http://feeds.feedburner.com/~ff/SharingMyThoughts?d=dnMXMwOfBR0" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/SharingMyThoughts?a=GIwi7FEt7rQ:04Xez5SuXUQ:Uw9eXibygTk"><img src="http://feeds.feedburner.com/~ff/SharingMyThoughts?i=GIwi7FEt7rQ:04Xez5SuXUQ:Uw9eXibygTk" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/SharingMyThoughts/~4/GIwi7FEt7rQ" height="1" width="1"/>]]></content:encoded><description>AnkhSVN has an excellent integration with almost all version of Visual Studios even the latest VS11 beta as well. But you might find that the default compare and merge tools aren&amp;#8217;t sufficient enough to control it. It&amp;#8217;s very easy to &amp;#8230; &lt;a href="http://codereflect.com/2012/05/18/how-to-change-ankhsvn-merge-and-compare-tools/"&gt;&lt;em&gt;Continue&amp;#160;reading&amp;#160;&lt;span class="meta-nav"&gt;&amp;#8594;&lt;/span&gt;&lt;/em&gt;&lt;/a&gt;</description><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://codereflect.com/2012/05/18/how-to-change-ankhsvn-merge-and-compare-tools/feed/</wfw:commentRss><slash:comments xmlns:slash="http://purl.org/rss/1.0/modules/slash/">0</slash:comments><feedburner:origLink>http://codereflect.com/2012/05/18/how-to-change-ankhsvn-merge-and-compare-tools/</feedburner:origLink></item><item><title>Sometimes good enough is not enough!</title><link>http://feedproxy.google.com/~r/SharingMyThoughts/~3/KNBWlQtPlXk/</link><category>essays</category><category>Project Management</category><category>Software Engineering</category><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">@sarat</dc:creator><pubDate>Wed, 16 May 2012 12:29:41 PDT</pubDate><guid isPermaLink="false">http://codereflect.com/?p=2037</guid><content:encoded xmlns:content="http://purl.org/rss/1.0/modules/content/"><![CDATA[<p>It was in April 2010, when I was passionately working at client site to meet the pre-release milestones of a project. The pre-release software was intended to get the feedback from the sales team.</p>
<p>The project was almost in a shape. But all we were eagerly waiting to integrate 3D clinical measurement functionality. After several months of work the feasibility was successful and we prototyped and tested with some sample data available.</p>
<p>The integration of this feature started 2 months before the pre-release and we were in a good to go shape. But the hardware and the real-time data can be notorious. The 3D models started showing some problems and incorrect measurements. The team was passionately fixing the issues.</p>
<p>The issues did not end up there. One of our team members found a critical work flow which actually made us to rethink about the fundamental algorithm which fuels up the entire feature and we are almost clueless how to solve this problem. More time was required to integrate the newly found work flow.</p>
<p>I never allowed anybody to negotiate the quality of the product being delivered from our hands. The transparency about the project execution of the project helped me to gain a smooth and comfortable relationship with the customer. But yet, I have decided to integrate the basic feature we have implemented though we won’t be able to cover the new workflows found.</p>
<p>In the business point of view this particular feature has took a major portion of our fund and time. It’s important to show up the value as we are closing to pre-release stage. At the same time the issues have been properly communicated to customer. What works, what’s broken, what are the things we are clueless about were explained in detail.</p>
<p>Customer simply put a simple statement “Sarath-san, don’t integrate this feature, focus on other issues”. But I was not really happy about it because first is the business perspsective of it and the second is the hard work of few folks for several months! I was optimistic that we can integrate the fundamental feature within 1-2 weeks! I knew I was compromising. But I could not ignore my team’s hard work.</p>
<p>Customer smiled and left. Next day he came with the product manager and called me up for a meeting. He asked me to explain about this particular problem and he said if possible, he wanted to help to solve the problem. I repeated with all details.</p>
<p>He thought for a while and replied me<br />
“Sarath-san, I would suggest you to remove this feature for this pre-release. I appreciate your hard work for this project and I am so happy about how the project turned out so far”</p>
<p>I said “Yeah but I am optimistic about it. I hope we can integrate it by next week. But there are some items which we need more time to fix. But the fundamental things are good go!”</p>
<p>He smiled and replied “Sarath-san, relax. Just think everything else other than this is high quality. The broken features can invite the risks from inside or outside. Tomorrow testers can report the issues and eventually we have to turn it down. The same thing can happen from the marketing team. Additionally the workflow of the product will be even more complex and we’re going to bet on something which we are not 100% confident about it. So rethink about it”</p>
<p>To ease up my perplexed mind, he said “Some other products we are deploying in this product isn’t ready. We can bring up these folks and you can have your demo later and at that time we can show our real guts!”</p>
<p>I was convinced and we focused on the fundamental features and had a great time demonstrating the feature.</p>
<p>Often good enough is not really enough to go. Things could be worse in the bigger perspective! If we’re willing to alter your standards from situation to situation, we’re going to have a tough time ahead. Compromise always send us back to square one and raise questions about our own talent and the quality of work we produce!</p>

<p><a href="http://feedads.g.doubleclick.net/~a/_Y-SDbiC3DIwEvi1JCVaM-G4_nQ/0/da"><img src="http://feedads.g.doubleclick.net/~a/_Y-SDbiC3DIwEvi1JCVaM-G4_nQ/0/di" border="0" ismap="true"></img></a><br/>
<a href="http://feedads.g.doubleclick.net/~a/_Y-SDbiC3DIwEvi1JCVaM-G4_nQ/1/da"><img src="http://feedads.g.doubleclick.net/~a/_Y-SDbiC3DIwEvi1JCVaM-G4_nQ/1/di" border="0" ismap="true"></img></a></p><div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/SharingMyThoughts?a=KNBWlQtPlXk:B31l-5iAVgk:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/SharingMyThoughts?d=yIl2AUoC8zA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/SharingMyThoughts?a=KNBWlQtPlXk:B31l-5iAVgk:gIN9vFwOqvQ"><img src="http://feeds.feedburner.com/~ff/SharingMyThoughts?i=KNBWlQtPlXk:B31l-5iAVgk:gIN9vFwOqvQ" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/SharingMyThoughts?a=KNBWlQtPlXk:B31l-5iAVgk:qj6IDK7rITs"><img src="http://feeds.feedburner.com/~ff/SharingMyThoughts?d=qj6IDK7rITs" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/SharingMyThoughts?a=KNBWlQtPlXk:B31l-5iAVgk:dnMXMwOfBR0"><img src="http://feeds.feedburner.com/~ff/SharingMyThoughts?d=dnMXMwOfBR0" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/SharingMyThoughts?a=KNBWlQtPlXk:B31l-5iAVgk:Uw9eXibygTk"><img src="http://feeds.feedburner.com/~ff/SharingMyThoughts?i=KNBWlQtPlXk:B31l-5iAVgk:Uw9eXibygTk" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/SharingMyThoughts/~4/KNBWlQtPlXk" height="1" width="1"/>]]></content:encoded><description>It was in April 2010, when I was passionately working at client site to meet the pre-release milestones of a project. The pre-release software was intended to get the feedback from the sales team. The project was almost in a &amp;#8230; &lt;a href="http://codereflect.com/2012/05/17/sometimes-good-enough-is-not-enough/"&gt;&lt;em&gt;Continue&amp;#160;reading&amp;#160;&lt;span class="meta-nav"&gt;&amp;#8594;&lt;/span&gt;&lt;/em&gt;&lt;/a&gt;</description><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://codereflect.com/2012/05/17/sometimes-good-enough-is-not-enough/feed/</wfw:commentRss><slash:comments xmlns:slash="http://purl.org/rss/1.0/modules/slash/">0</slash:comments><feedburner:origLink>http://codereflect.com/2012/05/17/sometimes-good-enough-is-not-enough/</feedburner:origLink></item><item><title>The curious behavior of CFileDialog::GetFolderPath function</title><link>http://feedproxy.google.com/~r/SharingMyThoughts/~3/CYu9LbkOEc0/</link><category>C++</category><category>code</category><category>MFC</category><category>Tips</category><category>Visual C++</category><category>Visual Studio</category><category>Visual Studio 2010</category><category>Win32</category><category>Code</category><category>vs2008</category><category>vs2010</category><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">@sarat</dc:creator><pubDate>Tue, 20 Mar 2012 23:51:23 PDT</pubDate><guid isPermaLink="false">http://codereflect.com/?p=2010</guid><content:encoded xmlns:content="http://purl.org/rss/1.0/modules/content/"><![CDATA[<p>In most of the implementations to get the folder path of the selected file from a file dialog, people tend implement their own implementation to find the last “\” character and trim the string. CFileDialog::GetFolderPath in fact it exposes the very same functionality but it shows different behavior across platform and MFC libraries.</p>
<p>The typical usage of a file dialog would be as follows</p>
<pre>CFileDialog f (true);
if( IDOK == f.DoModal())
{
   CString str = f.GetFolderPath();
}</pre>
<p>If you compile this code with Visual Studio 2008 and above the code will succeeds and give you the folder of the filename selected by the user. But if you compile the code with MFC version 8.0 (VS 2005) or the prior version the code you will eventually you will reach in exception.<br />
On stepping in to the code, you can see the following code with the MFC 8.0 implementation.</p>
<pre>CString strResult;

ASSERT(::IsWindow(m_hWnd));
ASSERT(m_ofn.Flags &amp; OFN_EXPLORER);

if (GetParent()-&gt;SendMessage(CDM_GETFOLDERPATH, (WPARAM)MAX_PATH, (LPARAM)strResult.GetBuffer(MAX_PATH)) &lt; 0)
	strResult.Empty();
else
	strResult.ReleaseBuffer();
return strResult;</pre>
<p>The internal implementation uses the typical window messaging system. The return of the message points to the string buffer which will be copied to the CString object and will be returned.<br />
Though GetFolderPath can’t be used in a typical scenario, it can be used when you’ve your own implementation of the CFileDialog. You can use them in the internal callbacks and own implementations of override-able function as long as the window is being displayed.<br />
E.g. see an implementation in a class derived from CFileDialog. Here the window is active. The call CFileDialog::OnOK will destroy the window object in the end.</p>
<pre>void MyFileDialog::OnOK()
{
	CString str = GetFolderPath();

	// Do something like some validation
	MessageBox( str );
	CFileDialog::OnOK();
}</pre>
<h2>Changes in Windows Vista</h2>
<p>In Windows Vista and above there are there several new shell interfaces introduced with extended functionality. The new changes in the file dialog and the Windows shell are incorporated in the new IFileDialog implementation. These interfaces are nothing but lightweight COM object and not part of MFC library. To provide the backward compatibility while exploiting the new features in the platform, Microsoft has changed the MFC implementation of CFileDialog with the help of using IFileDialog interface.<br />
The constructor of the new CFileDialog now takes a new (default) parameter in the end called bVistaStyle. Inside the constructor of CFileDialog, the m_bVistaStyle parameter is set with this input parameter and the whole implementation of CFileDialog is implemented with condition checks. If it’s Vista Style File dialog, IFileDialog interface will be used throughout the life of the object.</p>
<blockquote><p><a href="http://msdn.microsoft.com/en-us/library/dk77e5e7(v=vs.90).aspx" target="_blank">See the description from MSDN</a></p>
<p>Both the appearance and the functionality of the CFileDialog with Windows Vista differ from the earlier versions of Windows. The default CFileDialog automatically uses the new Windows Vista style without code changes if a program is compiled and run under Windows Vista. Use the bVistaStyle parameter in the constructor to manually override this automatic update.</p></blockquote>
<p>Obviously the old Open and Save file dialog API based implementations are remained intact and wrapped around with m_bVistaStyle condition check. You can find the implementation in the dlgfile.cpp (located underVC\atlmfc\src\mfc ).</p>
<p>Visual Studio 2008 (MFC 9.0) library has incorporated the above mentioned changes and behave properly.</p>
<p>For instance you can clearly see the code for GetFolderPath with the latest version of MFC library here. You can clearly see it uses m_pIFileDialog member of the class being used to get the folder path. The previous implementation is wrapped in the else case.</p>
<pre>CString CFileDialog::GetFolderPath() const
{
	CString strResult;
	if (m_bVistaStyle == TRUE)
	{
		IShellItem *psiResult;
		HRESULT hr = (static_cast(m_pIFileDialog))-&gt;GetFolder(&amp;psiResult);
		if (SUCCEEDED(hr))
		{
			LPWSTR wcFolderPath = NULL;
			hr = psiResult-&gt;GetDisplayName(SIGDN_FILESYSPATH, &amp;wcFolderPath);
			if (SUCCEEDED(hr))
			{
				strResult = wcFolderPath;
				CoTaskMemFree(wcFolderPath);
			}
			psiResult-&gt;Release();
		}
	}
	else
	{
		ASSERT(::IsWindow(m_hWnd));
		ASSERT(m_ofn.Flags &amp; OFN_EXPLORER);

		if (GetParent()-&gt;SendMessage(CDM_GETFOLDERPATH, (WPARAM)MAX_PATH, (LPARAM)strResult.GetBuffer(MAX_PATH)) &lt; 0)
			strResult.Empty();
		else
			strResult.ReleaseBuffer();
	}
	return strResult;
}</pre>
<h2>Conclusion</h2>
<p>You can make use of this call if you’re using Visual Studio 2008 (MFC 9.0) and above, you’re passing bVistaStyle as true in the constructor and the platform is Windows Vista and above. Also If it’s not required to provide backward compatibility, you can make use of IFileDialog interface than using CFileDialog class.</p>
<h2>Links</h2>
<p><a href="http://msdn.microsoft.com/en-us/library/xz5y6xhy(v=vs.90).aspx" target="_blank">CFileDialog::GetFolderPath</a><br />
<a href="http://msdn.microsoft.com/en-us/library/windows/desktop/bb775966(v=vs.85).aspx" target="_blank">IFileDialog interface</a></p>

<p><a href="http://feedads.g.doubleclick.net/~a/qtdES8OvKFOJMOFDmV8YToGyw6Y/0/da"><img src="http://feedads.g.doubleclick.net/~a/qtdES8OvKFOJMOFDmV8YToGyw6Y/0/di" border="0" ismap="true"></img></a><br/>
<a href="http://feedads.g.doubleclick.net/~a/qtdES8OvKFOJMOFDmV8YToGyw6Y/1/da"><img src="http://feedads.g.doubleclick.net/~a/qtdES8OvKFOJMOFDmV8YToGyw6Y/1/di" border="0" ismap="true"></img></a></p><div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/SharingMyThoughts?a=CYu9LbkOEc0:IQpugXoYau0:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/SharingMyThoughts?d=yIl2AUoC8zA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/SharingMyThoughts?a=CYu9LbkOEc0:IQpugXoYau0:gIN9vFwOqvQ"><img src="http://feeds.feedburner.com/~ff/SharingMyThoughts?i=CYu9LbkOEc0:IQpugXoYau0:gIN9vFwOqvQ" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/SharingMyThoughts?a=CYu9LbkOEc0:IQpugXoYau0:qj6IDK7rITs"><img src="http://feeds.feedburner.com/~ff/SharingMyThoughts?d=qj6IDK7rITs" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/SharingMyThoughts?a=CYu9LbkOEc0:IQpugXoYau0:dnMXMwOfBR0"><img src="http://feeds.feedburner.com/~ff/SharingMyThoughts?d=dnMXMwOfBR0" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/SharingMyThoughts?a=CYu9LbkOEc0:IQpugXoYau0:Uw9eXibygTk"><img src="http://feeds.feedburner.com/~ff/SharingMyThoughts?i=CYu9LbkOEc0:IQpugXoYau0:Uw9eXibygTk" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/SharingMyThoughts/~4/CYu9LbkOEc0" height="1" width="1"/>]]></content:encoded><description>In most of the implementations to get the folder path of the selected file from a file dialog, people tend implement their own implementation to find the last “\” character and trim the string. CFileDialog::GetFolderPath in fact it exposes the &amp;#8230; &lt;a href="http://codereflect.com/2012/03/21/the-curious-behavior-of-cfiledialoggetfolderpath-function/"&gt;&lt;em&gt;Continue&amp;#160;reading&amp;#160;&lt;span class="meta-nav"&gt;&amp;#8594;&lt;/span&gt;&lt;/em&gt;&lt;/a&gt;</description><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://codereflect.com/2012/03/21/the-curious-behavior-of-cfiledialoggetfolderpath-function/feed/</wfw:commentRss><slash:comments xmlns:slash="http://purl.org/rss/1.0/modules/slash/">0</slash:comments><feedburner:origLink>http://codereflect.com/2012/03/21/the-curious-behavior-of-cfiledialoggetfolderpath-function/</feedburner:origLink></item><item><title>How to capture the Debug Trace from Win32 Services?</title><link>http://feedproxy.google.com/~r/SharingMyThoughts/~3/tDFQ3piF3Y0/</link><category>Tips</category><category>tools</category><category>Troubleshooting</category><category>troubleshooting</category><category>WinDBG</category><category>Windows</category><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">@sarat</dc:creator><pubDate>Wed, 15 Feb 2012 01:15:45 PST</pubDate><guid isPermaLink="false">http://codereflect.com/?p=1857</guid><content:encoded xmlns:content="http://purl.org/rss/1.0/modules/content/"><![CDATA[<p>This is a simply entry level tip but extremely helpful for the beginners.</p>
<p>Most of the people are familiar withthe famous Debug Trace tool <a href="http://technet.microsoft.com/en-us/sysinternals/bb896647" target="_blank">Debug View</a> which is one of the best and popular tools from Sysinternals (Part of Microsoft Now)</p>
<p>Download and launch DebugView with administrator privilege (choose Run as Administrator )</p>
<p>Enable <code>Capture-&gt;Capture Global Win32 <code>from the menu bar.</code></code></p>
<p><a href="http://codereflect.com/assets/DbgView1.png"><img class="alignleft size-full wp-image-1859" title="DbgView" src="http://codereflect.com/assets/DbgView1.png" alt="" width="381" height="245" /></a></p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>You can alternatively do this from elevated command prompt or explorer using <code>WinDbg.exe /g </code></p>
<p>&nbsp;</p>

<p><a href="http://feedads.g.doubleclick.net/~a/j5H293tsYuLpsurBTenwrueK1Wc/0/da"><img src="http://feedads.g.doubleclick.net/~a/j5H293tsYuLpsurBTenwrueK1Wc/0/di" border="0" ismap="true"></img></a><br/>
<a href="http://feedads.g.doubleclick.net/~a/j5H293tsYuLpsurBTenwrueK1Wc/1/da"><img src="http://feedads.g.doubleclick.net/~a/j5H293tsYuLpsurBTenwrueK1Wc/1/di" border="0" ismap="true"></img></a></p><div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/SharingMyThoughts?a=tDFQ3piF3Y0:05qakjexYeU:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/SharingMyThoughts?d=yIl2AUoC8zA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/SharingMyThoughts?a=tDFQ3piF3Y0:05qakjexYeU:gIN9vFwOqvQ"><img src="http://feeds.feedburner.com/~ff/SharingMyThoughts?i=tDFQ3piF3Y0:05qakjexYeU:gIN9vFwOqvQ" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/SharingMyThoughts?a=tDFQ3piF3Y0:05qakjexYeU:qj6IDK7rITs"><img src="http://feeds.feedburner.com/~ff/SharingMyThoughts?d=qj6IDK7rITs" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/SharingMyThoughts?a=tDFQ3piF3Y0:05qakjexYeU:dnMXMwOfBR0"><img src="http://feeds.feedburner.com/~ff/SharingMyThoughts?d=dnMXMwOfBR0" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/SharingMyThoughts?a=tDFQ3piF3Y0:05qakjexYeU:Uw9eXibygTk"><img src="http://feeds.feedburner.com/~ff/SharingMyThoughts?i=tDFQ3piF3Y0:05qakjexYeU:Uw9eXibygTk" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/SharingMyThoughts/~4/tDFQ3piF3Y0" height="1" width="1"/>]]></content:encoded><description>This is a simply entry level tip but extremely helpful for the beginners. Most of the people are familiar withthe famous Debug Trace tool Debug View which is one of the best and popular tools from Sysinternals (Part of Microsoft Now) &amp;#8230; &lt;a href="http://codereflect.com/2012/02/15/how-to-capture-the-debug-trace-from-win32-services/"&gt;&lt;em&gt;Continue&amp;#160;reading&amp;#160;&lt;span class="meta-nav"&gt;&amp;#8594;&lt;/span&gt;&lt;/em&gt;&lt;/a&gt;</description><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://codereflect.com/2012/02/15/how-to-capture-the-debug-trace-from-win32-services/feed/</wfw:commentRss><slash:comments xmlns:slash="http://purl.org/rss/1.0/modules/slash/">0</slash:comments><feedburner:origLink>http://codereflect.com/2012/02/15/how-to-capture-the-debug-trace-from-win32-services/</feedburner:origLink></item><item><title>How to Install Windows Phone 7 tools on Windows Server 2008?</title><link>http://feedproxy.google.com/~r/SharingMyThoughts/~3/qtd_K6b-FCw/</link><category>Tips</category><category>Troubleshooting</category><category>Troubleshoot</category><category>Windows Phone 7</category><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">@sarat</dc:creator><pubDate>Wed, 08 Feb 2012 00:58:33 PST</pubDate><guid isPermaLink="false">http://codereflect.com/?p=1853</guid><content:encoded xmlns:content="http://purl.org/rss/1.0/modules/content/"><![CDATA[<p>By default Windows Phone 7 tools are allowed to install on Desktop operating systems Windows 7 and Windows Vista. I am working with a server box and not really comfortable to install another OS even as VM to do this.</p>
<p>A small configuration hack can help you to install Windows Phone 7 tools with Windows Server 2008.</p>
<p><a href="http://create.msdn.com/en-US/" target="_blank">Download Windows Phone 7 tools from MSDN website</a><br />
Extract downloaded vm_web.exe (or vm_web2.exe) using some unzip tools or using self extraction option by<br />
<code><br />
 vm_web2.exe /x<br />
</code><br />
Find and open baseline.dat file from extracted folder (It&#8217;s formatted as INI file. Use Notepad to open it)<br />
Navigate to section <code>gencomp7788</code><br />
Change <code>InstallOnLHS</code> and <code>InstallOnWin7Server</code> to <code>0</code></p>
<p>Run the extracted setup using<br />
<code> setup.exe /web </code></p>

<p><a href="http://feedads.g.doubleclick.net/~a/USdmh_8UyQfPjrpESNShjmKGwFM/0/da"><img src="http://feedads.g.doubleclick.net/~a/USdmh_8UyQfPjrpESNShjmKGwFM/0/di" border="0" ismap="true"></img></a><br/>
<a href="http://feedads.g.doubleclick.net/~a/USdmh_8UyQfPjrpESNShjmKGwFM/1/da"><img src="http://feedads.g.doubleclick.net/~a/USdmh_8UyQfPjrpESNShjmKGwFM/1/di" border="0" ismap="true"></img></a></p><div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/SharingMyThoughts?a=qtd_K6b-FCw:WIthqXjeE5Q:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/SharingMyThoughts?d=yIl2AUoC8zA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/SharingMyThoughts?a=qtd_K6b-FCw:WIthqXjeE5Q:gIN9vFwOqvQ"><img src="http://feeds.feedburner.com/~ff/SharingMyThoughts?i=qtd_K6b-FCw:WIthqXjeE5Q:gIN9vFwOqvQ" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/SharingMyThoughts?a=qtd_K6b-FCw:WIthqXjeE5Q:qj6IDK7rITs"><img src="http://feeds.feedburner.com/~ff/SharingMyThoughts?d=qj6IDK7rITs" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/SharingMyThoughts?a=qtd_K6b-FCw:WIthqXjeE5Q:dnMXMwOfBR0"><img src="http://feeds.feedburner.com/~ff/SharingMyThoughts?d=dnMXMwOfBR0" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/SharingMyThoughts?a=qtd_K6b-FCw:WIthqXjeE5Q:Uw9eXibygTk"><img src="http://feeds.feedburner.com/~ff/SharingMyThoughts?i=qtd_K6b-FCw:WIthqXjeE5Q:Uw9eXibygTk" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/SharingMyThoughts/~4/qtd_K6b-FCw" height="1" width="1"/>]]></content:encoded><description>By default Windows Phone 7 tools are allowed to install on Desktop operating systems Windows 7 and Windows Vista. I am working with a server box and not really comfortable to install another OS even as VM to do this. &amp;#8230; &lt;a href="http://codereflect.com/2012/02/08/how-to-install-windows-phone-7-tools-on-windows-server-2008/"&gt;&lt;em&gt;Continue&amp;#160;reading&amp;#160;&lt;span class="meta-nav"&gt;&amp;#8594;&lt;/span&gt;&lt;/em&gt;&lt;/a&gt;</description><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://codereflect.com/2012/02/08/how-to-install-windows-phone-7-tools-on-windows-server-2008/feed/</wfw:commentRss><slash:comments xmlns:slash="http://purl.org/rss/1.0/modules/slash/">0</slash:comments><feedburner:origLink>http://codereflect.com/2012/02/08/how-to-install-windows-phone-7-tools-on-windows-server-2008/</feedburner:origLink></item><item><title>Make sure there’s no dirty picture – Have a good big picture!</title><link>http://feedproxy.google.com/~r/SharingMyThoughts/~3/4aT8tjvsnsk/</link><category>Articles</category><category>essays</category><category>Software Engineering</category><category>Tips</category><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">@sarat</dc:creator><pubDate>Wed, 07 Dec 2011 09:34:43 PST</pubDate><guid isPermaLink="false">http://codereflect.com/?p=1840</guid><content:encoded xmlns:content="http://purl.org/rss/1.0/modules/content/"><![CDATA[<p>Few years back I had worked with a Japanese customer for a health care imaging project at their site. I was relatively new to the domain. Most of the development team was there in India. </p>
<p>We had some solid requirements and prototyping on some new features. I had demonstrated one of the prototypes integrated to the product which essentially play back the images aligned to the ECG cycle acquired from the cardiac patient. The feature helps the sonographer to export the data as AVI. I simply tested the feature and quickly setup the demo as we’ve already crossed the deadline. Things were working just fine. This I had already seen in the prototype earlier. Fine. I demonstrated the feature successfully and was happy about it. I requested him to to try the new feature to get more feedback from him. He happily took over the system.</p>
<p>He simply registered a patient, then acquired the images along with ECG. He went on reviewing the acquired images, then he exported the cycles as AVI to the patient. He quit the application and opened the patient browser if appears under the current patient. Yea it’s there. I dint feel anything bad when he registered one more patient and start the application again. (Application won’t quit, it will be residing in memory always. They simply hide the window and release the resources and keeps on waiting for commands from parent application). He did the very same procedure again. It was working I was happy again. The progress bar has been displayed again and finished the export. Then he took the patient browser once more. Surprisingly the data wasn’t there under the current patient.</p>
<p>As I knew the code base well, I figured out within seconds what made it to disappear the data. I told him “I’m sorry, the new patient event not handled well. The code isn’t resetting/replacing the patient ID with new one. I can fix this. It’s just one line modification” and I was about to go back to my desk to modify the source.</p>
<p>He stopped me and smiled and explained, “Sarath-san, are you realizing that this is a serious security issue?” I could not fully understand what he really meant with security issue. </p>
<p>I did not reply. He continued “For programmers, it’s a one line code modification which takes to fix this issue. But think from a customer perspective. If you went a hospital with some small chest pain and the next patient is coming with some serious cardiac problem and what if his data being exported to your ID, then the doctor gives you the wrong treatment?” </p>
<p>The example was perfect. I could not think of a major heart surgery because of a system/sonographer’s mistake. That was kind of eye opener. Even after all these years I still remember the story. </p>
<p>Most of the time, programmers are either instructed to do some part of the code without having understanding of the impact. To make and maintain better software, it is also important to understand what is the big picture. What is the real impact. Always remember the issues being found during the development time is easy to fix, once it’s delivered to the customer site, the cost will be N times more, depends on the number of customers we’ve and the cost of deploying the patches. It starts from requirement capturing to implementation. It’s responsibility of the person who captures the requirements to test/inform the major uses cases, aspect and impact of the features. On the other hand, when we’re implementing something, it’s solely our responsibility to properly understand the requirement, big picture of this requirements and the impact area. It’s equally important to do regression testing to make sure that the existing functionalities aren’t broken. </p>
<p>When less competent people leads these activity there’s a high chance to have the information in pockets and do not explain the requirements properly to make sure that they’ve better control over the project (trust me, there are people). But that is actually making the product and themselves worse. Also it’s developers responsibility to bug the people enough to get maximum information and clarify the requirements. </p>

<p><a href="http://feedads.g.doubleclick.net/~a/ilcVVj-evfG33rCTPUoN5lD7wzw/0/da"><img src="http://feedads.g.doubleclick.net/~a/ilcVVj-evfG33rCTPUoN5lD7wzw/0/di" border="0" ismap="true"></img></a><br/>
<a href="http://feedads.g.doubleclick.net/~a/ilcVVj-evfG33rCTPUoN5lD7wzw/1/da"><img src="http://feedads.g.doubleclick.net/~a/ilcVVj-evfG33rCTPUoN5lD7wzw/1/di" border="0" ismap="true"></img></a></p><div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/SharingMyThoughts?a=4aT8tjvsnsk:R5Vj25fmVLU:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/SharingMyThoughts?d=yIl2AUoC8zA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/SharingMyThoughts?a=4aT8tjvsnsk:R5Vj25fmVLU:gIN9vFwOqvQ"><img src="http://feeds.feedburner.com/~ff/SharingMyThoughts?i=4aT8tjvsnsk:R5Vj25fmVLU:gIN9vFwOqvQ" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/SharingMyThoughts?a=4aT8tjvsnsk:R5Vj25fmVLU:qj6IDK7rITs"><img src="http://feeds.feedburner.com/~ff/SharingMyThoughts?d=qj6IDK7rITs" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/SharingMyThoughts?a=4aT8tjvsnsk:R5Vj25fmVLU:dnMXMwOfBR0"><img src="http://feeds.feedburner.com/~ff/SharingMyThoughts?d=dnMXMwOfBR0" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/SharingMyThoughts?a=4aT8tjvsnsk:R5Vj25fmVLU:Uw9eXibygTk"><img src="http://feeds.feedburner.com/~ff/SharingMyThoughts?i=4aT8tjvsnsk:R5Vj25fmVLU:Uw9eXibygTk" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/SharingMyThoughts/~4/4aT8tjvsnsk" height="1" width="1"/>]]></content:encoded><description>Few years back I had worked with a Japanese customer for a health care imaging project at their site. I was relatively new to the domain. Most of the development team was there in India. We had some solid requirements &amp;#8230; &lt;a href="http://codereflect.com/2011/12/07/make-sure-theres-no-dirty-picture-have-a-good-big-picture/"&gt;&lt;em&gt;Continue&amp;#160;reading&amp;#160;&lt;span class="meta-nav"&gt;&amp;#8594;&lt;/span&gt;&lt;/em&gt;&lt;/a&gt;</description><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://codereflect.com/2011/12/07/make-sure-theres-no-dirty-picture-have-a-good-big-picture/feed/</wfw:commentRss><slash:comments xmlns:slash="http://purl.org/rss/1.0/modules/slash/">3</slash:comments><feedburner:origLink>http://codereflect.com/2011/12/07/make-sure-theres-no-dirty-picture-have-a-good-big-picture/</feedburner:origLink></item><item><title>C++: Erase-Remove Idiom</title><link>http://feedproxy.google.com/~r/SharingMyThoughts/~3/NdcqZnVwXXI/</link><category>C++</category><category>code</category><category>STL</category><category>Tips</category><category>Visual C++</category><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">@sarat</dc:creator><pubDate>Tue, 22 Nov 2011 05:10:10 PST</pubDate><guid isPermaLink="false">http://codereflect.com/?p=1832</guid><content:encoded xmlns:content="http://purl.org/rss/1.0/modules/content/"><![CDATA[<p>Erase-remove idiom is a common technique to eliminate the elements from a C++ STL container which satisfies a particular condition.</p>
<p>We can do the hand written loop to remove the elements from the container. For e.g. if you want to remove an element vector you can do something as below. (note erasing element from a C++ container within a standard for or while loop with simple iterator++ will end up undefined result)</p>
<pre>
vector<int>::iterator it = vec.begin();
while(it != vec.end())
     if( *it == 5 )
         it = vec.erase(it); // Remove and take the return of the erase function to safely reassign
     else
         ++it;
</pre>
<p>The above code is simple as it appears, it simply iterate through the elements and find if a match there for the value then remove it from the container. And it takes back the value returned form <code>erase</code> where it returns the iterator of the next element. If no more elements, it will <code>vector::end</code> </p>
<p>Now, the containers will have different implementations for the same function. A <code>map::erase</code> return <code>void</code>. So it&#8217;s difficult to give a single and easy strategy for each type of containers.</p>
<p><a href="http://www.cplusplus.com/reference/algorithm/remove/" target="_blank"><code>remove</code></a> is a handy function defined in <code>algorthm</code> It&#8217;s easy to get confused to know what it does and distinguish between <code>erase</code>. <code>remove</code> remove (move) the elements from the given range. Mostly push it towards the end of the container. The function returns an iterator to the location where the moved elements located within the container. It essentially won&#8217;t remove the elements as such from the container. Here is the sample demo of using <code>remove</code></p>
<pre>
// remove algorithm example
#include <algorithm>
using namespace std;

int main ()
{
  int data[] = {10,20,30,30,20,10,10,20};      // 10 20 30 30 20 10 10 20

  // bounds of range:
  int* pbegin = data;                          // ^
  int* pend = data+sizeof(data)/sizeof(int);   // ^                       ^

  pend = remove (pbegin, pend, 20); // 10 30 30 10 10 ?  ?  ?
                                    // ^              ^

  return 0;
}
</pre>
<p>Now this handy function has an alternative version to give a comparator function which can accept the object of the type specified for the container. Inside the function, you can make decision to remove or not by specifying in the return value. In simple words, rather giving a comparison hard coded value, we&#8217;ll give a function to make decision for us. <a href="http://www.cplusplus.com/reference/algorithm/remove_if/" target="_blank">See the documentation and example here.</a></p>
<p>Erase-Remove tequenique is accomplished in following ways.<br />
1. Move the elements to be removed to the end with the help of <code>remove</code> function<br />
2. Take the return of <code>remove</code> and pass to the <code>erase</code> function as beginning and containers::end as end.<br />
3. Finally the contianer will contains the elements which are not satisfying the comparator function/value.</p>
<pre>
#include <vector> // the general-purpose vector container
#include <algorithm> // remove and remove_if

bool is_odd(int i) { // unary predicate returning true if and only if the argument is odd
  return i % 2;
}
bool is_even(int i) { // unary predicate returning true if and only if the argument is even
  return !is_odd(i);
}

int main() {
  using namespace std;
  int elements[] = {0, 1, 2, 3, 4, 5, 6, 7, 8, 9 };
  // create a vector that holds the numbers from 0-9.
  vector<int> v(elements, elements + 10); 

  // use the erase-remove idiom to remove all elements with the value 5
  v.erase(remove(v.begin(), v.end(), 5), v.end()); 

  // use the erase-remove idiom to remove all odd numbers
  v.erase( remove_if(v.begin(), v.end(), is_odd), v.end() );

  // use the erase-remove idiom to remove all even numbers
  v.erase( remove_if(v.begin(), v.end(), is_even), v.end() );
}
</pre>
<p>Reference:<br />
<a href="http://en.wikipedia.org/wiki/Erase-remove_idiom" target="_blank">Erase-remove idiom</a></p>

<p><a href="http://feedads.g.doubleclick.net/~a/ymgwLwbdRcw2gWafE9unkx0AliY/0/da"><img src="http://feedads.g.doubleclick.net/~a/ymgwLwbdRcw2gWafE9unkx0AliY/0/di" border="0" ismap="true"></img></a><br/>
<a href="http://feedads.g.doubleclick.net/~a/ymgwLwbdRcw2gWafE9unkx0AliY/1/da"><img src="http://feedads.g.doubleclick.net/~a/ymgwLwbdRcw2gWafE9unkx0AliY/1/di" border="0" ismap="true"></img></a></p><div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/SharingMyThoughts?a=NdcqZnVwXXI:GkVzg_zrBEo:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/SharingMyThoughts?d=yIl2AUoC8zA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/SharingMyThoughts?a=NdcqZnVwXXI:GkVzg_zrBEo:gIN9vFwOqvQ"><img src="http://feeds.feedburner.com/~ff/SharingMyThoughts?i=NdcqZnVwXXI:GkVzg_zrBEo:gIN9vFwOqvQ" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/SharingMyThoughts?a=NdcqZnVwXXI:GkVzg_zrBEo:qj6IDK7rITs"><img src="http://feeds.feedburner.com/~ff/SharingMyThoughts?d=qj6IDK7rITs" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/SharingMyThoughts?a=NdcqZnVwXXI:GkVzg_zrBEo:dnMXMwOfBR0"><img src="http://feeds.feedburner.com/~ff/SharingMyThoughts?d=dnMXMwOfBR0" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/SharingMyThoughts?a=NdcqZnVwXXI:GkVzg_zrBEo:Uw9eXibygTk"><img src="http://feeds.feedburner.com/~ff/SharingMyThoughts?i=NdcqZnVwXXI:GkVzg_zrBEo:Uw9eXibygTk" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/SharingMyThoughts/~4/NdcqZnVwXXI" height="1" width="1"/>]]></content:encoded><description>Erase-remove idiom is a common technique to eliminate the elements from a C++ STL container which satisfies a particular condition. We can do the hand written loop to remove the elements from the container. For e.g. if you want to &amp;#8230; &lt;a href="http://codereflect.com/2011/11/22/c-erase-remove-idiom/"&gt;&lt;em&gt;Continue&amp;#160;reading&amp;#160;&lt;span class="meta-nav"&gt;&amp;#8594;&lt;/span&gt;&lt;/em&gt;&lt;/a&gt;</description><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://codereflect.com/2011/11/22/c-erase-remove-idiom/feed/</wfw:commentRss><slash:comments xmlns:slash="http://purl.org/rss/1.0/modules/slash/">0</slash:comments><feedburner:origLink>http://codereflect.com/2011/11/22/c-erase-remove-idiom/</feedburner:origLink></item></channel></rss>

