<?xml version="1.0" encoding="iso-8859-1"?><!-- generator="b2evolution/1.10.3" -->
<rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:admin="http://webns.net/mvcb/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:content="http://purl.org/rss/1.0/modules/content/">
	<channel>
		<title>Olivier Langlois's blog - Last comments</title>
				<link>http://blog.olivierlanglois.net/index.php?disp=comments</link>
		<description></description>
		<language>en-CA</language>
		<docs>http://backend.userland.com/rss</docs>
		<admin:generatorAgent rdf:resource="http://b2evolution.net/?v=1.10.3"/>
		<ttl>60</ttl>
				<item>
			<title>In response to: Optimizing C++ code for Intel processors (and possibly many others)</title>
			<pubDate>Wed, 15 Aug 2012 03:02:02 +0000</pubDate>
			<dc:creator>Maurizio [Visitor]</dc:creator>
			<guid isPermaLink="false">c4459@http://blog.olivierlanglois.net/</guid>
			<description>if( ptr != NULL )
{
  delete ptr;
  ptr = NULL;
}
should be changed to:

delete ptr;
ptr = NULL;


This is plainly wrong when talking optimizations as the "delete ptr" statement will most likely turn into a function call to the delete operator, which will at the bare minimum check that ptr is not null before looking into the memory heap data structures.</description>
			<content:encoded><![CDATA[if( ptr != NULL )<br />
{<br />
  delete ptr;<br />
  ptr = NULL;<br />
}<br />
should be changed to:<br />
<br />
delete ptr;<br />
ptr = NULL;<br />
<br />
<br />
This is plainly wrong when talking optimizations as the "delete ptr" statement will most likely turn into a function call to the delete operator, which will at the bare minimum check that ptr is not null before looking into the memory heap data structures.]]></content:encoded>
			<link>http://blog.olivierlanglois.net/index.php/2007/11/25/optimizing_c_code_for_intel_processors_a#c4459</link>
		</item>
				<item>
			<title>In response to: Linksys Wireless-N Gaming Router WRT330N model review</title>
			<pubDate>Fri, 02 Sep 2011 06:18:40 +0000</pubDate>
			<dc:creator>RMP [Visitor]</dc:creator>
			<guid isPermaLink="false">c1042@http://blog.olivierlanglois.net/</guid>
			<description>Nice post. It helped me to find the issue why PS3 is hanging when we send media files via chunking..</description>
			<content:encoded><![CDATA[Nice post. It helped me to find the issue why PS3 is hanging when we send media files via chunking..]]></content:encoded>
			<link>http://blog.olivierlanglois.net/index.php/2010/12/05/linksys_wireless_n_gaming_router_wrt330n#c1042</link>
		</item>
				<item>
			<title>In response to: Distributed Systems: Concepts and Design (4th Edition)</title>
			<pubDate>Tue, 24 May 2011 22:55:39 +0000</pubDate>
			<dc:creator>marwan ahmed abdelhady [Visitor]</dc:creator>
			<guid isPermaLink="false">c863@http://blog.olivierlanglois.net/</guid>
			<description>nice book</description>
			<content:encoded><![CDATA[nice book]]></content:encoded>
			<link>http://blog.olivierlanglois.net/index.php/2010/03/28/distributed_systems_concepts_and_design_#c863</link>
		</item>
				<item>
			<title>In response to: Compiler Design in C</title>
			<pubDate>Tue, 17 May 2011 14:01:19 +0000</pubDate>
			<dc:creator>Turbo Pascal Fan [Visitor]</dc:creator>
			<guid isPermaLink="false">c856@http://blog.olivierlanglois.net/</guid>
			<description>Another good resource on compiler design

http://turbopascal.org/</description>
			<content:encoded><![CDATA[Another good resource on compiler design<br />
<br />
http://turbopascal.org/]]></content:encoded>
			<link>http://blog.olivierlanglois.net/index.php/2007/06/02/compiler_design_in_c#c856</link>
		</item>
				<item>
			<title>In response to: NAT traversal for the dummies and the best NAT router for online gaming</title>
			<pubDate>Mon, 21 Mar 2011 06:49:52 +0000</pubDate>
			<dc:creator>lano1106 [Member]</dc:creator>
			<guid isPermaLink="false">c714@http://blog.olivierlanglois.net/</guid>
			<description>I went to see the youtube video for the top 10 gaming routers. I have to disagree with the top 1 choice which is a router that I got problems with:

http://blog.olivierlanglois.net/index.php/2010/12/05/linksys_wireless_n_gaming_router_wrt330n

IMO, Netgear products are of higher quality.
</description>
			<content:encoded><![CDATA[I went to see the youtube video for the top 10 gaming routers. I have to disagree with the top 1 choice which is a router that I got problems with:<br />
<br />
http://blog.olivierlanglois.net/index.php/2010/12/05/linksys_wireless_n_gaming_router_wrt330n<br />
<br />
IMO, Netgear products are of higher quality.<br />
]]></content:encoded>
			<link>http://blog.olivierlanglois.net/index.php/2007/05/23/nat_traversal_for_the_dummies_and_the_be#c714</link>
		</item>
				<item>
			<title>In response to: NAT traversal for the dummies and the best NAT router for online gaming</title>
			<pubDate>Mon, 21 Mar 2011 01:21:51 +0000</pubDate>
			<dc:creator>XBox Repair Chicago [Visitor]</dc:creator>
			<guid isPermaLink="false">c713@http://blog.olivierlanglois.net/</guid>
			<description>Today this problem is almost gone, most routers are now RFC 4787 compliant. Great fix for the problem and those who have older routers can now game in peace. </description>
			<content:encoded><![CDATA[Today this problem is almost gone, most routers are now RFC 4787 compliant. Great fix for the problem and those who have older routers can now game in peace. ]]></content:encoded>
			<link>http://blog.olivierlanglois.net/index.php/2007/05/23/nat_traversal_for_the_dummies_and_the_be#c713</link>
		</item>
				<item>
			<title>In response to: NAT traversal for the dummies and the best NAT router for online gaming</title>
			<pubDate>Tue, 15 Feb 2011 14:32:39 +0000</pubDate>
			<dc:creator>Educational Games Online [Visitor]</dc:creator>
			<guid isPermaLink="false">c676@http://blog.olivierlanglois.net/</guid>
			<description>Check out this vid on Top Routers for Gaming 2011 at http://www.youtube.com/watch?v=kASW1o4hImE. Get some ideas then do some more research after, get the info straight and get it right the first time. </description>
			<content:encoded><![CDATA[Check out this vid on Top Routers for Gaming 2011 at http://www.youtube.com/watch?v=kASW1o4hImE. Get some ideas then do some more research after, get the info straight and get it right the first time. ]]></content:encoded>
			<link>http://blog.olivierlanglois.net/index.php/2007/05/23/nat_traversal_for_the_dummies_and_the_be#c676</link>
		</item>
				<item>
			<title>In response to: Graph breadth-first traversal algorithm C++ implementation</title>
			<pubDate>Tue, 12 Oct 2010 06:10:58 +0000</pubDate>
			<dc:creator>stephen [Visitor]</dc:creator>
			<guid isPermaLink="false">c396@http://blog.olivierlanglois.net/</guid>
			<description>Cool, I thought the interview was an all day affair hence my question about payment.
</description>
			<content:encoded><![CDATA[Cool, I thought the interview was an all day affair hence my question about payment.<br />
]]></content:encoded>
			<link>http://blog.olivierlanglois.net/index.php/2010/08/24/graph_breadth_first_traversal_algorithm_#c396</link>
		</item>
				<item>
			<title>In response to: Graph breadth-first traversal algorithm C++ implementation</title>
			<pubDate>Mon, 11 Oct 2010 19:18:17 +0000</pubDate>
			<dc:creator>lano1106 [Member]</dc:creator>
			<guid isPermaLink="false">c394@http://blog.olivierlanglois.net/</guid>
			<description>Stephen,

You have about 30 minutes, maybe less than that to produce the program. That being said, I am not even sure that I had a working program during the alloted time. and no, they do not pay you for your time like any interviews in any company that I know and IMO, this is the right thing to do.

I have considerably embellished the program once I decided that I would publish it on my website. With all the comments, and all the cool STL usages within the program, I would say that I spent a good evening to bring the program as it is now.
</description>
			<content:encoded><![CDATA[Stephen,<br />
<br />
You have about 30 minutes, maybe less than that to produce the program. That being said, I am not even sure that I had a working program during the alloted time. and no, they do not pay you for your time like any interviews in any company that I know and IMO, this is the right thing to do.<br />
<br />
I have considerably embellished the program once I decided that I would publish it on my website. With all the comments, and all the cool STL usages within the program, I would say that I spent a good evening to bring the program as it is now.<br />
]]></content:encoded>
			<link>http://blog.olivierlanglois.net/index.php/2010/08/24/graph_breadth_first_traversal_algorithm_#c394</link>
		</item>
				<item>
			<title>In response to: Graph breadth-first traversal algorithm C++ implementation</title>
			<pubDate>Mon, 11 Oct 2010 15:01:52 +0000</pubDate>
			<dc:creator>Stephen Reis [Visitor]</dc:creator>
			<guid isPermaLink="false">c393@http://blog.olivierlanglois.net/</guid>
			<description>Never had any interview where I was asked to write a program. Did that take you long to create Olivier; if ever it did facebook paid your time? Just asking out of curiosity.</description>
			<content:encoded><![CDATA[Never had any interview where I was asked to write a program. Did that take you long to create Olivier; if ever it did facebook paid your time? Just asking out of curiosity.]]></content:encoded>
			<link>http://blog.olivierlanglois.net/index.php/2010/08/24/graph_breadth_first_traversal_algorithm_#c393</link>
		</item>
				<item>
			<title>In response to: Logitech Quickcam Fusion</title>
			<pubDate>Sat, 03 Apr 2010 17:28:47 +0000</pubDate>
			<dc:creator>endorphin [Visitor]</dc:creator>
			<guid isPermaLink="false">c249@http://blog.olivierlanglois.net/</guid>
			<description>Have the same problem with software. After using official software XP becomes unstable.

Now, trying fix this not welcome problem</description>
			<content:encoded><![CDATA[Have the same problem with software. After using official software XP becomes unstable.<br />
<br />
Now, trying fix this not welcome problem]]></content:encoded>
			<link>http://blog.olivierlanglois.net/index.php/2007/10/30/logitech_quickcam_fusion#c249</link>
		</item>
				<item>
			<title>In response to: TCP RST flag subtleties</title>
			<pubDate>Fri, 26 Mar 2010 12:42:29 +0000</pubDate>
			<dc:creator>Joe Beckner [Visitor]</dc:creator>
			<guid isPermaLink="false">c246@http://blog.olivierlanglois.net/</guid>
			<description>Thank you, you are right, the router with IOS Firewall is doing NAT/PAT on the single IP address of the outside T1 interface.  So the Google servers will see all users with the same IP address and different TCP port numbers. I will take a look at this some more.</description>
			<content:encoded><![CDATA[Thank you, you are right, the router with IOS Firewall is doing NAT/PAT on the single IP address of the outside T1 interface.  So the Google servers will see all users with the same IP address and different TCP port numbers. I will take a look at this some more.]]></content:encoded>
			<link>http://blog.olivierlanglois.net/index.php/2010/02/06/tcp_rst_flag_subtleties#c246</link>
		</item>
				<item>
			<title>In response to: TCP RST flag subtleties</title>
			<pubDate>Fri, 26 Mar 2010 10:47:39 +0000</pubDate>
			<dc:creator>lano1106 [Member]</dc:creator>
			<guid isPermaLink="false">c244@http://blog.olivierlanglois.net/</guid>
			<description>Hi John,

it seems to be different. In the scenario I am describing, the client TCP/IP stack do receive the server reply. It is the application that do not sees it because a RST is immediately following the reply and is received by the TCP/IP stack before the application has the chance to read the reply from the stack.

This is not the problem that you have because if it was, you would see the reply precedes the RST segment with Wireshark.

In your situation, if you were asking me my opinion, I would suspect your router to be a NAT device and gmail server must have an internal limit that makes it refuse a single IP address to initiate more than a certain number of connections to protect itself against spammers.

I see some avenues to solve the problem:

1. If possible, configure your router to have more than 1 public IP address on the external NIC and make the router NAT module load balance the connections among the available public IP addresses.

2. Here is what my DNS server returns me for gmail.com:

Non-authoritative answer:
Name:   gmail.com
Address: 72.14.204.17
Name:   gmail.com
Address: 72.14.204.18
Name:   gmail.com
Address: 72.14.204.19
Name:   gmail.com
Address: 72.14.204.83

You could tweek your DNS server to let it do the load balance for your users.

Please report back here if this has helped you to fix the problem.
</description>
			<content:encoded><![CDATA[Hi John,<br />
<br />
it seems to be different. In the scenario I am describing, the client TCP/IP stack do receive the server reply. It is the application that do not sees it because a RST is immediately following the reply and is received by the TCP/IP stack before the application has the chance to read the reply from the stack.<br />
<br />
This is not the problem that you have because if it was, you would see the reply precedes the RST segment with Wireshark.<br />
<br />
In your situation, if you were asking me my opinion, I would suspect your router to be a NAT device and gmail server must have an internal limit that makes it refuse a single IP address to initiate more than a certain number of connections to protect itself against spammers.<br />
<br />
I see some avenues to solve the problem:<br />
<br />
1. If possible, configure your router to have more than 1 public IP address on the external NIC and make the router NAT module load balance the connections among the available public IP addresses.<br />
<br />
2. Here is what my DNS server returns me for gmail.com:<br />
<br />
Non-authoritative answer:<br />
Name:   gmail.com<br />
Address: 72.14.204.17<br />
Name:   gmail.com<br />
Address: 72.14.204.18<br />
Name:   gmail.com<br />
Address: 72.14.204.19<br />
Name:   gmail.com<br />
Address: 72.14.204.83<br />
<br />
You could tweek your DNS server to let it do the load balance for your users.<br />
<br />
Please report back here if this has helped you to fix the problem.<br />
]]></content:encoded>
			<link>http://blog.olivierlanglois.net/index.php/2010/02/06/tcp_rst_flag_subtleties#c244</link>
		</item>
				<item>
			<title>In response to: TCP RST flag subtleties</title>
			<pubDate>Fri, 26 Mar 2010 09:59:42 +0000</pubDate>
			<dc:creator>Joe Beckner [Visitor]</dc:creator>
			<guid isPermaLink="false">c243@http://blog.olivierlanglois.net/</guid>
			<description>I think I am experiencing the problem you are referring to in this blog.

I should preface my comment by stating that I am not a software programmer, I am a network hardware person who sells, install and maintains Cisco network switches, routers and firewalls for small and medium businesses.  
 
I am troubleshooting an intermittent problem for a client who has about 100 users on gmail.  They experiencing intermittent periods where one or more users cannot access their gmail. All other internet traffic (web, etc.)is ok. Resetting the Cisco3825 router firewall on the T1 line clears the problem.  I did not believe that this was really a router problem.  All sessions are terminated when the router restarts which is probably why it clears.

I have some Wireshark captures from when users are experiencing problems.  What I am seeing is an immediate TCP RST coming back from the Google gmail server after the successfull TCP 3 way session initiation for HTTPS. There are no HTTP codes coming back from the server. This repeats over and over.</description>
			<content:encoded><![CDATA[I think I am experiencing the problem you are referring to in this blog.<br />
<br />
I should preface my comment by stating that I am not a software programmer, I am a network hardware person who sells, install and maintains Cisco network switches, routers and firewalls for small and medium businesses.  <br />
 <br />
I am troubleshooting an intermittent problem for a client who has about 100 users on gmail.  They experiencing intermittent periods where one or more users cannot access their gmail. All other internet traffic (web, etc.)is ok. Resetting the Cisco3825 router firewall on the T1 line clears the problem.  I did not believe that this was really a router problem.  All sessions are terminated when the router restarts which is probably why it clears.<br />
<br />
I have some Wireshark captures from when users are experiencing problems.  What I am seeing is an immediate TCP RST coming back from the Google gmail server after the successfull TCP 3 way session initiation for HTTPS. There are no HTTP codes coming back from the server. This repeats over and over.]]></content:encoded>
			<link>http://blog.olivierlanglois.net/index.php/2010/02/06/tcp_rst_flag_subtleties#c243</link>
		</item>
				<item>
			<title>In response to: What is the C++ SFINAE principle ?</title>
			<pubDate>Mon, 31 Aug 2009 20:22:24 +0000</pubDate>
			<dc:creator>lano1106 [Member]</dc:creator>
			<guid isPermaLink="false">c212@http://blog.olivierlanglois.net/</guid>
			<description>Michal,

To be honest, I had an intellectual understanding of the example I was giving but I have
never bothered to compile it to see if it works until today.

I have tried to compile it with gcc 3.4.4 and I get the same error message. I will try to
find an answer and post it if possible.

Thank you for the comment.
</description>
			<content:encoded><![CDATA[Michal,<br />
<br />
To be honest, I had an intellectual understanding of the example I was giving but I have<br />
never bothered to compile it to see if it works until today.<br />
<br />
I have tried to compile it with gcc 3.4.4 and I get the same error message. I will try to<br />
find an answer and post it if possible.<br />
<br />
Thank you for the comment.<br />
]]></content:encoded>
			<link>http://blog.olivierlanglois.net/index.php/2007/09/01/what_is_the_c_sfinae_principle#c212</link>
		</item>
				<item>
			<title>In response to: What is the C++ SFINAE principle ?</title>
			<pubDate>Mon, 31 Aug 2009 01:29:18 +0000</pubDate>
			<dc:creator>Michal [Visitor]</dc:creator>
			<guid isPermaLink="false">c211@http://blog.olivierlanglois.net/</guid>
			<description>Hallo Olivier.
Thank You for Your example.

So far I am trying to understand how it works.

Unfortunatelly I have problem with preliminary step: it does not compile on my linux box (g++ (GCC) 4.3.0 20080428 (Red Hat 4.3.0-8)).

I get the following error:
p41.cpp:12: error: expected primary-expression before ">" token



Line 12 in my program is the following:

enum { Yes = sizeof(IsClassT...::test....(0)) == 1 };

(sorry for modifications in line above, but I couldn't put template parameter T in Your page, because they have a format of tag).

have You got idea why doesn't it compile?

best regards
Michal</description>
			<content:encoded><![CDATA[Hallo Olivier.<br />
Thank You for Your example.<br />
<br />
So far I am trying to understand how it works.<br />
<br />
Unfortunatelly I have problem with preliminary step: it does not compile on my linux box (g++ (GCC) 4.3.0 20080428 (Red Hat 4.3.0-8)).<br />
<br />
I get the following error:<br />
p41.cpp:12: error: expected primary-expression before ">" token<br />
<br />
<br />
<br />
Line 12 in my program is the following:<br />
<br />
enum { Yes = sizeof(IsClassT...::test....(0)) == 1 };<br />
<br />
(sorry for modifications in line above, but I couldn't put template parameter T in Your page, because they have a format of tag).<br />
<br />
have You got idea why doesn't it compile?<br />
<br />
best regards<br />
Michal]]></content:encoded>
			<link>http://blog.olivierlanglois.net/index.php/2007/09/01/what_is_the_c_sfinae_principle#c211</link>
		</item>
				<item>
			<title>In response to: CLOSE_WAIT vs TIME_WAIT</title>
			<pubDate>Thu, 14 May 2009 16:36:21 +0000</pubDate>
			<dc:creator>AltosAce [Visitor]</dc:creator>
			<guid isPermaLink="false">c205@http://blog.olivierlanglois.net/</guid>
			<description>Funny that you asked why in a TIME WAIT state, the time out period is not 2*MSL. Actually, if you look at the diagram of TCP finite state machine (12 states), the Timeout is indicated to be 2MSL (towards the bottom, right next to TIME WAIT state). (In my case, the state digram is in the back inside cover of Inside TCP/IP book by K Siyan).</description>
			<content:encoded><![CDATA[Funny that you asked why in a TIME WAIT state, the time out period is not 2*MSL. Actually, if you look at the diagram of TCP finite state machine (12 states), the Timeout is indicated to be 2MSL (towards the bottom, right next to TIME WAIT state). (In my case, the state digram is in the back inside cover of Inside TCP/IP book by K Siyan).]]></content:encoded>
			<link>http://blog.olivierlanglois.net/index.php/2008/06/05/close_wait_vs_time_wait#c205</link>
		</item>
				<item>
			<title>In response to: UNIX Network Programming: Networking APIs: Sockets and XTI; Volume 1, Second edition</title>
			<pubDate>Thu, 12 Mar 2009 19:39:48 +0000</pubDate>
			<dc:creator>lano1106 [Member]</dc:creator>
			<guid isPermaLink="false">c190@http://blog.olivierlanglois.net/</guid>
			<description>How is the sock variable initialized? It must be a variable returned from the socket() function.
</description>
			<content:encoded><![CDATA[How is the sock variable initialized? It must be a variable returned from the socket() function.<br />
]]></content:encoded>
			<link>http://blog.olivierlanglois.net/index.php/2008/07/06/unix_network_programming_networking_apis#c190</link>
		</item>
				<item>
			<title>In response to: UNIX Network Programming: Networking APIs: Sockets and XTI; Volume 1, Second edition</title>
			<pubDate>Tue, 10 Mar 2009 00:44:32 +0000</pubDate>
			<dc:creator>tanixmukherzee [Visitor]</dc:creator>
			<guid isPermaLink="false">c189@http://blog.olivierlanglois.net/</guid>
			<description>hi prasanna i am having a problem with connect function...
i dont know why...
i m giving u the code here..plz help me...



if ((conn=connect(sock,(struct sockaddr *)&#38;server_addr,sizeof(struct sockaddr)))&#60;0)
{
printf("error entered");
getchar();
perror("Connect");
exit(1);
}


the problem is i am having an error like...socket operation on non-socket...
can u help me out...the server program is okay...)</description>
			<content:encoded><![CDATA[hi prasanna i am having a problem with connect function...<br />
i dont know why...<br />
i m giving u the code here..plz help me...<br />
<br />
<br />
<br />
if ((conn=connect(sock,(struct sockaddr *)&amp;server_addr,sizeof(struct sockaddr)))&lt;0)<br />
{<br />
printf("error entered");<br />
getchar();<br />
perror("Connect");<br />
exit(1);<br />
}<br />
<br />
<br />
the problem is i am having an error like...socket operation on non-socket...<br />
can u help me out...the server program is okay...)]]></content:encoded>
			<link>http://blog.olivierlanglois.net/index.php/2008/07/06/unix_network_programming_networking_apis#c189</link>
		</item>
				<item>
			<title>In response to: XML Schema - The W3C's Object-Oriented Descriptions for XML</title>
			<pubDate>Tue, 06 Jan 2009 11:39:03 +0000</pubDate>
			<dc:creator>Simon Sprott [Visitor]</dc:creator>
			<guid isPermaLink="false">c184@http://blog.olivierlanglois.net/</guid>
			<description>This is a great book for learning the XSD standard.

Couple this with a good XML Schema Editor like Liquid XML Studio, and you'll learn the basics of the standard in no time.

The split code/diagram view provides the feedback required to quickly learn the effects on the XSD code as the documents structure changes.</description>
			<content:encoded><![CDATA[This is a great book for learning the XSD standard.<br />
<br />
Couple this with a good XML Schema Editor like Liquid XML Studio, and you'll learn the basics of the standard in no time.<br />
<br />
The split code/diagram view provides the feedback required to quickly learn the effects on the XSD code as the documents structure changes.]]></content:encoded>
			<link>http://blog.olivierlanglois.net/index.php/2008/08/04/xml_schema_the_w3c_s_object_oriented_des#c184</link>
		</item>
			</channel>
</rss>
