Beta
×

Welcome to the Slashdot Beta site -- learn more here. Use the link in the footer or click here to return to the Classic version of Slashdot.

Thank you!

Before you choose to head back to the Classic look of the site, we'd appreciate it if you share your thoughts on the Beta; your feedback is what drives our ongoing development.

Beta is different and we value you taking the time to try it out. Please take a look at the changes we've made in Beta and  learn more about it. Thanks for reading, and for making the site better!

Man Spends 2,200 Hours Defeating Bejeweled 2

Soulskill posted more than 4 years ago | from the wins-complimentary-straight-jacket dept.

It's funny.  Laugh. 179

An anonymous reader writes "A California steel contractor spent 2,200 total hours over the last three years racking up a high score in Bejeweled 2. He exceeded the 2^31-1 maximum score programmed for the score display, proving that there is, in fact, an end to the game. I suppose congratulations or condolences are in order."

cancel ×

179 comments

Sorry! There are no comments related to the filter you selected.

Signed int (4, Funny)

Eudial (590661) | more than 4 years ago | (#32056070)

Ah well, 2,147,483,647 points ought to be enough for anyone.

We need more people like this guy (4, Funny)

arcite (661011) | more than 4 years ago | (#32056228)

You all saw The Last Starfighter right? This guy has skills! Who know when unmatched matching of coloured gems could come in handy. Maybe we'll be invaded by variously Gem shaped aliens who (through a quirk in quantum mechanics no doubt) have a fatal weakness when matched in pairs of three. This guy could someday LITERALLY save the world!

Conversely, he may have a bright future as a stockboy at Walmart (or if you will, Target), which requires speed, precision, and the ability to organize matching products in rows of three, five, up to infinity. Clearly, he is a credit to the species.

Re:We need more people like this guy (0)

Anonymous Coward | more than 4 years ago | (#32056480)

parsing error on "pairs of three"

Re:We need more people like this guy (4, Funny)

MrNaz (730548) | more than 4 years ago | (#32056582)

This is Slashdot. A certain degree of "semantic leniency" is called for.

P.S., You insensitive clod.

Re:We need more people like this guy (2, Funny)

Jurily (900488) | more than 4 years ago | (#32057686)

Bad English cry baby Jesus makes.

Re:We need more people like this guy (1, Informative)

Anonymous Coward | more than 4 years ago | (#32056678)

I don't think there's anything wrong with "pairs of three." He obviously meant that each set of six aliens should be sorted into two matching groups of three.

Re:We need more people like this guy (5, Funny)

slamden (104718) | more than 4 years ago | (#32056656)

That's funny, we one time hired a guy to help us move in Chicago. He packed the truck like I had never seen before, perfectly floor to ceiling, all in the front half, tied down and perfectly stable. The back was 100% empty. It was certainly more efficient than the horizontal stacking that occurs whenever I pack a moving van.

Turns out the guy was a former Tetris champ making a little side money to pay for grad school.

Re:We need more people like this guy (1, Funny)

Anonymous Coward | more than 4 years ago | (#32056730)

Just as long as all of your belongings near the cab didn't magically disappear as he stacked them in, you know, because he may have been making even more money on the side, to pay for his cocaine habit.

Chicken or egg? (3, Interesting)

DerekLyons (302214) | more than 4 years ago | (#32057602)

Was he super good at spatial relationships and packing because he was a Tetris champ? Or was he a Tetris champ because he was a savant at spatial relationships and packing?

Re:We need more people like this guy (1)

eugene ts wong (231154) | more than 4 years ago | (#32058178)

Clearly, he is a credit to the species.

Not even 1 woman volunteered yet?? What's going on?

Re:Signed int (1)

PatPending (953482) | more than 4 years ago | (#32056248)

But... Bill Gates said 640k was enough for anyone!

Re:Signed int (0)

Anonymous Coward | more than 4 years ago | (#32056366)

Did not

Re:Signed int (2, Informative)

sonicmerlin (1505111) | more than 4 years ago | (#32056488)

That's actually an often misattributed quote. From Bill Gates's wiki article:

Often attributed to Gates in 1981. Gates considered the IBM PC's 640kB program memory a significant breakthrough over 8-bit systems that were typically limited to 64kB, but he has denied making this remark. Also see the 1989 and 1993 remarks above.

I've said some stupid things and some wrong things, but not that. No one involved in computers would ever say that a certain amount of memory is enough for all time I keep bumping into that silly quotation attributed to me that says 640K of memory is enough. There's never a citation; the quotation just floats like a rumor, repeated again and again. Gates (19 January 1996), "Career Opportunities in Computing—and More". Bloomberg Business News

Do you realize the pain the industry went through while the IBM PC was limited to 640K? The machine was going to be 512K at one point, and we kept pushing it up. I never said that statement — I said the opposite of that. "Gates talks" (20 August 2001) U.S. News & World Report

Re:Signed int (1)

Zordak (123132) | more than 4 years ago | (#32057010)

Never let the truth get in the way of a good quote. (See also: "I can see Russia from my front my back yard").

Re:Signed int (1, Funny)

Anonymous Coward | more than 4 years ago | (#32057554)

Give him another few years and he'll be denying he ever made those forgettable commercials with Jerry Seinfeld.

Re:Signed int (1, Informative)

camperdave (969942) | more than 4 years ago | (#32058452)

I'm sure he's said it at some point or another. You can't go through life having a misquote following you around like a love-sick teen following his crush without repeating the misquote somewhere along the line, even if it is "I never said 640K is enough for anybody"

Re:Signed int (2, Funny)

danny_lehman (1691870) | more than 4 years ago | (#32056280)

well shit.. i thought my highest score of 2mill was pretty good.. Why do i even try at these things.

Re:Signed int (0)

Anonymous Coward | more than 4 years ago | (#32056504)

I never thought I'd say this, but thank goodness for slashdot.

In the discussion for this topic on Digg, people were claiming "signed double," "unsigned int," and a few others were the datatypes used in the program.

x64 (4, Funny)

sakdoctor (1087155) | more than 4 years ago | (#32056092)

THE reason to upgrade to x64

(Also, I thought my 5 days continuous freelancer game at university was extreme)

Re:x64 (1)

Razalhague (1497249) | more than 4 years ago | (#32056220)

(Also, I thought my 5 days continuous freelancer game at university was extreme)

It's really not that much when you think about it. 2200 hours divided over three years is only 2 hours a day.

Re:x64 (2, Insightful)

MrNaz (730548) | more than 4 years ago | (#32056632)

Yes, 2 hours per day does sound rather manageable. Until you step back, take in a bit of perspective, and realize that he spent about as much time as the modern worker spends with his/her children on a cheap iPhone game.

When the life energy of the members of our society is of such little value that such a huge chunk of it would be spent on such a mind bogglingly empty pursuit, one has to question the values that we as a society hold dear.

Oh wait, we're free, that's right. Who am I to ask questions like that etc etc.

Re:x64 (2, Funny)

Anonymous Coward | more than 4 years ago | (#32056900)

aww, sounds like someone is having an existential crisis...

Re:x64 (2, Insightful)

Anonymous Coward | more than 4 years ago | (#32056922)

So? The average american spends far more than 2 hours a day watching TV. We all waste our life in different ways.

Re:x64 (-1, Redundant)

Anonymous Coward | more than 4 years ago | (#32057080)

Are you trying to tell us that what you're doing right now is so much more valuable? Obligatory XKCD [xkcd.com]

Re:x64 (0)

Anonymous Coward | more than 4 years ago | (#32059064)

In truth we all have too much time on our hands before we die. We spend most of it just killing time. I have to do something with it. I like commenting on Slashdot instead of spending time with real people. I'm bad at real people, I have no idea why. Others convince their country to go to war to kill other people that are killing time before their death differently, some build a pyramid or geodesic dome, others spread the gift and burden of life by having children. On the whole someone playing bejeweled is just another thing, but look at all the time he has helped us kill.

Re:x64 (2, Insightful)

HyperQuantum (1032422) | more than 4 years ago | (#32056246)

THE reason to upgrade to x64

If the developer had used an UNsigned int, the game could have been twice as long.

Re:x64 (1)

Bigjeff5 (1143585) | more than 4 years ago | (#32056336)

But then how would you show negative scores?

Oh wait...

Re:x64 (1)

ezzzD55J (697465) | more than 4 years ago | (#32056636)

oh wait what?

Re:x64 (1)

dingen (958134) | more than 4 years ago | (#32056754)

Oh wait, there's no such thing as a negative Bejeweled 2 score.

Re:x64 (0)

Anonymous Coward | more than 4 years ago | (#32056448)

One could argue that the game would still be as long, but the gameplay would be twice as long.

Re:x64 (1)

Angeliqe (1390757) | more than 4 years ago | (#32056518)

Not sure what language the game was written in, but I have a lot of problems when I used unsigned ints in C++. You cannot mix signed and unsigned ints or you get weird results when doing comparisons and basic math operations. It has to do with how the number is stored in memory (for the non-programmers). Limiting yourself to only unsigned numbers in a program is usually an annoyance.

Re:x64 (1)

Rockoon (1252108) | more than 4 years ago | (#32056838)

uuh... what?

Signed and unsigned integral values are stored in exactly the same way on twos complement machines. Its rather beautiful.

Your problems with mixing them is somewhere between your keyboard and your chair.

Re:x64 (1)

Angeliqe (1390757) | more than 4 years ago | (#32058138)

The leading bit on signed numbers is the actual sign. The leading bit on unsigned numbers is part of the number. Even if you store them both as twos complement, you have an extra bit which is interpreted differently depending on whether or not it is signed. How can you say that makes them exactly the same? How can they be stored exactly the same, yet give different ranges of values for the same number of bytes? I just didn't want to explain the entire thing figuring a lot of people didn't really need the explanation.

Re:x64 (1)

Johann Lau (1040920) | more than 4 years ago | (#32058594)

But you talked about "comparisons and basic math operations", not bit operations (which hardly apply to keeping the score in a game btw)

I'm no coder by any stretch of the imagination... but I've never had any problem mixing types in any language, as long as the numbers are small enough to fit into the smallest type involved in the whole operation. And even when doing bit stuff: just be aware of what type the variables you are using and accomodate for that, instead of doing something utterly insane like using the same type for all numbers heh?!

Re:x64 (1)

Angeliqe (1390757) | more than 4 years ago | (#32058876)

I'm going to use a 4 bit number just to simplify things. Compare 15 (1111 unsigned) to -1 (1111 signed). The answer is they are equal. You can see a similar problem with addition. There is no problem if you are 100% sure both numbers will always be positive. The problem only occurs when the signed number is an actual negative number. You can never be 100% sure of anything in a nontrivial program. It makes debugging a nightmare, especially in group programming, when signed and unsigned variables are mixed. You take away the possibility of checking for an error by comparing a score calculation to 0. Even if a value should never be less than 0, a mistake somewhere else may make it so. It's not a good idea to use unsigned values because it masks this error. When I say you can use all unsigned values, I mean on the same programming line, not the entire program (my bad). If you keep your signed and unsigned values on separate lines of code and don't mix them in the same comparison or math operation, you are fine. This is also annoying in large programs.

Re:x64 (0)

Anonymous Coward | more than 4 years ago | (#32058624)

No, but it looks like you need the explanation. If there are 32 bits in your long int, then it can have unsigned values from 0x00000000 to 0xFFFFFFFF (0 to 2^32 - 1) and signed values from 0x80000000 to 0xFFFFFFFF ( - 2^31 to -1) and 0x00000000 to 0x7FFFFFFF (0 to 2^31 -1).

Re:x64 (1)

7 digits (986730) | more than 4 years ago | (#32056558)

Best part of the article:

"In order to beat it, Little Gray killed 390,895 creatures, dealt 7,255,538,878 points of damage, completed 5,906 quests, raided 405 dungeons and hugged 11 players. We think he had sex zero times."

Upgrading to x64 would probably be darwin award worthly...

Re:x64 (1)

istartedi (132515) | more than 4 years ago | (#32056674)

Recompiled... recompiled... RECOMPILED!! -- (gamer dude wakes up), Oh thank God, it was just a dream.

Re:x64 (1)

mick232 (1610795) | more than 4 years ago | (#32056938)

You make exactly the same mistake as the original coder by assuming no one can actually achieve a score of 2^63-1. The way to go is to use some arbitrary precision math data type.

Time is relative. (0)

Anonymous Coward | more than 4 years ago | (#32056104)

Lately, I really wonder about the passage of time. Back in the day it seemed like devoting months to a game wasn't a big deal.

Now, I barely have enough time to accomplish all the things that are mandatory. My gaming life has died on the vine, and I regret to inform you how long it's been since the bathroom has been cleaned.

What are the odds (4, Funny)

Nidi62 (1525137) | more than 4 years ago | (#32056108)

So, who wants to bet that most of the time he spent playing Bejeweled he was also billing someone for contract work?

Re:What are the odds (0)

Anonymous Coward | more than 4 years ago | (#32056144)

So, who wants to bet that most of the time he spent playing Bejeweled he was also billing the government for contract work?

ftfy

Re:What are the odds (0)

Anonymous Coward | more than 4 years ago | (#32056158)

That is a very unsafe bet

Re:What are the odds (0, Troll)

TheMeuge (645043) | more than 4 years ago | (#32056164)

Union labor FTW

Re:What are the odds (2, Funny)

AnonymousClown (1788472) | more than 4 years ago | (#32056172)

So, who wants to bet that most of the time he spent playing Bejeweled he was also billing someone for contract work?

So, he was a QA engineer?

Re:What are the odds (5, Funny)

Voyager529 (1363959) | more than 4 years ago | (#32056302)

So, he was a QA engineer?

Likely for McAffee.

Hey it could be worse! (1)

arcite (661011) | more than 4 years ago | (#32056272)

He could have been watching porn!

Why this is sad (0, Troll)

iamhassi (659463) | more than 4 years ago | (#32056148)

In the article the author raises an interesting point:
"I just made fun of Little Gray's sex life for raiding 405 WoW dungeons, but am I any better? Are any of you? Maybe we are, maybe we're not....It might not be considered a "real" accomplishment to beat Bejeweled 2. It's not like Mike Leyde is a New York fireman or a scientist making lifesaving medical breakthroughs. At the end of the day though, he's achieved more through playing Bejeweled 2 than we have through pouring derision upon him and his ilk via the Internet."

Here's the rub: you (me, everyone) made fun of him for what, a few minutes? But he played a game for 2,205 hours to be "the best". He wasn't saving lives, he wasn't improving mankind, he wasn't doing this to make money (like a Starcraft player might), he simply sat on a chair and played for 2,205 hours, and he did that in just 3 years, which averages out to be 2 hours a day every day. That's a lot of wasted time within a short time frame, and he doesn't even have a train village to show for it like a model train builder might. I'm sure there's WoW players who might average out to be the same, but no one's telling anyone about it, and there's a lot of social interaction in WoW as anyone who watches The Guild [watchtheguild.com] knows.

Although maybe I shouldn't talk: how many hours does the average American watch TV a day? Although they wouldn't lock someone up for watching TV for 2 hrs a day, but if they did something crazy like, throw rocks at a tree for 2 hours, everyday, for 3 yrs, someone might notice. I think this guy needs professional help.

Re:Why this is sad (5, Insightful)

Devout_IPUite (1284636) | more than 4 years ago | (#32056224)

There are a LOT of WoW players who average more than 2 hours a day. When I played I averaged 3 hours a day. This guy enjoyed bejeweled and came home and played Bejeweled after work. A lot of americans watch about that much TV per day and they're not even posting a high score. Healthy? No. Worse than a typical high end raider in WoW? No. Worse than a typical American watching TV? No.

Re:Why this is sad (2, Funny)

Surt (22457) | more than 4 years ago | (#32056786)

The way it is worse is that bejeweled has a very limited repertoire of activity. This guy programmed his brain full of that limited range for 2k hours. At least with tv and wow you get a variety of social inputs.

Re:Why this is sad (0)

Anonymous Coward | more than 4 years ago | (#32057132)

"At least with tv and wow you get a variety of social inputs."

Well let's not go crazy...

Re:Why this is sad (2, Insightful)

Devout_IPUite (1284636) | more than 4 years ago | (#32057148)

With Bejeweled you're using your brain for problem solving. With TV you're not doing anything. You're just sitting on the couch like a very warm potato.

Re:Why this is sad (0)

Anonymous Coward | more than 4 years ago | (#32058800)

With TV, you're using your brain to process interesting stories and potentially get a new perspective on something or be introduced to something new.

With Bejeweled, its pretty much all muscle memory after the first few games.

Re:Why this is sad (1)

a_fuzzyduck (979684) | more than 4 years ago | (#32057258)

No, you just get told what's coming up in the near future.

Re:Why this is sad (0)

Anonymous Coward | more than 4 years ago | (#32059024)

Why is this modded troll? The guy just gave his honest opinion, it obviously wasn't designed to incite controversy.

Re:Why this is sad (1)

Bat Dude (1449125) | more than 4 years ago | (#32057882)

Nor a typical Slash dotter surfing and posting on here. Here is a survey how much time would the average slash dotter spend on this site about 3/4 hr a day for me.

Re:Why this is sad (3, Insightful)

McGiraf (196030) | more than 4 years ago | (#32056254)

Q: "how many hours does the average American watch TV a day? "

A: "According to the A.C. Nielsen Co., the average American watches more than 4 hours of TV each day"

They should be locked up for that.

Re:Why this is sad (4, Interesting)

IANAAC (692242) | more than 4 years ago | (#32056264)

Although maybe I shouldn't talk: how many hours does the average American watch TV a day? Although they wouldn't lock someone up for watching TV for 2 hrs a day, but if they did something crazy like, throw rocks at a tree for 2 hours, everyday, for 3 yrs, someone might notice. I think this guy needs professional help.

Oh, so what...

Really. Yes, plenty of people watch 2 hours of TV a day. Frankly, that's not all that excessive. Figure one 1-hour newscast and one 1-hour length drama/show. Does that put it more in perspective?

I'm not a gamer, so personally, I wouldn't spend 2 hours, let alone 2 minutes, playing a computer game, but the guy hasn't caused anyone any harm, so who cares, really?

It's not sad, it's just the way he chooses to spend his free time. Just as I might choose to spend my free time trying to learn another language - something that many other people would find boring and/or a waste of time.

Re:Why this is sad (4, Insightful)

EvolutionsPeak (913411) | more than 4 years ago | (#32057836)

Figure 40-minute newscast, 40-minute drama/show, 40 minutes advertising

FTFY

(Your point still stands. I agree with you.)

Re:Why this is sad (0)

Anonymous Coward | more than 4 years ago | (#32058196)

You're also assuming he wasn't playing during the times he was being paid as a contractor. :-)

Re:Why this is sad (1, Insightful)

Anonymous Coward | more than 4 years ago | (#32056314)

I think this guy has a hobby he enjoys. It's one where no one else is being harmed, unless his playing has damaged his relationships with friends and family. No worse than someone who watches any kind of TV program or reads books two hours a day. IMO, no one has a beef long as this guy obeys the law, pays his taxes, etc. There are people all over the world who indulge in some kind of pastime for themselves, and even if no one else ever benefits from it, in the end all that matters is it made their lives more enjoyable.

Re:Why this is sad (2, Insightful)

Vellmont (569020) | more than 4 years ago | (#32056380)


but if they did something crazy like, throw rocks at a tree for 2 hours, everyday, for 3 yrs, someone might notice. I think this guy needs professional help.

Throwing rocks at a tree is crazy? Talking to a tree and hearing a response is crazy. Throwing rocks at it might just be a new sport.

Why is it you seem to think something you don't understand is crazy? I don't understand anyone that watches their local news on TV every night. The sensationalist simplistic nonsense that comes out of it makes me want to throw rocks at my television when I see glimpses of it. But I don't think people that do watch and enjoy it are crazy. Badly informed and prone to fear everything yes, but crazy?

I talk to trees. (5, Funny)

harrytuttle777 (1720146) | more than 4 years ago | (#32056696)

Thank you for sticking up for people like me who talk to trees. I should caveat that I USED talk to trees until some of the trees started calling me crazy and laughing at me behind my back. Now I am just kind of sad.

   

Re:Why this is sad (1)

GospelHead821 (466923) | more than 4 years ago | (#32058078)

I throw pieces of rubber at metal poles for two hours at a time sometimes. Two hours is about right for 27 holes of disc golf.

Re:Why this is sad (0)

Anonymous Coward | more than 4 years ago | (#32056410)

Although maybe I shouldn't talk: how many hours does the average American watch TV a day? Although they wouldn't lock someone up for watching TV for 2 hrs a day, but if they did something crazy like, throw rocks at a tree for 2 hours, everyday, for 3 yrs, someone might notice. I think this guy needs professional help.

Maybe he just wants the tree to get off of his damn lawn?

Re:Why this is sad (1)

kwerle (39371) | more than 4 years ago | (#32056520)

See, what makes him really cool is that he was playing WoW *at the same time* - 2-boxing, as it were.

And watching TV.

So this guy was getting 6 hours (average) of amusement crammed into 2 hours/day. I'm pretty sure he spent his other free time saving baby seals.

NOW what do you have to say?

Gambled and Lost (0)

Anonymous Coward | more than 4 years ago | (#32056188)

That's about two hours per day, for three years straight.

Obligatory. [reallifecomics.com]

blitz? (0)

Anonymous Coward | more than 4 years ago | (#32056230)

but what is his score on bejeweled blitz? This equates out to 16225.67 points per minute. You don't even get a badge for that.

There's always someone with less of a life (1)

the_humeister (922869) | more than 4 years ago | (#32056236)

Re:There's always someone with less of a life (0, Troll)

masterwit (1800118) | more than 4 years ago | (#32056510)

Look, its World Of Warcraft... I think most of us could beat that game blindfolded.

Forget Bejeweled (0)

Anonymous Coward | more than 4 years ago | (#32056382)

Who is Tess Taylor and why is she naked with a bong? :p

Then he looked up and said... (1)

xandercash (1791710) | more than 4 years ago | (#32056416)

...I wonder what happened to my wife?

When you're bored... (0)

Anonymous Coward | more than 4 years ago | (#32056418)

One of the reason I don't want to start this game is I would be bored after ~30 minutes, and will started to code a bot to play for me.

captcha: harmless

Why criticize? (5, Insightful)

cvnautilus (1793340) | more than 4 years ago | (#32056442)

I, for one, don't consider time playing video games as "wasted." If it made this guy happy, why does it matter so long as he isn't killing and eating your goats or something?

Re:Why criticize? (2)

NotQuiteReal (608241) | more than 4 years ago | (#32056916)

About half of the people in the world think they know what is better for you than you do.

Re:Why criticize? (0)

Anonymous Coward | more than 4 years ago | (#32058878)

Worse. About half of the people think they know what is better for you, and they aren't shy about using force to compell you to do it.

He's got the better deal... (0)

Anonymous Coward | more than 4 years ago | (#32056538)

He's lucky he finally beat it. I've spent 3,264 hours on World of Warcraft, and I still haven't beaten it.

Condolences? (0)

hansraj (458504) | more than 4 years ago | (#32056624)

The guy spent roughly 5 minutes a day on overage. That sounds to me like he wasn't wasting anymore time than the rest of us do. If the guy can focus on a goal while doing what most people would do while taking breaks, then kudos to him!

----
Space monster need space Nom.. Nom.. [dropbox.com]

Re:Condolences? (2, Informative)

The Living Fractal (162153) | more than 4 years ago | (#32056830)

What kind of awesome math did you use to come up with that?

Three years = 1,095 days.
2,200 hours = 132,000 minutes


132,000 minutes / 1,095 days = 120 minutes / day

Honestly, where the hell did you come up with 5?

Re:Condolences? (1)

hansraj (458504) | more than 4 years ago | (#32056876)

D'oh!

It is 5 minutes every hour on avg. not in a day.

The keys are right next to each other..

Re:Condolences? (2, Funny)

LynnwoodRooster (966895) | more than 4 years ago | (#32057050)

D'oh!

It is 5 minutes every hour on avg. not in a day.

The keys are right next to each other..

I am SO behind the times... I need to get one of these new keyboards with the "hour" and "day" keys!

Wedding (0)

Anonymous Coward | more than 4 years ago | (#32059136)

Sounds like a wedding - congratulations or condolences, one for the bride, the second for the groom.

Anonymous for a reason (0)

Anonymous Coward | more than 4 years ago | (#32056704)

I spent 6600 hours playing runescape and I am not even ranked in the top 2000 players

Signed int? (1)

ruiner13 (527499) | more than 4 years ago | (#32056926)

Could they just put out a fix that uses an unsigned int and double his playtime? :)

Did anyone actually watch the video? (0)

Anonymous Coward | more than 4 years ago | (#32056940)

WHY is his monitor at ceiling level about six feet from his head while he plays? I need a chiropractor and a new eyeglasses prescription just LOOKING at his setup...

Here's what I don't understand... (2, Insightful)

Phroggy (441) | more than 4 years ago | (#32057186)

Why would you use a signed integer for a value like this? I mean, you're never going to have a negative score, and it's not like there's a performance benefit to using a signed integer instead of an unsigned integer. It would take up the same 32 bits of memory. Sure, a score of two billion should be enough and four billion is overkill, but that's really not the point - if you know you're never going to need negative values, why would you reserve a bit for them?

I see this sort of thing all the time. For example, various IMAP clients (including Mozilla Thunderbird and Apple Mail) use a signed integer for the message UID, which breaks horribly in the unlikely event that you happen to have a message in your mailbox with a UID above 2^31. (Unlikely, unless your IMAP server stores the UID within the message itself as an X-UID header, and your SMTP server doesn't strip X-UID headers from incoming messages, allowing spammers to cause all sorts of interesting problems.)

Is it really that much easier to use signed integers? Or are people just idiots?

Re:Here's what I don't understand... (1)

thoughtsatthemoment (1687848) | more than 4 years ago | (#32057412)

The reason, or maybe just one reason, to use signed integers is to prevent accidental or implicit conversion of a negative into something very large.

When a variable is near the neighborhood of 2^31, a 64 bit number should be used. And in cryptography, special data structures are used for even bigger numbers.

Re:Here's what I don't understand... (1, Insightful)

Anonymous Coward | more than 4 years ago | (#32057560)

Is it really that much easier to use signed integers?

Yes. I don't know which language Bejeweled is programmed in, but in most that I'm familiar with, to get a signed integer, you need to say just "int", whereas for an unsigned integer, you explicitly need to say "unsigned int".

Given that it took 3 years wall time, and 3 months solid of actual playing time to actually reach that point, I feel confident that the programmers figured that no one would actually ever get that high. And it's not like moving to an unsigned value would actually have gotten them anywhere - we'd just be having this same conversation in 2013. If they were really concerned about it, they should have gone for a long int or some sort of bignum value.

Re:Here's what I don't understand... (1)

wmbetts (1306001) | more than 4 years ago | (#32057572)

It is so much easier to use signed integers. Think about all the productive lost typing unsigned!

Re:Here's what I don't understand... (1)

RAMMS+EIN (578166) | more than 4 years ago | (#32057704)

``Why would you use a signed integer for a value like this?''

Probably because you would be programming in a language that makes it easier to use signed integers than, say, a type that could actually represent arbitrarily large values, as long as there were enough bits of memory available. Had the program been written in, say, Common Lisp, Ruby, or Python, using such an unconstrained numeric would actually have been the easiest thing to do.

Because of libraries and external dependencies (4, Informative)

KingSkippus (799657) | more than 4 years ago | (#32057772)

Why would you use a signed integer for a value like this?

An honest, practical answer:

Because most people who develop software link to other libraries, and many of those libraries don't have overloaded functions that take unsigned ints as parameters.

For example, C#'s String.Substring function [microsoft.com] takes Int32s as parameters. So if you're using an UInt32 called x to hold some kind of index that you want to use in that function, you have to 1) check to see if x is less than zero (or better yet, less than UInt32.MinValue), and if so, throw an exception, then 2) cast x to an Int32, which takes a miniscule amount of time and resources.

It's much easier just to define x as an Int32, even if you never intend for it to be negative.

In the case of Bejewelled, I can only guess as to what dependencies might exist. Maybe the graphics routine to display the score on the screen is some kind of DisplayNumber(Int32 number,...) function that is generic enough so that they can write the function to display any number, positive or negative, and not have to build and maintain (and risk breaking when the code is updated) yet another function to do the same thing with uints because some weird bizarre edge cases exist where people use numbers > 2^31 but for whatever reason can't just use an Int64 instead.

Re:Because of libraries and external dependencies (0)

Anonymous Coward | more than 4 years ago | (#32058052)

So if you're using an UInt32 called x to hold some kind of index that you want to use in that function, you have to 1) check to see if x is less than zero (or better yet, less than UInt32.MinValue), and if so, throw an exception, then 2) cast x to an Int32, which takes a miniscule amount of time and resources.

That Uint32 called x will never ever be lower than UInt32.MinValue. That check will always be evaluated to true. Instead, you may want to check if it exceeds Int32.MaxValue before passing it. I'm not sure about C#, but in any language for real men the cast just changes the instructions the register is used with, i.e., doesn't cost anything. Casts from smaller to larger data types may require some bits to be cleared though, but not a cast from unsigned 32 bits to signed 32 bits.

Re:Because of libraries and external dependencies (0)

Anonymous Coward | more than 4 years ago | (#32058222)

Also, Java doesn't even have unsigned primitives. It's one of the weaknesses of the language that you often hear people griping about, but I guess I can sort of see the logic. Allowing both signed and unsigned ints can cause a lot of bugs and dependency issues, like the parent's example from C#, and if going over two billion is a realistic probability, then going over four billion probably is too and you should be using a long. The only time I really want unsigned values in Java is with bytes, pretty much any time I'm dealing with a low-level file format.

Re:Because of libraries and external dependencies (1)

jfengel (409917) | more than 4 years ago | (#32058350)

It's one of the weaknesses of the language that you often hear people griping about, but I guess I can sort of see the logic.

The difference between signed and unsigned originated when memories were a lot smaller and CPUs slower. (Hey, I wrote assembly for the 8080, which lacked even a 16-bit multiply.) A single extra bit made a noticeable difference.

Today... hey, you think you're gonna need to count more than 2 billion? Fine, use an extra 4 bytes.

For that rare set of circumstances where you need more than 2 billion, but definitely less than 4 billion, and your loops are so tight that the extra delay in the pipelining makes a noticeable difference... well, you don't want to be writing in a garbage-collecting language anyway, now do you?

Re:Because of libraries and external dependencies (0)

Anonymous Coward | more than 4 years ago | (#32058242)

[...]then 2) cast x to an Int32, which takes a miniscule amount of time and resources.[...]

And would limit you to Int32 anyways

[...]Maybe the graphics routine to display the score on the screen is some kind of DisplayNumber(Int32 number,...) function that is generic enough so that they can write the function to display any number, positive or negative, and not have to build and maintain (and risk breaking when the code is updated) yet another function to do the same thing with uints because some weird bizarre edge cases exist where people use numbers > 2^31 but for whatever reason can't just use an Int64 instead.

The negative value wasn't displayed, so this isn't very likeley.

I've never been a gamer, too old for it I guess. (0, Troll)

sfarber53 (239131) | more than 4 years ago | (#32057784)

Still, I'd like to know why any one would spend so much of their time playing a game? Like so many of our leisure activities, gaming produces nothing beyond some sort of satisfaction for the player, but 2,200 hours (91.66 days), seems a bit excessive. Personally I think this sort of thing borders (just being polite), on obsession or addiction. Get some help, man!

Sad but I appreciate it (1)

thetoadwarrior (1268702) | more than 4 years ago | (#32058520)

I want to point and laugh at him and yeah I still think he's done something worse than I have but still I have played virtually every Pokemon game and completed most of them even giving up socialising with friends for the latest Heartgold version and I've turned 33 this year. So really I shouldn't point and laugh at him.

Why???? (0)

Anonymous Coward | more than 4 years ago | (#32058634)

Why did they use a signed value for the score?

They could have kept him going for another couple of years if they just used the appropriate damn type.
 

The Topper (1, Funny)

edunbar93 (141167) | more than 4 years ago | (#32058720)

Oh that's nothing. I spent more time than that changing my newborn's diapers and/or clothes. Just today.

Load More Comments
Slashdot Login

Need an Account?

Forgot your password?

Submission Text Formatting Tips

We support a small subset of HTML, namely these tags:

  • b
  • i
  • p
  • br
  • a
  • ol
  • ul
  • li
  • dl
  • dt
  • dd
  • em
  • strong
  • tt
  • blockquote
  • div
  • quote
  • ecode

"ecode" can be used for code snippets, for example:

<ecode>    while(1) { do_something(); } </ecode>