ID:194324
 
I've said it before and I'll say it again: braces are frickin' pointless.


protected static String removeJunk(String string)
// Adapted from Sun's Java Tutorial
{
int i, len = string.length();
StringBuffer dest = new StringBuffer(len);
char c;

for (i = 0; i < len; i++)
{
c = string.charAt(i);
if (Character.isLetterOrDigit(c) || c == ' ')
{
dest.append(c);
}
}

return dest.toString();
}
On 6/7/01 11:19 am Gughunter wrote:
I've said it before and I'll say it again: braces are frickin' pointless.

Heh, yeah. Surprisingly, most of my coding problems in "better" (and that is emphasised in a bad way) languages stem not from misplaced braces, but rather, from forgetting semicolons. I'm getting a massive mark in Computer Science right now, because my code is the cleanest in the class! Of course, I tend to complicate things unnecessarily (like typecasting variables into doubles, dividing them, and then seeing if their mantissa is equal to zero... rather than just using modulus =).


Of course, my understanding of C++ is still slightly weak. I suspect there's a hidden logic error in that frustration example, but I can't tell. =)


My brace/indentation standard is slightly different:

protected static String removeJunk(String string) {
// Adapted from Sun's Java Tutorial
int i, len = string.length();
StringBuffer dest = new StringBuffer(len);
char c;

for (i = 0; i < len; i++) {
c = string.charAt(i);
if (Character.isLetterOrDigit(c) || c == ' ') {
dest.append(c);
}
}

return dest.toString();
}


I dunno, I like this method better. I'm blatantly ignoring my teacher's indentation rule, but he doesn't seem to mind... so no matter! =)
In response to Spuzzum
On 6/7/01 11:51 am Spuzzum wrote:
My brace/indentation standard is slightly different:

I tend to prefer that style as well. I believe it's also known as Danism, as explained on p197 of The Blue Book.
In response to Air Mapster
On 6/7/01 11:56 am Air Mapster wrote:
On 6/7/01 11:51 am Spuzzum wrote:
My brace/indentation standard is slightly different:

I tend to prefer that style as well. I believe it's also known as Danism, as explained on p197 of The Blue Book.

Yup. Sorry, Tom! =)
In response to Spuzzum
Yup. Sorry, Tom! =)

My style is closer to Tomism, but I think it's slightly different. Only Guyism fully exposes braces as the miserable design flaw they are!
In response to Gughunter
On 6/7/01 12:01 pm Gughunter wrote:
Yup. Sorry, Tom! =)

My style is closer to Tomism, but I think it's slightly different. Only Guyism fully exposes braces as the miserable design flaw they are!

Yeah, your braces are indented one tab beneath the appropriate section. Tomist braces are flush-aligned with the section.

Any way someone throws their code together, it looks confusing to me. ;-)

(Actually, BYOND was starting to confuse me when I was programming, because I couldn't see braces. Then I remembered, and now C++ is confusing me. Oh well. =)


* Spuzzum is carefully learning way of ninja. He like fly on wax paper. Soon he will learn way to kill man with chopsticks.
In response to Gughunter
On 6/7/01 12:01 pm Gughunter wrote:
Yup. Sorry, Tom! =)

My style is closer to Tomism, but I think it's slightly different. Only Guyism fully exposes braces as the miserable design flaw they are!

BYOND has taught me that all other languages are making me do the work instead of the compiler, and I resent the hell out of that fact now.

How much life in the universe is lost to missing semi-colons and braces, when those items just exist so that the compiler programmer can take a long lunch instead of doing their job?
In response to Deadron
On 6/7/01 2:08 pm Deadron wrote:
On 6/7/01 12:01 pm Gughunter wrote:
Yup. Sorry, Tom! =)

My style is closer to Tomism, but I think it's slightly different. Only Guyism fully exposes braces as the miserable design flaw they are!

BYOND has taught me that all other languages are making me do the work instead of the compiler, and I resent the hell out of that fact now.

How much life in the universe is lost to missing semi-colons and braces, when those items just exist so that the compiler programmer can take a long lunch instead of doing their job?

Prècisement.


* Spuzzum resolves to use less French on the forum.
On 6/7/01 11:19 am Gughunter wrote:
I've said it before and I'll say it again: braces are frickin' pointless.

I wore braces for two and a half years. A few months after I had them taken off, around age 13 or so, my retainer kept falling out of my mouth at night so I stopped wearing it for a few weeks. Next time I tried to put it in, it didn't fit. A thousand dollars and two and a half years of pain lost in a matter of weeks. Z has a crooked smile.

Don't put braces on your young kids. Wait until they care about their looks enough to ask for them.

Z
In response to Zilal
On 6/7/01 5:02 pm Zilal wrote:
On 6/7/01 11:19 am Gughunter wrote:
I've said it before and I'll say it again: braces are frickin' pointless.

I wore braces for two and a half years. A few months after I had them taken off, around age 13 or so, my retainer kept falling out of my mouth at night so I stopped wearing it for a few weeks. Next time I tried to put it in, it didn't fit. A thousand dollars and two and a half years of pain lost in a matter of weeks. Z has a crooked smile.

Don't put braces on your young kids. Wait until they care about their looks enough to ask for them.

Z

i have messed up teeth (not really bad mind you i just look like a vampire becase my top and bottom fangs are huge and stick out a little..) well my mom wanted me to get braces.. but what she dosent get is i DO NOT like any sort of fix a person can have to "help them" or "let them fit in". i dont live by anyones standard. i also beleive we should blow the hell out of ever hospital on earth (fixing both the unnaturalness of the world and over population!) in fact i hope there is an outbreak of some man made virus that kill humans and humans only verry fast... but still leave 1 million peaple spread out over 700 Sq miles (so the human race will live on but know enof not to mass produce and use medicine that dose not grow natrally.....)

but this is just the ramblings of a madman.... most peaple think what i just said is compleatly crazy.... but look at what we are doing to the planet.... i would gladly be one of those who died if it ment the world was sent back into the dark ages
In response to jobe
The dark ages are called the dark ages for a reason. They used just as many "unnatural" medicines back then as they do know... the difference is that back then, they had no idea what was in those medicines or why they worked. The difference between natural versions of most modern medicines and the artificial versions is that the natural versions were as toxic to humans as they were to the disease organisms that they kill... so it was just a concept to see which died first. The first things "artificial" medicines did was lower the toxicity to humans.

What makes natural things better for us than unnatural? Processed reconstituted non-dairy cheese-like byproduct is 100 times healthier for you than Mother Nature's own poison arrow frog from the depths of the South African rainforest. Don't like eating animals? There's poison mushrooms and plants enough to lay you low, and they're totally natural, too.

As far as the whole concept "unnatural" goes, I say: bull. If a chemist takes certain substances that are found in nature, mixes them together in a natural process, and certain elements among the chemicals naturally bond with each other, then naturally, a new substance will result. If this substance has natural tendencies to interact with the human body and organisms infesting the human body, then naturally, taking that substance will have some effect on the health of the human.

Point of fact: there is not a single unnatural object in the universe. An unnatural object could not exist in this universe, which is a natural universe. If it did, we would not be able to see it, interact with it, or interpret it. We're all world-builders here. What happens if you try to put an object into BYOND that doesn't follow the rules? The world can't handle it, so it rejects it. Sometimes subtly, sometimes violently. So, the Hoover Dam is every bit as natural as a beaver dam. If not, what is it? Supernatural? Exactly which laws of physics did we defy in building it?

The whole idea that humans are somehow apart from nature is nothing but pure human egotism. There is a natural cycle... we're part of it. We can't even "hurt" the environment... the environment is everything. You can't "hurt" everything, you can just reconfigure parts of it. We can reconfigure it so badly that the environment can no longer sustain us... but that's not the end of the world. It's not the end of anything but us.

It may be that we'll consume and breed ourselves into extinction. You know what? All the people who talk about the natural cycle don't get it... that's part of the natural cycle. That's how a species dies of old age. If you have to die, and of course, you do have to die... wouldn't you rather have it be at the ripe old age of a hundred, in a comfortable bed surrounded by flowers, then horribly and violently at a young age?

And Jobe, about "what we're doing to the planet," the lead refineries of past ages created as much toxic pollution as modern industries... and a single good volcanic eruption can put that to shame. Global warming? Nature's got that taken care of already. Every time the globe heats up (you don't think this is the first time this has happened, do you? Humanity has got no tricks that Ma Nature hasn't seen before), it causes the ice caps to melt. This puts more floating ice and cold water into circulation. Water covers even more of the earth. Well, no amount of greenhouse effect is going to make the seas boil, so all the energy hitting the ocean is basically wasted. You know what you get then? That's right, boils and girls... an Ice Age.

Yes, this is a rant. And it's a rambling rant. But you know what I can't stand? Luddites on the internet. Unplug your computer and then tell me you'll go back to the dark ages.

------
Note: I'm not anti-environmentalist, anti-endangered animals, or anti-conservation in general. In fact, I'm emphatically pro all of those things. I simply have more logical reasons than some people. I'm pro-environment because we have to live in the environment. Like I said, we can't hurt the environment, but we can change it in ways that hurt us. I'm pro-endangered animal not because of any garbage about "the circle of life"... the circle of life INCLUDES species going extinct. It's just that killing off species is in no way beneficial to anyone, and I'm opposed to senseless killings in general. I'm pro-conservation for similarly pragmatic reasons.

-----
One last question: if natural things are better than unnatural (accepting such a distinction purely for the sake of argument), then why would a return to a "natural" existence result in people dying? Where is the advantage? You can't just say "Because natural is better!" Tell me why it's better.
In response to LexyBitch
On 6/9/01 3:40 pm LexyBitch wrote:
The dark ages are called the dark ages for a reason.

It's politically correct to refer to the dark ages as "the good old days"...
In response to jobe
On 6/9/01 2:50 pm jobe wrote:
> i DO NOT like any sort of fix a person can have to "help them" or "let them fit in". i dont live by anyones standard.

Well, to a certain degree I agree with that last sentiment. Conforming to society's standards of "normal" will only stagnate our species.

The rest of your "ramblings of a madman" sound like a crackpot terrorist (or a toxic shaman from Shadowrun). Lexy has already adressed it quite eloquently (Very well said, Lexy!) and I can think of very little to add, except to ask:

Have you ever gone to the hospital? Do you ever use medication that you don't grow in your own garden? Do you consider your own hypocrisy before you criticize society as a whole? If you truly and deeply feel that way, why not simply turn your back on modern society and technology? There are numerous places you could go: the rainforest, the congo, the northern reaches of Siberia, et al. I'm sure your government grant money would cover the expense of the trip there, and you won't need a return ticket.
In response to LexyBitch
One last question: if natural things are better than unnatural (accepting such a distinction purely for the sake of argument), then why would a return to a "natural" existence result in people dying? Where is the advantage? You can't just say "Because natural is better!" Tell me why it's better.


You know, Lexy, you and I have a lot more in common than I originally believed. I share your views exactly; life will go on, it's just humans that are in jeopardy here. Sure, we can screw up a few other species in the process, but meantime, new species will grow and old ones will evolve. Like the words of Michael Crichton, "Life will find a way."

Unless, of course, we bathe the whole of the Earth in a roiling ball of nuclear fire. But that's just plain stupid, and I don't think us humans are dumb enough to do that. We're dumber than everyone thinks (why else is the world average IQ 100?), but not dumb enough to not realise what will kill us and what won't in the short-term. And in the long-term, you'll be dead by that time anyway.
In response to Spuzzum

Unless, of course, we bathe the whole of the Earth in a roiling ball of nuclear fire.

I disagree. It's hard to imagine life arising from the conditions of the primeval earth, but they did. I think some form of life might possibly arise (eventually) from a scorched earth... maybe something currently outside our definition of life, but I think a complex, self-reproducing, evolving system could potentially arise from any number of situations. That's pure conjecture on my part. Optimism in the face of entropy.

We're dumber than everyone thinks (why else is the world average IQ 100?)

I'm praying that this is a joke. IQ tests don't test objective intelligence, they test intelligence relative to a norm. The average IQ is 100 because the tests are calibrated so that the average IQ will be 100. If the human race doubles, triples, or quadruples in intelligence over the course of a generation, the average IQ will still be 100, once the tests have been updated.

But other than that, I'm pleased to know that you think similarly. I'm a fierce individualist, but when I learn that others, working independently, have arrived at similar conclusions to mine, it pleases me.
In response to LexyBitch


ok noonw got me that time eather.... hrrmmm... im just saying.. you know all our medicins hurt the human race. the weaken us. and as for the circle of life thing.. i dont beleive that eather. i just think there are more "productive" ways of liveing. what have we aceaved with our "advancements"? all we have done is feed more peaple at one time.. i dun get it. wont we all be just as happy if we never knew these "comforts" and "luxurys" we have grown attached to? well.. you know what? srew this world. im not going to say another word about what it needs. oyu know im just going to wait a year and then move to austarlia and claim a homestead way out in the middle of nowhere. so as i am being comforted for my hardships you all will be tortured for your comforts....


oh yeah and as for nuclear war.. thats not a bad idea.. it wont touch the life on our planet. there is life liveing ONLY on geothermal vents on the ocean floor(not saying all life on the ocean floor lives off of geotheraml vents bacase some live off of larg balls of algee that falls to the floor too.. but not all.)
In response to LexyBitch
Lexy, I see many of your arguments as simply redefining the words "natural" and, for that matter, "hurt." When you redefine a word to the point where it no longer applies to anything in the universe -- as you did with natural -- it and its concepts lose any usefulness. And as a scholar of English I like to keep words as useful as possible. It's vital for argument and conversation.

The main thrust of your argument, however, I agree with much of: that just because something is man-made or altered by humans does not mean it's bad. Man-made status alone cannot make a thing harmful (I'm talking the classic definition of harm here, damage to our level of physical or mental function, not your neutered definition ;).

Now, I too consider myself a pragmatist or a utilitarian, but there are different kinds of pragmatism. In my mind, the reason utilitarianism so often fails in the real world is that emotional factors aren't taken into consideration. The "circle of life garbage" may be met by self-described logical heads with little but disdain, but the fact remains that people feel emotional connections to things and will suffer when they are gone because of this. Whether or not they ought to feel such, or have any good reason for feeling such, doesn't enter into it.

To me, if the only drawback to the extinction of spotted owls means people would be sad because they're no longer around, the species' saving would still be justified. (Note that this reasoning can't be smacked onto just anything. There are differing reasons for letting species go extinct -- such as loggers' jobs -- which must be looked at on a case by case basis.)

I was once party to a hypothetical situation: If a town were under siege, and the only way to save the town were to send out all its girls and have the archers kill them in view of the enemy, thus making the enemy turn away in fear, would you give that order?

(Side tangent: replying "There must be some other way" to hypothetical questions is akin to altering a definition of a word to the point where the word can no longer apply to anything in the universe. Both render the discussion pointless.)

I was the only self-described pragmatist who replied that no, I would not give that order. And that's because my practicality extends to hidden emotional costs. I highly doubt that town would want to be saved if it meant losing all its female children. (Our definition of "saved" here meaning the enemy's reatreat.)

In short, I believe that most pragmatists either go too far or not far enough, whichever you want to call it, by viewing others' illogical emotions as not worth considering in equations of whether X event would be good or bad, right or wrong, better for the world or worse.

I'm not sure whether that makes me more or less arrogant than most pragmatists. ;)

Z

Yeah, I've got it all figured out. Except why someone who'd gladly give his life to bring society back to the dark ages is using BYOND!
In response to Zilal
I'm not redefining hurt to the point where it no longer applies to anything... hurt can apply to anything. It just can't be applied to everything, all at once, taken as one coherent entity. I can be hurt, you can be hurt, my computer can be hurt. We all have definite endings and beginnings. A self-contained system (which the environment of the earth is, for most practical purposes) cannot be hurt by anything inside of that self-contained system, though.

There's other viewpoints, of course. I hold several of them at once. None of them are really mutually exclusive. It's hard to argue when you take that into consideration, so I don't often mention it. For instance it's just as valid to view the earth as one, big, living organism, of which individual humans are no more than cells, or even parts of cells. Personally, I believe that. I also believe that the individual cells of our body go about performing their functions, thinking, in some way we can't perceive, that they're individuals going about their business, doing what they want to sometimes and what they have to others. They're right, of course. The molecules that make them up and the atoms that make up those molecules have the same situation. And it works the other way, too. The health care system, for instance, thinks that it's sentient, that the actions it takes are the result of decision it makes, rather than the actions and decisions of the humans and infrastructure that make it up. It's perfectly right, of course. So is the great big organism called our society, which considers health care to be just another organ system.

None of this can be disproven, but it certainly can't be proven, either, so I don't bring it up much. I believe it wholeheartedly, though. It satisfies all the questions. Why do positive particles move towards negative ones? Because they feel like it.

Natural, I'll give you. I admit it. I set out, in fact, to gut the word natural. It's an (ahem) artificial distinction... like most distinctions we make, handy for categorizing things, for organizing the world around us into a sensible pattern. Helpful, and harmless, as long as we recognize the distinction for what it is: a conveniently placed, but blurry and ultimately imaginary, line of demarcation. I don't enjoy pointing out that this particular emperor has no clothes... but I've found it to be useful. After all, Jobe could have turned around and said processed cheese vs. poison frogs is unfair, because I'm stacking artificial food vs. natural poison. He could claim that, all other properties being equal, a natural food is better than an unnatural food... so I make a pre-emptive strike by pointing out that "naturalness" isn't a real property.

Bottom line, as far as logic vs. sentiment goes: you can be logical about anything. Logic does nothing but process information. The result all depends on the information you're working with. Information in this messy universe, where we don't get to see the sourcecode or manipulate variables directly, is a decidedly fuzzy commodity. There's no logical way to decide which information is valid, that doesn't rely on previous information that we've already decided is valid. Sentiment gives us a place to start. Like you said, we have to find a balance between fun, realism, and balance in making our games. Where exactly we find that balance has as much to do with how we're feeling at the moment than how logic we're being... there's perfectly logical arguments in favor of just about every damage system we could dream up, and how do you measure those arguments stacked up against each other, if they're all perfectly logical?

Anyways, this is all by way of saying that I'm not a total utilitarian, nor do I strive to be perfectly logical. I had another point, but I've forgotten it already.

Yeah, I've got it all figured out. Except why someone who'd gladly give his life to bring society back to the dark ages is using BYOND!

Who do you think has been introducing all these new bugs into the system? Jobe is trying to topple the technocracy from within.
In response to LexyBitch


ok as i was saying in another post was it is all usless anyhow. everything is predefined (that is if this reality is the ONLY reality interacting with this one.. like if your spirit interacted with you fram "the other side" i could not say this becase noone knows enof about "the other side" enof to say if it is or is not predefined also.) so if we are only matter and the other variouse stuff out there that is to small to be matter interacting with everything else then everything would be desided by the density variations in the sinularity that was "The Big Bang". thus my emotions and thoughts tward the subject are just electrical and chemical reactions in my brain.
In response to jobe
I used to think that, too, but there's a potential hole and an actual hole in the theory. The potential hole in that is that events occuring at the quantum level can never be observed, so -anything- could be going on down there. If there's an "input" device for the physical universe, that's where it plugs in. The actual hole is that if you have a field of conscious perception, you have a spirit, or at least something intangible... because if you were just the more complicated equivalent of a bunch of strings and wires, you'd still outwardly react the same, but inwardly, there wouldn't be anything. Matter has no awareness. Or if it does, then there is no need for a spiritual plane to circumvent predestination. Now, I can't say that you or anyone else has a field of conscious perception, but I can say that I do.

On 6/10/01 5:27 pm jobe wrote:
ok as i was saying in another post was it is all usless anyhow. everything is predefined (that is if this reality is the ONLY reality interacting with this one.. like if your spirit interacted with you fram "the other side" i could not say this becase noone knows enof about "the other side" enof to say if it is or is not predefined also.) so if we are only matter and the other variouse stuff out there that is to small to be matter interacting with everything else then everything would be desided by the density variations in the sinularity that was "The Big Bang". thus my emotions and thoughts tward the subject are just electrical and chemical reactions in my brain.
Page: 1 2