I'm seriously tempted...
-
John Cardinal wrote:
I never guessed anyone would try to do that
You can sum it up like this: All software would work perfectly if it wasn't for those pesky users!!
------------------------------------------- Don't walk in front of me, I may not follow; Don't walk behind me, I may not lead; Just bugger off and leave me alone!!
-
Ray Cassick wrote:
At very least you need to NOT allow me to do that anymore.
Yeah, easily 90% of all the programming you do between the beta stage and release stage is firmly in the category of "I never guessed anyone would try to do that" or "What the hell?" :) Protecting users from themselves is critical but one of the most boring and uninspiring areas of work. Breaking something that was working is all too easy to do. It's really not possible to avoid this 100% of the time with a production project of substantial size and complexity. We have testing methods and standard scripts we run through but sometimes stuff gets missed. It's rare and only happened to me a handful of times in all the years I've been at this, but again, if someone reports it you *have* to fix it immediately and get the update out to everyone, not let it slide. A lot depends on the programmer who is doing the bug fix or feature change and their understanding of the effects that their changes could have, I think that too large a project with too many people leads to more of this kind of unintended consequences because people dont' have enough of the big picture to understand the consequences of what they're doing.
"I don't want more choice. I just want better things!" - Edina Monsoon
John Cardinal wrote:
their understanding of the effects that their changes could have
This actually brings up a question about available tools. Do you think that there are good tools available to help developers get this bigger picture? Do you think just having a simple call graph that shows the tree of affected functions impacted by changing one is enough? Personally I think that this along with a good Unit testing package/system in place (and a decent design to start with) should be enough to fend off all but the real killer corner cases here.
-
Ray Cassick wrote:
When was the last time an aircraft guidance system needed to be rebooted mid flight?
I bet if that happened, the airline was United. I've been in a plane where after a 45 min delay we were told they were shutting off the plane to reboot the computer, and then we were good to go.
Christian Graus - Microsoft MVP - C++ "I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
Christian Graus wrote:
were shutting off the plane to reboot the computer
One heck of a power switch on that computer. To restart, turn off airplane...:wtf:
-
Do it. If they suck they wont care. If they don't suck and really care then maybe it will spur them to realize that just because they sell software that doe snot mean they are not held responsible for poor quality products. Personally I am getting sick of the mantra 'all software has bugs'. When was the last time an aircraft guidance system needed to be rebooted mid flight?
-
John Cardinal wrote:
their understanding of the effects that their changes could have
This actually brings up a question about available tools. Do you think that there are good tools available to help developers get this bigger picture? Do you think just having a simple call graph that shows the tree of affected functions impacted by changing one is enough? Personally I think that this along with a good Unit testing package/system in place (and a decent design to start with) should be enough to fend off all but the real killer corner cases here.
No a call graph isn't enough, you have to *know* what goes where and what is affected by what. As for unit testing I don't believe in it and we don't use it. I believe it's a crutch designed for companies to be able to place far less trust in their developers and free them up to hire very large teams of low talent programmers in an effort to cheaply get software out the door faster. In other words factory programming. In our company we practice what I feel is artisan programming not factory programming, but we pick projects where we can be artisans so my opinion is obviously biased. In all the examples I've seen it used in it is used pointlessly in the great majority of methods / functions and is just a drain on resources and time and gives developers a false sense of security. So much important time seems to be wasted developing the tests, seeing if they are applicable, running the tests etc against a great majority of code that is blindingly simple and if coded correctly and defensively in the first place would not require a test at all under any circumstances. I do believe in something alternative which is special code that runs in debug builds only and make liberal use of that to ensure sanity checks etc where it makes sense in my own code.
"I don't want more choice. I just want better things!" - Edina Monsoon
-
Ray Cassick wrote:
Personally I am getting sick of the mantra 'all software has bugs'
Well technically it's true, it's what the producer of that software does about it that's the realy dividing line between good software and crappy software. Not caring about your customers is the kiss of death for software. I swear there is a lot of money to be made in simply replicating existing software from companies with known crappy support and a careless attitude about releases but supporting it properly and making damn sure a release is tested carefully.
"I don't want more choice. I just want better things!" - Edina Monsoon
Yes that is a very good idea. I think some companies have already done that. The first to come in mind would be Google. They started a search engine company at a time when everyone was thinking it was a saturated market. They did it much better than everyone else... Still the problem at hand does not apply only to software, many companies do not care enough about quality or support.
-
Do it. If they suck they wont care. If they don't suck and really care then maybe it will spur them to realize that just because they sell software that doe snot mean they are not held responsible for poor quality products. Personally I am getting sick of the mantra 'all software has bugs'. When was the last time an aircraft guidance system needed to be rebooted mid flight?
Ray Cassick wrote:
Personally I am getting sick of the mantra 'all software has bugs'. When was the last time an aircraft guidance system needed to be rebooted mid flight?
Very strong comment. I will remember that one! And ofcourse, It's just commercial talk. Maybe it's a hard criterium, but it is possible to deliver software without any bug. throw new NotImplementedException("No signature.");
-
*Pat on the shoulder* Hang in there old sport...
-Gatsby
-
Ray Cassick wrote:
Personally I am getting sick of the mantra 'all software has bugs'. When was the last time an aircraft guidance system needed to be rebooted mid flight?
Very strong comment. I will remember that one! And ofcourse, It's just commercial talk. Maybe it's a hard criterium, but it is possible to deliver software without any bug. throw new NotImplementedException("No signature.");
M@RI0 wrote:
it is possible to deliver software without any bug
No, it's not, except for trivial cases. The phrase "without bugs" implies a lot of things. For lack of a better definition, it means software that can be formally proven correct. Any application of meaningful size can't be proven correct. Similarly, even trivial applications that run under existing operating systems can't be proven correct, since you have to prove the environment correct as well. If you define "without bugs" as "software that isn't immediately lethal to the end user, or even better, doesn't get us sued in court", then sure. There's plenty of bug-free software out there.
Software Zen:
delete this;
-
Christian Graus wrote:
were shutting off the plane to reboot the computer
One heck of a power switch on that computer. To restart, turn off airplane...:wtf:
Rob Graham wrote:
One heck of a power switch on that computer. To restart, turn off airplane...
Either we were on the same United flight, or it happens more than occasionally. Seriously, all power to the plane was shut off. Totally quiet, no lights, no air, no engines. IIRC it was the guidance computers. After a couple of minutes, fire up the engines and we're good to go. I remember saying, a little too loudly "Must be running Windows.":omg: I thought it was funny. Half the passengers in front of me turned around. It was obvious from the stares of disbelief that no one else found it humorous. :-O
Gary
-
John Cardinal wrote:
I never guessed anyone would try to do that
You can sum it up like this: All software would work perfectly if it wasn't for those pesky users!!
------------------------------------------- Don't walk in front of me, I may not follow; Don't walk behind me, I may not lead; Just bugger off and leave me alone!!
_Damian S_ wrote:
if it wasn't for those pesky users!
Hence, long live COBOL and command-line interfaces!!! :-D Contrary to popular beliefs, it IS possible to write bug-free software. It is difficult, but not impossible. With increased (or reduced) complexity comes bugs.
bool WasteTimeAndSuckCycles() { bool bWillNeverHappen = TRUE; int i = 0; while (bWillNeverHappen) { // Warm up the CPU // Wait for CPU Power-off i++; } return (bWillNeverHappen); }
Gary
-
M@RI0 wrote:
it is possible to deliver software without any bug
No, it's not, except for trivial cases. The phrase "without bugs" implies a lot of things. For lack of a better definition, it means software that can be formally proven correct. Any application of meaningful size can't be proven correct. Similarly, even trivial applications that run under existing operating systems can't be proven correct, since you have to prove the environment correct as well. If you define "without bugs" as "software that isn't immediately lethal to the end user, or even better, doesn't get us sued in court", then sure. There's plenty of bug-free software out there.
Software Zen:
delete this;
Gary Wheeler wrote:
M@RI0 wrote: it is possible to deliver software without any bug No, it's not, except for trivial cases.
Sorry, Wheeler, you've been listening to Billy G. too much. It is possible to write bug-free software. The software must do everything it is supposed to do, and nothing it is not supposed to do (the more difficult proof), including allowing for unanticipated situations. As a developer, it is not my responsibility to validate the O.S. or the complier/linker/assembler, however, the application must operate correctly under the O.S. that I qualify it for. Example, if an O.S. (bug) stops sending the application mouse clicks, that is not a problem with the application (that would appear to hang). If the compiler is wrong, again it is not a problem with the application. (Writing in machine code can alleviate compiler problems.) The difficulty is that formally proving software is correct is typically more time-consuming than the application/system development time. We attempt to reduce bugs by applying whatever testing we can, however, there comes diminishing returns. How much testing is done also, in the business world, depends on the "lethalness" of the software. If an application/system can kill/maim people or destroy equipment unintentionally, testing is generally more thorough than if the downside is our spell-checker misses some spellings. Also, having the software do self-checking takes CPU cycles and can make a system less responsive. Multi-processor CPUs can allow software to be more reliable at run-time with no degradation in performance. One thread tests the gozeins and gozeouts while another thread runs the logic. The logic thread returns expected results only if the checking thread finds no problems. Has ANYONE ever found a bug that after-the-fact given the resources was impossible under any means to find? No! We have an aha moment. Once found, we can add additional testing to find that bug in the future (or not). The problem is that we need to *think* about these situations at development time and incorporate them into the application.
Gary
-
_Damian S_ wrote:
if it wasn't for those pesky users!
Hence, long live COBOL and command-line interfaces!!! :-D Contrary to popular beliefs, it IS possible to write bug-free software. It is difficult, but not impossible. With increased (or reduced) complexity comes bugs.
bool WasteTimeAndSuckCycles() { bool bWillNeverHappen = TRUE; int i = 0; while (bWillNeverHappen) { // Warm up the CPU // Wait for CPU Power-off i++; } return (bWillNeverHappen); }
Gary
ghle wrote:
Hence, long live COBOL and command-line interfaces!!!
I agree 50 per cent. Command-line interfaces rock. COBOL not so much. ;) Actually we could replace COBOL with a myriad of other languages and have that same "discussion." For example, "VB" or "C" or ".NET" or "Java." So let's leave at, "To each his own." By the way, you have a compiler warning. It should be:
bool bWillNeverHappen = true;
Best regards, BDF -
ghle wrote:
Hence, long live COBOL and command-line interfaces!!!
I agree 50 per cent. Command-line interfaces rock. COBOL not so much. ;) Actually we could replace COBOL with a myriad of other languages and have that same "discussion." For example, "VB" or "C" or ".NET" or "Java." So let's leave at, "To each his own." By the way, you have a compiler warning. It should be:
bool bWillNeverHappen = true;
Best regards, BDFTo each his own - agreed. Another thread discussed the desire to kill COBOL, just another reason why we can't.
Big Daddy Farang wrote:
By the way, you have a compiler warning. It should be: bool bWillNeverHappen = true;
Note: I do NOT have a compiler warning, you do. It compiled and executed just fine.:wtf: From afx.h
// Standard constants #undef FALSE #undef TRUE #undef NULL #define FALSE 0 #define TRUE 1 #define NULL 0
Gary
-
To each his own - agreed. Another thread discussed the desire to kill COBOL, just another reason why we can't.
Big Daddy Farang wrote:
By the way, you have a compiler warning. It should be: bool bWillNeverHappen = true;
Note: I do NOT have a compiler warning, you do. It compiled and executed just fine.:wtf: From afx.h
// Standard constants #undef FALSE #undef TRUE #undef NULL #define FALSE 0 #define TRUE 1 #define NULL 0
Gary
Hi Gary, I sit corrected. It is indeed I who has the compiler warning. I know that with VC++ 6 that would compile without warning. Your original code would be
bool bWillNeverHappen = 1;
after preprocessing. C++ allows assigning anint
to abool
and doesn't complain. However, either of these would be more correct:BOOL bWillNeverHappen = TRUE; // BOOL is #typedef int bool bWillNeverHappen = true;
Why have nits if you can't pick them? :laugh: BDF -
Hi Gary, I sit corrected. It is indeed I who has the compiler warning. I know that with VC++ 6 that would compile without warning. Your original code would be
bool bWillNeverHappen = 1;
after preprocessing. C++ allows assigning anint
to abool
and doesn't complain. However, either of these would be more correct:BOOL bWillNeverHappen = TRUE; // BOOL is #typedef int bool bWillNeverHappen = true;
Why have nits if you can't pick them? :laugh: BDFBig Daddy Farang wrote:
Why have nits if you can't pick them?
because lice are icky. :rolleyes:
-- You have to explain to them [VB coders] what you mean by "typed". their first response is likely to be something like, "Of course my code is typed. Do you think i magically project it onto the screen with the power of my mind?" --- John Simmons / outlaw programmer
-
Hi Gary, I sit corrected. It is indeed I who has the compiler warning. I know that with VC++ 6 that would compile without warning. Your original code would be
bool bWillNeverHappen = 1;
after preprocessing. C++ allows assigning anint
to abool
and doesn't complain. However, either of these would be more correct:BOOL bWillNeverHappen = TRUE; // BOOL is #typedef int bool bWillNeverHappen = true;
Why have nits if you can't pick them? :laugh: BDFBig Daddy Farang wrote:
Why have nits if you can't pick them?
Ah, and eat them! Some food for thought... X| But seriously, true is defined as NOT ZERO and false is defined as ZERO, no? so
bool nits = TRUE;
andbool nits = 1;
are correct and valid anyhow? It's been a while since I've used the CPM Borland C compiler... But this brings up a burning question regarding my EVC++ environment. MS generated code uses BOOL instead of bool. This takes a larger data storage area (32 bits to store a 1 or zero) which is not efficient. Is the trade off on storage space made up for in execution speed and or data alignment. I.e., is it faster to load registers with 32 bits rather than 8 bits (1 bit?). I know it is faster to load on an even boundary, but what if you are only loading one byte, not 4? Is there a penalty for padding the field with zeros or in loading 4 bytes instead of one? Anyone?:confused:Gary
-
Big Daddy Farang wrote:
Why have nits if you can't pick them?
Ah, and eat them! Some food for thought... X| But seriously, true is defined as NOT ZERO and false is defined as ZERO, no? so
bool nits = TRUE;
andbool nits = 1;
are correct and valid anyhow? It's been a while since I've used the CPM Borland C compiler... But this brings up a burning question regarding my EVC++ environment. MS generated code uses BOOL instead of bool. This takes a larger data storage area (32 bits to store a 1 or zero) which is not efficient. Is the trade off on storage space made up for in execution speed and or data alignment. I.e., is it faster to load registers with 32 bits rather than 8 bits (1 bit?). I know it is faster to load on an even boundary, but what if you are only loading one byte, not 4? Is there a penalty for padding the field with zeros or in loading 4 bytes instead of one? Anyone?:confused:Gary
ghle wrote:
true is defined as NOT ZERO and false is defined as ZERO, no?
Sort of, I guess you can think of them in those terms surely. From MSDN's C++ Language Reference: bool This keyword is a built-in type. A variable of this type can have values true and false. Conditional expressions have the type bool and so have values of type bool. For example, i!=0 now has true or false depending on the value of i. true This keyword is one of the two values for a variable of type bool or a conditional expression (a conditional expression is now a true boolean expression). false The keyword is one of the two values for a variable of type bool or a conditional expression (a conditional expression is now a true Boolean expression). So they don't come right out and say that but.... The C# Language Reference explains further: In C++, a value of type bool can be converted to a value of type int; in other words, false is equivalent to zero and true is equivalent to nonzero values. In C#, there is no conversion between the bool type and other types. For example, the following if statement is invalid in C#, while it is legal in C++:
int x = 123;
if (x) // Invalid in C#
{
printf("The value of x is nonzero.");
}ghle wrote:
MS generated code uses BOOL instead of bool.
I think this partly due to backwards compatibility with C language which does not have
bool
but usesBOOL
. As for the questions in your last paragraph, I don't have to answer that.#define (don't have to) (can't)
ghle wrote:
Anyone?
Bueller? BDF
-
ghle wrote:
true is defined as NOT ZERO and false is defined as ZERO, no?
Sort of, I guess you can think of them in those terms surely. From MSDN's C++ Language Reference: bool This keyword is a built-in type. A variable of this type can have values true and false. Conditional expressions have the type bool and so have values of type bool. For example, i!=0 now has true or false depending on the value of i. true This keyword is one of the two values for a variable of type bool or a conditional expression (a conditional expression is now a true boolean expression). false The keyword is one of the two values for a variable of type bool or a conditional expression (a conditional expression is now a true Boolean expression). So they don't come right out and say that but.... The C# Language Reference explains further: In C++, a value of type bool can be converted to a value of type int; in other words, false is equivalent to zero and true is equivalent to nonzero values. In C#, there is no conversion between the bool type and other types. For example, the following if statement is invalid in C#, while it is legal in C++:
int x = 123;
if (x) // Invalid in C#
{
printf("The value of x is nonzero.");
}ghle wrote:
MS generated code uses BOOL instead of bool.
I think this partly due to backwards compatibility with C language which does not have
bool
but usesBOOL
. As for the questions in your last paragraph, I don't have to answer that.#define (don't have to) (can't)
ghle wrote:
Anyone?
Bueller? BDF