Python - Project with well-written code - Example for study?

Discussion in 'App Development' started by kmiklas, Jan 16, 2020.

  1. Well you gave the example yourself: zipline is difficult to modify. If code is difficult to modify, that's a strike against it. I've never met a "good" codebase that is difficult to modify. You should be able to sexually abuse good code and have it remain as pure as a virgin.
     
    #11     Jan 17, 2020
  2. fan27

    fan27

    #12     Jan 17, 2020
  3. It's a great list, but it's a list of useful libraries. What the OP needs is something they can learn from. That probably means a project needs to be relatively small and tractable, and it must have readable, well written code. Whether the project is useful or not isn't that relevant.

    GAT
     
    #13     Jan 17, 2020
  4. fan27

    fan27

    The second item in the list.

    Algorithms and Design patterns
    https://github.com/vinta/awesome-python#algorithms-and-design-patterns

    Also, look at any of the repos put out by top tier tech companies as they will typically be quality.
     
    #14     Jan 17, 2020
    helgen_1 and globalarbtrader like this.
  5. traider

    traider

    It's difficult for me because it isn't pure python but they had to make tradeoffs for performance
     
    #15     Jan 17, 2020
  6. I'm sure they measured the performance in order to decide what they should do but lots of bad code has been written in the name of premature optimization. What changes did they make and why?
     
    #16     Jan 17, 2020
  7. carrer

    carrer

    https://github.com/mementum/backtrader#alternatives

     
    #17     Jan 17, 2020
    Warren likes this.
  8. ryker

    ryker

    Another way to get better is via code review. If you know someone that can review your code (github code review is ok but not great) that will really help too.
     
    #18     Jan 18, 2020
  9. xappppp

    xappppp

    This type of discussion is really helpful. Can anyone to more extensive discussion of similar topic in this forum?
     
    #19     Jun 29, 2020
  10. jharmon

    jharmon

    xappppp, I've been doing Python for a while now.

    Extra modules like Zipline and the like take a while to figure out. My daily data vendor (Norgate) has figured out how to adapt code Clenow's book against its data, which is a task I'm thankful I didn't have to do myself.

    Zipline is authored by Quantopian, but you need to really delve through their community forum to get anything approaching "extensive".

    Maybe you could tell us what you're trying to achieve, what periodicity you use (or want to use) and we could let you know which Python module(s) might work?
     
    #20     Jun 29, 2020