<story><title>Java is better than C++ for high speed trading systems</title><url>https://news.efinancialcareers.com/uk-en/3004875/low-latency-java-trading-systems</url></story><parent_chain><item><author>Karellen</author><text>^^This^^ is why you shouldn&amp;#x27;t call software developers &amp;quot;engineers&amp;quot; (disclaimer, am software developer).&lt;p&gt;&amp;quot;No-one ever explicitly &lt;i&gt;specified&lt;/i&gt; that the bridge shouldn&amp;#x27;t fall down and kill everyone who was on it at the time&amp;quot;, said no engineer, ever.</text></item><item><author>angry_octet</author><text>The worst (messiest, laziest and most chaotic) engineer I know works at a brokerage, coding obscenely large and unreliable edifices (and in a number of languages, from C++ to Excel+VB)... He does what he is asked, and doesn&amp;#x27;t worry about telling them what they need. They never demand code that doesn&amp;#x27;t crash, they see that as a fact of life, and developers are an overhead. Basically someone else owns the risk, the brokers don&amp;#x27;t, so why should he?&lt;p&gt;People who don&amp;#x27;t like this style (or the code) leave.&lt;p&gt;The direction for quality has to come from the top and be supported by systematic mechanisms. In fact that would be a question to ask in interviews.</text></item><item><author>vgatherps</author><text>I’ve seen this sentiment before and worked on both a “low latency Java” team and low latency C++ teams.&lt;p&gt;I have some sympathy for the idea that the JVM is better since it means you won’t spend all your time chasing crash reports. The thing is, like another comment hinted at, is that this issue is generally more reflective of the environment you build in than the technology choice.&lt;p&gt;Here’s a good talk on the reasons for and limits of using C++ for low latency systems: &lt;a href=&quot;https:&amp;#x2F;&amp;#x2F;m.youtube.com&amp;#x2F;watch?v=NH1Tta7purM&quot; rel=&quot;nofollow&quot;&gt;https:&amp;#x2F;&amp;#x2F;m.youtube.com&amp;#x2F;watch?v=NH1Tta7purM&lt;/a&gt;&lt;p&gt;If I had to rank in terms of reliability of trading infrastructure I’ve used&amp;#x2F;worked on,&lt;p&gt;* Low Latency C &amp;#x2F; C++ infra at fully automated trading firm. Very much run by the programmers and quants and also fairly small. By far the fastest (near limits of what you could do) and also most reliable.&lt;p&gt;* Low Latency Java execution infrastructure. Pretty reliable, not that fast, had some issues with GC battling and manual memory management to avoid GC, etc. There was a pretty clear latency floor (still quite low) even when “doing everything right” that serious native infrastructure beat.&lt;p&gt;* C++ market making infra at a firm run by manual traders. It was by far the slowest and least reliable. Echos the experience of “spent hours debugging weird crashes”. The culture was very “A trader asked for this and needs it done yesterday. Also this refactoring business doesn’t sound like adding new features, drop it”.&lt;p&gt;What I saw is that if you hire people who have a good idea of what they’re doing and keep a culture of technical excellence, C++ is definitely a better choice if you care about latency. You really have to maintain a culture of high quality code, testing, and in general caring about the technology.&lt;p&gt;This is only really possible when all of the stakeholders are involved in the technology, or at least understand the benefits. Once you start down the path of “well this feature could be done a day quicker if...” this goes down the drain, and a few years later you find yourself getting run over on latency AND with an impossible to use trading system. It’s really the worst of both worlds.</text></item></parent_chain><comment><author>derefr</author><text>I think it’s not that software engineers aren’t engineers; but more that they’re most equivalent to &lt;i&gt;combat engineers&lt;/i&gt; — engineers operating under time-pressure and shipping-pressure, where the systems they build need to “work” (in the sense of a bridge getting people across a ravine) but may only need to work &lt;i&gt;once&lt;/i&gt;; and where it may be perfectly fine&amp;#x2F;expected&amp;#x2F;required to need to “baby” the resulting engineered system along (i.e. letting a batch of people over the bridge, then closing it to traffic, examining the piles for faults, and shoring up the ones that are slipping; then reopening the bridge, in a cycle.)&lt;p&gt;It’s not that this type of engineering is “not engineering”; it’s that it’s engineering where the engineer themselves (and their ability to actively re-stabilize the system) is considered a load-bearing element in the design, such that the system will very likely fall apart once that element is removed.&lt;p&gt;Combat engineering is still engineering, in the sense that there are still tolerances to be achieved, and it’s still a disaster if the bridge falls over while it’s in active use for the mission it was built for. It’s just not considered a problem if it falls over &lt;i&gt;later&lt;/i&gt;, once that mission is accomplished.</text></comment>
<story><title>Java is better than C++ for high speed trading systems</title><url>https://news.efinancialcareers.com/uk-en/3004875/low-latency-java-trading-systems</url></story><parent_chain><item><author>Karellen</author><text>^^This^^ is why you shouldn&amp;#x27;t call software developers &amp;quot;engineers&amp;quot; (disclaimer, am software developer).&lt;p&gt;&amp;quot;No-one ever explicitly &lt;i&gt;specified&lt;/i&gt; that the bridge shouldn&amp;#x27;t fall down and kill everyone who was on it at the time&amp;quot;, said no engineer, ever.</text></item><item><author>angry_octet</author><text>The worst (messiest, laziest and most chaotic) engineer I know works at a brokerage, coding obscenely large and unreliable edifices (and in a number of languages, from C++ to Excel+VB)... He does what he is asked, and doesn&amp;#x27;t worry about telling them what they need. They never demand code that doesn&amp;#x27;t crash, they see that as a fact of life, and developers are an overhead. Basically someone else owns the risk, the brokers don&amp;#x27;t, so why should he?&lt;p&gt;People who don&amp;#x27;t like this style (or the code) leave.&lt;p&gt;The direction for quality has to come from the top and be supported by systematic mechanisms. In fact that would be a question to ask in interviews.</text></item><item><author>vgatherps</author><text>I’ve seen this sentiment before and worked on both a “low latency Java” team and low latency C++ teams.&lt;p&gt;I have some sympathy for the idea that the JVM is better since it means you won’t spend all your time chasing crash reports. The thing is, like another comment hinted at, is that this issue is generally more reflective of the environment you build in than the technology choice.&lt;p&gt;Here’s a good talk on the reasons for and limits of using C++ for low latency systems: &lt;a href=&quot;https:&amp;#x2F;&amp;#x2F;m.youtube.com&amp;#x2F;watch?v=NH1Tta7purM&quot; rel=&quot;nofollow&quot;&gt;https:&amp;#x2F;&amp;#x2F;m.youtube.com&amp;#x2F;watch?v=NH1Tta7purM&lt;/a&gt;&lt;p&gt;If I had to rank in terms of reliability of trading infrastructure I’ve used&amp;#x2F;worked on,&lt;p&gt;* Low Latency C &amp;#x2F; C++ infra at fully automated trading firm. Very much run by the programmers and quants and also fairly small. By far the fastest (near limits of what you could do) and also most reliable.&lt;p&gt;* Low Latency Java execution infrastructure. Pretty reliable, not that fast, had some issues with GC battling and manual memory management to avoid GC, etc. There was a pretty clear latency floor (still quite low) even when “doing everything right” that serious native infrastructure beat.&lt;p&gt;* C++ market making infra at a firm run by manual traders. It was by far the slowest and least reliable. Echos the experience of “spent hours debugging weird crashes”. The culture was very “A trader asked for this and needs it done yesterday. Also this refactoring business doesn’t sound like adding new features, drop it”.&lt;p&gt;What I saw is that if you hire people who have a good idea of what they’re doing and keep a culture of technical excellence, C++ is definitely a better choice if you care about latency. You really have to maintain a culture of high quality code, testing, and in general caring about the technology.&lt;p&gt;This is only really possible when all of the stakeholders are involved in the technology, or at least understand the benefits. Once you start down the path of “well this feature could be done a day quicker if...” this goes down the drain, and a few years later you find yourself getting run over on latency AND with an impossible to use trading system. It’s really the worst of both worlds.</text></item></parent_chain><comment><author>travisporter</author><text>I think software developers have a range in terms of responsibility from plumbers&amp;#x2F;electricians to civil engineers. We could save the designation “software engineer” for someone who has to go through the requisite ethics and case study courses like all other engineers. Otherwise maybe programmer&amp;#x2F;developer. (I’m gatekeeping I guess)</text></comment>