Boy, its a damn good thing you went out of your way to both write more code and generate slower code. Now maybe its a fluke of the JVM on here, but doing the concat method is 20% faster...
Well, there are two ways you can prove it -- write a test... do a million iterations of one, versus a million of the other and watch your RAM usage and time it takes.
Alternately, compile it and then use a java disassembler, and look at the resulting code.
The string concatination is very heavily optimized, and structures like that where you are concatinating hardcoded strings basically does the equivalent of interning them (there aren't real string objects for those).
Compilers are smart. If you concatinate to produce the string, it knows what you are trying to do and can optimize. If you self-optimize and get it wrong (which is what happens when you use a StringBuffer), it doesn't know what you are doing and can't optimize it.
Two seconds of google searching turned up this, if you don't want to test it yourself: http://www.precisejava.com/javaperf/j2se/StringAnd StringBuffer.htm
Anyone who's ever done any performance testing in Java knows that these days, concatinating produces FAR more efficient code than the StringBuffer method...
I figure my time is worth in the order of a year of Tivo's service per hour...
Looking at the install docs for that, I figure I could pay Tivo service from now until the day I die and not have spent more than the value of the time I wasted installing that.
Now, if there was an ISO with all that crap pre-compiled, pre-installed, and pre-configured for a specific set of hardware I could buy and assemble quickly, then maybe it'd be worth it to play around with...
If I was Jason, Chris would be stuffed in a locker after class for only giving me a 96 when I gave him a 98.
Nothing happens to your privacy...
on
NYT on RFID Tags
·
· Score: 2, Insightful
You don't have an RFID tag, and they're item-type specific anyway, not item-specific (ie, they might say you're carrying a pink size-16 thong, but not which thong and they don't know who you are)
There are things in this world to be legitimately paranoid about, but this isn't one of them.
Hmmm looking through your recent posts, you are an angry, angry mean. Why all the hate?
Considering how much blatently incorrect stuff was in the ten or so posts of yours I just read, I'm not sure you're qualified to say much of anything...
FWIW, in case the math is too hard, 2.85 million miles at legal speeds is 12 hours a day, five days a week, 52 weeks a year for almost 16 years. Where did you get time to become an expert in everything else your other posts seem to indicate you're an expert in? Books-on-tape?
Re:This study only concerns drafting tracks.
on
Game Theory at 190mph
·
· Score: 1, Flamebait
Imaginary friend? Hardly, but aparently your understanding of basic aerodynamics is woefully lacking.
Two equal sized/weight vehicles, that may in fact be true, but there's a significant sized area immediately behind a trailer that has enough of a reduced air pressure that you can very easily get into a sweet spot where the air pressure behind as opposed to the front your car is more than enough to keep you in that spot.
I've done it before, I know a number of people who have, and in case it wasn't completely clear, no shit its a risky thing to do, why do you think I said it takes more sack to do that then racing around at track at 150mph? Its dangerous, but its a rush when you get into that spot.
Having followed people very deep into a braking zone at 140mph before three or four feet off their bumper, I'm quite aware of the risks involved with the person in front of you braking faster than you are.
Example: Porsche 996TT with the PCCB kit and hot rotors is something I'd be worried about stopping behind with only feet clearance at 140mph... a semi isn't the slightest concern. Either way, I didn't say I did it, because aggressive driving only belongs on the track.
I appreciate your attempt at making yourself sound knowledgable, though... you might've fooled someone with your "er, 10 seconds" statistic. Very confidence inspiring, there.
Oh, for anyone who does wonder why it works other than this kid, drafting does two things -- reduces the drag on the rear of the front car, and reduces the wind resistance on the front of the trailing car... because there is a lower pressure there. Guess what happens if you put a substantially lighter car in that space?
Re:This study only concerns drafting tracks.
on
Game Theory at 190mph
·
· Score: 1, Interesting
I used to know a guy who would draft trucks on long drives... get right up behind them, and put the car in neutral and let them pay for the gas...
Having done a LOT of racing myself, that takes a whole lot more sack then going around at track at 150mph.
Thats very strange... I know lots of hardcore techs who are into racing themselves, but don't know anyone into racing themselves who think NASCAR is anything more than motorsports version of WWF/WWE.
I'm a hardcore tech, I spend most of the time I'm not geeking out racing, and I've worked tech for racing teams... and my extent of interest in NASCAR is the thought coming into turn six at Watkins Glen that the "professional" NASCAR drivers are so damn scared of making turns both directions that they skip the boot entirely...
Sounds like you know that, what the heck are you a NASCAR fan for?;-)
That should still be illegal... I've never seen one of those which was for a sales pitch, they're usually creditors. Creditors aren't allowed to leave any message to the effect that they're calling about an unpaid debt on an answering machine because its considered harassment, so they leave messages like that.
Have you actually called it back to see if its a sales pitch?
So its not like the technology is all that complicated.
From experience, though, the signals don't propogate very well. I have a lot of dead spots in my house, and nothing works on any circuit with an electric motor on it.
I agree. I think whats going to end up happening long term is Windows will take and keep the desktop (I just don't see it happening with Linux, this coming from someone whose used it as his only OS at home for ten years), Linux in the datacenter, and OS-X in the same niche role its in now, with the caveat that I think it'll start pulling away the tiny percentage of people who want to run Unix on their desktop.
Ten years running Linux, and tomorrow morning I'm dropping the bills on one of those spiffy gigahertz 17" iMacs. I want Unix, and I want more functional stability than Linux has ever given me (not OS stability, but stability in terms of what programs I can use to do what, what works with what else, etc... )
I didn't read Ebert's review, but the quotes you pulled out seemed to hit the whole franchise right on the head.
And I *have* seen all the episodes, except for that junk show Voyager. And all the movies. Yup, read most of the books too, at least all the ones that were written before ten years ago.
So I'm in a pretty good position to agree with him. You sure that was Star Trek you were watching?
I know a lot of you on Slashdot aren't old enough to remember when Challanger exploded at takeoff, and don't remember the uphoria and excitement that we all used to have when the Space Shuttle was new, or the excitement that a honest to God civilian was getting to go into space. In this era of any rich playboy with $20mil can get into space with enough effort, its hard to imagine what that was like for us, especially those of us who were young at the time.
You also may not remember the emptiness when it became clear that NASA with public and short-sighted government pressure was shying away from manned space flight, and there was so much fear that it may never recover. This was a tragedy of epic proportions -- the possibility that we in the US (and as one of the major players in manned space flight) might shy away from exploration and adventure because it was dangerous.
Things truely never recovered. The idiocy that is the Interational Space Station is a direct descendant of those events 17 years ago (almost to the day). The loss of our looking outward at greater feats, better manned spacecraft and the like are all descendant from that instant.
Now we stand at the cusp of it happening again. This depresses me. People today just don't understand that taking risks is important to advancement, and death is part of taking risks... something explorers have understood for centuries, and a lot of people have seemed to have forgotten today.
While part of me thinks NASA getting out of the manned space business, and dumping this massive waste of energy going into the ISS would be a good thing, because it may open up that exploration and adventure to those goverments or business who still have that sense of longing. I'm scared, though, that no one else will step up and take the reigns.
I hope we as a nation can recognize this for what it was -- an unfortunate event, but an outcome that can be expected when pushing the boundaries. We should feel pride in the people who lost their lives here, and rise up, and continue to do what they gave their lives for. I hope we as Americans don't shrink away even more in fear.
As potentially unpatriotic as it is to say, it makes me glad to know that the hope, energy and imagination of the billion people in China are there to step up, if we turn our backs on this important step in Humanity's future. It matters far more to me that we do this as a species then we do it as a nation. I hate the thought of what losing this would be a sign of for us as a country, though.
Its funny, I've said the same thing before... if I could make 3/4 of what I'm making now and spend my day working as an Audi/VW/Porsche mechanic/tuner, I'd be happy as a pig in you-know-what.
But I'm in no hurry. Unlike a lot of people, I'm working at a job I look forward to every morning with people I enjoy working with.
If not all cars, most cars have the VIN displayed in a sticker at the very front of the dash, next to the A-pillar. You can read it through the windshield. Many also have a barcode of it there.
Want to steal a car easily? Go peek in the front window, get the VIN number, and find a minimum-wage kid in a dealer parts department and give him fifty bucks to cut you a key for it. There's only 20-30 keys for a given car model -- they may have one in stock anyway, and they know which key you have based on your VIN number.
Eh, try again. Should've tried the alternate...
Here's a comparison of the two methods:
12 new #4
15 dup
16 invokespecial #5
19 ldc #6
21 invokevirtual #7
24 aload_1
25 invokevirtual #7
28 ldc #8
30 invokevirtual #7
33 aload_2
34 invokevirtual #7
37 ldc #8
39 invokevirtual #7
42 aload_3
43 invokevirtual #7
46 invokevirtual #9
49 invokevirtual #10
Versus
56 invokespecial #5
59 astore 4
61 aload 4
63 ldc #6
65 invokevirtual #7
68 pop
69 aload 4
71 aload_1
72 invokevirtual #7
75 pop
76 aload 4
78 ldc #8
80 invokevirtual #7
83 pop
84 aload 4
86 aload_2
87 invokevirtual #7
90 pop
91 aload 4
93 ldc #8
95 invokevirtual #7
98 pop
99 aload 4
101 aload_3
102 invokevirtual #7
105 pop
106 getstatic #3
109 aload 4
111 invokevirtual #9
114 invokevirtual #10
Boy, its a damn good thing you went out of your way to both write more code and generate slower code. Now maybe its a fluke of the JVM on here, but doing the concat method is 20% faster...
Um... Not to get into a pissing match, but you've clearly never tried it. Concatinating does NOT create string buffers...
/., heaven forbid anyone try something before they reply, right?
But this is
Well, there are two ways you can prove it -- write a test... do a million iterations of one, versus a million of the other and watch your RAM usage and time it takes. Alternately, compile it and then use a java disassembler, and look at the resulting code. The string concatination is very heavily optimized, and structures like that where you are concatinating hardcoded strings basically does the equivalent of interning them (there aren't real string objects for those). Compilers are smart. If you concatinate to produce the string, it knows what you are trying to do and can optimize. If you self-optimize and get it wrong (which is what happens when you use a StringBuffer), it doesn't know what you are doing and can't optimize it. Two seconds of google searching turned up this, if you don't want to test it yourself: http://www.precisejava.com/javaperf/j2se/StringAnd StringBuffer.htm
Anyone who's ever done any performance testing in Java knows that these days, concatinating produces FAR more efficient code than the StringBuffer method...
I figure my time is worth in the order of a year of Tivo's service per hour...
Looking at the install docs for that, I figure I could pay Tivo service from now until the day I die and not have spent more than the value of the time I wasted installing that.
Now, if there was an ISO with all that crap pre-compiled, pre-installed, and pre-configured for a specific set of hardware I could buy and assemble quickly, then maybe it'd be worth it to play around with...
If I was Jason, Chris would be stuffed in a locker after class for only giving me a 96 when I gave him a 98.
You don't have an RFID tag, and they're item-type specific anyway, not item-specific (ie, they might say you're carrying a pink size-16 thong, but not which thong and they don't know who you are)
There are things in this world to be legitimately paranoid about, but this isn't one of them.
Move along.
Hmmm looking through your recent posts, you are an angry, angry mean. Why all the hate?
Considering how much blatently incorrect stuff was in the ten or so posts of yours I just read, I'm not sure you're qualified to say much of anything...
FWIW, in case the math is too hard, 2.85 million miles at legal speeds is 12 hours a day, five days a week, 52 weeks a year for almost 16 years. Where did you get time to become an expert in everything else your other posts seem to indicate you're an expert in? Books-on-tape?
Imaginary friend? Hardly, but aparently your understanding of basic aerodynamics is woefully lacking.
Two equal sized/weight vehicles, that may in fact be true, but there's a significant sized area immediately behind a trailer that has enough of a reduced air pressure that you can very easily get into a sweet spot where the air pressure behind as opposed to the front your car is more than enough to keep you in that spot.
I've done it before, I know a number of people who have, and in case it wasn't completely clear, no shit its a risky thing to do, why do you think I said it takes more sack to do that then racing around at track at 150mph? Its dangerous, but its a rush when you get into that spot.
Having followed people very deep into a braking zone at 140mph before three or four feet off their bumper, I'm quite aware of the risks involved with the person in front of you braking faster than you are.
Example: Porsche 996TT with the PCCB kit and hot rotors is something I'd be worried about stopping behind with only feet clearance at 140mph... a semi isn't the slightest concern. Either way, I didn't say I did it, because aggressive driving only belongs on the track.
I appreciate your attempt at making yourself sound knowledgable, though... you might've fooled someone with your "er, 10 seconds" statistic. Very confidence inspiring, there.
Oh, for anyone who does wonder why it works other than this kid, drafting does two things -- reduces the drag on the rear of the front car, and reduces the wind resistance on the front of the trailing car... because there is a lower pressure there. Guess what happens if you put a substantially lighter car in that space?
I used to know a guy who would draft trucks on long drives... get right up behind them, and put the car in neutral and let them pay for the gas...
Having done a LOT of racing myself, that takes a whole lot more sack then going around at track at 150mph.
Thats very strange... I know lots of hardcore techs who are into racing themselves, but don't know anyone into racing themselves who think NASCAR is anything more than motorsports version of WWF/WWE.
;-)
I'm a hardcore tech, I spend most of the time I'm not geeking out racing, and I've worked tech for racing teams... and my extent of interest in NASCAR is the thought coming into turn six at Watkins Glen that the "professional" NASCAR drivers are so damn scared of making turns both directions that they skip the boot entirely...
Sounds like you know that, what the heck are you a NASCAR fan for?
Its simple -- your program doesn't require a GPL DNS server, it just requires a DNS server.
'nuff said.
Um... have you looked at a real CD before?
You can on them too.
That should still be illegal... I've never seen one of those which was for a sales pitch, they're usually creditors. Creditors aren't allowed to leave any message to the effect that they're calling about an unpaid debt on an answering machine because its considered harassment, so they leave messages like that.
Have you actually called it back to see if its a sales pitch?
So its not like the technology is all that complicated.
From experience, though, the signals don't propogate very well. I have a lot of dead spots in my house, and nothing works on any circuit with an electric motor on it.
Liar, Slashdot readers don't have ex's.
I agree. I think whats going to end up happening long term is Windows will take and keep the desktop (I just don't see it happening with Linux, this coming from someone whose used it as his only OS at home for ten years), Linux in the datacenter, and OS-X in the same niche role its in now, with the caveat that I think it'll start pulling away the tiny percentage of people who want to run Unix on their desktop.
Ten years running Linux, and tomorrow morning I'm dropping the bills on one of those spiffy gigahertz 17" iMacs. I want Unix, and I want more functional stability than Linux has ever given me (not OS stability, but stability in terms of what programs I can use to do what, what works with what else, etc... )
Um, have YOU ever watched Star Trek?
I didn't read Ebert's review, but the quotes you pulled out seemed to hit the whole franchise right on the head.
And I *have* seen all the episodes, except for that junk show Voyager. And all the movies. Yup, read most of the books too, at least all the ones that were written before ten years ago.
So I'm in a pretty good position to agree with him. You sure that was Star Trek you were watching?
That I *saw* the movie, and I can't remember that Data died. How did he die, again?
Must've not made much of an impact...
If there isn't interesting news, talk about something thats not interesting. After a half hour, repeat.
I know a lot of you on Slashdot aren't old enough to remember when Challanger exploded at takeoff, and don't remember the uphoria and excitement that we all used to have when the Space Shuttle was new, or the excitement that a honest to God civilian was getting to go into space. In this era of any rich playboy with $20mil can get into space with enough effort, its hard to imagine what that was like for us, especially those of us who were young at the time.
You also may not remember the emptiness when it became clear that NASA with public and short-sighted government pressure was shying away from manned space flight, and there was so much fear that it may never recover. This was a tragedy of epic proportions -- the possibility that we in the US (and as one of the major players in manned space flight) might shy away from exploration and adventure because it was dangerous.
Things truely never recovered. The idiocy that is the Interational Space Station is a direct descendant of those events 17 years ago (almost to the day). The loss of our looking outward at greater feats, better manned spacecraft and the like are all descendant from that instant.
Now we stand at the cusp of it happening again. This depresses me. People today just don't understand that taking risks is important to advancement, and death is part of taking risks... something explorers have understood for centuries, and a lot of people have seemed to have forgotten today.
While part of me thinks NASA getting out of the manned space business, and dumping this massive waste of energy going into the ISS would be a good thing, because it may open up that exploration and adventure to those goverments or business who still have that sense of longing. I'm scared, though, that no one else will step up and take the reigns.
I hope we as a nation can recognize this for what it was -- an unfortunate event, but an outcome that can be expected when pushing the boundaries. We should feel pride in the people who lost their lives here, and rise up, and continue to do what they gave their lives for. I hope we as Americans don't shrink away even more in fear.
As potentially unpatriotic as it is to say, it makes me glad to know that the hope, energy and imagination of the billion people in China are there to step up, if we turn our backs on this important step in Humanity's future. It matters far more to me that we do this as a species then we do it as a nation. I hate the thought of what losing this would be a sign of for us as a country, though.
Its funny, I've said the same thing before... if I could make 3/4 of what I'm making now and spend my day working as an Audi/VW/Porsche mechanic/tuner, I'd be happy as a pig in you-know-what.
But I'm in no hurry. Unlike a lot of people, I'm working at a job I look forward to every morning with people I enjoy working with.
Our ex-president was giving orders while getting head. Which is worse?
You mean like <a href="http://developers.slashdot.org/article.pl?s<nobr>i<wbr></wbr></nobr> d=03/01/21/1752251&mode=thread">this</a>?
If not all cars, most cars have the VIN displayed in a sticker at the very front of the dash, next to the A-pillar. You can read it through the windshield. Many also have a barcode of it there.
Want to steal a car easily? Go peek in the front window, get the VIN number, and find a minimum-wage kid in a dealer parts department and give him fifty bucks to cut you a key for it. There's only 20-30 keys for a given car model -- they may have one in stock anyway, and they know which key you have based on your VIN number.
VIN numbers are totally public info.