|
|
"HOW DOES THE PROGRAM WORK?" OR "WHAT IS THE CONCEPT OF THIS PROGRAM?" BECAUSE MR. I NEED TO DEFENSE IT TO MY PROF. THIS COMING TUESDAY.. HOPE U UNDERSTAND MY SITUATION. THIS IS THE CODE OF THIS OUTPUT: [E] encipher [D] decipher [X] Exit Enter choice: e(user input) Enter message to encrypt: (user input) Enter key:user input) The encrypted message: Back to main menu? (Yes/No) YES (return to menu if NO, program exits) : y (user input) Enter choice:d(user input) Enter message to decrypt:(user input) Enter key:(user input) The decrypted message is: Back to main menu? (y/n): N (user input) @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ |
Another effective technique is to explain your code to someone else. This will often cause you to explain the bug to yourself. Sometimes it takes no more than a few sentences, followed by an embarrassed "Never mind, I see what's wrong. Sorry to bother you.'' This works remarkably well; you can even use non-programmers as listeners. One university computer center kept a teddy bear near the help desk. Students with mysterious bugs were required to explain them to the bear before they could speak to a human counselor. - Brian W. Kernighan and Rob Pike in 'The Practice of Programming' |