General chat and talk about whisky.
Jeroen Kloppenburg
Silver Member
Posts: 402
Joined: Sun Aug 11, 2002 1:01 am
Location: Deventer, the Netherlands
Contact:

Postby Jeroen Kloppenburg » Sat May 20, 2006 10:15 am

Probably the well known 'off-by-one' bug many coders face more then a single time in their career ;)

Computers often start counting at 0, so if the coder then takes the returned 4 for example and takes it as 4, he forgets the 0, being 5 total.

Had this happening several times in my tasting notes program as well :\

Apathy78
New member
Posts: 24
Joined: Fri May 19, 2006 2:19 pm
Location: Jacksonville, NC

Postby Apathy78 » Mon May 22, 2006 9:44 pm

Jeroen Kloppenburg wrote:Probably the well known 'off-by-one' bug many coders face more then a single time in their career ;)

Computers often start counting at 0, so if the coder then takes the returned 4 for example and takes it as 4, he forgets the 0, being 5 total.

Had this happening several times in my tasting notes program as well :\

Y2K :o :shock:

PuckJunkie
Bronze Member
Posts: 177
Joined: Fri May 12, 2006 7:36 pm
Location: Dallas, TX USA

Postby PuckJunkie » Mon May 22, 2006 10:21 pm

It's due to both the difference in how the numbers are determined and the fact that the "Forum Search" function in phpbb isn't perfect.

The "Total Posts" number under your profile is incremented whenever you post in a forum area, unless that area is specifically programmed otherwise. But when you use the "Find all posts" link, you're doing the same thing as if you'd used the "Forum Search" link at the top and then specified the author and displayed all results as posts (rather than threads). For some reason phpbb often returns duplicate matches, showing the precise posting twice and counting the duplicate match in its summary number that it reports. If you were willing to root through your 391 posts, I imagine you would find one duplicate. Or if you want to root through Lawrence's 2947 returned results, you'd have 57 duplicates to find... :)

Puck


Return to “Whisky Chat”



Who is online

Users browsing this forum: Yahoo [Bot] and 1 guest