Hello,
I'm thinking about making a number complex stats that will pull data from a large number of columns (I suppose you could call them "compound stats", as they'll be referencing various things), and this will probably many times in one stat (so I think the coding lines will be extremely long and reference lots of columns many multiples of times). These will all be used on my HUD.
I don't (or at least at the moment) have any specific questions about the coding, rather I wonder if there are guidelines for how to go about making larger, more complex stats, when considering:
- the efficiency of the code and therefore how fast such data will be shown on a HUD.
- the efficiency and ease of coding, and understanding it when returning to it at a later point.
What about using the "variables"? I don't fully understand them, but I have experimented and found that you can put simple numbers into them, which can make stats easily customisable (instead of going through multiple stats and altering every reference to a specific number). E.g. I can set a variable to "=26" or "26" and use it by name when i need the number 26... but I then have the freedom to change "26" to something else. Does this create extra overhead for postgres, enough that I might be concerned?
What about when creating more complex stats - does it make sense to nest stats to make them more legible and more easily amended, or perhaps can the same thing be done with columns? If I am doing that with columns, would that slow down the housekeeping process and the HUD? Would extra stats (the nested ones) have the same effect?
I hope I explained it clearly enough so that you can provide some tips for me here.
Finally, I have a second, hopefully more basic question: Can I create a stat that looks at either a date range, or something like the last X opportunities? I know this feature is in the HUD itself to apply to the last X hands, and that you can create a database containing hands played within a date range, but I'm considering the idea of having the majority of stats cover larger areas for sample size (i.e. looking up results in the entire DB) but with a few special exceptions that I could code to have a limited focus. To give extreme examples, something like raise river -- which has a small sample and needs more time to be accurate -- compared to say RFI, where I feel it's really beneficial to use a smaller time period to have more accurate readings as the stat converges fast. Is there any way to limit the number of hands or dates looked at for my example of RFI?
Thanks for your time.