Email: Password: Remember Me | Create Account (Free)

Back to Subject List

Old thread has been locked -- no new posts accepted in this thread
Andy Neil
03/03/10 17:57
Read: 503 times
Basingstoke
Uk


 
#173804 - Is it "lucky" or "unlucky" when bad code runs "correctly"
For example, here: http://www.8052.com/forum/read/173759 - where the NUL termination was not provided for a 'C' string.

Now it is possible that the very next byte after the end of the unterminated string might just happen to contain a zero value; in that case, the code would appear to "work" - despite being fundamentally flawed!

The question is, should this be considered "lucky" or "unlucky"?

"Lucky" because the code actually "works" when it shouldn't;

"Unlucky" because it will inevitably stop "working" at some point, and you'll be stumped because, "it was working perfectly (sic) yesterday"...

List of 17 messages in thread
TopicAuthorDate
Is it "lucky" or "unlucky" when bad code runs "correctly"      Andy Neil      03/03/10 17:57      
   I vote UNlucky      Erik Malund      03/03/10 18:03      
   Unlucky      Neil Kurzman      03/03/10 20:48      
   unlucky      James Hinnant      03/03/10 20:52      
   very unlucky      Mahmood Elnasser      03/03/10 23:54      
   Very unlucky. At least during testing.      Christoph Franck      03/04/10 01:51      
   bugs happen        Jan Waclawek      03/04/10 01:52      
   certainly unlucky but...      MUNISH KUMAR      03/04/10 02:07      
      But it would be very unlucky...      Andy Neil      03/04/10 02:39      
         That is a very good point...      Michael Karas      03/04/10 05:07      
            recalling a non-aberrant behavior      Erik Malund      03/04/10 06:30      
         Just a matter of chance      MUNISH KUMAR      03/04/10 07:11      
            you do not know Murphy was an optimist?      Erik Malund      03/04/10 08:43      
               I'm not defending      MUNISH KUMAR      03/04/10 11:54      
      considering ??      Erik Malund      03/04/10 06:39      
         I disagree      Neil Kurzman      03/04/10 16:03      
            not really      Erik Malund      03/05/10 07:13      

Back to Subject List