Not always. While I have been known to drop into assembly, it should never be the first recourse when you are trying to speed things up. If it is, you are likely to miss out on the biggest savings. My rough priority list:
Find some way to quantify how slow/fast the program is, and where. This might mean using a profiler, but it might not. Slice the data various ways (by high level task, by thread, by low level functions, by data structures accessed, by calling patterns, etc.)
Look closely at the places where the largest chunks of objectionable time are being spent. Consider various refactorings, new algorithms, new data structures, etc. Also look at the customers of the routines in question, to see what their real needs are (e.g. is someone sorting a bazillion data items just so they can pluck the smallest/largest from one end of the structure, or are they recomputing a value that seldom changes) and consider other ways to meet these needs.
Make some test modifications, and repeat
Once you have a good understanding of what the program is doing, and are convinced that it is being done in the most way practical, calculate how long this should be taking.
If the actual times are far above your informed estimate, then consider hand coding.
about 10 Gs?... speed of sound = 1100 f/s, so 5500 f/s in 15 s = 1100 f/s in 3 s = 367 f/s^2. 10 Gs would be 322 f/s^s. Close enuf. Increased accuracy is welcome.
I think the big source of error in our calculations here will be our uncertanty of the acceleration profile. While constant acceleration is certainly a reasonable solution, it isn't the only possibility. For example, we could have:
First second: no accelleration
Second second: no accelleration
Third second: still no accelleration
Fourth second: no accelleration continues
Fifth second: dito
Sixth second: deep rumbling sound is heard, but no accelleration
Seventh second: a very small amount of side-to-side accelleration, but it never amounts to anything
Eighth second: rumbling stops; accelleration does not start
Ninth second: everything is disturbingly quiet, and quite stationary
Tenth second: no accelleration II, the dance mix
Eleventh second: a very small amount of upward acceleration is detected, but it is well within the error bars for the instruments
Twelfth second: no accelleration, but what might be a hint of smoke
Thirteenth second: no accelleration, and that is definitely smoke
Fourteenth second: no acceleration, but the smoke is building up nicely
Fifteenth second: a great deal of acceleration, accompanied by a lot of smoke and a very, very loud "bang".
I sure hope this isn't what happens, but it could fit the numbers as well as "constant accelleration at 10.5G +/- a fudge."
Notice though that (according to my recolection, varrious news reports, and the reference that you cited) that declaration has not been passed. It was introduced and refered to committee.
A lot of bills get introduced, but they don't count until they are voted on and passed.
At some point, they'll realize that all creatures can fly (under the proper circumstances). Of course, the best way to prove this to the hard-core skeptics (take an elephant, a trebuchete, and an attorney into a large open field...) will doublessly get PETA all miffed at you.
Have you looked into the Xanth novels by Piers Anthony? They definitely fit the "Or any novels with a good depressing ending with no hope of a future" condition. While I wouldn't recommend them to anyone who might have unsuspected suicidal tendencies, they should be good for anyone who finds themselves too happy.
I would infer that they plan to have (or at least want the option to have) these remotely controlled by an operator in some sort of "waldo" suit. Thus it makes sense to have the same basic configuration as your operator.
Then why bother with astro-nuts at all? The weight of that life-support system hurled into orbit would mean so much extra capability in orbit!
You may have a point initially, but in the long run the main reason to go to space is exactly that: space. The earth is, after all, only so large. If we all stay down here we will either have to 1) force people to stop having children (and kill the excess kids that sneak through the cracks), or 2) institute a regular program for killing adults (and eventually, killing them before they reach breeding age), or 3) let nature do it for us.
None of these sound too appealing to me. But moving out into space (note: not "moving to other planets") gives us a great deal more time to find a better solution. It doesn't solve the problem, but it gives us another thousand years or so to work out a solution.
65 million years ago, the dinosaurs disappeared mysteriously from the earth, supposedly caused by an impact from a meteor or piece of comet.
A.D.2002: A retired French army colonel makes his skydive from 25 miles up. His chute* fails to open and he makes a large crater. Experts measuring the crater realize how luck we are that he didn't weigh several tons...
And in that instant new theory about extreme sports among the dinosaurs is born.
-- MarkusQ
* If it fails to open, is it still called a "shoot" or would the proper now be "a fuck"?
Be careful if you try this; those capacitors hold a fair amount of charge.
My brothers and I played with some of them in the kitchen at a family gathering a few years back. One of them is in the biz, and had more used, disposable cameras then he knew what to do with. We were bored and trying to rig up something ad-hoc (as I recall, we were using whatever we could find in the kitchen--rubber bands, tupperware, etc.) Our wives were in the dining room with the everyone else, and we weren't being very structured about it.
Things were going fairly well until we accidentally shorted something. There was a loud bang, a flash, and one of us jumped back, knocking over a pile of pie tins.
All conversation in the dining room stopped, and after a moment our mother's voice called calmly: "What are you boys doing in there?"
Without missing a beat we all replied, in unison, "Nothing!"
I find that as my daughter (born 5/4/00) gets more interested in doing what I'm doing, I have more projects that I don't really get to work on until she goes to bed.
*laugh* I hear that. I've been playing around with directional antennas for 802.11b (trying to link two buildings on the cheap) and my son can't understand why he can't help dad cut & bend sheet metal.
...as long as the OpenGL people agree to allow Microsoft to use any OpenGL technology developed using them...
Bruce:
So, does
everybody have to sign away their rights to MS just because MS might think they have a related patent?
I don't see why. *smile* To me it sounds like Microsoft would be satisfied if any OpenGL technology developed using their "Intelectual Property" was GPL'd.
watching over them constantly because they are small, fragile and keep getting into things that are dangerous for them. A pet that can be seriously injured by a sock sounds like a ton of work.
I have to admit, reading those pages I'm glad I have a cat. He's smart, fast, and I don't have to babyproof the house.
I suspect those people are a little over the top. Our gliders are quite bright, and seem to be able to handle themselves well enough. We have a cage for them to sleep in (they're day sleepers, which is another plus for nerd pets, IMHO), but they also get to come out and play quite frequently.
I have a friend with three and also serveral cats. Initially, the cats seemed to be thinking "Hmmm, those little critters look like they'd make a good snack," until the big tom decided to check out the possibility.
He started stalking, and as soon as the glider in question saw him, he (the glider) puffed himself up and started towards the cat (~50 times his mass) striding sort of like an old-west gunfighter. The cat stopped, looked confused. The glider kept going until he was a few inches from the cat.
They peered at each other.
The cat stuck out one paw, cautiously, as if to swat at the glider. The glider leaped onto the cats head and started biting his ears.
The cat ran, flipping his head from side to side until the glider jumped off. The glider then went back to what he'd been doing and they've pretty much left each other alone since.
If you are looking to make a commitment I would recommend a few sugar gliders. They are very fun, but they do bond to their owners and live for many years, so they aren't a good choice if you're just dabbling with the idea of pets. They are also communal, so you should get at least two.
As always, a simple web seearch will turn up lots more information.
IMHO, the problem is worse with hardware, at least in that there is more risk of damage. I recently bought a "new," shrink-wrapped CD-burner, installed it on a Linux box I was putting together, and popped it open to stick in a blank CD...only to find that there already was a CD in it, with a hand-written lable and some bootlegged MS Windows game on it.
My best guess is that someone
bought the drive to copy a friend's CD,
did so,
returned the drive,
went home,
slapped their forehead and said...!Doh!
-- MarkusQ
A total reversal
on
GUIs for Robots
·
· Score: 5, Insightful
Fifty years from now I expect all wars to be fought by giant robots controlled by teenagers
In stark contrast to the situation today, where wars are fought by teenagers controlled by giant robots.
The compiler generates different code depending on whether it's comparing signed or unsigned values. Typecasting isn't converting anything, it's just telling the compiler to use an unsigned comparison rather than a signed one.
You appear to have missed his point. If the variable contains an unsigned value it should have been declared unsigned in the first place rather than casting this one use of it. Otherwise any other present or future uses may be in error unless they too are cast.
You may want to read things over more carefully before calling someone an idiot.
If all you want is the dish, why not make one? Telescope mirrors aren't too hard to make, and a RF dish should be a lot easier.
-- MarkusQ
+1 Ontopic on the MQR standard
on
Data Quality Act
·
· Score: 4, Insightful
Given enough eyeballs, all your documents are shallow.
Good point, valentyn. With slightly different spin, the ability of anyone to challenge data would have been seen as a Good Thing. I have no idea why you were modded "Offtopic."
As for your second paragraph about "images pumped by the market" telling me what to think, I believe you really haven't read much history....
You would be mistaken. If you recall, the point in question here is:
Second you must have the manufacture/ marketing/ sales etc. This is the bailiwick of larger corporations.
Looking at history I mostly see ventures carried forward by individuals, small groups, or organizations headed by the same. I also see projects that rose or fell on their merits, rather than on media blitzes and cold calling campaigns. It is possible that in my reading of history I somehow missed the copious references to large corporations with sales and marketing budgets in ancient times. Could you please point them out to me?
There's nothing wrong with your perspective to invention, but one thing to note is it appears you're going for the "bleeding heart inventor" approach, which is to say that you don't care if you profit off your invention, which is fine, but when it's introduced to the wider world it's almost certain if that others WILL profit from your idea instead of you.
I don't see why this point is so hard for everyone to grasp:
I profit from an invention when my goals are met.
There is nothing "bleeding heart" about wanting to meet your goals and not worrying over other people's get rich painfully schemes. Getting sucked into a dream of acquiring "wealth" I don't need by pushing my invention on people who don't want it on its merits and have to be "marketed" to is about as profitable to me as getting hooked on heroin would be. (Which, I might add, is more than a metaphore in some industries.)
Here is a major clue: life is a blast, if you take the time to live it instead of always trying to "succeed" at near impossible goals that weren't your in the first place.
As for your model of how the world gets changed, I would say you're sorrily simplifying it, and ignoring the impact of organizations on innovation & invention over the past 100 years.
The images pumped to us by "the market" would tent to agree with you, but in my personal experience the individuals with a passion for what they are doing come first and then, if they succeed, history is rewritten by whoever has the biggest megaphone. As one friend of mine quiped, he worked seventeen years for the pure joy of doing what he loved, only to becpme "an overnight success" when he finally got funded by people who then made his life hell. When he left the company that he had "founded" to go back to actually enjoying life, the company's story was that he'd "burned out". He couldn't care less.
I took 'success' to be how much the invention has been used in the real world, and how much influence it has had on people's lives.
Whereas I take success to be how much the invention served the needs of the inventor. People seem to have gotten the idea that lust-for-fame is the mother of invention, but I still hold that necessity is the true source. I invent something because I need it. If the invention removes / fixes / fills the need, it worked.
Several times over the course of my life I have seen the following story played out:
Someone has a problem
They come up with something to fix the problem
It works
Someone else gets the bright idea that this could be the ticket to wealth and fame.
Half the people involved immediately loose their perpective on life and start chasing adventure capital.
With luck, they don't get any, and everyone goes back to being normal. But often enough, they get some.
Most of the remaining people loose their perspective.
A stock / share / point / royalty scheme that is roughly twice as complicated as the original invention is concocted.
The investors start making demands (you need a type X for this roll, like my buddy Bob here).
With luck, the whole mess colapses under its own weight. But often enough it doesn't.
Marketing sets in. The actual merits of the original invention are lost in sea of lies and stupidity.
By this point, everyone involved has a sucky life. Friendships have been, if not ruined, at least strained to the point of pain and acrimony.
Exponential growth sets in.
I bail out, if I haven't already.
Eventually, KABOOM!
End result, almost everyone involved is worse off, and older, than they were when it all started. And why? Beats the hell out of me.
If you want to change the world, find a problem that you care about and can fix with your own resources. Fix it. Repeat as often as you like. That is how the world gets changed.
I'd be strongly tempted to mod this +1, Funny except that:
-- MarkusQ
And Smaller == Faster.
Not always. While I have been known to drop into assembly, it should never be the first recourse when you are trying to speed things up. If it is, you are likely to miss out on the biggest savings. My rough priority list:
-- MarkusQ
about 10 Gs?
I think the big source of error in our calculations here will be our uncertanty of the acceleration profile. While constant acceleration is certainly a reasonable solution, it isn't the only possibility. For example, we could have:
I sure hope this isn't what happens, but it could fit the numbers as well as "constant accelleration at 10.5G +/- a fudge."
-- MarkusQ
Notice though that (according to my recolection, varrious news reports, and the reference that you cited) that declaration has not been passed. It was introduced and refered to committee.
A lot of bills get introduced, but they don't count until they are voted on and passed.
-- MarkusQ
At some point, they'll realize that all creatures can fly (under the proper circumstances). Of course, the best way to prove this to the hard-core skeptics (take an elephant, a trebuchete, and an attorney into a large open field...) will doublessly get PETA all miffed at you.
-- MarkusQ
Have you looked into the Xanth novels by Piers Anthony? They definitely fit the "Or any novels with a good depressing ending with no hope of a future" condition. While I wouldn't recommend them to anyone who might have unsuspected suicidal tendencies, they should be good for anyone who finds themselves too happy.
-- MarkusQ
P.S. Seriously though, what about A Canticle for Leibowitz?
I would infer that they plan to have (or at least want the option to have) these remotely controlled by an operator in some sort of "waldo" suit. Thus it makes sense to have the same basic configuration as your operator.
-- MarkusQ
Then why bother with astro-nuts at all? The weight of that life-support system hurled into orbit would mean so much extra capability in orbit!
You may have a point initially, but in the long run the main reason to go to space is exactly that: space. The earth is, after all, only so large. If we all stay down here we will either have to 1) force people to stop having children (and kill the excess kids that sneak through the cracks), or 2) institute a regular program for killing adults (and eventually, killing them before they reach breeding age), or 3) let nature do it for us.
None of these sound too appealing to me. But moving out into space (note: not "moving to other planets") gives us a great deal more time to find a better solution. It doesn't solve the problem, but it gives us another thousand years or so to work out a solution.
-- MarkusQ
Since most of the good advice I can think of for reverse engineering the check sum has already been posted, I'll suggest something orthogonal:
You might consider black-boxing the original app using DosEmu and glue code of your own devising. Stuff goes in, stuff comes out, and you're done.
-- MarkusQ
P.S. I'm assuming, of course, that this is just a one-off project, not something you plan to replicate.
65 million years ago, the dinosaurs disappeared mysteriously from the earth, supposedly caused by an impact from a meteor or piece of comet.
A.D.2002: A retired French army colonel makes his skydive from 25 miles up. His chute* fails to open and he makes a large crater. Experts measuring the crater realize how luck we are that he didn't weigh several tons...
And in that instant new theory about extreme sports among the dinosaurs is born.
-- MarkusQ
* If it fails to open, is it still called a "shoot" or would the proper now be "a fuck"?
Be careful if you try this; those capacitors hold a fair amount of charge.
My brothers and I played with some of them in the kitchen at a family gathering a few years back. One of them is in the biz, and had more used, disposable cameras then he knew what to do with. We were bored and trying to rig up something ad-hoc (as I recall, we were using whatever we could find in the kitchen--rubber bands, tupperware, etc.) Our wives were in the dining room with the everyone else, and we weren't being very structured about it.
Things were going fairly well until we accidentally shorted something. There was a loud bang, a flash, and one of us jumped back, knocking over a pile of pie tins.
All conversation in the dining room stopped, and after a moment our mother's voice called calmly: "What are you boys doing in there?"
Without missing a beat we all replied, in unison, "Nothing!"
It was like old times.
-- MarkusQ
I find that as my daughter (born 5/4/00) gets more interested in doing what I'm doing, I have more projects that I don't really get to work on until she goes to bed.
*laugh* I hear that. I've been playing around with directional antennas for 802.11b (trying to link two buildings on the cheap) and my son can't understand why he can't help dad cut & bend sheet metal.
-- MarkusQ
You're being naive.
No, I was being sarcastic.
-- MarkusQ
Decando: Bruce:
I don't see why. *smile* To me it sounds like Microsoft would be satisfied if any OpenGL technology developed using their "Intelectual Property" was GPL'd.
-- MarkusQ
I have a friend with three and also serveral cats. Initially, the cats seemed to be thinking "Hmmm, those little critters look like they'd make a good snack," until the big tom decided to check out the possibility.
He started stalking, and as soon as the glider in question saw him, he (the glider) puffed himself up and started towards the cat (~50 times his mass) striding sort of like an old-west gunfighter. The cat stopped, looked confused. The glider kept going until he was a few inches from the cat.
They peered at each other.
The cat stuck out one paw, cautiously, as if to swat at the glider. The glider leaped onto the cats head and started biting his ears.
The cat ran, flipping his head from side to side until the glider jumped off. The glider then went back to what he'd been doing and they've pretty much left each other alone since.
-- MarkusQ
If you are looking to make a commitment I would recommend a few sugar gliders. They are very fun, but they do bond to their owners and live for many years, so they aren't a good choice if you're just dabbling with the idea of pets. They are also communal, so you should get at least two.
As always, a simple web seearch will turn up lots more information.
-- MarkusQ
IMHO, the problem is worse with hardware, at least in that there is more risk of damage. I recently bought a "new," shrink-wrapped CD-burner, installed it on a Linux box I was putting together, and popped it open to stick in a blank CD...only to find that there already was a CD in it, with a hand-written lable and some bootlegged MS Windows game on it.
My best guess is that someone
-- MarkusQ
Fifty years from now I expect all wars to be fought by giant robots controlled by teenagers
In stark contrast to the situation today, where wars are fought by teenagers controlled by giant robots.
-- MarkusQ
You appear to have missed his point. If the variable contains an unsigned value it should have been declared unsigned in the first place rather than casting this one use of it. Otherwise any other present or future uses may be in error unless they too are cast.
You may want to read things over more carefully before calling someone an idiot.
-- MarkusQ
If all you want is the dish, why not make one? Telescope mirrors aren't too hard to make, and a RF dish should be a lot easier.
-- MarkusQ
Good point, valentyn. With slightly different spin, the ability of anyone to challenge data would have been seen as a Good Thing. I have no idea why you were modded "Offtopic."
-- MarkusQ
As for your second paragraph about "images pumped by the market" telling me what to think, I believe you really haven't read much history....
You would be mistaken. If you recall, the point in question here is:
Looking at history I mostly see ventures carried forward by individuals, small groups, or organizations headed by the same. I also see projects that rose or fell on their merits, rather than on media blitzes and cold calling campaigns. It is possible that in my reading of history I somehow missed the copious references to large corporations with sales and marketing budgets in ancient times. Could you please point them out to me?-- MarkusQ
There's nothing wrong with your perspective to invention, but one thing to note is it appears you're going for the "bleeding heart inventor" approach, which is to say that you don't care if you profit off your invention, which is fine, but when it's introduced to the wider world it's almost certain if that others WILL profit from your idea instead of you.
I don't see why this point is so hard for everyone to grasp:
There is nothing "bleeding heart" about wanting to meet your goals and not worrying over other people's get rich painfully schemes. Getting sucked into a dream of acquiring "wealth" I don't need by pushing my invention on people who don't want it on its merits and have to be "marketed" to is about as profitable to me as getting hooked on heroin would be. (Which, I might add, is more than a metaphore in some industries.)Here is a major clue: life is a blast, if you take the time to live it instead of always trying to "succeed" at near impossible goals that weren't your in the first place.
As for your model of how the world gets changed, I would say you're sorrily simplifying it, and ignoring the impact of organizations on innovation & invention over the past 100 years.
The images pumped to us by "the market" would tent to agree with you, but in my personal experience the individuals with a passion for what they are doing come first and then, if they succeed, history is rewritten by whoever has the biggest megaphone. As one friend of mine quiped, he worked seventeen years for the pure joy of doing what he loved, only to becpme "an overnight success" when he finally got funded by people who then made his life hell. When he left the company that he had "founded" to go back to actually enjoying life, the company's story was that he'd "burned out". He couldn't care less.
-- MarkusQ
I took 'success' to be how much the invention has been used in the real world, and how much influence it has had on people's lives.
Whereas I take success to be how much the invention served the needs of the inventor. People seem to have gotten the idea that lust-for-fame is the mother of invention, but I still hold that necessity is the true source. I invent something because I need it. If the invention removes / fixes / fills the need, it worked.
Several times over the course of my life I have seen the following story played out:
End result, almost everyone involved is worse off, and older, than they were when it all started. And why? Beats the hell out of me.If you want to change the world, find a problem that you care about and can fix with your own resources. Fix it. Repeat as often as you like. That is how the world gets changed.
-- MarkusQ
You must be a teenager still living with mommy if you don't see the reason for marketing. Wait until you grow up and enter the real world.
*laugh* I still remember how anoyed I was the first time I wasn't carded. It was in the 1980's.
But I guess I'm still among the very young at heart.
-- MarkusQ