Comments

  • Show us what makes your handicapping work
    Respectfully, I am looking for screenshots along with the explanations.
  • 001-Core Programming: Why Bother to Improve Your Coding?
    I understand what you are saying.

    Thank you.
  • 001-Core Programming: Why Bother to Improve Your Coding?
    I must be missing something here because I don't see what is gained by calling the function to receive the previous variable.

    If you set xKeep to a value, what is the advantage over simply making xKeep a global variable?

    Since you can only have one xKeep, it is, in effect, a global variable.

    Ah... You could make the function thread-specific.
    Small gain there.

    Am I on the right track?
  • 001-Core Programming: Why Bother to Improve Your Coding?
    Got it.
    There is ONE "keep" value or could you have xKEEP,yKEEP,ZKEEP, xFred, TommyBoy and any other number of variables?
  • 001-Core Programming: Why Bother to Improve Your Coding?
    Now I understand.

    So, if I use a function multiple times, it stores the last time xKeep was changed?
  • 001-Core Programming: Why Bother to Improve Your Coding?
    I'm still confused.

    Function(X1,X2,X3)
    Y= X1 + X2 * X3
    Return Y


    So, if you pass (say) 3 values (x2,x2,x3), and it returns (Y), how do you fetch Y again without passing the values again?
  • 001-Core Programming: Why Bother to Improve Your Coding?
    Ah, now I understand (I think).

    What does the call to reget the variable look like?
  • 001-Core Programming: Why Bother to Improve Your Coding?
    I don't understand what you mean by "store that number."
    To me that means "put it in a global variable."
  • 001-Core Programming: Why Bother to Improve Your Coding?
    That appears to be a standard function.
    That is, you pass a value (or several values) and return a value (or several values).

    Thus, you prevent multiple coding of the same computation, but you still have to call the function again to get the value again.
  • 001-Core Programming: Why Bother to Improve Your Coding?
    My point about OOP is that it provides a way of holding values and accessing them without recalculation. Of course, that can be done with static variables inside a function. And there are various ways of pushing, popping or accessing those stored values. The key is to not recalculate every time you need the value and I admit to being bad about doing that. But, I have been good about sharing the code that is the basic framework for many of my calculations.RanchWest

    I'm not sure I understand this, but I think you're saying that you can (effectively) load a value somewhere to recall it without actually storing it in a variable.

    Is it like a location?
  • 001-Core Programming: Why Bother to Improve Your Coding?
    I don't know if you've done any object-oriented programming, but one thing that is nice is being able to store data in an object and access it. Makes it easier to make a calculation one time and be done with it, just access the calculated value.RanchWest

    I checked out of OOP almost 2 decades back. Just didn't like it.
    But admittedly, I use a language whose original form of OOP was a lot like everything being a complicated way to call a function.

    The biggest changes for me have been in my approach to organization.
    First I wrote more functions, then added more routines.
    I created a rule that said all code for anything goes on a single visible page.

    As an example, here's the main page of what is called the My Handicapping section.

    This is the part where your handicapping is stored so that the model and the AI can help you improve things.

    Now, this is the BEFORE picture. No code has been written yet, but the comments (green) make it very clear what I'm about to write.

    utwa9i4tualol9fc.png
  • 001-Core Programming: Why Bother to Improve Your Coding?
    You and I are completely on the same page.
    So much of the code I wrote in HSH is truly painful to look at now. LOL

    I, too, wrote assembler. My coding was not only slow but ineffective.

    Funny but the group of programmers I hang with, many I've known for almost 3 decades... well, I used to think I was like a 7.5 on the scale of 1-10. Now, as I see how they've grown - especially horizontally while I remained vertical - I've changed that to a 4.5.
  • 001-Core Programming: Why Bother to Improve Your Coding?
    @RanchWest

    So glad you popped this to the top.

    How do you handle comments & documentation in your code?
  • Energy distribution, again....
    A big THANK YOU to @RanchWest for your idea about the Median Energy.

    I'm implementing via some reports in the Pace Handicapping module.

    F1% & EP% for races where the horses ran within 1 length of the winner (or won by any margin).
    Same but with Similar Surf & Distance within 1/2 furlong of today.

    In addition, these 2 metrics (F1% & EP%) will show for the race in each pace line.
    (This one takes some doing but will make it relatively easy to test your theories.

    Ranch, I believe that your approach may have tremendous value when combined with the prediction of which call will be the most important in today's race. (Determined by the ES5 approach which considers the number of ES5+ horses and applies the two rules I've mentioned before.
  • Energy distribution, again....
    @RanchWest

    Here's what I was looking for:
    tui0yp2r4ngjefik.png
  • Energy distribution, again....
    I don't have a valid physics-based formula to use.

    For example, my energy calculation is similar to energy produced by a wave.

    It is a a physical science formula that is not known (by me).
    Note: I am not smart enough to create my own from scratch, so I look for something in the science world that looks close and try to use it - without modification if possible.
  • Energy distribution, again....
    deceleration is
    ( EP/f3 ) * 100

    I believe EP is f1 + f2.

    TEDC (which I use as VDC) is:
    100 * ( f1 + f2 + f3 ) / deceleration

    I think VDC is:
    100 * ( AP + f3 ) / deceleration
    RanchWest

    Ah, this is very helpful.
    So, this is not physics-based but rather a logical relationship between the numbers.

    I generally use some form of a known physical science formula but really struggling with the velocities for fractions that use the Stretch Call (in any way) since it is a distance without a time.

    It's easy when you are using pace numbers because you all the variables are known:
    • Distance
    • Lengths Behind
    • Core Ratings
  • Energy distribution, again....
    He does have New Pace and CSR in RDSS right?Mark

    Yes, he liked what he saw and appropriated it from me.

    I have missed your point, though.
  • Energy distribution, again....
    Yes, Ted & I are always sharing ideas. LOL