I know it doesn't work that way anymore, but the idea of the prison system is not just to punish offenders and shield society from dangerous people, it is also supposed to rehabilitate people. Locking people up for their entire life is costly and totally non-productive for a society. You really only want to do that with the irredeemably violent people.
That's why we have a graded punishment system, unlike during the middle ages where there only was a single punishment: death, meted with various amounts of torture beforehand depending on whether you had simply stolen a loaf of bread or killed a king.
Somewhere along the line it was realized that if you punish everybody the same even for petty crimes then instead of deterring crime you encourage more violent ones, because once offenders get on the wrong side of the law it doesn't make any difference anyway to the way they will be treated if caught.
We could of course go back to that system. Now will you accept that punishment if you are ever caught drink-driving following a RBT? In other words, where do you draw the line?
Imprisonment rates are poor way to measure how well a society functions, or do you think that it is a good thing that the US now imprisons proportionally more people than China?
The big problem of course is to get enough weapons grade Uranium to make a bomb. That is all what the Manhattan Project was about and today is still not a trivial task.
Let's see the rest of the world share in the American Dream, then.
Two cars per Chinese or Indian family. What do you say to that? Have you noticed what happened (on Slashdot) when a few Indian companies decide to compete for American jobs? Unfair do you say?
The US way of life is not sustainable. Of course if you are on top of the economic ladder will you say that the system is wonderful.
Right, now we a single superpower, who doesn't mind waging war against anybody it perceived going against its interests. I'm not talking solely about Iraq & Afghanistan, look up what else the US have bombed in the last few decades.
Now third world countries have wised up to that. Why do you think North Korea is so interested in developing its own nuclear weapons?
And that promotes peace all over the globe how exactly?
Not just Pinocchio, consider a huge part of the music in Fantasia, supposedly their masterpiece. Paul Dukas composed `The Sorcerer's Apprentice' in 1895 and he only died in 1935. Did they license his music? Wasn't copyright restricted to 20 years after the work was first published at the time?
Stating the obvious, there is a difference between actively working on a piece of technology (say vision) used to diagnose say skin cancer and actively working on a piece of technology used to guide missiles, even though they might be the same underneath.
In the former researchers make all the effort to adapt their thought process to the medical problem at hand. They might talk to doctors, patients, etc. If they are successful they might save some lives. In the latter they might think about accuracy, speed and whatever, but they know it's all about detonating that bomb at the right time and in the right place. They might talk to generals and strategists. If they are successful they might more accurately kill the people the military wanted to kill.
In science and technology, R. Feynman famously said that the prime problem is not to fool oneself, because Nature cannot be fooled. If you work on weapons development of any kind and you are rationalizing that you are helping your country defend itself and that maybe your technology might be used for pacific uses as well, who are you fooling?
There is also the argument that better technology kill fewer people because it is more accurate. This always assumes that the users of that technology are both wise and cautious. It's up to you but I don't trust anybody with weapons in hand even if they are the `good guys'.
Try reading `Manifold: Time' by Stephen Baxter. This story goes to witness the heat death of the universe (still filled with conscious beings) and sets about changing that dreary future. Billions of years does not even start to cover it. How about 10^100 years?
Possibly, but Tolkien is not against craft or even engineering. Elven rings & other various magic objects, beautiful or impressive dwellings feature on the side of good. Moria was once a great Dwarves achievement before they succumbed to greed and mined too deep. It just has to be at one with nature, and frankly, who can argue against that?
Science without conscience is but soul's ruin (Rabelais).
Maybe aerospace software engineers have something to say about Ada not being practical. Probably similar to what the (real) engineers would say about your comment about FORTRAN. The fact is most engineering/scientific software (think PDE solvers, etc) is available and maintained in FORTRAN. There is no real alternative to BLAS (Basic Linear Algebra System) for example. It's often free too.
STL is incredibly useful, but like many powerful tools it is not 100% intuitive to use effectively at first go. It is easy to overuse templates (Hey, I can support ALL TYPES in my library, yay!) and not all compilers are optimized to remove redundant code, but such compilers are becoming available.
Like you say though, if you don't like it you don't have to use it, or you can use it more sparingly.
Partly false. In the US, last I checked you can publish and you still have up to a year to lodge a patent application. This is not true in most of the rest of the world.
As someone who works in image analysis for a living, I can tell you that a 61% success rate in anything is worse than useless. This is not 61% chance of catching a terrorist, it's the chance of recognising someone correctly whom they already knew. This system will be bringing up errors all the time, so often that it will be ignored.
To be of any help, error rates must be way below 1%. 99.99% accuracy is the figure most often bandied around for anything that has to be fully automated. This is the figure post offices want for ZIP code, banks want for cheque amounts and doctors want for diagnosing instruments of any kind, because anything less actually create more work for the operator, who still has to be a fully trained professional and who generally makes fewer mistakes than the automated system.
This is why you don't see many image analysis companies with stellar stock on Wall Street.
Old data must be maintained, just like the rest. You must keep copying your old data to new formats, all the time, as soon as the new standard format becomes available, and certainly before the reader for the old format dies. You must also use non-proprietary ways of storing your data. Plain old text is always best if it works for you.
The good news is that because of the exponential growth in storage the old data is only piddling amount compared to the new data you are piling on now.
All the data I used to do my thesis and that I brought to my new place of work 10 years ago fits on one half CD. I brought it on a SCSI 512MB hard disk, which I'd bought for the purposed and failed years ago.
Before that all the code I'd written for my previous company fitted on a few floppies. Before that my important Unix (SunOS 2.x) home directory files all fitted on a single tape.
I used to think that my whole home directory would fit on a single CD, then on a single DVD, and now I'm kind of stuck, I need several hundreds of GB or masses of CDs. But in 10 years time it will be nothing.
I'm sure that you are very smart, but even very smart people get tired and do stupid things. Ever been involved in a car accident? Did you feel stupid afterwards? How can you be so sure that you will never do anything stupid, ever?
It's not about people being smart or stupid. It's about a company that sells dangerous product because of a bottom line issue. People never asked for scalding hot coffee, no one can drink 190 degree coffee. Nobody's liberties are being affected by this verdict. Instead a less dangerous product is now being sold, that is still hot (150 degrees!) and that will not give you 3rd degree burns if you spill it on you by accident.
The woman was awared 3 million bucks NOT because she was stupid. She was a typical victim (more than 700 had been burned by that coffee) of a callous company. McDonalds was fined 3 million bucks and told each new victim would cost them as much from now on unless they changed their act.
You are absolutely correct on most points. I'm not sure however that the US will choose not to maintain its costly military. I think it needs to realize that winning war is easy with such materiel and good soldiers, but that winning the peace is a different kettle of fish. Possibly just as much money must be spent on it.
Another thing that always annoy me is that most French people think that the Rainbow Warrior episode was a complete disgrace from start to finish. Same as not all American approve of Bush's gung-ho approach to solving the world's problem.
You should read some other history books sometimes.
Originally Ho-Chi-Minh loved the US ideals and tried many times to get US help, not just at the end of WWI but right during the Indochina conflic. The US kept supplying France with weapons and not listening to him. France had little influence, then as now, on US foreign policies.
When the US took the place of the old colonial power and brought the conflict up one notch, Ho-Chi-Minh and the rest of the Vietnamese government finally saw through the US game. The US foreign policy then as now is not about bringing Democracy to anybody. It is just as crippled by ideology as any other country.
French nuclear tests occured in the southern Pacific, about as far off the French mainland as possible, however uncomfortably close to such nations as New Zealand. NZ is the home of Greenpeace. Whether you like that latter group or not, they know how to make a big stink when necessary, and they have some unpleasant memories associated with the French secret services on the matter of the Rainbow Warrior.
char string1[LONG_STRING];/* oops, wrong one */ char string2[SHORT_STRING]; char string3[SHORT_STRING];
string1 can overload. While this is obvious written like that when attention is drawn to it, in the middle of a real program people do write things ike that all the time. This is precisely the problem C++ strings were designed to fix. You don't need to allocate them beforehand because programmers are likely to get it wrong some of the time.
As for your problem of running out of memory in the middle of your program instead of at the beginning, lookup the string::reserve() member function. If you can't reserve() it will throw there and then.
If you want to implement strings with limited storage so that it doesn't eat all your heap, you can use your own allocator that does precisely that.
Finally I don't believe you can prove the correctness of something involving stack allocation like in your example. You seem to assume stack space is infinite, and it isn't. Try using your example in a recursive framework for example. At any rate you can quote Knuth on the correctness of algorithms:
"Beware of bugs in the above code; I have only proved it correct, not tried it."
1- there is always two sides to a story. What your government tells you, and what it doesn't. WMD in Iraq? the current political climate in Afghanistan? What about slightly older stories like Vietnam?
2- The first thing you do in invading a country is cause misery and death. Remember the boy with no limb left? Or that young girl napalmed from the Vietnam era? Do you cause less misery and death by invading than by not doing it? Do you trust your government to do that grim accounting for you?
3- Remember that what your government wants to do, it wants to did for political, financial, hegemonical and ideological reasons first. Humanitarian last. Always.
As a sign of how different cultures can be and at the same time almost identical, many people (presumably from the US) express disbelief that protests can actually achieve anyting.
In Europe one regularly sees hundred of thousands of protesters in the street for seemignly benign things from a distance, such as a change in education policy. For really important matters one can see millions of people, who are very hard to ignore. Ministers have been known to resign after a large enough protest.
However in the US the situation is the same. Doesn't anyone remember the enormous protests, marches and so one of the 60's?
I know it doesn't work that way anymore, but the idea of the prison system is not just to punish offenders and shield society from dangerous people, it is also supposed to rehabilitate people. Locking people up for their entire life is costly and totally non-productive for a society. You really only want to do that with the irredeemably violent people.
That's why we have a graded punishment system, unlike during the middle ages where there only was a single punishment: death, meted with various amounts of torture beforehand depending on whether you had simply stolen a loaf of bread or killed a king.
Somewhere along the line it was realized that if you punish everybody the same even for petty crimes then instead of deterring crime you encourage more violent ones, because once offenders get on the wrong side of the law it doesn't make any difference anyway to the way they will be treated if caught.
We could of course go back to that system. Now will you accept that punishment if you are ever caught drink-driving following a RBT? In other words, where do you draw the line?
Imprisonment rates are poor way to measure how well a society functions, or do you think that it is a good thing that the US now imprisons proportionally more people than China?
`Take the A train' is a Bill Strayhorn (wonderful name for a Jazz composer) piece, historically associated with the Duke Ellington big band orchestra.
The big problem of course is to get enough weapons grade Uranium to make a bomb. That is all what the Manhattan Project was about and today is still not a trivial task.
Excellent sig, is that true or did you make that up?
Let's see the rest of the world share in the American Dream, then.
Two cars per Chinese or Indian family. What do you say to that? Have you noticed what happened (on Slashdot) when a few Indian companies decide to compete for American jobs? Unfair do you say?
The US way of life is not sustainable. Of course if you are on top of the economic ladder will you say that the system is wonderful.
Right, now we a single superpower, who doesn't mind waging war against anybody it perceived going against its interests. I'm not talking solely about Iraq & Afghanistan, look up what else the US have bombed in the last few decades.
Now third world countries have wised up to that. Why do you think North Korea is so interested in developing its own nuclear weapons?
And that promotes peace all over the globe how exactly?
Not just Pinocchio, consider a huge part of the music in Fantasia, supposedly their masterpiece. Paul Dukas composed `The Sorcerer's Apprentice' in 1895 and he only died in 1935. Did they license his music? Wasn't copyright restricted to 20 years after the work was first published at the time?
Stating the obvious, there is a difference between actively working on a piece of technology (say vision) used to diagnose say skin cancer and actively working on a piece of technology used to guide missiles, even though they might be the same underneath.
In the former researchers make all the effort to adapt their thought process to the medical problem at hand. They might talk to doctors, patients, etc. If they are successful they might save some lives. In the latter they might think about accuracy, speed and whatever, but they know it's all about detonating that bomb at the right time and in the right place. They might talk to generals and strategists. If they are successful they might more accurately kill the people the military wanted to kill.
In science and technology, R. Feynman famously said that the prime problem is not to fool oneself, because Nature cannot be fooled. If you work on weapons development of any kind and you are rationalizing that you are helping your country defend itself and that maybe your technology might be used for pacific uses as well, who are you fooling?
There is also the argument that better technology kill fewer people because it is more accurate. This always assumes that the users of that technology are both wise and cautious. It's up to you but I don't trust anybody with weapons in hand even if they are the `good guys'.
Try reading `Manifold: Time' by Stephen Baxter. This story goes to witness the heat death of the universe (still filled with conscious beings) and sets about changing that dreary future. Billions of years does not even start to cover it. How about 10^100 years?
Possibly, but Tolkien is not against craft or even engineering. Elven rings & other various magic objects, beautiful or impressive dwellings feature on the side of good. Moria was once a great Dwarves achievement before they succumbed to greed and mined too deep. It just has to be at one with nature, and frankly, who can argue against that?
Science without conscience is but soul's ruin (Rabelais).
Maybe aerospace software engineers have something to say about Ada not being practical. Probably similar to what the (real) engineers would say about your comment about FORTRAN. The fact is most engineering/scientific software (think PDE solvers, etc) is available and maintained in FORTRAN. There is no real alternative to BLAS (Basic Linear Algebra System) for example. It's often free too.
STL is incredibly useful, but like many powerful tools it is not 100% intuitive to use effectively at first go. It is easy to overuse templates (Hey, I can support ALL TYPES in my library, yay!) and not all compilers are optimized to remove redundant code, but such compilers are becoming available.
Like you say though, if you don't like it you don't have to use it, or you can use it more sparingly.
Partly false. In the US, last I checked you can publish and you still have up to a year to lodge a patent application. This is not true in most of the rest of the world.
According to Google Zeitgeist twice as many people are running Win95 on their desktop as Linux. Win98 is the second most popular O/S.
Yes it will, it's focal length is huge however (light years?)
As someone who works in image analysis for a living, I can tell you that a 61% success rate in anything is worse than useless. This is not 61% chance of catching a terrorist, it's the chance of recognising someone correctly whom they already knew. This system will be bringing up errors all the time, so often that it will be ignored.
To be of any help, error rates must be way below 1%. 99.99% accuracy is the figure most often bandied around for anything that has to be fully automated. This is the figure post offices want for ZIP code, banks want for cheque amounts and doctors want for diagnosing instruments of any kind, because anything less actually create more work for the operator, who still has to be a fully trained professional and who generally makes fewer mistakes than the automated system.
This is why you don't see many image analysis companies with stellar stock on Wall Street.
We will get there but it will take time.
Old data must be maintained, just like the rest. You must keep copying your old data to new formats, all the time, as soon as the new standard format becomes available, and certainly before the reader for the old format dies. You must also use non-proprietary ways of storing your data. Plain old text is always best if it works for you.
The good news is that because of the exponential growth in storage the old data is only piddling amount compared to the new data you are piling on now.
All the data I used to do my thesis and that I brought to my new place of work 10 years ago fits on one half CD. I brought it on a SCSI 512MB hard disk, which I'd bought for the purposed and failed years ago.
Before that all the code I'd written for my previous company fitted on a few floppies. Before that my important Unix (SunOS 2.x) home directory files all fitted on a single tape.
I used to think that my whole home directory would fit on a single CD, then on a single DVD, and now I'm kind of stuck, I need several hundreds of GB or masses of CDs. But in 10 years time it will be nothing.
I'm sure that you are very smart, but even very smart people get tired and do stupid things. Ever been involved in a car accident? Did you feel stupid afterwards? How can you be so sure that you will never do anything stupid, ever?
It's not about people being smart or stupid. It's about a company that sells dangerous product because of a bottom line issue. People never asked for scalding hot coffee, no one can drink 190 degree coffee. Nobody's liberties are being affected by this verdict. Instead a less dangerous product is now being sold, that is still hot (150 degrees!) and that will not give you 3rd degree burns if you spill it on you by accident.
The woman was awared 3 million bucks NOT because she was stupid. She was a typical victim (more than 700 had been burned by that coffee) of a callous company. McDonalds was fined 3 million bucks and told each new victim would cost them as much from now on unless they changed their act.
One day you might be grateful. Think about it.
You are absolutely correct on most points. I'm not sure however that the US will choose not to maintain its costly military. I think it needs to realize that winning war is easy with such materiel and good soldiers, but that winning the peace is a different kettle of fish. Possibly just as much money must be spent on it.
Another thing that always annoy me is that most French people think that the Rainbow Warrior episode was a complete disgrace from start to finish. Same as not all American approve of Bush's gung-ho approach to solving the world's problem.
You should read some other history books sometimes.
Originally Ho-Chi-Minh loved the US ideals and tried many times to get US help, not just at the end of WWI but right during the Indochina conflic. The US kept supplying France with weapons and not listening to him. France had little influence, then as now, on US foreign policies.
When the US took the place of the old colonial power and brought the conflict up one notch, Ho-Chi-Minh and the rest of the Vietnamese government finally saw through the US game. The US foreign policy then as now is not about bringing Democracy to anybody. It is just as crippled by ideology as any other country.
French nuclear tests occured in the southern Pacific, about as far off the French mainland as possible, however uncomfortably close to such nations as New Zealand. NZ is the home of Greenpeace. Whether you like that latter group or not, they know how to make a big stink when necessary, and they have some unpleasant memories associated with the French secret services on the matter of the Rainbow Warrior.
Not quite good enough:
strlcpy(to,from,0);
Your example can fail if you insert a bug like so:
/* oops, wrong one */
#define VLONG_STRING 80
#define LONG_STRING 60
#define SHORT_STRING 40
char string1[LONG_STRING];
char string2[SHORT_STRING];
char string3[SHORT_STRING];
string1 can overload. While this is obvious written like that when attention is drawn to it, in the middle of a real program people do write things ike that all the time. This is precisely the problem C++ strings were designed to fix. You don't need to allocate them beforehand because programmers are likely to get it wrong some of the time.
As for your problem of running out of memory in the middle of your program instead of at the beginning, lookup the string::reserve() member function. If you can't reserve() it will throw there and then.
If you want to implement strings with limited storage so that it doesn't eat all your heap, you can use your own allocator that does precisely that.
Finally I don't believe you can prove the correctness of something involving stack allocation like in your example. You seem to assume stack space is infinite, and it isn't. Try using your example in a recursive framework for example. At any rate you can quote Knuth on the correctness of algorithms:
"Beware of bugs in the above code; I have only proved it correct, not tried it."
So there you go. All the best.
Here we go, the US rightously policing the world.
1- there is always two sides to a story. What your government tells you, and what it doesn't. WMD in Iraq? the current political climate in Afghanistan? What about slightly older stories like Vietnam?
2- The first thing you do in invading a country is cause misery and death. Remember the boy with no limb left? Or that young girl napalmed from the Vietnam era? Do you cause less misery and death by invading than by not doing it? Do you trust your government to do that grim accounting for you?
3- Remember that what your government wants to do, it wants to did for political, financial, hegemonical and ideological reasons first. Humanitarian last. Always.
All the best.
As a sign of how different cultures can be and at the same time almost identical, many people (presumably from the US) express disbelief that protests can actually achieve anyting.
In Europe one regularly sees hundred of thousands of protesters in the street for seemignly benign things from a distance, such as a change in education policy. For really important matters one can see millions of people, who are very hard to ignore. Ministers have been known to resign after a large enough protest.
However in the US the situation is the same. Doesn't anyone remember the enormous protests, marches and so one of the 60's?
That's it, you've made my friend's list.
Thanks for these uplifting news.