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

**URL:** <https://www.ruby-forum.com/t/is-it-possible-to-make-an-online-poker-clock-with-ruby/72519>\
**Category:** Rails\
**Created:** [October 17, 2006, 9:02pm UTC](https://www.ruby-forum.com/t/is-it-possible-to-make-an-online-poker-clock-with-ruby/72519 "2006-10-17T21:02:34Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![davidstokar](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/d/4da419/32.png) [@davidstokar](https://www.ruby-forum.com/u/davidstokar)\
**Post date:** [October 17, 2006, 9:02pm UTC](https://www.ruby-forum.com/t/is-it-possible-to-make-an-online-poker-clock-with-ruby/72519/1 "2006-10-17T21:02:34Z")

</div>

I’m just starting to learn ruby and i wanted to set some projects for  
myself the 1st of which is a poker clock running online,  
but before i start trying to do it i would like to know if it’s  
possible. I dont want to waste my time if it’s not possible at all.

Thanks.

---

<div class="post-metadata">

**Author:** ![davidstokar](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/d/4da419/32.png) [@davidstokar](https://www.ruby-forum.com/u/davidstokar)\
**Post date:** [October 17, 2006, 9:14pm UTC](https://www.ruby-forum.com/t/is-it-possible-to-make-an-online-poker-clock-with-ruby/72519/2 "2006-10-17T21:14:17Z")

</div>

What’s a “poker clock”?

---

<div class="post-metadata">

**Author:** ![davidstokar](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/d/4da419/32.png) [@davidstokar](https://www.ruby-forum.com/u/davidstokar)\
**Post date:** [October 17, 2006, 9:23pm UTC](https://www.ruby-forum.com/t/is-it-possible-to-make-an-online-poker-clock-with-ruby/72519/3 "2006-10-17T21:23:32Z")

</div>

A poker clock is used when people are playing real live poker games. the  
Poker clock counts down in time till a blind goes up, A blind would go  
up at a period of time set by the players. Sorry just to add a Blind is  
an amount of money, It’s a poker term.

if you google Poker clocks you will see loads. but they are all download  
ones. where you have to install them. i want to try make a web based  
one.

Bill W. wrote:

> What’s a “poker clock”?

---

<div class="post-metadata">

**Author:** ![davidstokar](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/d/4da419/32.png) [@davidstokar](https://www.ruby-forum.com/u/davidstokar)\
**Post date:** [October 17, 2006, 9:46pm UTC](https://www.ruby-forum.com/t/is-it-possible-to-make-an-online-poker-clock-with-ruby/72519/4 "2006-10-17T21:46:31Z")

</div>

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…

---

<div class="post-metadata">

**Author:** ![davidstokar](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/d/4da419/32.png) [@davidstokar](https://www.ruby-forum.com/u/davidstokar)\
**Post date:** [October 17, 2006, 9:51pm UTC](https://www.ruby-forum.com/t/is-it-possible-to-make-an-online-poker-clock-with-ruby/72519/5 "2006-10-17T21:51:02Z")

</div>

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.

Philip H. wrote:

> 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…

---

<div class="post-metadata">

**Author:** ![davidstokar](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/d/4da419/32.png) [@davidstokar](https://www.ruby-forum.com/u/davidstokar)\
**Post date:** [October 17, 2006, 9:56pm UTC](https://www.ruby-forum.com/t/is-it-possible-to-make-an-online-poker-clock-with-ruby/72519/6 "2006-10-17T21:56:32Z")

</div>

On 10/17/06, Philip H. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

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

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.

---

<div class="post-metadata">

**Author:** ![davidstokar](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/d/4da419/32.png) [@davidstokar](https://www.ruby-forum.com/u/davidstokar)\
**Post date:** [October 17, 2006, 10:00pm UTC](https://www.ruby-forum.com/t/is-it-possible-to-make-an-online-poker-clock-with-ruby/72519/7 "2006-10-17T22:00:32Z")

</div>

Hi David,

David S. 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

---

<div class="post-metadata">

**Author:** ![davidstokar](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/d/4da419/32.png) [@davidstokar](https://www.ruby-forum.com/u/davidstokar)\
**Post date:** [October 17, 2006, 10:54pm UTC](https://www.ruby-forum.com/t/is-it-possible-to-make-an-online-poker-clock-with-ruby/72519/8 "2006-10-17T22:54:53Z")

</div>

On 10/17/06, David S. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> 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.

Actually I think a poker clock might not be bad. It’s not super  
ambitious by any means…you’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 🙂

Pat

---

<div class="post-metadata">

**Author:** ![davidstokar](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/d/4da419/32.png) [@davidstokar](https://www.ruby-forum.com/u/davidstokar)\
**Post date:** [October 17, 2006, 11:24pm UTC](https://www.ruby-forum.com/t/is-it-possible-to-make-an-online-poker-clock-with-ruby/72519/9 "2006-10-17T23:24:54Z")

</div>

> 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 🙂 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  
[evite.com](http://evite.com), 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:

[http://www.cardplayer.com/players/results/Daniel\_Negreanu/1185](http://www.cardplayer.com/players/results/Daniel_Negreanu/1185)

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

-philip
