First of all, you instantiate a StringBuffer class, which is used to concatenate the "" and the x. Then the StringBuffer is used to create a String object. Then you rinse and repeat to the tune of ten million. That's a LOT of allocating.
As anyone who does Java knows, object allocations are DEATH in java. Avoid them if at all possible.
I bet if you change just the "" + x to just x, you'll shave off those extra 4 seconds.
We had better re-evaluate our position on letting Middle-Eastern children play games such as Microsoft Flight Simulator, or SimCity, which may promote violent tendencies toward crashing airplanes.
THe best educational games I played while I was a kid were on the C64. I'm sure they are ported in various ways to other systems, but my favourites were:
Distributed computing power has become so abundant and easily reachable (seti, dist.net, etc), that the entities with interests in preserving and justifying there existance (seti folk, protein structure folk, encryption folk)have to survive by distracting us with a limitless abundance of distributable contests.
Shouldn't we also be suspicious of corporately sponsored media outlets publishing articles condemming sponsored research?
Of course! If it could be showed that effective and accurate research can be done with corporate sponsorship, then the media might get held accountable for all the FUD they monger.
As a Canadian, I always find it interesting that when the US media refers to our contribution, we get nary a mention.
THings like "The new space arm was added today," or "The arm was added by an astronaut launched from the NASA shuttle Atlantis," etc.
Canadian media write the story:
"The new Canadarm2 built in Canada by Canadians was added today". "The newest technology to come out of Canada," etc. (slightly exagerated of course)
Obviously, the Canadian media wants to brag about it's achievments, and the US doesn't need or care to. But I bet this little quirk in the arm will bring the word Canada to the forefront of space news this week...
> > In a l999 CBS.MarketWatch.com poll, 23 per cent of the people surveyed called pornography the Net's worst feature.
L-999, huh? Nice typewriter ya got there, Katz!
By not including it, aren't they really just using their monopolistic practices to advance a technology of their choice? If bluetooth is an innovative technology, then isn't this just more proof of the same argument about the MS monopoly stifiling progress?
Lobby congress now! FOrce MS to include Bluetooth support!
You should be ashamed of yourself for trying to make money off this "side project"!
You should put all the source that you've developed thus far on a web site, and GPL it.
Then your employer can't expect you to work on it for them, because you'd be using your knowledge of the source to complete it, which if closed by your company would violate the GPL right?
Then we can all dance around and be merry because we've seen how beneficial it is to open source everything. Well, except for the fact that if I was your employer I'd fire you.
It's a post-apocalyptic tale (aren't they all?) but there is a definite theme of responsibility regarding technology.
I.e. If it was technology that brought about the first disaster of humanity - should we really be trying to rediscover that same technology? Have we learned anything, could we be more responsible now, or is mankind just inherently stupid/evil/selfish?
For all of you insisting on a 4D maze with time as the 4th dimension, check out the movie Cube. I won't go into too much detail to spare those
who haven't seen it yet. Great movie!
I'm sure it's just that I haven't read enough comments to find someone else whose clarified this.
The actual GAME of minesweeper IS NOT NP Complete!!
Given a particular minesweeper board, except for times where no logical decision is possible, the game is COMPLETELY deterministic (you use deduction to figure out which box you click next). The "guessing" involved in NP is NOT the same as the guessing you do with the lack of information provided in some Minesweeper boards.
What *IS* NP complete is the CONSISTANCY of the Minesweeper board. Ie. Given a minesweeper configuration, is a solution POSSIBLE.
For example, a board with a 9 would be inconsistant because it can't possibly have 9 bombs around it. Likewise, a square with a 2, and all but one square uncovered would be inconsistant.
In short: Solving the game is not the problem. The problem is: Given a board, without making any more moves, is it possible that a solution exists.
That problem is NP-complete.
Do you realize what you're doing when you type:
System.out.println("" + x);
Probably not, so I'll tell you.
First of all, you instantiate a StringBuffer class, which is used to concatenate the "" and the x. Then the StringBuffer is used to create a String object. Then you rinse and repeat to the tune of ten million. That's a LOT of allocating.
As anyone who does Java knows, object allocations are DEATH in java. Avoid them if at all possible.
I bet if you change just the "" + x to just x, you'll shave off those extra 4 seconds.
We had better re-evaluate our position on letting Middle-Eastern children play games such as Microsoft Flight Simulator, or SimCity, which may promote violent tendencies toward crashing airplanes.
THe best educational games I played while I was a kid were on the C64. I'm sure they are ported in various ways to other systems, but my favourites were:
Lemonade (Capitalist fun)
Oregon Trail (pioneering, resource management)
I won't care either way until either of these companies (TIvO, replay) grow up enough to open their markets to Canada.
Distributed computing power has become so abundant and easily reachable (seti, dist.net, etc), that the entities with interests in preserving and justifying there existance (seti folk, protein structure folk, encryption folk)have to survive by distracting us with a limitless abundance of distributable contests.
'Nuff said.
Shouldn't we also be suspicious of corporately sponsored media outlets publishing articles condemming sponsored research?
Of course! If it could be showed that effective and accurate research can be done with corporate sponsorship, then the media might get held accountable for all the FUD they monger.
One reason why online editorials can't compete with mainstream media outlets.
We agree with you Jon. I want to see these arguments in a medium where the average yokel will see them.
As a Canadian, I always find it interesting that when the US media refers to our contribution, we get nary a mention.
THings like "The new space arm was added today," or "The arm was added by an astronaut launched from the NASA shuttle Atlantis," etc.
Canadian media write the story:
"The new Canadarm2 built in Canada by Canadians was added today". "The newest technology to come out of Canada," etc. (slightly exagerated of course)
Obviously, the Canadian media wants to brag about it's achievments, and the US doesn't need or care to. But I bet this little quirk in the arm will bring the word Canada to the forefront of space news this week...
Blame Canada eh?
You're not giving the whole story either.
In XP you *AND* your partner in crime design the test cases, and write the code.
Pair Programming is a fundamental in XP.
L-999, huh? Nice typewriter ya got there, Katz!
Forfty percent of people know that!
Shouldn't MS have to include bluetooth support?
By not including it, aren't they really just using their monopolistic practices to advance a technology of their choice? If bluetooth is an innovative technology, then isn't this just more proof of the same argument about the MS monopoly stifiling progress?
Lobby congress now! FOrce MS to include Bluetooth support!
The question on all the issues that crop up around here seem to be with loopholes.
On the one hand, a person has certain rights. On the other, granting that right shouldn't open the door to all sorts of objectionable things.
i.e. You Americans *love* your free speech - but you still can't say "I've got a bomb" in an airport.
Napster is great for sharing indie-band music, but you still shouldn't trade copyright material.
You can't be responsible for seeds blowing onto your land, but you can't use that as an excuse for having a crop of it.
For every right we grant, we open a door to abuse.
"I'm just going to start punching the air like this, and if you get in the way - it's your fault!"
Yes, private industry invading our schools is _exactly_ what we need.
"Can anyone tell me the atomic mass of Bolognium?"
"Delicious?!"
You should be ashamed of yourself for trying to make money off this "side project"!
You should put all the source that you've developed thus far on a web site, and GPL it.
Then your employer can't expect you to work on it for them, because you'd be using your knowledge of the source to complete it, which if closed by your company would violate the GPL right?
Then we can all dance around and be merry because we've seen how beneficial it is to open source everything. Well, except for the fact that if I was your employer I'd fire you.
You should read this book by Walter M. Miller Jr.
It's a post-apocalyptic tale (aren't they all?) but there is a definite theme of responsibility regarding technology.
I.e. If it was technology that brought about the first disaster of humanity - should we really be trying to rediscover that same technology? Have we learned anything, could we be more responsible now, or is mankind just inherently stupid/evil/selfish?
Fantastic book (with lots of bio-babble) about man's next leap.
Link to book here
Shouldn't this be a Katz story?
Come to think of it, a clone of Linus would really speed up development, wouldn't it? Or would we have to clone Alan Cox too?
You may also want to clone Andy Tannenbaum. Now that's either funny or trolling... not sure which...
This sounds vaguely similar to how PalmOS apps work.
THe entire filesystem is based around the idea of a database, where memory chunks are accessed based on the name of the app, etc....
I remember how awesome the commie was back in the day.
I would be playing Ghosts'n'Goblins while my buddies with their Tandys were playing Test Drive in CGA with PC-Speaker beeps.
I even had a 2400baud modem, and 3"1/2 drive. That sucker seemed like it'd never fill up.
who haven't seen it yet. Great movie!
Not to mention is was Canadian-made!! Go Canada!
If things go well, I'll be showing her my 'O' face.
Oh...oh....oh
I'm sure it's just that I haven't read enough comments to find someone else whose clarified this.
The actual GAME of minesweeper IS NOT NP Complete!!
Given a particular minesweeper board, except for times where no logical decision is possible, the game is COMPLETELY deterministic (you use deduction to figure out which box you click next). The "guessing" involved in NP is NOT the same as the guessing you do with the lack of information provided in some Minesweeper boards.
What *IS* NP complete is the CONSISTANCY of the Minesweeper board. Ie. Given a minesweeper configuration, is a solution POSSIBLE.
For example, a board with a 9 would be inconsistant because it can't possibly have 9 bombs around it. Likewise, a square with a 2, and all but one square uncovered would be inconsistant.
In short: Solving the game is not the problem. The problem is: Given a board, without making any more moves, is it possible that a solution exists.
That problem is NP-complete.
I wonder if it has anything to do with Uranus.