Welcome, Guest. Please login or register.
May 09, 2025, 09:45:56 PM

Login with username, password and session length

Recent Topics

[May 08, 2025, 09:53:46 AM]

[May 05, 2025, 09:12:01 AM]

[May 03, 2025, 06:39:16 PM]

by jed
[May 02, 2025, 09:57:11 AM]

[May 01, 2025, 05:53:19 PM]

[April 26, 2025, 04:27:54 PM]

[April 23, 2025, 11:10:07 AM]

by [WR]
[April 23, 2025, 09:15:13 AM]

[April 21, 2025, 10:44:08 AM]

[April 17, 2025, 04:48:17 PM]

[April 17, 2025, 08:45:02 AM]

by jed
[April 11, 2025, 01:03:22 PM]

[April 11, 2025, 06:19:31 AM]

[April 07, 2025, 07:03:34 AM]

[April 05, 2025, 08:50:20 PM]

Picture Of The Month



Guess who's back?
jed with a spring Big Mack

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

0 Members and 1 Guest are viewing this topic.

INSAYN

  • ORC_Safety
  • Sturgeon
  • *
  • **RIP...Ron, Ro, AMB, Stephen**
  • Location: Forest Grove, OR
  • Date Registered: Aug 2008
  • Posts: 5417
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:
 

"If I was ever stranded on a beach with only hand lotion...You're the guy I'd want with me!"   Polyangler, 2/27/15


polepole

  • Administrator
  • Sturgeon
  • *****
  • NorthWest Kayak Anglers
  • Location: San Jose, CA :(
  • Date Registered: Apr 2006
  • Posts: 10095
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


INSAYN

  • ORC_Safety
  • Sturgeon
  • *
  • **RIP...Ron, Ro, AMB, Stephen**
  • Location: Forest Grove, OR
  • Date Registered: Aug 2008
  • Posts: 5417
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, 06:37:15 AM by INSAYN »
 

"If I was ever stranded on a beach with only hand lotion...You're the guy I'd want with me!"   Polyangler, 2/27/15


rawkfish

  • ORC
  • Sturgeon
  • *
  • Cabby Strong!
  • youtube.com
  • Location: Portland
  • Date Registered: Mar 2009
  • Posts: 4731
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
"Fishing relaxes me.  It's like yoga except I still get to kill something."  - Ron Swanson


bsteves

  • Fish Nerd
  • Administrator
  • Sturgeon
  • *****
  • Better fishing through science
  • Location: Portland, OR
  • Date Registered: Feb 2007
  • Posts: 4584
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;
“People say nothing is impossible, but I do nothing every day.”

― A.A. Milne, Winnie-the-Pooh


[WR]

  • Sturgeon
  • *******
  • VFW, Life Member at Large, since 1997.
  • ADTA.org
  • Location: currently 17844/17837
  • Date Registered: Jan 2008
  • Posts: 4747
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.
As of July 12th, I am, officially,  retired.