Is it possible to make an online poker clock with ruby ?

What's a "poker clock"?

Hi David,

David Stokes wrote:

the Poker clock counts down in time till a blind goes up [...] at a period of time set by the players.

Thanks for the explanation. The answer is yes; you can do that with Rails. I'm working on something similar (not poker related, though). I'm using the BackgrounDRb plugin to furnish the background clock task. Google on 'backgroundrb' to get started.

hth, Bill

You could sure... but why? Why not just use an oven timer and be done with it?

Otherwise, if your blinds are set and your time interval is set, just use Javascript and update the page periodically...

I mean you could use Rails, but I don't see how it would make it easier...

I'm going to take a wild guess and say that he wants to display the clock on a big screen TV at his friend's house, hosting it on his own server so that it "moves" with him as the game rotates houses.

Actually I think a poker clock might not be bad. It's not super ambitious by any'd likely get it done in an evening, and it would be useful to you.

For the clock portion you're probably best off using a Javascript countdown timer. But you can still use Rails for part of the app. Get a basic JS countdown that doesn't have anything to input the time or start it. It should be extremely basic, taking only the amount of time as a construction argument. Then you can use Rails to get time input from the user (in whatever format you want), and convert it into a format that the JS timer can use. Then you output the page with the timer configured and start it.

You might also consider using camping (a very lightweight Rails-like framework) for this, because it's so simple. Or you can use Rails :slight_smile:


Well i wanted to use rails because i'm trying to learn it. But if using javascript is easier then I wont use Rails.

As a total beginner to Rails what would you suggest as a 1st project.

Hrm... well, do something you are interested in that's for sure :slight_smile: If you like poker... maybe setup a "poker event" web app... where you could enter the date time, the location, number (or list of) players, blind structure, payouts, etc. Then go really crazy and add in some general party-potluck features for who's going to bring what type of beer... Kind of like an, but for poker.

If it's mostly the same group of people you play poker with, turn the list of players into it's own database with statistics along the lines of this:

You could really go crazy if you wanted. Might not be uber-practical, but you'd touch a lot of different aspects of rails :slight_smile: