<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>kr1zz &#187; C++</title>
	<atom:link href="http://www.cristianonattero.com/blog/tag/c/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.cristianonattero.com/blog</link>
	<description>Cristiano Nattero</description>
	<lastBuildDate>Tue, 07 Feb 2012 11:44:57 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>Unavailable Visual Studio Intellisense in C++ projetcs</title>
		<link>http://www.cristianonattero.com/blog/2009/11/10/unavailable-visual-studio-intellisense-in-c-projetcs/</link>
		<comments>http://www.cristianonattero.com/blog/2009/11/10/unavailable-visual-studio-intellisense-in-c-projetcs/#comments</comments>
		<pubDate>Tue, 10 Nov 2009 10:08:10 +0000</pubDate>
		<dc:creator>kr1zz</dc:creator>
				<category><![CDATA[geek]]></category>
		<category><![CDATA[C++]]></category>
		<category><![CDATA[Intellisense]]></category>
		<category><![CDATA[microsoft]]></category>
		<category><![CDATA[troubleshoot]]></category>
		<category><![CDATA[Visual Studio]]></category>

		<guid isPermaLink="false">http://www.cristianonattero.com/blog/?p=898</guid>
		<description><![CDATA[Sometimes, in C++ projects, Visual Studio IntelliSense stops working with apparently no reasons. There are many official and non official guides on how to troubleshoot it and they almost always say that, given some conditions are respected, if IntelliSense doesn&#8217;t work, it is suggested to delete its database to let Visual Studio rebuilds it. To [...]]]></description>
			<content:encoded><![CDATA[<p>Sometimes, in <strong>C++ projects</strong>, <strong><a title="famous Microfsoft Integrated Development Environment" href="http://en.wikipedia.org/wiki/Microsoft_Visual_Studio" target="_blank">Visual Studio</a> <a title="Microsoft Visual Studio autocompletion" href="http://en.wikipedia.org/wiki/IntelliSense" target="_blank">IntelliSense</a> stops working</strong> with apparently no reasons. There are many official and non official <a title="your friend google will lead to them" href="http://www.google.it/search?q=visual+studio+intellisense+troubleshoot+c%2B%2B" target="_blank">guides on how to <strong>troubleshoot</strong> it</a> and they almost always say that, given some conditions are respected, if <strong>IntelliSense doesn&#8217;t work</strong>, it is suggested to <a title="in the official guide" href="http://msdn.microsoft.com/en-us/library/ms235519.aspx" target="_blank">delete its database to let Visual Studio rebuilds it</a>. To be able to do it, it is necessary to close the current solution, otherwise windows wouldn&#8217;t allow the access to the .ncb file.</p>
<p>However this procedure apparently doesn&#8217;t work for me. <span id="more-898"></span>I have found that I also need to close the IDE and do something else. Here it follows the &#8211; at least for me &#8211; working sequence:</p>
<ol>
<li>clean the solution</li>
<li>close the solution</li>
<li>close Visual Studio</li>
<li>delete the .ncb file</li>
<li>open Visual Studio</li>
<li>load the solution and <strong>clean it again</strong></li>
<li>rebuild the solution</li>
</ol>
<p>What I find particularly annoying is that after a while the buggy IntelliSense goes crazy again and I have to stop working and repeat the whole sequence again. That&#8217;s a notable waste of time! <img src='http://www.cristianonattero.com/blog/wp-includes/images/smilies/icon_sad.gif' alt=':-(' class='wp-smiley' /> </p>
<p>I have reproduces this problem on some computers, with VS 2005 and 2008, and with XP and Vista, but only with unmanaged C++. I haven&#8217;t tried managed C++, while a colleague of mine says it doesn&#8217;t happen with C#.</p>
<p>Comments or &#8211; possibly useful <img src='http://www.cristianonattero.com/blog/wp-includes/images/smilies/icon_wink.gif' alt=';-)' class='wp-smiley' />  &#8211; suggestions?</p>
]]></content:encoded>
			<wfw:commentRss>http://www.cristianonattero.com/blog/2009/11/10/unavailable-visual-studio-intellisense-in-c-projetcs/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>double-check your damn pointers, okay?</title>
		<link>http://www.cristianonattero.com/blog/2008/02/13/double-check-your-damn-pointers-okay/</link>
		<comments>http://www.cristianonattero.com/blog/2008/02/13/double-check-your-damn-pointers-okay/#comments</comments>
		<pubDate>Wed, 13 Feb 2008 08:42:40 +0000</pubDate>
		<dc:creator>kr1zz</dc:creator>
				<category><![CDATA[geek]]></category>
		<category><![CDATA[me]]></category>
		<category><![CDATA[C++]]></category>
		<category><![CDATA[debug]]></category>
		<category><![CDATA[LinkedIn]]></category>
		<category><![CDATA[memory leak]]></category>
		<category><![CDATA[programmazione]]></category>
		<category><![CDATA[tesi]]></category>

		<guid isPermaLink="false">http://cristianonattero.com/blog/2008/02/13/double-check-your-damn-pointers-okay/</guid>
		<description><![CDATA[Yesterday, working on my thesis, I felt like I died and resurrected more than once in a few hours. Trust me, I&#8217;m beginning to understand the way the compiler feels  
Jokes apart, the following C++ code contains a bug similar to the one I found: can you spot it? (please forgive the bad indent [...]]]></description>
			<content:encoded><![CDATA[<p>Yesterday, working on my thesis, I felt like I died and resurrected more than once in a few hours. Trust me, I&#8217;m beginning to understand the <a title="see it on xkcd" href="http://xkcd.com/371/">way the compiler feels</a> <img src='http://www.cristianonattero.com/blog/wp-includes/images/smilies/icon_wink.gif' alt=';-)' class='wp-smiley' /> </p>
<p>Jokes apart, the following C++ code contains a bug similar to the one I found: can you spot it? (please forgive the bad indent )</p>
<p><code>void calledMethod( some_class *object )<br />
{<br />
arg = doSomething();<br />
delete object;<br />
object = new some_class( arg );<br />
}</code></p>
<p><code>void callerMethod()<br />
{<br />
[...]<br />
calledMethod( anObject );<br />
anObject.doSomethingElse();<br />
[...]<br />
}</code></p>
]]></content:encoded>
			<wfw:commentRss>http://www.cristianonattero.com/blog/2008/02/13/double-check-your-damn-pointers-okay/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>funziona?</title>
		<link>http://www.cristianonattero.com/blog/2008/02/04/funziona/</link>
		<comments>http://www.cristianonattero.com/blog/2008/02/04/funziona/#comments</comments>
		<pubDate>Mon, 04 Feb 2008 23:02:14 +0000</pubDate>
		<dc:creator>kr1zz</dc:creator>
				<category><![CDATA[geek]]></category>
		<category><![CDATA[me]]></category>
		<category><![CDATA[C++]]></category>
		<category><![CDATA[DARP]]></category>
		<category><![CDATA[Dial-A-Ride]]></category>
		<category><![CDATA[LinkedIn]]></category>
		<category><![CDATA[metaeuristica]]></category>
		<category><![CDATA[nerd]]></category>
		<category><![CDATA[programmazione]]></category>
		<category><![CDATA[ricerca operativa]]></category>
		<category><![CDATA[solver]]></category>
		<category><![CDATA[tesi]]></category>

		<guid isPermaLink="false">http://cristianonattero.com/blog/2008/02/04/funziona/</guid>
		<description><![CDATA[Non vorrei cantare vittoria prima del tempo, però da quando ha iniziato a funzionare la mia tesi ha continuato a dare segnali sempre più incoraggianti.
Per onorare il titolo di nerd conferitami ufficialmente oggi da Fra, ecco un riassunto, un po&#8217; hardcore, sui primi esperimenti col mio solver metaeuristico per il Dial-A-Ride Problem.


Primo: la soluzione iniziale [...]]]></description>
			<content:encoded><![CDATA[<p>Non vorrei cantare vittoria prima del tempo, però da quando ha iniziato a funzionare la mia tesi ha continuato a dare segnali sempre più incoraggianti.</p>
<p>Per onorare il titolo di <strong>nerd</strong> conferitami ufficialmente oggi da Fra, ecco un riassunto, un po&#8217; hardcore, sui primi esperimenti col mio <strong>solver metaeuristico</strong> per il <strong>Dial-A-Ride Problem</strong>.</p>
<p><span id="more-17"></span></p>
<ul>
<li>Primo: la soluzione iniziale è una soluzione di tutto rispetto, non solo è ammissibile ma sembrerebbe sensata.</li>
<li>Secondo: l&#8217;euristica costruttiva che uso per generarla è parente di quella usata dal programma che il mio andrà a sostituire, le soluzioni dovrebbero quindi essere paragonabili. Sul dataset su cui ci stiamo confrontando il solver vecchio impiega circa un&#8217;ora, il mio circa trenta secondi. Merito dell&#8217;algoritmo ma anche merito del C++, voglio vedere chi mi dice che non si usa più <img src='http://www.cristianonattero.com/blog/wp-includes/images/smilies/icon_wink.gif' alt=';-)' class='wp-smiley' /> </li>
<li>Terzo: venerdì, prima di andare a casa, abbiamo fatto partire un run da 25mila iterazioni. Ne è uscito un log da ben 18MB! Volevo rimandare a domattina ma non ho resistito: ho appena finito di esaminarlo. È una lettura interessante solo per gli amanti del genere, e forse per chi soffre di insonna: è terribilmente grezzo, pieno di informazioni sulla memoria. C&#8217;è ancora un piccolo memory leak, ma non grave. Il programma è arrivato in fondo senza schiantarsi, ed è  già un risultato rassicurante. Inoltre ha lasciato non servite solo 9 richieste su 676. Il costo delle soluzioni è sceso di quasi due ordini di grandezza: difficile dire ora se sia tanto o poco, senza risultati di riferimento.</li>
</ul>
<p>Da domani sera dovrei riuscire a produrre un output più dettagliato, magari riesco a pubblicare anche qualche grafico. Nel frattempo vorrei:</p>
<ol>
<li>misurare le soluzioni trovate dal solver vecchio usando il mio modello (penso di non dover scrivere ancora molto codice);</li>
<li>vedere su un GIS come sono fatte queste soluzioni e confrontare i percorsi (qui il mio ruolo è marginale)</li>
<li>confrontare lo scheduling delle richieste su una timeline.</li>
</ol>
<p>Direi che a quel punto ci sarà materiale a sufficienza per una bella tesi. Tardi, ma un po&#8217; di soddisfazione forse arriva.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.cristianonattero.com/blog/2008/02/04/funziona/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
	</channel>
</rss>

