
There really isn’t a better feeling than suddenly understanding something that has bothered you for a while. I recently figured two things out that have been plaguing me for about a month and a year respectively. Sure, I haven’t been actively contemplating them for that long, but they’ve been there, holding me back from doing things I wanted to. Both of them are very nerdy and code-oriented, so feel free to remain cooler than me by not reading on.
First: Creating W/L records based on nothing but a results table. For instance, let’s say I have a a table with just 5 columns: a key, a home team, an away team, and each team’s score. It took my a while, and it really wasn’t so much an epiphany as hammering it out through a bunch of tests, but I can get a full win/loss record now, which is all I wanted.
Second: Cycling through a large database table at given intervals to pull out statistics over set blocks of information. If that makes no sense, let me try to confuse you further:
The whole purpose of this was to use a large PokerTracker database to look at how preflop stats varied over a small portion of hands. A lot of people feel that after 10k hands, your stats are basically your stats and can be used to find leaks. I don’t necessarily disagree with that, but what if it’s really that after 2500 hands, you are 99% likely to be at your stats if you play a low variance style (say 18 vpip, 14 pfr), but it takes 20k hands for a higher variance one (28 vpip 22 pfr)? Again, if those abbreviations mean nothing to you, congratulations, you’re a better person than me.
Anyway, what I wanted to do was look at 50 hand intervals, 100 hand intervals, and maybe 250 and 500 hand intervals over a database of a consistent winning player for, say, 50,000 hands. This would take forever if I had to change the values of the hands to look each time, so I knew I would have to script it. Of course, I know very little scripting (even though I am still getting the hang of Python).
However, as I’ve been doing more php recently with the MLS project I’ve been working on, I realized how I can do this intervals problem. I won’t bore you with the exact code, but basically it just involves using a for loop, incrementing 2 numbers which are my the end caps interval by a certain amount each time, and pushing the results from each query into an array. Then I can display that array and/or copy it to an excel table. Of course, this requires me to put the database on a webserver since I only know so much, but that’s entirely possible.
Now, there are 3 kinds of people in the world. One kind who will never understand this and/or don’t care. We’ll call them, say 98%. The people who can understand this and think it’s pretty cool. We’ll say that consists of Aaron and maybe a handful other people, 1.1%. Of course, it should be noted here that Aaron and I spent lunch the other day talking about how to integrate a USB scan gun into our warehouse management database, so we’re more than a little lame. And finally, there are the 0.9% of people who this makes perfect sense to, and they knew it all along, and they’re unimpressed.
What sucks is that it’s that last group of people who I try to impress when I do things like this. I don’t care about the other people, they couldn’t tell what I do apart from what the real experts do. I want to do something that impresses the people who know what I’m talking about, and I think that’s why so many of my stat/database projects never make it past the “me working on them” step. I just don’t want to put anything out there that those people won’t like or get something out of. I guess whenever I finally make something I’m happy with it’ll be good, but it bothers me that my fear of these things is keeping me from working on stuff and releasing it to feedback.
Whatever though, the MLS page is definitely coming. I’m writing queries and building tables right now, so count on it. Suck or not, it will exist.
That was long.