Live data from Hacker News

Java is better than C++ for high speed trading systems

news.efinancialcareers.com

231–240 of 483 posts

Re: Java is better than C++ for high speed trading systems

#231

Earlier quoted context omitted.

Given the same conditions (i.e. people don't die) the same outcome would present itself. We have a history of bridges falling down, so much so that Wikipedia has a list on that: https://en.wikipedia.org/wiki/List_of_bridge_failures A particular one that caught my eye: Cimarron River Rail Crossing Dover, Oklahoma Territory United States 18 September 1906 Wooden railroad trestle Washed out under pressure from debris du…

The sarcastic/negative implication of your example is that software engineering today is where civil engineering was 100+ years ago.

I don't think that is the case - but that is certainly one interpretation of it. They were still engineers at the time though, and so are we.

Re: Java is better than C++ for high speed trading systems

#232
post #208

Earlier quoted context omitted.

^^This^^ is why you shouldn't call software developers "engineers" (disclaimer, am software developer). "No-one ever explicitly specified that the bridge shouldn't fall down and kill everyone who was on it at the time", said no engineer, ever.

You shouldn't compare bridge building to developing a trading apps (on causes death, the other merely financial loss) Compare bridge building to developing software for pace maker. Now compare number of failures in both cases. You get what you pay for, if you pay for developer you'll get a developer.

> You get what you pay for, if you pay for developer you'll get a developer.

That's way too oversimplified. You can be as good and as thorough as you want, but if the root of the problem is that software is seen as a cost not as an integral part of the solution, you get bad results.

This often starts with unclear/vague requirements that change every other day as new information and understanding is gained.

But it doesn't stop there - unrealistic deadlines, lack of defined processes and quality control as well as disregard (and refusal to budget and schedule) for background tasks (documentation, refactoring, ...) are also contributing factors that can turn even the best and most diligent software developer into a messy code cowboy.

If gaming the system is rewarded more or actually doing a good job is even penalised, why do a good job?

Re: Java is better than C++ for high speed trading systems

#233
post #214

Earlier quoted context omitted.

The sarcastic/negative implication of your example is that software engineering today is where civil engineering was 100+ years ago.

Yes, but not because software engineers are worse human beings than civil engineers, which is all too often the undertone of these discussions. Rather, because software engineering hasn't killed enough people to advance; or when it has, it wasn't obviously the culprit. In which fields of software engineering do we find actual solid procedures and standards? Avionics. Medical hardware. Fields where the link between bu…

> software engineering hasn't killed enough people to advance

and where it had, you get pretty serious control and certification process put in place to avoid it (Boeing notwithstanding)

Re: Java is better than C++ for high speed trading systems

#234
post #192

Earlier quoted context omitted.

Why not just write it in C? And pre-allocate all the data structures, make them global, put them into a queue, and constantly reuse them. No more need to instantiate objects.

I write C++ for now almost 30 years, and always for the workloads where the cost of allocations was plainly visible, especially in the critical parts of the applications. So I have never stopped writing "non idiomatic" C++, at least from the point of view of typical language lawyers (and C++ attracted them a lot through the years). And I'm surely not the only one: there were different environments where it was recogn…

Yep, the same thing I do - just write in C++ as if it was good old C, with very occasional use of templates, containers and exceptions.

Re: Java is better than C++ for high speed trading systems

#235

Earlier quoted context omitted.

The sarcastic/negative implication of your example is that software engineering today is where civil engineering was 100+ years ago.

I don’t think that is too far off the mark. Given 8 more decades of progress we might even be able to produce reliable code. Webpages will be 100GB of JavaScript though

> Given 8 more decades of progress we might even be able to produce reliable code

As the risk of nitpicking, we already can produce reliable code, but as piaste's comment states, it's rare to make the necessary investment.

Avionics software and medical systems software is held to a very high standard, at great expense, but the average website or desktop application is not.

> Webpages will be 100GB of JavaScript though

I agree that the problem of bloat is likely to continue to worsen in the web, but that's just the web. Other sectors, like high-performance game engines, will continue to compete on efficiency.

Re: Java is better than C++ for high speed trading systems

#236
post #185

Earlier quoted context omitted.

I switched to C++ after years of doing web development in python, javascript and typescript, go and other high level languages associated with web dev. You're not wrong, the ego among C++ devs is astronomical. There's a huge amount of serious hate for python and this idea that being a C++ dev is superior. Get this we use Nix and C++ and the nix part of the code base is just as complex as the C++ code base. The nix st…

I worked at a large C++ shop (the kind that maintains a stdlib fork) and never saw them looking down at Python.

I think that's common for people that have a higher vision and comprehension of computers, to respect other choices and other tools. I prefer linux, but win10 and ios are great in the domain they target. C++ is great tools when you want to be low level, like managing memory, python is another great tool when you don't want to or don't need to or don't have the time to. Hey, guess what, it can be the same person that write python and c++ code !! And he even can like both !!! And be good at both !!!

Re: Java is better than C++ for high speed trading systems

#238
post #78
post #26

Earlier quoted context omitted.

I've found that coding in a "C-like style" offers great performance too. Are there any languages that target the JVM and are designed for higher speed? If it enforced the "C-like style" at the language level, perhaps it would be easier to follow? Of course at this point the usual answer is just use Rust, but is there a language that meets in the middle? Sometimes I just want the GC to do the work and I'm okay with th…

> Are there any languages that target the JVM and are designed for higher speed? Yes: Java Performant Java looks mostly like C, just with no manual malloc() calls. Sure you could write Java in a J2EE way but.. that not a good choice.

In Java, every object stored on heap (and they can't be stored on stack) has a JVM-induced space overhead. Also, the allocator is free to spread the objects across the heap in a chaotic manner, which will make for less than optimal utilization of cache lines.

Re: Java is better than C++ for high speed trading systems

#239
post #208

Earlier quoted context omitted.

You shouldn't compare bridge building to developing a trading apps (on causes death, the other merely financial loss) Compare bridge building to developing software for pace maker. Now compare number of failures in both cases. You get what you pay for, if you pay for developer you'll get a developer.

I remember reading about bad software in a radiotherapy machine inducing many deaths. And also about software in Toyota cars failing and also inducing deaths because the code was a huge mess. In the end, there is no such thing as a clear separation between "engineer" and "developers".

There is definitely one. Engineers need to write technical and ethical exams, and need to have years of accountable experience in order to become engineers.

To become a software developer there are no official requirements whatsoever. This is why is wrong to call software developers engineers.

Whenever asked I always say I am a software developer.

Re: Java is better than C++ for high speed trading systems

#240
post #214

Earlier quoted context omitted.

Yes, but not because software engineers are worse human beings than civil engineers, which is all too often the undertone of these discussions. Rather, because software engineering hasn't killed enough people to advance; or when it has, it wasn't obviously the culprit. In which fields of software engineering do we find actual solid procedures and standards? Avionics. Medical hardware. Fields where the link between bu…

> software engineering hasn't killed enough people to advance and where it had, you get pretty serious control and certification process put in place to avoid it (Boeing notwithstanding)

[deleted]
Post reply on HN