HQ COURSES STORE PRICING ABOUT

  • 001-Core Programming: Why Bother to Improve Your Coding?
    function MySortaGlobal( xValue )
    static xKeep

    if xValue == NIL
    else
    xKeep := xValue
    endif

    return xKeep
    RanchWest

    When a value is passed, it is stored in xKeep and xKeep is returned. When no value is passed, the function returns what is stored in xKeep.
  • 001-Core Programming: Why Bother to Improve Your Coding?
    If a value is passed in, that SETS the stored value. If no value is passed in, that GETS (fetches) the stored value. In my example, I denoted no passed value as being NIL, but the exact coding would depend on the language.
  • 001-Core Programming: Why Bother to Improve Your Coding?
    If your language supports static variables, then those are persistent, but not globally. So, if a function is holding that static value, then the value can be accessed as in the function I showed above. It is available globally, but is not a global variable. As you likely know, global variables are a no no.
  • 001-Core Programming: Why Bother to Improve Your Coding?
    Yes, but I'll give you an example. I know you calculate a strength number where you look at the speed figures for all of the lines of all of the horses in a race. If you store that number, then when you need it again you don't have to do that calculation again. You still have about the same amount of code, but the execution time is less.
    t
  • 001-Core Programming: Why Bother to Improve Your Coding?
    function MySortaGlobal( xValue )
    static xKeep

    if xValue == NIL
    else
    xKeep := xValue
    endif

    return xKeep

    It might be written a little differently in different languages. If you don't pass in a value, then the stored value is returned. If you do pass a value, then that value is stored. Obviously, this could be made more complex, storing multiple values etc.
  • 001-Core Programming: Why Bother to Improve Your Coding?
    A variable or an instance variable. The emphasis is on not doing calculations over and over, especially calculations that are complex enough to take up time. The variable can be static within a function and accessible through a call to the function. It's the workaround to avoid global variables.
  • 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.

    The truth about 100% OOP is that it relies on perfect design and even then can become nearly impossible to maintain, especially if the basic requirements change. That doesn't mean that objects are not useful.
  • 001-Core Programming: Why Bother to Improve Your Coding?
    ,

    Many things in life are humbling. Like Saratoga, lol (unless you're Jack). Or, look on my FB page at the display at the leather show. I do good leatherwork, but some of that stuff is ridiculously good... and humbling.

    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.
  • 001-Core Programming: Why Bother to Improve Your Coding?
    One thing that strikes me is that 30 years ago speed was a huge factor. I actually did some screens in assembly language because otherwise you could actually see the screen paint and that gave me grief. Today, computers are so fast that it is better to write clean code than to worry about things like variable name length and such. But, it is still sometimes important to do things one time and not keep going back and doing it over and over.
  • 001-Core Programming: Why Bother to Improve Your Coding?
    I put comments in when I feel they are really needed, but to be honest that is often because my function names, variable names and array elements are not expressed in a self-documenting fashion.... I guess you could say mostly from laziness or rushing. I get on a roll with a new concept and I focus too much on completion and not enough on keeping things tidy. It usually leads to regret, especially when it comes to array elements.

    But I do feel that complex computations do sometimes need comments to explain the objective. Or, for example, I am dealing with yards... it is nice to comment the furlongs, though those, too, could be expressed as manifest constants.
  • 001-Core Programming: Why Bother to Improve Your Coding?
    A quick tip...

    Try to keep coding on the positive.

    Saying .NOT. or ! or however you language says not is usually not the clearest way to write code.

    Instead of

    If .NOT. eof()
    // do something
    endif

    write

    if eof()
    else
    // do something
    endif

    I think you'll come to appreciate the clarity.
  • Energy distribution, again....
    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:
    Dave Schwartz

    I don't understand. What is not known?
  • Energy distribution, again....
    I also have a number I call Pressure that I equate to Quirin speed points on steroids. It suggests which horses will go to the lead. I then arrive at a mean number for that. So, here is what I have for the field:

    Variance 0.611111
    Std. Dev. 0.781736
    Mean 1.888889 EP
    Median Pressure 63
    Top 3 Q 21
    Giles Speed Points 3 (3+ 1C, 2 2C, 1 3C, 0 4C)
    Hi Q % Tot Q 25.00


    The first 3 numbers are for the EPS running style based on %M as explained earlier in this thread. These are actual numbers for the 8th at TDN today. With the mean EPS at 1.88, my anticipation was that the pace was not going to be unusual though a bit on the early side, suggesting some of the front end might collapse. The top 3 Q of 21 suggested the same. I had #9 as a pace Presser though positionally he was an S. His current class was highest in the field and pressure was 63,exactly at average. His Scott PCR was 3rd behind the coupled entry that went off at odds on, .3/1. So, the #9 did indeed stalk from 3rd and closed up the stretch. Interestingly, the uncoupled entry mate, #6, finished 2nd at 67/1, triggering an exacta of $163.40 on $1. The jock on #6 was the best in the field and the trainer of the two exacta horses was the best in the field. Of course, hindsight is 20/20, but just goes to show that most races do have working puzzle pieces.
  • Energy distribution, again....
    ↪Dave Schwartz He does have New Pace and CSR in RDSS right?Mark

    Ted told me publicly how to compute CSR. I use the BRIS speed ratings. I also use the same methodolgy on the BRiS pace figures.for 2f, 4f, 6f, and LT.
  • Energy distribution, again....
    The following is how I define the calculations. May not be "perfect Sartin".

    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

    I make no adjustments to the raw numbers for these because the adjustments would wash out.
  • Energy distribution, again....
    I use Total Energy divided by deceleration. Does that tell you enough or do you need more? I don't think that is technically the Sartin way.
  • Energy distribution, again....
    i just remembered. I do use VDC as one of many factors in selecting a pace line, giving limited preference to the line with the best VDC.
  • Energy distribution, again....
    %Median, deceleration and VDC (velocity to deceleration) can also tell a couple of things.

    1) the inability to handle a longer distance

    2) a form cycle fall off of form
  • Energy distribution, again....
    As I described in the chaos thread, I also take the median %M of each horse and assign a value from 1 to 6 as being E to L. I am fully cognizant that this EPS is not to be a replacement for the positional EPS running style commonly employed, both should be employed in different ways.

    It is this 1 (early) to 6 (late) system that I use to determine how early or late the field is, using the average of the 1 to 6 system. I tried to arrive at values for 1 to 6 that more or less evenly split up all horses, at least that was the goal. So, when a field is over 3, it is late. Under 3 is early. When the field is late, that's when chaos might ensue. With a lot of late horses in the field, they still have to have some on the lead and those horses often shift their distribution and that's why they back up. At least, that is my thought.

    In this 1 to 6 system, I also calculate the variance and standard deviation from the mean, but I have not done enough study to know how to use those values. I suspect they have significance.
  • Energy distribution, again....
    Yes, the middle of the sorted list. I figure for the most part the extremes will end up being mostly irrelevant.

    I don't remember exactly how I figured the range, but it is always a set value above and a set value below the median value. So, I am not depending on an exact value anyway. Just looking for horses that have been running extreme energy distributions for the current field.

    My unscientific observation is that at Saratoga a horse that has been a late distribution has very little chance on the dirt.