Heya Fog, my credits are wonky, just letting you know. ;)
|
Heya Fog, my credits are wonky, just letting you know. ;)
HI fog I spoke to hallowette to have him/her post this for you but it got me thinking (yeah scary right)
Anyway in programming for accountans I have found odd rounding issues based on wheter its a microsoft product or not that is doing the calculations for your code.
We are taught that if its 5 or above round up to next highest number when thinking in rounding terms ... but awhile back a thing called banker's rounding was introduced and is predominent in microsoft products and it rounds differently than most folks concepts of 5 and up round up.
This method was introduced because over a large period of time things could be skewed on rounding (take the movie entrapment for example lol)
Anyway bankers rounding says round to the nearest EVEN number, if the rounding number is 5 then mathmatical thought is to even out 1-4, 6-9 and then treat 5 as exception .. if the preceding number is even then round down ... if the preceding number is odd round up ... so if number is 2.35 and you are rounding to one decimal this would round to 2.4 if the number is 2.25 this would round down to 2.2... The though is to balance out rounding .. but most folks aren't aware that software programs do this and may not see it when glancing
I am not sure if this is realated to our divide by zero issues, nor do I know the standards of rounding used in whatever language you are using, but I know I have had to write my own functions to supercede the banker's rounding prevalent today because to accountants they freak out about that one penny lol and want it rounded up for display. Hope this helps if not .. well some useful info for folks possibly perusing their bank statements.
Thanks
» Edited on: 2011-11-08 07:58:12
The issue is related to not waiting for the page to refresh before hitting submit again. There is no round and the server is LAMP based. There is no microsoft anywhere on it. Its easy enough for me or one of the draios to click the refresh icon.
Okay was a random thought heh that might help ya, if it didn't np .. but I KNOW it will help programmers in the future ... trust me I hit my head up against a wall the first time I encountered this so called bankers rounding built into vb somethign at the time and it ticked me off till I found the reasoning and could counter act it to coincide with my clients expections .. (microsoft sometimes just forces issues stead of giving choices)
This is the code: honor=honor+$lpoints, rvrhonor=rvrhonor+$lpoints if you can find a divide in there let me know. The problem comes when you send a half sql statement because someone clicks the button a second time before the page finishes loading. It doesn't have the chance to finish the first one. Only way to fix this is taking away the iframe window and making people reload the whole page every time. Or people can learn patience and not spam click. Even banks ask you to "Click Once" and wait for the page to completely load. This issue happens on every system we have, lore, explore, artisan, fellowship and event leadership. Anywhere someone can spam click. I've built a reset script and plan to deploy a periodic autofixer soon. This issue is the reason promotions are a manual process. We'd have guild leaders over night.
If I did something wrong, sorry 'bout that. It's odd though, because I am typically not a "spam clicker" because I know it can mess stuff up. I'll just be sure I am more patient next time, just in case. But thanks for fixing it for me, Fog.
» Edited on: 2011-11-08 10:54:25
You did nothing wrong Hallowette, We all make this happen sooner or later :).
There is another way to get a similar problem to occur. On the leadership page if you click 'start event' without choosing an event type or selecting to reload an existing one you get rank 20 valour. You don't need to spam click the button -- just one click will do it.
Tried that Caelee and it didn't work for me. were warlords set to anything in particular?
Hmmmm. It doesn't do it for me now. The time when I did it I wasn't a level that gave me the option to add warlords. I was trying to help someone lead his first family run and was walking him through how to enter the run on the website. He got stuck not being able to enter objectives and then we realized he had become a level 20 leader (oops!). So I asked him to tell me exactly what he clicked, and I was able to replicate it too. At the time, there were no warlord boxes and we simply opened the leadership panel and clicked "Start Event". Perhaps you've changed something that has fixed it (in the last 2 months or so), or else it could only be an issue for new leaders without the warlord options. Obviously this isn't something I was going to go around clicking all the time to test, so I hadn't checked it again until just now.
Are you using the MyISAM tables or the InnoDB tables? I believe InnoDB has transaction support, so you can avoid getting the half-queries in the database. Might be an easier fix than writing an autofixer.
Actually pat the autofixer is already built i just need to write the detection script and it will be fully functional. Built the autofixer shortly after it started happening. It used to not be a very common occurrence.
» Edited on: 2011-11-08 16:07:50
Well I managed to get my exploration points wonky. I think it was when I added a new discovery but forgot to select the collection for it. I then deleted it (since it was bunk). I noticed after adding about 10 more artifacts that I'm the best explorer ever ;)
Keep this up Pat and im gonna rename you to DivideByZero :P
If only this wasn't an RP server, I would make an alt with that name :)
"The issue is related to not waiting for the page to refresh before hitting submit again. There is no round and the server is LAMP based." I disagree--it is basically a problem of getting users to stop doing something. That is solvable with a little detective work (find out where they live) followed by basic operant conditioning via negative reinforcement as described in the work of B.F. Skinner. The later is made easy by us living in a country with a good package delivery system and the existence of places that sell all kinds of varieties of live insects and arachnids. It's only about $50 to have 100 live discoid cockroaches delivered to someone. Send with a card from Hallmark's "Stop Breaking My Software" series, and they'll get the message.