<?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>Wed, 07 Dec 2011 10:18:37 PST</lastBuildDate><generator>http://wordpress.org/?v=3.3.1</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>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 and prototyping on some new features. I had demonstrated one of the prototypes integrated to [...]</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 remove an element vector you can do something as below. (note erasing element from a [...]</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><item><title>Visual Studio 2011 IDE advancements</title><link>http://feedproxy.google.com/~r/SharingMyThoughts/~3/t84ktGbvV6M/</link><category>Uncategorized</category><category>tools</category><category>Visual Studio 2011</category><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">@sarat</dc:creator><pubDate>Thu, 17 Nov 2011 21:58:30 PST</pubDate><guid isPermaLink="false">http://codereflect.com/?p=1827</guid><content:encoded xmlns:content="http://purl.org/rss/1.0/modules/content/"><![CDATA[<p>New Visual Studio is around the corner. Microsoft Corporate Division VC, Somasegar has given a sneak peak to new IDE features in his blog.</p>
<p>I find this is promising. Especially, with Visual Studio 2010, we&#8217;ve found completely revamped architecture for extending Visual Studio. On the other hand, Whole Tomato is a company, which had shown what customers really wanted out of Visual Studio. Their Visual Assist X plugin is an excellent piece of art. There are other famous guys who sells similar softwares like DevExpress. But I personally prefer VA, because it&#8217;s light weight and not leaving much confusions with cluttered interfaces like others. </p>
<p>Visual Studio Power Tools is another awesome free option to improve your productivity. But I believe Microsoft can do well with their IDEs. Ever since Visual Studio 2003, we&#8217;ve not gained anything better out of Microsoft IDEs. Almost 8 years, though Microsoft has introduced a bunch of technologies and language improvements especially for C#, the IDE remains a substandard for the world&#8217;s biggest developer community.</p>
<p>Visual Studio 2011 is a positive improvement where the art of search with regular expression integrated well with to find information quickly.</p>
<p><a href="http://blogs.msdn.com/b/somasegar/archive/2011/11/17/visual-studio-11-ide-advances.aspx" target="_blank">Read the full scoop here in Soma&#8217;s blog</a></p>
<p><img alt="" src="https://byfiles.storage.live.com/y1pD_3RCoCOZUnxiLh8-EPRexlZtvIYjwnzsBbrquFs4GKrRr4GFyvOKZa4RJqizv4StuUcMzWGkEc/image6.png?psid=1" title="Visual Studio 2011" class="alignnone" width="524" height="204" /></p>

<p><a href="http://feedads.g.doubleclick.net/~a/Q1TsXUdnFH7zW7G3u-8ZEssVXdQ/0/da"><img src="http://feedads.g.doubleclick.net/~a/Q1TsXUdnFH7zW7G3u-8ZEssVXdQ/0/di" border="0" ismap="true"></img></a><br/>
<a href="http://feedads.g.doubleclick.net/~a/Q1TsXUdnFH7zW7G3u-8ZEssVXdQ/1/da"><img src="http://feedads.g.doubleclick.net/~a/Q1TsXUdnFH7zW7G3u-8ZEssVXdQ/1/di" border="0" ismap="true"></img></a></p><div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/SharingMyThoughts?a=t84ktGbvV6M:71VdCio2gJc:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/SharingMyThoughts?d=yIl2AUoC8zA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/SharingMyThoughts?a=t84ktGbvV6M:71VdCio2gJc:gIN9vFwOqvQ"><img src="http://feeds.feedburner.com/~ff/SharingMyThoughts?i=t84ktGbvV6M:71VdCio2gJc:gIN9vFwOqvQ" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/SharingMyThoughts?a=t84ktGbvV6M:71VdCio2gJc:qj6IDK7rITs"><img src="http://feeds.feedburner.com/~ff/SharingMyThoughts?d=qj6IDK7rITs" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/SharingMyThoughts?a=t84ktGbvV6M:71VdCio2gJc:dnMXMwOfBR0"><img src="http://feeds.feedburner.com/~ff/SharingMyThoughts?d=dnMXMwOfBR0" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/SharingMyThoughts?a=t84ktGbvV6M:71VdCio2gJc:Uw9eXibygTk"><img src="http://feeds.feedburner.com/~ff/SharingMyThoughts?i=t84ktGbvV6M:71VdCio2gJc:Uw9eXibygTk" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/SharingMyThoughts/~4/t84ktGbvV6M" height="1" width="1"/>]]></content:encoded><description>New Visual Studio is around the corner. Microsoft Corporate Division VC, Somasegar has given a sneak peak to new IDE features in his blog. I find this is promising. Especially, with Visual Studio 2010, we&amp;#8217;ve found completely revamped architecture for extending Visual Studio. On the other hand, Whole Tomato is a company, which had shown [...]</description><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://codereflect.com/2011/11/18/visual-studio-2011-ide-advancements/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/18/visual-studio-2011-ide-advancements/</feedburner:origLink></item><item><title>WinDBG: How to list call stack of all threads in managed dump/application?</title><link>http://feedproxy.google.com/~r/SharingMyThoughts/~3/qdrVTcckL7c/</link><category>Debugging</category><category>WinDBG</category><category>debug</category><category>tools</category><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">@sarat</dc:creator><pubDate>Wed, 16 Nov 2011 03:48:06 PST</pubDate><guid isPermaLink="false">http://codereflect.com/?p=1824</guid><content:encoded xmlns:content="http://purl.org/rss/1.0/modules/content/"><![CDATA[<p>Even before analyzing the dump using <code>!analyze</code> with a crash/hang dump, I really wanted to see all threads call stack in a single shot. Mostly I use <code>~*kb</code> to list the call stack with all threads for a native application/dump with WinDBG.</p>
<p>But WinDBG and .NET call stacks aren&#8217;t in a good sync. We will have to load SOS.dll or SOSEX.dll to get better help with debugging.</p>
<p>You can use <code>!EEStack</code> of SOS.dll to display call stack of all threads.</p>
<p><code><br />
.load C:\Windows\Microsoft.NET\Framework\v2.0.50727\SOS.dll<br />
!EEStack<br />
</code></p>

<p><a href="http://feedads.g.doubleclick.net/~a/04c0zsDvYMsYeXr6p5FuNtsIp5k/0/da"><img src="http://feedads.g.doubleclick.net/~a/04c0zsDvYMsYeXr6p5FuNtsIp5k/0/di" border="0" ismap="true"></img></a><br/>
<a href="http://feedads.g.doubleclick.net/~a/04c0zsDvYMsYeXr6p5FuNtsIp5k/1/da"><img src="http://feedads.g.doubleclick.net/~a/04c0zsDvYMsYeXr6p5FuNtsIp5k/1/di" border="0" ismap="true"></img></a></p><div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/SharingMyThoughts?a=qdrVTcckL7c:ZH7vBupfJ9I:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/SharingMyThoughts?d=yIl2AUoC8zA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/SharingMyThoughts?a=qdrVTcckL7c:ZH7vBupfJ9I:gIN9vFwOqvQ"><img src="http://feeds.feedburner.com/~ff/SharingMyThoughts?i=qdrVTcckL7c:ZH7vBupfJ9I:gIN9vFwOqvQ" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/SharingMyThoughts?a=qdrVTcckL7c:ZH7vBupfJ9I:qj6IDK7rITs"><img src="http://feeds.feedburner.com/~ff/SharingMyThoughts?d=qj6IDK7rITs" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/SharingMyThoughts?a=qdrVTcckL7c:ZH7vBupfJ9I:dnMXMwOfBR0"><img src="http://feeds.feedburner.com/~ff/SharingMyThoughts?d=dnMXMwOfBR0" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/SharingMyThoughts?a=qdrVTcckL7c:ZH7vBupfJ9I:Uw9eXibygTk"><img src="http://feeds.feedburner.com/~ff/SharingMyThoughts?i=qdrVTcckL7c:ZH7vBupfJ9I:Uw9eXibygTk" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/SharingMyThoughts/~4/qdrVTcckL7c" height="1" width="1"/>]]></content:encoded><description>Even before analyzing the dump using !analyze with a crash/hang dump, I really wanted to see all threads call stack in a single shot. Mostly I use ~*kb to list the call stack with all threads for a native application/dump with WinDBG. But WinDBG and .NET call stacks aren&amp;#8217;t in a good sync. We will [...]</description><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://codereflect.com/2011/11/16/windbg-how-to-list-call-stack-of-all-threads-in-managed-dumpapplication/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/16/windbg-how-to-list-call-stack-of-all-threads-in-managed-dumpapplication/</feedburner:origLink></item><item><title>Code Analysis – Visual C++ 2011</title><link>http://feedproxy.google.com/~r/SharingMyThoughts/~3/7XOQOewdWqE/</link><category>C++</category><category>C++ 0x</category><category>code</category><category>Visual Studio 2011</category><category>Code analysis</category><category>VS2011</category><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">@sarat</dc:creator><pubDate>Wed, 09 Nov 2011 11:20:52 PST</pubDate><guid isPermaLink="false">http://codereflect.com/?p=1778</guid><content:encoded xmlns:content="http://purl.org/rss/1.0/modules/content/"><![CDATA[<p>Microsoft finally including code analysis to detect the problematic code that could lead to crash and create security woes.</p>
<p>•Fixing a bug early avoids wasted time debugging strange crashes or reliability issues later on.<br />
•Fixing a bug early avoids resetting/repeating testing after a bug is fixed late in the development cycle.<br />
•Fixing a bug early avoids the complexities associated with fixing it if it is exposed after the application ships.</p>
<p>The Security Science team with the Microsoft Security Engineering Centre (MSEC) worked closely with the Visual Studio Code Analysis team to ensure that the Visual Studio Developer Preview includes as many of the SDL mandatory C/C++ Code Analysis warnings as possible. These are the security-related warnings that Microsoft considers critical to fix for internal C/C++ software development. </p>
<p>This feature is included in Visual Studio 2011 Express as well.</p>
<p><a href="http://blogs.msdn.com/b/sdl/archive/2011/10/19/code-analysis-for-all.aspx" target="_blank">read more</a></p>
<p><iframe style="height:544px;width:960px" src="http://channel9.msdn.com/Events/BUILD/BUILD2011/TOOL-100T/player?w=960&#038;h=544" frameBorder="0" scrolling="no" ></iframe></p>

<p><a href="http://feedads.g.doubleclick.net/~a/H6eTWuf2rPkSKQa411SgKJOs6R8/0/da"><img src="http://feedads.g.doubleclick.net/~a/H6eTWuf2rPkSKQa411SgKJOs6R8/0/di" border="0" ismap="true"></img></a><br/>
<a href="http://feedads.g.doubleclick.net/~a/H6eTWuf2rPkSKQa411SgKJOs6R8/1/da"><img src="http://feedads.g.doubleclick.net/~a/H6eTWuf2rPkSKQa411SgKJOs6R8/1/di" border="0" ismap="true"></img></a></p><div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/SharingMyThoughts?a=7XOQOewdWqE:P8C0HnnCCDs:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/SharingMyThoughts?d=yIl2AUoC8zA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/SharingMyThoughts?a=7XOQOewdWqE:P8C0HnnCCDs:gIN9vFwOqvQ"><img src="http://feeds.feedburner.com/~ff/SharingMyThoughts?i=7XOQOewdWqE:P8C0HnnCCDs:gIN9vFwOqvQ" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/SharingMyThoughts?a=7XOQOewdWqE:P8C0HnnCCDs:qj6IDK7rITs"><img src="http://feeds.feedburner.com/~ff/SharingMyThoughts?d=qj6IDK7rITs" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/SharingMyThoughts?a=7XOQOewdWqE:P8C0HnnCCDs:dnMXMwOfBR0"><img src="http://feeds.feedburner.com/~ff/SharingMyThoughts?d=dnMXMwOfBR0" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/SharingMyThoughts?a=7XOQOewdWqE:P8C0HnnCCDs:Uw9eXibygTk"><img src="http://feeds.feedburner.com/~ff/SharingMyThoughts?i=7XOQOewdWqE:P8C0HnnCCDs:Uw9eXibygTk" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/SharingMyThoughts/~4/7XOQOewdWqE" height="1" width="1"/>]]></content:encoded><description>Microsoft finally including code analysis to detect the problematic code that could lead to crash and create security woes. •Fixing a bug early avoids wasted time debugging strange crashes or reliability issues later on. •Fixing a bug early avoids resetting/repeating testing after a bug is fixed late in the development cycle. •Fixing a bug early [...]</description><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://codereflect.com/2011/11/10/code-analysis-visual-c-2011/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/10/code-analysis-visual-c-2011/</feedburner:origLink></item><item><title>Graphics Debugging in Visual Studio 2011</title><link>http://feedproxy.google.com/~r/SharingMyThoughts/~3/8MfHchsB1T0/</link><category>direct2D</category><category>Visual C++</category><category>Visual Studio</category><category>Visual Studio 2010</category><category>Visual Studio 2011</category><category>D2D</category><category>D3D</category><category>links</category><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">@sarat</dc:creator><pubDate>Wed, 09 Nov 2011 09:35:49 PST</pubDate><guid isPermaLink="false">http://codereflect.com/?p=1776</guid><content:encoded xmlns:content="http://purl.org/rss/1.0/modules/content/"><![CDATA[<p>Metro style games and graphics-intensive apps present a huge opportunity for developers on new devices such as tablets. The primary API for accessing the full power of the underlying graphics hardware on Windows is <strong>DirectX 11</strong> (including <strong>Direct3D</strong> and <strong>Direct2D</strong>).</p>
<p>One of the most significant innovations we have brought to Visual Studio 11 is a series of tools for assisting you in developing Direct3D games. We made a quick video of some of these features on Channel9 (<a href="http://channel9.msdn.com/posts/Visual-Studio-vNext-DirectX-11-Development-Experience" target="_blank">link</a>). In this post, I will walk through our debugging &amp; diagnostics support for D3D.</p>
<p>The new <strong>Graphics Debugger</strong> in Visual Studio is a debugging and analysis tool that captures detailed information from a Direct3D application as it executes. You can use it to:</p>
<ul>
<li>Capture rendered frames for later inspection and analysis.</li>
<li>View DirectX events and their effects on the application.</li>
<li>View 3D meshes before and after vertex shader transformations.</li>
<li>Discover which DirectX events contribute to the color of a specific pixel.</li>
<li>Jump directly to the location in source code for a particular DirectX call</li>
</ul>
<div><strong><a href="http://blogs.msdn.com/b/vcblog/archive/2011/11/08/10235150.aspx" target="_blank">Read more from Visual C++ Team Blog </a></strong></div>
<div><img class="alignnone" src="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-65-69-metablogapi/7713.image27_5F00_thumb_5F00_210F27F9.png" alt="" width="644" height="370" /></div>

<p><a href="http://feedads.g.doubleclick.net/~a/p416zHx3WwToEr9vA6rSTDlYKHQ/0/da"><img src="http://feedads.g.doubleclick.net/~a/p416zHx3WwToEr9vA6rSTDlYKHQ/0/di" border="0" ismap="true"></img></a><br/>
<a href="http://feedads.g.doubleclick.net/~a/p416zHx3WwToEr9vA6rSTDlYKHQ/1/da"><img src="http://feedads.g.doubleclick.net/~a/p416zHx3WwToEr9vA6rSTDlYKHQ/1/di" border="0" ismap="true"></img></a></p><div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/SharingMyThoughts?a=8MfHchsB1T0:-F7FF8HGuhk:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/SharingMyThoughts?d=yIl2AUoC8zA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/SharingMyThoughts?a=8MfHchsB1T0:-F7FF8HGuhk:gIN9vFwOqvQ"><img src="http://feeds.feedburner.com/~ff/SharingMyThoughts?i=8MfHchsB1T0:-F7FF8HGuhk:gIN9vFwOqvQ" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/SharingMyThoughts?a=8MfHchsB1T0:-F7FF8HGuhk:qj6IDK7rITs"><img src="http://feeds.feedburner.com/~ff/SharingMyThoughts?d=qj6IDK7rITs" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/SharingMyThoughts?a=8MfHchsB1T0:-F7FF8HGuhk:dnMXMwOfBR0"><img src="http://feeds.feedburner.com/~ff/SharingMyThoughts?d=dnMXMwOfBR0" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/SharingMyThoughts?a=8MfHchsB1T0:-F7FF8HGuhk:Uw9eXibygTk"><img src="http://feeds.feedburner.com/~ff/SharingMyThoughts?i=8MfHchsB1T0:-F7FF8HGuhk:Uw9eXibygTk" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/SharingMyThoughts/~4/8MfHchsB1T0" height="1" width="1"/>]]></content:encoded><description>Metro style games and graphics-intensive apps present a huge opportunity for developers on new devices such as tablets. The primary API for accessing the full power of the underlying graphics hardware on Windows is DirectX 11 (including Direct3D and Direct2D). One of the most significant innovations we have brought to Visual Studio 11 is a series of tools for assisting [...]</description><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://codereflect.com/2011/11/09/graphics-debugging-in-visual-studio-2011/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/09/graphics-debugging-in-visual-studio-2011/</feedburner:origLink></item><item><title>How to run a program with administrative privilege using keyboard shortcuts?</title><link>http://feedproxy.google.com/~r/SharingMyThoughts/~3/QKDS5geHkqo/</link><category>Tips</category><category>Explorer</category><category>Windows 7</category><category>Windows 8</category><category>Windows Vista</category><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">@sarat</dc:creator><pubDate>Sun, 06 Nov 2011 22:44:31 PST</pubDate><guid isPermaLink="false">http://codereflect.com/?p=1772</guid><content:encoded xmlns:content="http://purl.org/rss/1.0/modules/content/"><![CDATA[<p><strong>Simple Version</strong></p>
<ul>
<li>Find the program from the start menu</li>
<li>Simply press Ctrl+Shift+Enter</li>
</ul>
<p><strong>Detailed</strong></p>
<p>I was fed up on right-clicking programs and choose &#8220;Run As Administrator&#8221; to run in the elevated mode. I can simply set the properties of any programs in Vista/Windows 7 to always run as administrator. Or simply you can turn of UAC, in the worst case I can turn of few services to make explorer to run as administrator always.</p>
<p><a href="http://codereflect.com/assets/Find.png"><img class="alignleft size-full wp-image-1773" title="Find" src="http://codereflect.com/assets/Find.png" alt="" width="409" height="228" /></a></p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>But rather I prefer to use</p>
<ul>
<li>Find the program from the start menu</li>
<li>Simply press Ctrl+Shift+Enter</li>
</ul>
<div>You can run any programs in elevated mode using this shortcut!</div>

<p><a href="http://feedads.g.doubleclick.net/~a/mydMImgfT0FHp8C7ytin4wlaK58/0/da"><img src="http://feedads.g.doubleclick.net/~a/mydMImgfT0FHp8C7ytin4wlaK58/0/di" border="0" ismap="true"></img></a><br/>
<a href="http://feedads.g.doubleclick.net/~a/mydMImgfT0FHp8C7ytin4wlaK58/1/da"><img src="http://feedads.g.doubleclick.net/~a/mydMImgfT0FHp8C7ytin4wlaK58/1/di" border="0" ismap="true"></img></a></p><div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/SharingMyThoughts?a=QKDS5geHkqo:2b_HBqRYLzg:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/SharingMyThoughts?d=yIl2AUoC8zA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/SharingMyThoughts?a=QKDS5geHkqo:2b_HBqRYLzg:gIN9vFwOqvQ"><img src="http://feeds.feedburner.com/~ff/SharingMyThoughts?i=QKDS5geHkqo:2b_HBqRYLzg:gIN9vFwOqvQ" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/SharingMyThoughts?a=QKDS5geHkqo:2b_HBqRYLzg:qj6IDK7rITs"><img src="http://feeds.feedburner.com/~ff/SharingMyThoughts?d=qj6IDK7rITs" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/SharingMyThoughts?a=QKDS5geHkqo:2b_HBqRYLzg:dnMXMwOfBR0"><img src="http://feeds.feedburner.com/~ff/SharingMyThoughts?d=dnMXMwOfBR0" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/SharingMyThoughts?a=QKDS5geHkqo:2b_HBqRYLzg:Uw9eXibygTk"><img src="http://feeds.feedburner.com/~ff/SharingMyThoughts?i=QKDS5geHkqo:2b_HBqRYLzg:Uw9eXibygTk" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/SharingMyThoughts/~4/QKDS5geHkqo" height="1" width="1"/>]]></content:encoded><description>Simple Version Find the program from the start menu Simply press Ctrl+Shift+Enter Detailed I was fed up on right-clicking programs and choose &amp;#8220;Run As Administrator&amp;#8221; to run in the elevated mode. I can simply set the properties of any programs in Vista/Windows 7 to always run as administrator. Or simply you can turn of UAC, [...]</description><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://codereflect.com/2011/11/07/how-to-run-a-program-with-administrative-privilege-using-keyboard-shortcuts/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/07/how-to-run-a-program-with-administrative-privilege-using-keyboard-shortcuts/</feedburner:origLink></item><item><title>C# – How to check whether the application running with Administrator privilege?</title><link>http://feedproxy.google.com/~r/SharingMyThoughts/~3/OW4rTIkLms8/</link><category>.NET</category><category>C Sharp</category><category>code</category><category>Tips</category><category>C++</category><category>Windows</category><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">@sarat</dc:creator><pubDate>Tue, 25 Oct 2011 05:35:17 PDT</pubDate><guid isPermaLink="false">http://codereflect.com/?p=1767</guid><content:encoded xmlns:content="http://purl.org/rss/1.0/modules/content/"><![CDATA[<p>A simple snippet can help you</p>
<pre>
using System.Security.Principal;
public bool IsAdmin()
{
    try
    {
        WindowsIdentity user = WindowsIdentity.GetCurrent();
        WindowsPrincipal principal = new WindowsPrincipal(user);
        return principal.IsInRole(WindowsBuiltInRole.Administrator);
    }
    catch (Exception ex)
    {
        MessageBox.Show(ex.Message);
        return false;
    }
}
</pre>

<p><a href="http://feedads.g.doubleclick.net/~a/Bnqx7MQoyVlj8gZ7KLVlPr_60Os/0/da"><img src="http://feedads.g.doubleclick.net/~a/Bnqx7MQoyVlj8gZ7KLVlPr_60Os/0/di" border="0" ismap="true"></img></a><br/>
<a href="http://feedads.g.doubleclick.net/~a/Bnqx7MQoyVlj8gZ7KLVlPr_60Os/1/da"><img src="http://feedads.g.doubleclick.net/~a/Bnqx7MQoyVlj8gZ7KLVlPr_60Os/1/di" border="0" ismap="true"></img></a></p><div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/SharingMyThoughts?a=OW4rTIkLms8:1-gZsllUzL4:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/SharingMyThoughts?d=yIl2AUoC8zA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/SharingMyThoughts?a=OW4rTIkLms8:1-gZsllUzL4:gIN9vFwOqvQ"><img src="http://feeds.feedburner.com/~ff/SharingMyThoughts?i=OW4rTIkLms8:1-gZsllUzL4:gIN9vFwOqvQ" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/SharingMyThoughts?a=OW4rTIkLms8:1-gZsllUzL4:qj6IDK7rITs"><img src="http://feeds.feedburner.com/~ff/SharingMyThoughts?d=qj6IDK7rITs" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/SharingMyThoughts?a=OW4rTIkLms8:1-gZsllUzL4:dnMXMwOfBR0"><img src="http://feeds.feedburner.com/~ff/SharingMyThoughts?d=dnMXMwOfBR0" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/SharingMyThoughts?a=OW4rTIkLms8:1-gZsllUzL4:Uw9eXibygTk"><img src="http://feeds.feedburner.com/~ff/SharingMyThoughts?i=OW4rTIkLms8:1-gZsllUzL4:Uw9eXibygTk" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/SharingMyThoughts/~4/OW4rTIkLms8" height="1" width="1"/>]]></content:encoded><description>A simple snippet can help you using System.Security.Principal; public bool IsAdmin() { try { WindowsIdentity user = WindowsIdentity.GetCurrent(); WindowsPrincipal principal = new WindowsPrincipal(user); return principal.IsInRole(WindowsBuiltInRole.Administrator); } catch (Exception ex) { MessageBox.Show(ex.Message); return false; } }</description><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://codereflect.com/2011/10/25/c-how-to-check-whether-the-application-running-with-administrator-privilege/feed/</wfw:commentRss><slash:comments xmlns:slash="http://purl.org/rss/1.0/modules/slash/">0</slash:comments><feedburner:origLink>http://codereflect.com/2011/10/25/c-how-to-check-whether-the-application-running-with-administrator-privilege/</feedburner:origLink></item><item><title>Double null check for Singleton classes</title><link>http://feedproxy.google.com/~r/SharingMyThoughts/~3/3xuDXO4i90Y/</link><category>.NET</category><category>C Sharp</category><category>code</category><category>Tips</category><category>C++</category><category>Design Patterns</category><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">@sarat</dc:creator><pubDate>Tue, 25 Oct 2011 02:38:27 PDT</pubDate><guid isPermaLink="false">http://codereflect.com/?p=1761</guid><content:encoded xmlns:content="http://purl.org/rss/1.0/modules/content/"><![CDATA[<p>Singleton is one of the easiest design patterns to implement. Here I am discussing about the overhead we face with lock objects when we have to support Singleton in a multi-threaded environment. </p>
<p>[For the easiness of expressing, I prefer C# over C++.]</p>
<pre>
class FileSystem
{
    public static FileSystem getInstance()
    {
        if( instace == null )
            instace = new FileSystem();
        return instace;
    }
    private static FileSystem instace;
}
</pre>
<p>The above is a simple singleton class. But when the the instance is being accessed from multiple thread, we will have to employ some synchronization mechanisms to avoid the issues. </p>
<pre>
class FileSystem
    {
        public static FileSystem getInstance()
        {
            lock (lockObj)
            {
                if( instace == null )
                {
                    instace = new FileSystem();
                }
                return instace;
            }
        }

        private FileSystem()
        {
        }
        private static FileSystem instace;
        private static object lockObj = new object();
    }
</pre>
<p>Yes we&#8217;ve synchronized it better. Now what&#8217;s the issue, the instance creation is synchronized but this is a single time activity. i.e the instance is created only once by either of the threads. During the life time of the program, the lock which is employed is not really necessary. Each time a thread call <code>FileSystem.getInstance(); </code> it enters the costly <code>lock(lockObj);</code> statement rather than returning the already allocated  object.</p>
<p>How to sort this issue? Double null checking is a famous technique to avoid the overheads caused by the locks for already allocated instance objects.</p>
<p>See a sample implementation</p>
<pre>
namespace DoubleNullCheck
{
    class Program
    {
        static void Main(string[] args)
        {
            for (int i = 0; i < 10; i++)
            {
                Thread t = new Thread(Program.doWork);
                t.Start();
            }

            Thread.Sleep(2000);
            bStop = true;
            Thread.Sleep(1000);
            Console.WriteLine("Exiting...");
        }

        static void doWork()
        {
            while (!Program.bStop)
            {
                FileSystem fs = FileSystem.getInstance();
            }
        }
        public static volatile bool bStop = false;
    }

    // Singleton class
    class FileSystem
    {
        // getInstance with double null check
        public static FileSystem getInstance()
        {
            if( instace == null )
            {
                Console.WriteLine("1 depth null check" + Thread.CurrentThread.ManagedThreadId);
                lock (lockObj)
                {
                    Console.WriteLine("entered lock" + Thread.CurrentThread.ManagedThreadId);
                    if (instace == null)
                    {
                        Console.WriteLine("2 - Newing the object" + Thread.CurrentThread.ManagedThreadId);
                        instace = new FileSystem();
                    }
                    else
                        Console.WriteLine("2 - Ohh thread is already allocated" + Thread.CurrentThread.ManagedThreadId);
                }
            }
            return instace;
        }

        private FileSystem()
        {
        }
        private static FileSystem instace;
        private static object lockObj = new object();
    }
}
</pre>
<p>What happens here?</p>
<p>Thread 1 calls the getInstance() method and determines that instance is null at //1st null check<br />
Thread 1 enters the if block, but is preempted by thread 2<br />
Thread 2 calls the getInstance() method and determines that instance is null at //1st null check<br />
Thread 2 enters the if block and creates a new Singleton object<br />
Thread 2 returns the Singleton object reference<br />
Thread 2 is preempted by thread 1.<br />
Thread 1 continue it's execution and realize that, the object is alrady created (at 2nd null check) and returns<br />
The subsequent calls to getInstance from any threads simply returns the instance after null check</p>
<p>Thus we can improve the overhead of unnecessary lock checking!</p>

<p><a href="http://feedads.g.doubleclick.net/~a/LBOA-QraBA4cv9WEmIJDwxNh5EI/0/da"><img src="http://feedads.g.doubleclick.net/~a/LBOA-QraBA4cv9WEmIJDwxNh5EI/0/di" border="0" ismap="true"></img></a><br/>
<a href="http://feedads.g.doubleclick.net/~a/LBOA-QraBA4cv9WEmIJDwxNh5EI/1/da"><img src="http://feedads.g.doubleclick.net/~a/LBOA-QraBA4cv9WEmIJDwxNh5EI/1/di" border="0" ismap="true"></img></a></p><div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/SharingMyThoughts?a=3xuDXO4i90Y:bF13Lw2EgP0:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/SharingMyThoughts?d=yIl2AUoC8zA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/SharingMyThoughts?a=3xuDXO4i90Y:bF13Lw2EgP0:gIN9vFwOqvQ"><img src="http://feeds.feedburner.com/~ff/SharingMyThoughts?i=3xuDXO4i90Y:bF13Lw2EgP0:gIN9vFwOqvQ" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/SharingMyThoughts?a=3xuDXO4i90Y:bF13Lw2EgP0:qj6IDK7rITs"><img src="http://feeds.feedburner.com/~ff/SharingMyThoughts?d=qj6IDK7rITs" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/SharingMyThoughts?a=3xuDXO4i90Y:bF13Lw2EgP0:dnMXMwOfBR0"><img src="http://feeds.feedburner.com/~ff/SharingMyThoughts?d=dnMXMwOfBR0" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/SharingMyThoughts?a=3xuDXO4i90Y:bF13Lw2EgP0:Uw9eXibygTk"><img src="http://feeds.feedburner.com/~ff/SharingMyThoughts?i=3xuDXO4i90Y:bF13Lw2EgP0:Uw9eXibygTk" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/SharingMyThoughts/~4/3xuDXO4i90Y" height="1" width="1"/>]]></content:encoded><description>Singleton is one of the easiest design patterns to implement. Here I am discussing about the overhead we face with lock objects when we have to support Singleton in a multi-threaded environment. [For the easiness of expressing, I prefer C# over C++.] class FileSystem { public static FileSystem getInstance() { if( instace == null ) [...]</description><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://codereflect.com/2011/10/25/double-null-check-for-singleton-classes/feed/</wfw:commentRss><slash:comments xmlns:slash="http://purl.org/rss/1.0/modules/slash/">5</slash:comments><feedburner:origLink>http://codereflect.com/2011/10/25/double-null-check-for-singleton-classes/</feedburner:origLink></item><item><title>Windows 8 – System wide smartscreen filter</title><link>http://feedproxy.google.com/~r/SharingMyThoughts/~3/qeedRt7fKBM/</link><category>Windows 8</category><category>security</category><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">@sarat</dc:creator><pubDate>Tue, 18 Oct 2011 20:42:58 PDT</pubDate><guid isPermaLink="false">http://codereflect.com/?p=1758</guid><content:encoded xmlns:content="http://purl.org/rss/1.0/modules/content/"><![CDATA[<p>Smartscreen filter is introduced with internet explorer to pro-actively find the malwares, phishinig websites etc. With Windows 8, the smartscreen filter is available system wide. Especially the downloaded files will be verified with smartscreen filter irrelevant of the tool/browser used to download the file. If the smartscreen filter is unreachable, then system would warn the user to open the file with care. </p>
<p>In my best understanding, the smart-screen filter is integrated with Windows Defender which is the built-in  system-wide security service for Windows 8. No other settings are available in the Developer preview to control the settings for the same.</p>

<p><a href="http://feedads.g.doubleclick.net/~a/7d2nCP8kcOVvcMGz_iCBmZoDUs8/0/da"><img src="http://feedads.g.doubleclick.net/~a/7d2nCP8kcOVvcMGz_iCBmZoDUs8/0/di" border="0" ismap="true"></img></a><br/>
<a href="http://feedads.g.doubleclick.net/~a/7d2nCP8kcOVvcMGz_iCBmZoDUs8/1/da"><img src="http://feedads.g.doubleclick.net/~a/7d2nCP8kcOVvcMGz_iCBmZoDUs8/1/di" border="0" ismap="true"></img></a></p><div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/SharingMyThoughts?a=qeedRt7fKBM:MELCYTu2Koc:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/SharingMyThoughts?d=yIl2AUoC8zA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/SharingMyThoughts?a=qeedRt7fKBM:MELCYTu2Koc:gIN9vFwOqvQ"><img src="http://feeds.feedburner.com/~ff/SharingMyThoughts?i=qeedRt7fKBM:MELCYTu2Koc:gIN9vFwOqvQ" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/SharingMyThoughts?a=qeedRt7fKBM:MELCYTu2Koc:qj6IDK7rITs"><img src="http://feeds.feedburner.com/~ff/SharingMyThoughts?d=qj6IDK7rITs" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/SharingMyThoughts?a=qeedRt7fKBM:MELCYTu2Koc:dnMXMwOfBR0"><img src="http://feeds.feedburner.com/~ff/SharingMyThoughts?d=dnMXMwOfBR0" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/SharingMyThoughts?a=qeedRt7fKBM:MELCYTu2Koc:Uw9eXibygTk"><img src="http://feeds.feedburner.com/~ff/SharingMyThoughts?i=qeedRt7fKBM:MELCYTu2Koc:Uw9eXibygTk" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/SharingMyThoughts/~4/qeedRt7fKBM" height="1" width="1"/>]]></content:encoded><description>Smartscreen filter is introduced with internet explorer to pro-actively find the malwares, phishinig websites etc. With Windows 8, the smartscreen filter is available system wide. Especially the downloaded files will be verified with smartscreen filter irrelevant of the tool/browser used to download the file. If the smartscreen filter is unreachable, then system would warn the [...]</description><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://codereflect.com/2011/10/19/windows-8-system-wide-smartscreen-filter/feed/</wfw:commentRss><slash:comments xmlns:slash="http://purl.org/rss/1.0/modules/slash/">0</slash:comments><feedburner:origLink>http://codereflect.com/2011/10/19/windows-8-system-wide-smartscreen-filter/</feedburner:origLink></item></channel></rss>

