Getting Started with Automated Trading

Discussion in 'Automated Trading' started by ErikS, Jun 15, 2008.

  1. Euler

    Euler

    Java and C# are both linked in with "platforms" -- Java's own platforms for Java, and Microsoft's for C#. You may find them somewhat easier to learn than C++ due to their built-in memory management and tightly integrated development environments, although they may be too slow for certain real-time systems or other performance-demanding situations.
     
    #11     Jun 24, 2008
  2. bidask

    bidask

    listen guys. the claim that java and C# are slower than C++ is a myth spread by the diehard C++ people out there. you see, c++ was the first language and many people learned it when it first came out. since that was the only real language available at the time, lots of systems were built using c++. these systems need to be maintained and upgraded year after year. since the core was built using c++, it only made sense to continue using c++ to make the upgrades so you don't have to reinvent the wheel. this kind of legacy is the reason why c++ still has the popularity that it has.

    java and C# came out years after c++, and they corrected a bunch of the inefficiencies and dangerous behaviors of c++. java and c++ kind of makes some of the things that you have to do in c++ obsolete. that's why so many c++ people spread these rumors and try to belittle the other languages. typical behavior.

    hardly and computer science programs teach c++ anymore. go check yourself. there is a reason for that. how would you feel if your english teacher made you write your essay with a typewriter instead of a computer?

    btw, do you know what's the most popular language in the world? it's the almighty Visual Basic. that's right. it's a great language and is far more intuitive than any of the other languages. it is truly the best language!

    get two equally skilled programmers to build a nice looking gui order entry system running on any version of windows. one programmer uses Visual Basic. the other programmer uses c++. see which person can build it faster. the visual basic programmer will kick the crap out of the c++ guy with one hand tied behind his back.

    wanna fight?:D
     
    #12     Jun 24, 2008
  3. Hmmm .....

    While there is a lot of rubbish talked about slow Java performance, in general if the same algorithms are applied C++ code is faster. In most cases modern processors/memory are sufficiently speedly such that the difference is immaterial. As always, system performance is a very complex issue and hard and fast rules are suspect.

    For what people here are likely to be doing Java or C# will in all likelihood be fast enough - by an order of magnitude.

    I worked as contract developer for several years with C and C++ on Unix systems. Wild horses would not drag me back to C or C++ from Java unless there is a demonstrably sound reason to do so. And performance in most cases would not be a sufficiently good reason.

    I dunno about the Visual Basic bit. I think that might be old news. More job ads for Java, Java runs on more devices and is the number one language on Sourceforge for open source projects. If you want cross platform in an enterprise environment, there aren't too many other choices.

    The days of knocking together data entry forms on Windows with VB will come to an end. A lot of this sort of stuff will be replaced by Ajax or Web 2 or some successor to that sort of thing.

    And besides, some of the Visual Basic programmers I've come across were terrible.
     
    #13     Jun 24, 2008
  4. Craig66

    Craig66

    I do large scale, distributed, real time systems work for telecoms and Java and C# are never going to be faster than well coded C or C++, the fact that there is a whole extra layer before actual execution makes it physically impossible for a start plus you really don't want a garbage collection kicking in while you are mixing the audio for a conference (for example).

    Every once in awhile the Java weenies get themselves all a-fluster when some new set of totally contrived speed benchmarks are released, but don't believe a word of it, for any non-trivial application C++ slays in terms of speed.

    Setting speed aside though, it's about the right tool for the job, it is a lot easier to write GUI in C# (easier than Java) and there is a much easier learning curve in general. Not all applications really need that type of raw speed, for most trading applications the bottlenecks will be disk and network I/O, not the relative speed of the language used.
     
    #14     Jun 24, 2008
  5. Euler

    Euler

    Java and C# are slower than C++, for almost all applications. C++ is simply closer to the machine, and no religious ranting and raving will change that. That DOES NOT, however, mean that one should use C++ instead -- in fact, for most business applications, I'd say Java (or C# if you like Microsoft's platforms) is a much better choice.

    Not everyone cares about GUI's, but for those that do, there are fine platforms in all of C++, VB, Java, or C#.

    The main problem I see with Visual Basic is that Microsoft changes it frequently, and the "automatic upgrade" stuff, while technically impressive, can make things into an awful-looking mess. At least C++ and Java have the advantage of being relatively stable; the jury is still out on C#, given Microsoft's track record. (Of course, if you plan to just throw all your code out every 3 years, this really isn't a problem.) On the other hand, Microsoft's IDE's are really nice and consistent, and from an ease-of-learning-language-and-platform point of view, they're probably unparalleled. Just be sure that's what you want, because it's generally harder to switch from their platforms than others since .Net, etc. are proprietary.
     
    #15     Jun 24, 2008
  6. luchini

    luchini

    C++ slows as soon as you add the overhead for OO. The second you want to program as if you're from this generation of programmers any computational speed advantage is nullified.

    I support both C# and C++ project in my office right now and the C++ application is far slower than any other non-gui application that I'm currently developing/supporting. Do a non-trivial test (no fib sequence) and you'll see. Common, light weight packages in C# and Java that really affect speed greatly seem to slow down C++ applications greatly.

    BTW I want to know how anyone thinks that manual memory managment makes it easier for someone to understand how to program. The way I see it, the thread starter wants to walk the middle line of having efficent code that wont require him to master C++'s absolutly retarded coding conventions.

    While I'll agree that native code is far faster than byte code, tweaks can be made to the Java compiler that can amerliorate the situiation. Also, as far as I know, C# and Java have better supported packages. C# becomes native after its run-time compiled and Java can be compiled to a native platform so that point is moot (don't ask me to cite the last one as I'm out of touch with the java world and it was told to me by a java evangelist).

    I would welcome and sources (relevant because java has made strides in the complier arena over the past 15 years and I've read articles contradicting the speed myth). My point remains, any negligible speed gains you get would be nullified by the enormeous increase in development time. C# and Java allow someone who understands OO programing to focus in on the problem at hand rather than wade through archaic syntax. All that being said, if you really want to understand how this shit works....take the C++ course and, if you can, take a course in compilers (hardest class that I got my lowest grade in college but learned more in it than any other class). Afterward, develop the thing in Java or C#.

    If I find the time I'll cite some sources....
     
    #16     Jun 24, 2008
  7. C++ (and C) are much faster than Java/c#/python/perl/etc. in any significant application. To say otherwise just shows a lack of experience. I've used them all in programs from 10k lines to 2 million+ lines. I've seen java take down otherwise good technical companies (application would not run well enough on a top end machine to be commercially viable - previous version in c++ ran just fine). I'm aware of various contrived performance 'tests' too that show java being faster than C...too funny.

    C is not just faster, but incredibly faster in many cases. The problem today is that guys coming out of school learn java and have no concept of how fast a modern computer really is. To them it's normal that you can watch the GUI elements in a program like TWS update one at a time.

    But yes, c++ takes a high level of skill to use well. c# is the best of the current interpreted languages if you don't need portability. There are also high-level constructs in languages like c#/lisp/etc. that can be extremely useful (first-class functions, lambdas, closures, etc.) for solving certain problems. So as usual, use the tool for the problem at hand.
     
    #17     Jun 25, 2008
  8. Euler

    Euler

    That is simply wrong, as a general statement. I'm sure you can construct scenarios in which it isn't, but these would be rare and/or contrived.

    C++ syntax isn't objectively worse than Java's or vice versa -- it's really a matter of opinion (although I personally favor the Java syntax slightly). Most of the language features are the same now (since Sun has essentially added back the "bad" C++ features that they originally excluded, yet under new names). Perhaps the only thing that's obviously more convenient about Java, in general, is the garbage collection, which is a very nice thing to have, in most (but not all) cases.

    But I don't disagree that Java/C# usually consume somewhat less development time than C++ for most business applications, especially for simple ones.
     
    #18     Jun 25, 2008
  9. luchini

    luchini

    Ok maybe you misunderstood what I meant because I don't think that you're going to argue that there is additional overhead associated with OO programming; on the assembly level you have to make a ton of go-to statements to blocks of code which is inherently slower than simply running through assembly code. This is a problem with all OO systems which is why I didn't entertain a disucssion on C. Actually, lack of a distinct paradime was exactly one of my reasons for telling the thread starter to stay away from writing code in C++ as it lends itself to bad coding habits. I've met some brilliant coders that were not good developers; the type of people that enjoy subverting windows but couldn't write maintainable code. C++ leaves the programmer with too much wiggle room. One thing I can say about C++ programmers is that when they're good, they tend to be really good.

    That being said, JIT compilers have distinct advantages over precompilation when it comes to OO because of the fact that C++ really has no idea what classes inherit from what other classes so it creates a full virtual table whereas a JIT compiled language can have access to that information and reduce virtual table sizes.

    There are numerous other advantages with using C# specifically when it comes to extransibility and maintainability (never had production level software in Java but from what I head jar files behave similarly to C# class libraries).

    This is really going to be my last post on this paticular subject because this always turns into a pointless debate with people usually siding with thier language of choice and ignoring advantages\disadvantages but I will say this, anyone that is developing software and is a true software engineer should not be afraid to jump between any of these three lanugages (or any von neumann language for that matter). They have similularities but Java and C# have distinct advantages for the novice in that the syntax allows the user to focus in on the task at hand and not the quirks of dealing with the language...

    By the way the main reason that comp sci departments are shying away from C++ is that from a CS perspective, Java is a higher level language that can better describe and illustrate algorithims. Its a pure OO language. That being said, I think that most programmers should start with C++ so that they have a better understanding of how the computer works internally than move up.
     
    #19     Jun 25, 2008
  10. luchini

    luchini

    by the way Dr.Dobbs posted a bench mark of all three languages on multiple platforms (using GCC for C++). The results weren't compelling in any direction
     
    #20     Jun 25, 2008