Hacker News new | past | comments | ask | show | jobs | submit login
Stranger than Fiction: The story of PostgreSQL and Online Poker (codingthewheel.com)
53 points by 4chan4ever on July 8, 2009 | hide | past | favorite | 22 comments



The article makes it sound like poker players have become a little more database-savvy than they really have. The vast majority of poker tracker users are vaguely aware that some db with a goofy name exists, but that's about it. The number of them who know what a foreign key is is a rounding error.

And the reason poker attracts so much technology is the same reason the stock market does: there's a hell of a lot of money to be made. A $50 piece of software is worth what you pay for it 10,000 times over if it even improves your win rate by 1% (and Poker Tracker most certainly does much more). A bot that can average winning 1 cent a hand could make you a millionaire, so a year or two spent building it is easily justified.


"A $50 piece of software is worth what you pay for it 10,000 times over if it even improves your win rate by 1% (and Poker Tracker most certainly does much more)."

hehe - there's a big "if" there: if you play enough and if you use the info. I bought PT 5-6 yrs ago and I don't play anymore. A 1% improvement over 400 hands won't make my $50 back at the low limits :)


I tried to make it, I really did, but the stories and other stuff up front made it impossible. I made it through one scroll and, by that point, I had found nothing interesting about Postgre or online poker and I bailed. Now that I come back here and see that this was submitted by "4chan4ever", I feel a bit dirty for having visited.


On the contrary, I thought it was actually an interesting history of poker players using software to track hand history (a subject which is very common to his blog), and how the industry/area grew into using Postgres. Its not really meant to be a technical article but rather a history of sorts.

As an aside, does anyone else ever feel the desire to start programming some sort of poker app whenever they read codingthewheel? Seems like it'd be such a fun area for a side-project!


I've you're serious about writing a poker bot, you should check out the forums at http://pokerai.org. I recently started developing a bot and found several useful nuggets of information on the site. Be warned though, everything feels like a hack when writing a poker bot (specifically determining the state of the game from a screenshot ... kind of a pseudo-OCR).

And finally, no, I haven't made any significant income from my bot (as it current only plays preflop on 6-max tables ... I manually takeover after the flop).


Codingthewheel actually did a pretty intensive and in-depth series of blog posts about building a poker bot, you might want to check it out if you haven't already. IIRC covered things like communicating with the other processes, using Win32 APIs to scrape the text and controls of the poker client, how poker clients attempt to detect bots, etc.


I couldn't disagree with you any more.

My usual (although probably totally unhealthy) habit of waking up and immediately (as in...within 20 seconds of opening my eyes) checking HN, gibsonandlily.com, reddit.com, and slashdot.com led me to this article. I read the entire thing from beginning to end (which is rare, for me), and thoroughly enjoyed the entire thing.

In fact, as I was reading it, I kept remarking to myself how much I enjoyed the writing style.

To each his own, I guess. It does frighten me a bit, though, that people make this complaint so much. What do people who can't be bothered to read a couple of pages worth of a story do when they are confronted by a book, magazine, or newspaper? (or a kindle).


I'm not a "nurturer" by default and so, after "x" has occurred (with "x" being different for each medium) and I've found nothing of interest, I bail. Different personalities and that's okay :)


This is funny because a friend and I were having the exact same conversation recently. He started playing poker after a long hiatus, and was impressed with how much Poker Tracker had improved, and mentioned that it was so sophisticated now it came with an installation of PostgreSQL. I balked at this immediately, thinking there must be a better way than loading an entire PostgreSQL instance onto an end user's machine. I assumed that standalone applications that required RDBMS functionality would use an embeddable database system like Derby or SQLite. I'm most interested to hear from the developer what requirements led him to choose PostgreSQL over those alternatives. Anyone here have any thoughts?


I'm reading the Codingthewheel blog pretty regulalry. While I don't find this article on Postgre particularly intriguing, some others are good, for instance the one on hand evaluator algorithms: http://www.codingthewheel.com/archives/poker-hand-evaluator-....

All this talk is often making me wonder whether good (and improving bots) will take over the world of online poker someday, to the point where it is just a pure waste of money for anyone else than an expert to play, on any blinds level. (not that I'd feel sad about it).


I have read some other articles about poker bots and the attempts by the site operators to ban them using captchas and such. Does anyone else think it would be a good idea to build an online poker site where the bots are actually encouraged? I don’t know about betting for real money but I would bet there are lots of people and/or groups that would love the build the strongest system in the world.


While I'm glad PostgreSQL proved useful, I fail to understand why SQLite wouldn't be a better choice for this application.


Interesting, if somewhat longish read.


I have a feeling that article could be condensed into something way shorter.


But when you consider MySQL's web-centric history, its lack of transactional and foreign key support, and its relaxed attitude with regard to data integrity

2 things:

1 MySQL has had support for transactions since version 4.

2 Relaxed attitude towards data integrity Seriously?


MySQL may or may not quietly ignore transactions and foreign keys and invalid values (substituting incorrect values that happen to be valid), depending on how it's configured, and the defaults are mostly wrong (unsafe). And as far as I know there is still no option for "make my transaction fail if I try to use a table that doesn't support transactions".


Well if you don't support foreign keys in the main implementation (ISAM or whatever it's called), isn't it hard to say that you seriously care about data integrity?


MySQL DOES have support for foreign keys.

create table foo (blah, blah, blah) engine = innodb

Sorry, I'm not trying to start an argument. That sentence just struck me as a bit inflammatory.


The GP's point is that the default engine, and hence the one used by probably 90+% of people using MySQL doesn't support FKs and other "standard" data integrity features that you wouldn't even know to ask about, since every other major db supports them by default.

Plus if you try to create an FK on a myisam backed table it happily runs the SQL, without errors, and you think you have a working FK.


It's more like the "default default" -- you can change it so, by default, every table is created using InnoDB. IIRC, MySQL comes with an example config that demonstrates just that.


I'd bet 90%+ of companies using MySQL for anything serious are using InnoDB.


The article is vague on when MySQL was dissed, but the closer you get to 2002, the more common MySQL 4 was.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: