# rubeTimer - Beta testers wanted



## b03tz (Jun 4, 2008)

*rubeTimer.com - Updated*

Hi there people!

I'm not coming just here to show off my stuff and advertise. No no, i'm trying to create an advanced rubik timer with lot's of usefull functions that also makes it fun to cube online.

--- update ---
Changelog:
* We can now be found at http://www.rubetimer.com
* Stats screen is bigger (thus better readable)
* Updated some code for cross-browser compatibility (FF, IE5+)
* Updated the scramble generator, should be sufficient now
* Added sound functionality when inspection time is set (3, 2, 1 beeps)
* Added stats functionality
* Fixed some timer bugs
* Fixed some broken queries

Upcoming features / Work to be done:

* Ability to challenge a player that is logged in
* Get faster in cubing instead of scripting all day
* Ability to select multiple puzzles and view stats from multiple puzzles
--- /update ---

It's just a way of making online cubing fun!

Now we need you, to beta test this thing. Soon it will be online on it's own domain, for now it's in a subfolder on one of my websites.

Please check it out and let me know any bugs that you encounter or any features that you want to see added.

http://www.rubetimer.com


----------



## Hadley4000 (Jun 4, 2008)

There are some bugs with the scrambles.

L2 U F2 L D2 R F L2 U B' R D F2 B' L' B2 U R2 F *L2 L'* U2 *D D2* B


----------



## b03tz (Jun 4, 2008)

I've noticed that. Will be fixed asap.

Thanks!


----------



## Mohammad96 (Jun 4, 2008)

Its like cubemania 

but i would like the digital text font it would look more like a stackmat
and also it would be nice if it had a beeping sound when it comes to 3 seconds of inspection time if u dont get me just go to cubetimer.com


----------



## brunson (Jun 4, 2008)

Interesting choice of name.

http://www.google.com/search?q=define:+rube


----------



## Stefan (Jun 4, 2008)

What's the advantage compared to cubemania?


----------



## DavidWoner (Jun 4, 2008)

brunson said:


> Interesting choice of name.
> 
> http://www.google.com/search?q=define:+rube



LOL!!! thats hilarious.


----------



## tim (Jun 4, 2008)

OS: Mac OS X 10.5.2

1.) Safari 3.1.1
I can't use the space bar to start the timer
2.) Firefox 2.0.0.14
The login textboxes are larger than their surrounding box.

And: "rubeTimer is an advanced Rubik's timer with a lot of functions" shouldn't be the first sentence of your description, if the timer still hasn't a lot of functions .


/edit:

```
if (event.key == 'space')
```

I'm not sure, but i don't think event.key can be compared with strings.


----------



## b03tz (Jun 4, 2008)

tim said:


> OS: Mac OS X 10.5.2
> 
> 1.) Safari 3.1.1
> I can't use the space bar to start the timer
> ...



Yes it can  I'm using mootools  (http://docs.mootools.net/Element/Element-Event.js#Event)
About the textboxes, i've noticed it on a mac
that my friend owns. Also have to fix that. Thanks!


----------



## b03tz (Jun 4, 2008)

Vault312 said:


> brunson said:
> 
> 
> > Interesting choice of name.
> ...



Indeed! ^^


----------



## b03tz (Jun 4, 2008)

Mohammad96 said:


> Its like cubemania
> 
> but i would like the digital text font it would look more like a stackmat
> and also it would be nice if it had a beeping sound when it comes to 3 seconds of inspection time if u dont get me just go to cubetimer.com



I'll see what i can do


----------



## tim (Jun 4, 2008)

b03tz said:


> tim said:
> 
> 
> > OS: Mac OS X 10.5.2
> ...



But somehow it doesn't work on safari. Anyway: jQuery rocks!


----------



## JBCM627 (Jun 5, 2008)

@stefan: I guess at least this lets you take averages of x (I think?). In terms of personal use, this is a lot better. Cubemania looks great and all, but I personally don't find it very useful if I can only take an average of 5.

@tim's comment, suggestion: try using event.keycode == 32, or numbers, instead. On most english keyboards, spacebar will have value 32, at least... perhaps add a feature allowing users to change this, to encompass more / any keys.

@scramble problem: Also, here is an NxMxL scrambler I made the other day to try and help Doug with RJT: http://www.thewonderidiot.net/timer/scramble.html. As its already in JS, it might be useful 

In the directory above that is my own timer, which I normally use... I'd suggest adding any additional features you find useful from there too


----------



## b03tz (Jun 5, 2008)

StefanPochmann said:


> What's the advantage compared to cubemania?



The advantage will be, even more functionality and i'm going to try to make it even more fun to cube online


----------



## b03tz (Jun 5, 2008)

JBCM627 said:


> @stefan: I guess at least this lets you take averages of x (I think?). In terms of personal use, this is a lot better. Cubemania looks great and all, but I personally don't find it very useful if I can only take an average of 5.
> 
> @tim's comment, suggestion: try using event.keycode == 32, or numbers, instead. On most english keyboards, spacebar will have value 32, at least... perhaps add a feature allowing users to change this, to encompass more / any keys.
> 
> ...



Thanks alot for your reply! My scrambler is written in PHP (i'm using Ajax to generate scrambles ) May i ask you what you did to limit the moves chosen ? (So that you don't get U D U D or U D U'

And the event-code, i really don't get it...since i'm using mootools this should be cross browser. Though the possibility to select your own key might even be better! Thanks for that


----------



## tim (Jun 5, 2008)

b03tz said:


> Thanks alot for your reply! My scrambler is written in PHP (i'm using Ajax to generate scrambles ) May i ask you what you did to limit the moves chosen ? (So that you don't get U D U D or U D U'



Use axis. Have a look at joey's ruby code: http://speedsolving.com/showpost.php?p=42320&postcount=22




b03tz said:


> And the event-code, i really don't get it...since i'm using mootools this should be cross browser.



Maybe it's a bug then.


----------



## b03tz (Jun 5, 2008)

Indeed, for now i've added the ability to view your stats in images. I've attached a screenshot so you can see what i mean. I've tested this in IE7, IE6 and FF 2

And tim, can you please test the spacebar thing in safari again? I've tried something.


----------



## tim (Jun 5, 2008)

b03tz said:


> And tim, can you please test the spacebar thing in safari again? I've tried something.



Uhm, look at the attachment . Btw. here's the safari browser.


----------



## b03tz (Jun 5, 2008)

tim said:


> b03tz said:
> 
> 
> > And tim, can you please test the spacebar thing in safari again? I've tried something.
> ...



Thanks for the link! Didn't know they had a PC version. Did the site look like this before i changed the spacebar thing?


----------



## Lt-UnReaL (Jun 5, 2008)

RubeTimer's graph showing your improvement is definitely an advantage over cubemania. Cubemania just shows your averages equally spaced apart from each other, so if you had 50 averages in 1 day, then after that you had 1 average 3 months later, it would look like, well, you know what I mean. RubeTimer actually shows your improvement over a period(x-axis = date, y-axis = time). Probably more accurate as well because it isn't an average of 5.


----------



## tim (Jun 5, 2008)

b03tz said:


> tim said:
> 
> 
> > b03tz said:
> ...



No, it looked like in Firefox.


----------



## b03tz (Jun 5, 2008)

tim said:


> b03tz said:
> 
> 
> > tim said:
> ...



Well the "look" is fixed, though the javascript thing i gonna take some time. (alot, it's not just the keycode and i just can't seem to debug javascript in safari)


----------



## b03tz (Jun 5, 2008)

Added a countdown sound (from 3 to 0)


----------



## JBCM627 (Jun 5, 2008)

tim said:


> b03tz said:
> 
> 
> > Thanks alot for your reply! My scrambler is written in PHP (i'm using Ajax to generate scrambles ) May i ask you what you did to limit the moves chosen ? (So that you don't get U D U D or U D U'
> ...



Right about the axis thing, but I suppose its a bit different as its written for MxNxL cubes. It picks an axis, generates moves on it, then switches to another. It is similar to the official WCA scrambler in this aspect, although the one I made does in addition to allowing MxNxL scrambles remove a small bias in picking random turns as well.

As for the keycodes, in javascript at least, you would need to code something like this:

```
<input type='button' onKeyDown='javascript:presskey(event.keyCode)' value='press me'>
```

then in the javasctipt, something like:

```
function presskey(code){
  if(code == 32 || code == 13 || code == other_numbers){
    starttimer();
  }
}
```

where you can have PHP put any keys you wish in the presskey function. List of keycodes (note, you can even have alt or other buttons next to the timer trigger the button as well in case they miss spacebar...)


----------



## qqwref (Jun 5, 2008)

Can't we just have someone add new features to cubemania? For example if you want averages that aren't of 5 Tim or someone could make a practice mode where you can do averages of any size but where averages of 5 aren't recorded at all (perhaps just the singles could count). Or if you want the graph to be changed it shouldn't be too hard for someone to put that in. I'm rather fond of cubemania by now and I don't want to see it fall into disuse just because the programmers don't want to add features that aren't that difficult to program in. (Before you say you don't have time, I'd be willing to help out.)

I don't mind people making new timers but it honestly seems patently ridiculous to me that people keep programming entirely new timers just to add one or two features that other ones might not have, and that the programmers who have worked on the older timers don't add the new features when they hear about them. Can't we just take one well-established timer that we all have been using and have some good times on and keep adding features to it when we think of them? It would make a lot more sense that way, and we could keep all of the community in one place rather than just migrating every time someone programs a new timer. If we just picked one timer that we all already liked, and had a lot of people from the community help in programming it (open source! woo!), I don't doubt that it would eventually become extremely customizable and have all the features that any cubers could possibly want.


----------



## JBCM627 (Jun 5, 2008)

I'd be willing to work on cubemania or help out with any other timer as well. I have ideas for quite a few additional features, many of which I have already implemented on my own timer; it wouldn't be too hard to transfer these over I wouldn't think


----------



## b03tz (Jun 6, 2008)

Indeed, but that's of topic here. I'm not trying to "top-off" another timer, i'm trying to create something unique. And i need the community for that.

That's why i'm asking help  The things you are requesting, should be in it's own topic imho.

Thanks for the replies though!


----------



## JBCM627 (Jun 6, 2008)

Agree with this also, b03tz. Any more questions or requests, or if you would like any help, let me know.


----------



## b03tz (Jun 6, 2008)

Added some more detail to the stats viewing. You can now plot graphs showing your average, best and worst times. Looks pretty neet 

Check it out!


----------



## Karthik (Jun 6, 2008)

I got this scramble: B' R2 L2 F' *U D U* L' B2 D2 R D2 R' F2 U' B2 D2 L' F2 R2 B' D B2 R2 U2
This too: F U' B R' D2 *L2 R' L2* F' D B2 R B' D F2 L' D' L R U' F' U' R' F2 L'


----------



## b03tz (Jun 6, 2008)

Karthik said:


> I got this scramble: B' R2 L2 F' *U D U* L' B2 D2 R D2 R' F2 U' B2 D2 L' F2 R2 B' D B2 R2 U2
> This too: F U' B R' D2 *L2 R' L2* F' D B2 R B' D F2 L' D' L R U' F' U' R' F2 L'



Thanks for the examples. I'm going to fix this issue soon


----------



## JBCM627 (Jun 6, 2008)

The graph looks really nice, but could it be bigger? Also, will you eventually have a way to let people delete times they don't want that they have submitted?


----------



## b03tz (Jun 6, 2008)

JBCM627 said:


> The graph looks really nice, but could it be bigger? Also, will you eventually have a way to let people delete times they don't want that they have submitted?



To both answers: yes.

I've already fixed the size issue but it's on a different hosting server. I've registered my real domain today  all the fixes will be available when the site comes online there (any minute now).

Thanks for the heads up!


----------



## b03tz (Jun 6, 2008)

Hi people,

Here it is:

http://www.rubetimer.com

* Larger stat pics
* You can now delete all your times (my times in the menu) - still wip!


----------



## Stefan (Jun 6, 2008)

The timer doesn't work for me, space bar gets ignored. I use Opera, maybe this error log can help.

Edit: Gah, Pat, why scale down (that much)?


----------



## JBCM627 (Jun 6, 2008)

Hmm works fine in IE and firefox for me, maybe its jsut opera. It does handle keystrokes slightly differently than IE and FFfor some reason... I haven't played around with opera enough to be able to make any suggestions, though.

For some reason, though, this is working my computer extra hard while the timer is running... cubetimer.com does this also. I dont know if its simply the routines used for displaying the times or what, but every time I start the timer my fan clicks on. Perhaps this is just a result of using development software such as mootools, but it would probably be a good idea to check on the efficiency of the code. After a quick glance, there is a ton of code behind the timer... way more than I'd expect for something as simple as stopwatch code. Although not a problem, perhaps a future goal should be working on efficiency


----------



## b03tz (Jun 6, 2008)

JBCM627 said:


> Hmm works fine in IE and firefox for me, maybe its jsut opera. It does handle keystrokes slightly differently than IE and FFfor some reason... I haven't played around with opera enough to be able to make any suggestions, though.
> 
> For some reason, though, this is working my computer extra hard while the timer is running... cubetimer.com does this also. I dont know if its simply the routines used for displaying the times or what, but every time I start the timer my fan clicks on. Perhaps this is just a result of using development software such as mootools, but it would probably be a good idea to check on the efficiency of the code. After a quick glance, there is a ton of code behind the timer... way more than I'd expect for something as simple as stopwatch code. Although not a problem, perhaps a future goal should be working on efficiency



Hey, i know what you mean. It's about the timer indeed, it's not unoptimised code. The functions you see cannot get any smaller than they are. It's about the following:

To update the timer, a event is set that updates the timer periodically. Normally an event occurs every second, or 10 seconds. This event though, occurs every 1 millisecond. And because javascript is client side, this is inevitable.

I could make an option to update the timer in a lesser frequency (perhaps every 10 ms) but that would make it less precise.


----------



## b03tz (Jun 6, 2008)

StefanPochmann said:


> The timer doesn't work for me, space bar gets ignored. I use Opera, maybe this error log can help.
> 
> Edit: Gah, Pat, why scale down (that much)?



Thanks alot for the reply. I'm going to install opera tomorrow and try to fix this issue. Also thanks for the screens, helps me alot!


----------



## JBCM627 (Jun 7, 2008)

> I could make an option to update the timer in a lesser frequency (perhaps every 10 ms) but that would make it less precise.



Yes, I suppose this is one resolution. I only wonder if it is trying to run too much code each iteration because when I run other timer scripts (including my own, which I can put to .01s), it never has been a problem. Perhaps 10ms would be a good idea, as it is .01s, which is the accuracy your clock is set to. A nuance, I suppose, but not entirely trivial


----------



## qqwref (Jun 7, 2008)

I don't know if it's possible in the language you're using, but what if you had the timer only update every second or so, but still display time to centisecond accuracy (or millisecond if you wish) when you stop it? I've seen this put to good effect in (for example) hi-games, which displays the number of whole seconds you've been going for, but gets the accurate time at the end.


----------



## Robert (Jun 7, 2008)

i cant register, I entered the activation code and it said it was already activated, and when I try to log on it doesent do anything, it just refreshes the page


----------



## b03tz (Jun 7, 2008)

Robert said:


> i cant register, I entered the activation code and it said it was already activated, and when I try to log on it doesent do anything, it just refreshes the page



Your account is now activated. I just did it with your code 

Have fun!


----------



## Johannes91 (Jun 7, 2008)

b03tz said:


> The functions you see cannot get any smaller than they are.


The code is quite difficult to read because indentation is so random and there are a bunch of global variables with very short names. There certainly is room for optimizations at many places (and smaller doesn't necessarily mean faster). I'll just point out one thing that confuses me: setTimeout("startTIME()",1). I don't understand why people do this. Passing a string makes the interpreter eval() it. Just pass the actual function: setTimeout(startTIME,1).



b03tz said:


> To update the timer, a event is set that updates the timer periodically. This event occurs every 1 millisecond. And because javascript is client side, this is inevitable.
> I could make an option to update the timer in a lesser frequency (perhaps every 10 ms) but that would make it less precise.


Why do you think it's inevitable (and what does client side have to do with it)?

Yes, it would make it less precise, but only because you're doing something dumb in addTime(). If you used simply (pseudo-code) "currentTime - startTime" to get the elapsed time -- instead of "$('clock').innerHTML" -- it would be more accurate and it wouldn't matter what the timer is showing. You could update it once every 100ms and only display the seconds like qqwref suggested (I think it's a good idea) without losing precision.


----------



## b03tz (Jun 7, 2008)

Johannes91 said:


> b03tz said:
> 
> 
> > The functions you see cannot get any smaller than they are.
> ...



The client side thing was meant to clearify all the counter activity's happen on your PC. Not on the server, only the times are exchanged. I could indeed update the clock "less" often. I'm going to update the timer soon, though it functions for now.

Right now i'm focussing on:

* Head 2 Head challenges
* A shoutbox
* Add more functionality to "My Times"
* Build in different cube types (2x2, 3x3, 4x4 etc)


----------



## b03tz (Jun 7, 2008)

Added shoutbox
Added "Settings" screen
Added "WCA ID" to register form and the settings screen


----------



## b03tz (Jun 8, 2008)

Please continue here:
http://speedsolving.com/showthread.php?t=4552


----------

