Comment Re:pixels (Score 1) 29
They simply enhanced it.
They simply enhanced it.
But how exactly does a planet "snatch" another object? The smaller object starts out at a huge distance from the planet, falls towards it (increasing its kinetic energy), passes by the planet (if it doesn't crash into it), and then... converts its kinetic energy back to the amount of potential energy it started out with, right?
Now if two different bodies would collide while close to the planet, some of the debris might just end up in orbit around the planet. But why would one small object not simply leave the planet again?
(Just an honest question, not saying anyone is wrong, just wondering how it works)
You can disable the Karma bonus. The problem with the bonus is that it adds one to the displayed score, but is not counted for achievements. Once you have a score:5 (which is really score 4 + 1 bonus), people stop modding you up so you never make it to a "real" +5. They can still mod you up one more point, but most people don't know so they don't. And this makes you miss achievements that require a "real" +5 (comedian, for example)
caveat: maybe they have changed the system in the mean time, but I remember it certainly used to work that way.
I believe that my God has laid out a story for me in which I don't believe in Him, so I have chosen to obey His will by being atheist. With any luck, I'll even be rewarded with 70 virgins.
Why don't they just use tolet-to-tap water in agriculture then? The plants surely won't mind. And people certainly seem to have accepted the fact that plants eat shit as fertilizer, so why not recycled toilet water?
Actually, my response would be that drinking large quantities of perfectly pure water is not very good for you and can even be dangerous. It strips away essential minerals from your body.
The Earth is not flat therefore Kansas is not flat.
A sphere can still have a flat spot, can't it? Slice a sphere with a plane just inside its radius, and the intersection will be perfectly flat. I don't know much about Kansas, but your logic certainly seems flawed.
I wasn't talking about Duff's device anymore, just the general normal usage of switch statements and the fact that they fall through by default, instead of the more logical opposite choice of breaking by default and continuing only by choice with an explicit instruction. Someone replied that falling through was useful if a whole list of values needed the same treatment, but I think it would have been better to have a standard where a list of values (and possibly ranges) could be provided rather than a silly list of "case x:case y:case z:".
Obviously, if you wanted to use Duff's device with such a modified switch syntax, every case label would need a "continue" to fall through explicitly.
OK, I'll amend my position slightly: they should break by default (and continue as an explicit option) but you should obviously be able to provide a list of values instead of the ridiculous 50 consecutive "case 5:case 6: case 7:...". Better still, they might add ranges while they're at it.
Oh well, I don't imagine them changing the standard for that any time soon, but one can dream...
Any decent compiler makes those changes automatically. Probably even with optimisations switched off, since these are such a no-brainer.
They really ought to have done it the other way around: break by default, and use "continue" to fall through. It can indeed be useful sometimes, but in the vast majority of cases you want it to break, and forgetting that statement causes all sorts of trouble.
They probably chose "ugly hack" because they couldn't figure out how to write a regexp that matched "hack" but didn't match "whack", "shack" etc.
Next up, a new study detailing how many puppies are killed by different programming languages, based on the comments in the code.
I remember something similar, called Duff's device. Not two overlapping switch statements (I don't think that's possible), but an intertwined loop and switch. I don't see any references to lines in bitmaps, but it's entirely possibe that the same kind of construction was used for that purpose too.
send(to, from, count)
register short *to, *from;
register count;
{
register n = (count + 7) / 8;
switch (count % 8) {
case 0: do { *to = *from++;
case 7: *to = *from++;
case 6: *to = *from++;
case 5: *to = *from++;
case 4: *to = *from++;
case 3: *to = *from++;
case 2: *to = *from++;
case 1: *to = *from++;
} while (--n > 0);
}
}
Ideally, you should include a generic version without any hackish optimizations, but it isn't strictly required if you don't think you'll ever change CPUs in the future.
And then your company upgrades its CPUs while you're long gone, and now they need to figure out who the hell wrote that crappy piece of code that keeps crashing on the new CPU, and some other programmer has to rewrite everything from scratch because they can't figure out how your code works and why it's not doing what it's supposed to be doing.
By the way, that other programmer may just be an older version of you who has completely forgotten what the younger version did there... (not that I have any experience with that, cough)
The one day you'd sell your soul for something, souls are a glut.