Firstly I should explain the background. I am interested in high frequency trading programming roles. After looking at many job specs it is very clear that there is a big demand for programmers who have programmed Java and C++ on Unix as opposed to Windows.

My question is what are the differences a High Freq programmer would come across? It cannot be something in the language itself because syntactically they do not differ over OS? Therefore I thought it must be something which the programming language has to interface, resources etc?

Could anyone please help me out as I am trying to improve my C++/Java on Unix, in order to aim for this type of career?

ps I'm guessing part of this answer lies with the socket infrastructure on Unix?

  • 2
    put linux on your laptop and learn to write perl and shell scripts. – Kevin Nov 21 '11 at 16:12
  • Java (ideally) shouldn't be any different, that's how it was designed anyway, but yes, there are a number of differences where C uses system calls - especially e.g. filesystem interaction and, as you guessed, sockets/networking. And nice name, @kevin above. – Kevin Nov 21 '11 at 16:17
  • I have done some shell scripts in the past, but I cant see that being the reason for high freq- would they touch perl scripts? I thought they would be too slow? – user997112 Nov 21 '11 at 16:17
  • I can't speak from experience, but I've spoken with some guys who wrote a high-freq trading platform and it does the algorithm/modeling in Java and all IO operations are done in C (for the higher speeds) with JNI as the go-between. Why is Unix the OS of choice? Probably the same reasons people use them for web/application/* servers. – user7007 Nov 21 '11 at 16:39
  • 1
    Most likely they are not concerned at all with experience in programming Java on UNIX. What they want is someone with experience as a user of UNIX, who knows how to work in that environment and run and support their Java programs there. I think Kevin is on the right track. – Jeremy Nov 21 '11 at 17:03

I worked at a HF shop and another services company for a short time. They care about speed. Speed of the software, speed of the network, and any other thing that could possibly have to do with speed.

They use Linux for stability, as other people have noted, but also because it allows you to tune, measure, and control almost everything. With a multicore box, you can use the program 'taskset' to keep your process on a dedicated CPU, for example. But most fundamentally, Linux lets you modify, control, and even edit the kernel of the OS. So say you get an exchange message that is only 1kb. You can control the ethernet driver to trigger an interrupt as soon as that tiny bit of data comes thru, whereas the default may be to wait for more data. HF shops care about this for latency.

Programming wise, learn everything you can about C++, including templates. Learn how to speed programs up any way you can. Learn about 'locality of reference' to keep data nearby in memory so it stays in cache instead of getting paged out. Learn about assembly, so you can see that one line of C++ produces X asm instructions, but another line produces X-1. Learn about threads and processes, and how the kernel controls process scheduling ( there are different ways to control it ).

Java is different, but I don't know enough to give you any advice. What I've heard about it is to learn how to keep code blocks in cache and it will run as fast as C++. Learn everything you can about making Java run fast and the different java VM's available on Linux.

So Linux is like a kit car, and Windows is like a car off GM's assembly line. Windows is one-size-fits-all, and you wont' get any inside details without shelling out $ to Microsoft. Then the added uncertainty of whether the next version of stuxnet could come thru and compromise your whole network. Or next year they'll change the API and you have to learn it all over again. Linux is solid and changes very little.

Hope this helps.


Transaction servers are mostly(but not only) Unix: Thats because Unix is highly stable, and less resource hungry. A less important but not ignorable reason is legacy applications. You wouldnt want to move a stabe unix based transaction server to Windows.

But that doesnt necessarily mean that you have to program on Unix. Once I did a project on Oracle D2K . The app runs on Windows but the forms were stored on a Unix server.

If you are looking at C++ programming for high volum esystems , do pay a lot of attention to threading and exception handling, apart from socket programming. Learn whatever you can about application optimization. Few books teach you that. Learn what you can from expereinced people and from your own experience.

  • Once you get into the details in your third paragraph, there will be differences between MS Windows and Unix. There's a big advantage to standardizing on one platform so everybody can study how to optimize on it. – David Thornley Nov 21 '11 at 17:24
  • Could anybody give some advice how I can pick up the threading and exception handling on Unix? – user997112 Nov 21 '11 at 18:09

You'll need to know how to use the various Unix profiling and performance management tools (everything from ps to dtrace), plus all the other development tools (shell scripting, Perl, awk, find, xargs...). You'll need to know your way around the file system (like how to get performance counters from the /proc directory). I haven't worked in that particular industry, but generally Unix positions depend on lot more on using generic command-line tools than GUI-based stuff.


I once worked in a Java project in which we developed an ERP application that ran both on Linux and Windows. I developed on Linux (Java, Eclipse) but the main customers used it on Windows.

The Java code did not need any changes between Linux and Windows. The only difference I noticed was that the application ran much faster on Linux and a colleague of mine explained to me that the Linux file system is much faster than the Windows file system. Maybe this (performance) is one of the reasons why there is a big demand for developers who can work on a UNIX system.

Not the answer you're looking for? Browse other questions tagged or ask your own question.