well contributing to society i would say teaching.. since these kids may develop 100 new technology in the future where as you will develop only what one man can do ..
well contributing to society i would say teaching.. since these kids may develop 100 new technology in the future where as you will develop only what one man can do ..
true, but, it should be taught differently, not ,how was mentioned earlier, on five line programs. That's just repetitive and useless, soon the kids won't want to ahve anything to do with it, what should be done is this: give the students this program:flowcharting and other visual documentation methods are something I wish they taught MORE actually.
when they compile there won't be any errors, but, when they run it they'll be prompted to enter the variable once, but the secnod time, the enter more text will flash and the program will exit. That's because of the hanging '\n' sitting in the input buffer, this is where the flow chart comes in handy, that's how you teach somebody how the code really works, that it's not perfect even if it compiles. Then they'll see the real need for the flowchart and really grasp the concepts.Code:#include <iostream> using namespace std; char SomeVariable[20]; int main() { std::cout<<"Enter some text"<<endl; std::cin>>SomeVariable; std::cout<<"Enter more text"<<endl; std::cin>>SomeVariable; return 0; }
I'm actually being hypocritical here, considering i never actually draw out a chart like i should, but i get the idea, and i go through it in my head, which is fine, the concept of following information aroudn your program is the key. This is what teachers need to mention when teaching flowcharts.
PHP and XML
Let's talk about SAX