Question from someone who know absolutely NOTHING about programming

Discussion in 'App Development' started by NeoTrader, Oct 16, 2015.

  1. Adding my 2 cents: C++ was popular because it was what people learned in college at the time. People don't want to learn to do the same thing they know, just in another way, which is exactly what happens when you switch languages. Once you're proficient in one (which takes about 10 years), there's little to gain on changing "how" you do things (Java or C++ or Haskell) versus focusing on what makes the difference: knowing *what* to do and doing it whatever way you know.

    I used to program in C++ (about 10 years) but switched to Java (since about 5 years) for productivity reasons. I can implement an idea about 10x faster in Java than in C++ and since I'm mostly testing ideas (models, strategies), execution speed is irrelevant compared to the language not getting in my way.
     
    #31     Jan 12, 2016
    eusdaiki likes this.
  2. I totally agree. On my side, I still continue to make my trading tools in C. I know that it would takes me less time to write it in C# or java (in my work I use mostly C# and a little of java) but I'm so much happy to work in C that it doesn't matter.
     
    #32     Jan 18, 2016
  3. jarjar

    jarjar

    IMO for starting out I like C# because the ecosystem is really mature, you have Visual Studio which destroys eclipse in terms of productivity. You have a language that is more natural to write, Java syntax, function naming, packaging is wonky and confusing.

    Example in Java you write
    int curNumber = 5;
    but when you declare a list of ints you use
    ArrayList<Integer>();

    Why, this is so confusing to beginners.

    Also Java does not have unsigned integers, this "feature" alone makes many deem it not worthy.

    Most trading APIs support C# from what I have seen. I would say that would be most productive. If you parse a lot of excel consider VBA, tho I never used it.
     
    #33     Feb 25, 2016
  4. And could probably implement the testing of a strat, indicator, model about 10x faster than Java using Easy Language or Power Language.
    Unless you are trading systems with millisecond time-in-trades, today's CPU's can easily keep up with fast market conditions even using scripted languages includind EL,PL, or Javascript.
     
    #34     Feb 26, 2016
  5. jarjar

    jarjar

    Python is much faster then Java for quickly testing strategies / implementing. I can make the argument mathematically sound by simply presenting that fact you need to type much less words and letters when using python vs Java (due to dynamic typing), thus if you type at a constant rate of x letters per minute, you will be able to write more Python code in that time knowing both languages equally.

    Also python has list comprehension you can do stuff like newPrices = [mutate(x) for x in prices]. Writing that in Java would take much more lines.
     
    #35     Feb 26, 2016
  6. 2rosy

    2rosy

    Code:
    List<Blah> newPrices = prices.stream().map(mutate).collect(Collectors.toList());
    
    :D
     
    #36     Feb 26, 2016
    ZenMusic likes this.
  7. jarjar

    jarjar

    :wtf: not a Java programmer but that is impressive that they have lambdas, did not realize. You still have to be so verbose and statically imply tho. C# has the same problems that is why I speak about Java because I know C# pretty well.
     
    #37     Feb 26, 2016
  8. Canoe007

    Canoe007

    While you enjoy learning C++, certainly don't get distracted by which language is "best". As Bond James said, I'll say another way: code your business solution accurately and reliably - worry about the speed later (if that even turns out to be a factor). Then if it's not fast enough, you can identify the bottle necks and optimize the code.
    (One thing you may benefit from is looking at Design Patterns.)

    That said, it seems a lot of HFTs are hiring C/C++, likely because they can use C in key spots for minimizing lag. And you see linux turning up too; reminding me where every A B comparison of windows vs linux on the same hardware that I've personally seen, the linux just flies.

    And that said, I'm getting some surprising performance upgrades refactoring Java 7 code to use features that came available with Java 8. I'm now using 40% of my target allotted time for a turnaround (price received to order out the door), and that on a machine I built in 2010. I analyze my position every second; once the strategy and order code is done, the GUI gets to update: with Java 8 it's done in 200ms instead of 800ms. Gives me tons of space if I ever need to give garbage collection some space.

     
    #38     Mar 6, 2016
  9. sprstpd

    sprstpd

    Once you learn the basics of programming, you can transfer your skill set to any language you want to. So really what you want to do is learn a programming language that is easy to use, easy to read, and has high-level programming concepts. I would suggest that C/C++/Java/C# are not ideal fits for this category. Learn something like Scheme, Racket, Haskell, maybe Ruby or Python. Then once you understand the basics, you can migrate to any language you want. The best concept language I learned was Scheme - I don't use it for practical applications but I still use its underlying principles.

    Note that I am assuming you want to learn about general programming. If you only want to learn about trading specific program, then learning a specific trading script language would be fine.
     
    #39     Mar 6, 2016
  10. I think we are missing the primary issue of "the platform"....and the various features and functions they provide. Being able to obtain the open position profit and the last set of trades P&L for the day are those specific platform features which could be important.
    Some platforms make it easier than others to obtain that information.
     
    #40     Mar 8, 2016