Event Sponsors

2012 ORC

June 16, 2012.

More info here.

Sign up now ... $30.

Recent Topics

by [WR]
[Today at 03:48:40 am]

[Today at 12:56:34 am]

[Today at 12:52:51 am]

[May 22, 2012, 11:45:58 pm]

[May 22, 2012, 10:54:32 pm]

[May 22, 2012, 10:37:52 pm]

[May 22, 2012, 09:48:30 pm]

[May 22, 2012, 08:16:53 pm]

[May 22, 2012, 07:59:42 pm]

by [WR]
[May 22, 2012, 06:27:43 pm]

[May 22, 2012, 06:03:43 pm]

[May 22, 2012, 02:26:50 pm]

[May 22, 2012, 01:26:55 pm]

[May 22, 2012, 12:36:26 pm]

[May 22, 2012, 11:18:20 am]

Picture Of The Month


Waterman Scores Chrome!

Author Topic: AOTY score page goofed up?  (Read 237 times)

0 Members and 1 Guest are viewing this topic.

Offline INSAYN

  • Sturgeon
  • *****
  • Posts: 2768
AOTY score page goofed up?
« on: January 31, 2012, 07:29:13 am »
Is it just my computer, or does yours also show no points for CBY's perch, and for some reason Rawkfish's two fish are not being added together.  Hopefully it's just my computer here at work that is goofy.  :dontknow:
"I didn't make it to the gym today.  That makes 5 years in a row."


Offline polepole

  • Administrator
  • Sturgeon
  • *****
  • Posts: 6951
    • NorthWest Kayak Anglers
Re: AOTY score page goofed up?
« Reply #1 on: January 31, 2012, 07:32:39 am »
Is it just my computer, or does yours also show no points for CBY's perch, and for some reason Rawkfish's two fish are not being added together.  Hopefully it's just my computer here at work that is goofy.  :dontknow:

I see points for CBY's perch.

And Rawkfish's is indeed messed up. This is a longstanding, known bug in the system that happens when 2 fish scores from the same person are equal.  We've been fixing it by adding 0.01 inch to one of the fish to make them unequal.  I'll do that to one of Rawkfish's fish.

That being said, bsteves, anything thoughts on fixing this bug for real?

-Allen

Offline INSAYN

  • Sturgeon
  • *****
  • Posts: 2768
Re: AOTY score page goofed up?
« Reply #2 on: January 31, 2012, 07:34:02 am »
Is it just my computer, or does yours also show no points for CBY's perch, and for some reason Rawkfish's two fish are not being added together.  Hopefully it's just my computer here at work that is goofy.  :dontknow:

I see points for CBY's perch.

And Rawkfish's is indeed messed up. This is a longstanding, known bug in the system that happens when 2 fish scores from the same person are equal.  We've been fixing it by adding 0.01 inch to one of the fish to make them unequal.  I'll do that to one of Rawkfish's fish.

That being said, bsteves, anything thoughts on fixing this bug for real?

-Allen

If that's the case, we should just round all of Rawkfish's catches to a nice even number to give CBY a fighting chance this year.   ;D

Yeah, I tried closing everything on my computer and viewing it again.  CBY's perch doesn't show points for me.  I can see points for it if I click on the image icon and view the entry.   It shows the points there just fine.  :-\
« Last Edit: January 31, 2012, 07:37:15 am by INSAYN »
"I didn't make it to the gym today.  That makes 5 years in a row."


Offline rawkfish

  • Sturgeon
  • *****
  • Posts: 2177
    • youtube.com
Re: AOTY score page goofed up?
« Reply #3 on: January 31, 2012, 09:00:45 am »
And Rawkfish's is indeed messed up. This is a longstanding, known bug in the system that happens when 2 fish scores from the same person are equal.  We've been fixing it by adding 0.01 inch to one of the fish to make them unequal.  I'll do that to one of Rawkfish's fish.

I figured that's what was up.

If that's the case, we should just round all of Rawkfish's catches to a nice even number to give CBY a fighting chance this year.   ;D

No one would want an win like that, would they?  >:D
   
2011 Angler Of The Year
1st Place 2011 PDX Bass Yakin' Classic

Offline bsteves

  • Fish Nerd
  • Administrator
  • Sturgeon
  • *****
  • Posts: 3330
  • Better fishing through science
Re: AOTY score page goofed up?
« Reply #4 on: January 31, 2012, 10:14:51 am »
I think the answer to the bug is that I need to rely less on pure SQL and more on Ruby's ActiveRecord when calculating and ranking everyone's score.  Currently the following SQL query is used to create the total scores and ranking for the site.  It suffers from a glitch were it doesn't deal with ties well.  If anyone has any suggestions I'm all ears.  Until then the add/subtract a tiny fraction of an inch from your tied fish seems to be the work around.

Quote
SELECT id as user_id, users.login, Q1.Score from users left join (SELECT user_id, login, sum(maxspscore) as score FROM (SELECT t1.user_id, t1.login, t1.speciesname, t1.maxspscore, COUNT(*) AS lowerscore FROM (SELECT users.id as user_id, users.login, targets.speciesname, Max(length*targets.points) AS maxspscore FROM users INNER JOIN (targets INNER JOIN catches ON targets.id = catches.target_id) ON users.id = catches.user_id WHERE (catches.date >= users.date_paid) AND (catches.date >= '2012-01-01') and (users.date_paid >= '2012-01-01') GROUP BY users.login, targets.speciesname) AS t1 JOIN (SELECT users.id as user_id, users.login, targets.speciesname, Max(length*targets.points) AS maxspscore FROM users INNER JOIN (targets INNER JOIN catches ON targets.id = catches.target_id) ON users.id = catches.user_id WHERE  (catches.date >= users.date_paid) AND (catches.date >= '2012-01-01') and (users.date_paid >= '2012-01-01') GROUP BY users.login, targets.speciesname) AS t2 ON t1.user_id = t2.user_id AND t1.maxspscore <= t2.maxspscore GROUP BY t1.user_id, t1.maxspscore HAVING lowerscore <=10) AS Table1 GROUP BY user_id order by score DESC) as Q1 ON users.id = Q1.user_id where date_paid >='2012-01-01' AND (users.youthdiv = 'no') order by Q1.score DESC, users.login;

Scholars have long known that fishing eventually turns men into philosophers.  Unfortunately, it is almost impossible to buy decent tackle on a philosopher's salary.  ~Patrick F. McManus

Offline [WR]

  • Sturgeon
  • *****
  • Posts: 2994
Re: AOTY score page goofed up?
« Reply #5 on: January 31, 2012, 10:25:53 am »
Brian
Hit up the brain trust on Linux Journal and Linux Magazine.  .coms respectively. There are some resident experts on Ruby and the other open source data base programs at each location. Maybe they can give you a working patch that will solve this problem.
" Not everyone is fortunate enough to live upstream."- Mark Twain