Giving code to posters rather than helping them

Reply

Join Date: Oct 2006
Posts: 57
Reputation: may4life is an unknown quantity at this point 
Solved Threads: 2
may4life may4life is offline Offline
Junior Poster in Training

Re: Math Tutoring Program

 
0
  #1
Nov 28th, 2006
<< This thread is split off from a discussion that originated here: http://www.daniweb.com/forums/thread62976.html >>

Here;s something you can work on. It may not be exactly what you need but its a basis at least. Also, why do you need to check if the second number of the division is zero, from the second you say it will accept values from 1-20?? Anyway, I put the check in the program as well if u need it for later on.. Hope it helps, byee
#include <iostream>
#include <ctime>
 
using namespace std;
 
int DoMenu();
void addition(int random1, int random2);
void subtraction(int random1, int random2);
void multiplication(int random1, int random2);
void division(int random1, int random2);
 
int main()
{  
    int random1, random2;
    srand(time(0));
 
    int choice;
 
    do
    {
        random1 = 1+(rand()%20); // from 1-20
        random2 = 1+(rand()%20); // from 1-20
 
        choice = DoMenu();
 
        switch (choice)
        {
            case 0: cout << endl;                     break;
            case 1: addition(random1,random2);         break;
            case 2: subtraction(random1,random2);     break;
            case 3: multiplication(random1,random2); break;
            case 4: 
                {
                    if (random2 == 0)
                        cout << "Error: Division by zero, cannot proceed\n";
                    else
                        division(random1,random2);
                } break;
            default : cout << "Error in input\n\n"; break;
        }
 
    } while (choice != 0);
 
    return 0; 
}
 
int DoMenu()
{
    int MenuChoice;
        cout << "(1)Addition\n";
        cout << "(2)Subtraction\n";
        cout << "(3)Multiplication\n";
        cout << "(4)Division\n";
        cout << "(0)Quit\n";
        cout << "-----------------\n";
        cout << "Choice: ";
    cin >> MenuChoice;
    return MenuChoice;
}
 
void addition(int random1, int random2)
{
    int answer;
 
    cout << "\n" << random1 << " + " << random2 << " = ";
    cin >> answer;
 
    if (answer == (random1+random2))
        cout << "Congratulations\n\n";
    else
        cout << "Incorrect\n\n";
}
 
void subtraction(int random1, int random2)
{
    int answer;
 
    cout << "\n" << random1 << " - " << random2 << " = ";
    cin >> answer;
 
    if (answer == (random1-random2))
        cout << "Congratulations\n\n";
    else
        cout << "Incorrect\n\n";
}
 
void multiplication(int random1, int random2)
{
    int answer;
 
    cout << "\n" << random1 << " * " << random2 << " = ";
    cin >> answer;
 
    if (answer == (random1*random2))
        cout << "Congratulations\n\n";
    else
        cout << "Incorrect\n\n";
}
 
void division(int random1, int random2)
{
    int answer;
 
    cout << "\n" << random1 << " / " << random2 << " = ";
    cin >> answer;
 
    if (answer == (random1/random2))
        cout << "Congratulations\n\n";
    else
        cout << "Incorrect\n\n";
}
Last edited by cscgal; Dec 3rd, 2006 at 6:03 am. Reason: Explanation about thread split
Reply With Quote Quick reply to this message  
Join Date: Jun 2006
Posts: 7,619
Reputation: ~s.o.s~ has much to be proud of ~s.o.s~ has much to be proud of ~s.o.s~ has much to be proud of ~s.o.s~ has much to be proud of ~s.o.s~ has much to be proud of ~s.o.s~ has much to be proud of ~s.o.s~ has much to be proud of ~s.o.s~ has much to be proud of ~s.o.s~ has much to be proud of 
Solved Threads: 468
Super Moderator
Featured Poster
~s.o.s~'s Avatar
~s.o.s~ ~s.o.s~ is offline Offline
Failure as a human

Re: Math Tutoring Program

 
0
  #2
Nov 28th, 2006
*sigh* Hey there May4life I know what I am saying is not officially according to the Daniweb rules but you are spoiling the newbies.

Just handing them readymade solutions will stunt their development in these things, they would never think of doing things their own, will always expect an easy answer, and much more.

Can't you atleast let these people have a shot of it....

We have already been there with you (I suppose a PM was sent to you) but still you must think that the thing "hope it helped" isn't helping them but just harming them in an irreversible way.

Hope you understand the point I am trying to prove..
I don't accept change; I don't deserve to live.
Reply With Quote Quick reply to this message  
Join Date: Oct 2006
Posts: 57
Reputation: may4life is an unknown quantity at this point 
Solved Threads: 2
may4life may4life is offline Offline
Junior Poster in Training

Re: Math Tutoring Program

 
0
  #3
Nov 28th, 2006
*sigh* Hey there May4life I know what I am saying is not officially according to the Daniweb rules but you are spoiling the newbies.

Just handing them readymade solutions will stunt their development in these things, they would never think of doing things their own, will always expect an easy answer, and much more.
Hey there s.o.s,

I totally understand your point of view but as you said, i'm not doing anything against the rules here. I respect the rules and try as much as I can to stay within the limits of what i do.
As for "spoiling" newbies, I too am quite new at this stuff (i've only been learning C++ for nearly 3 months now) and I got as far as I have by studying other people's examples and solutions, in the same way that I am helping others in here now.

Can't you atleast let these people have a shot of it....

We have already been there with you (I suppose a PM was sent to you) but still you must think that the thing "hope it helped" isn't helping them but just harming them in an irreversible way.

Hope you understand the point I am trying to prove..
You're right, I have been sent a PM about the same "problem"
As I also mentioned in that, there are many ways to solve a problem, I just give one which i believe is best. Now, if the person that gets this code decides to simply take it, copy it and give it in as his/her own work without at least making the effort of understanding it, that's their problem in the sense that they will most likely fail their written exam or get caught in the act (maybe someone else in the same forum is taking the same class and decides to copy the code). I have absolutely nothing to lose; instead I like not only taking these programs and solving them as a test to myself, but I also like making other people happy and calming them down after the agonizing hours they've already spent trying to solve their problem.
I just want to make it clear that I am not trying to give people easy solutions to their homework, I am not trying to get anyone in trouble.. I just give them a method for easier studying (if they want it). I just want everyone to know the ways I (personally as myself) would face and handle certain programming problems. I also mention this in the PMs I get from people that need help with their programs, not only in this forum but all the others I am signed up with. I have no problem with other programmers saying stuff like "I would use this instead of what you use", or "Your code isnt as efficient as mine". That's how we learn and also understand new concepts.
Making people happy is very easy to do, keeping everyone happy is the hardest! I am really sorry if what I'm doing affects you in a bad way, but to tell u the truth, this is the reason I sign up to forums.
Up to now its been great and honestly this is the best forum so far, by far!! I've made loads of friends and get a lot of practice and knowledge from other people. And as far as my programming skills are concerned, I have found that these forums are the best and fastest way to learn!
Last edited by may4life; Nov 28th, 2006 at 5:39 pm.
Reply With Quote Quick reply to this message  
Join Date: Jun 2006
Posts: 7,619
Reputation: ~s.o.s~ has much to be proud of ~s.o.s~ has much to be proud of ~s.o.s~ has much to be proud of ~s.o.s~ has much to be proud of ~s.o.s~ has much to be proud of ~s.o.s~ has much to be proud of ~s.o.s~ has much to be proud of ~s.o.s~ has much to be proud of ~s.o.s~ has much to be proud of 
Solved Threads: 468
Super Moderator
Featured Poster
~s.o.s~'s Avatar
~s.o.s~ ~s.o.s~ is offline Offline
Failure as a human

Re: Math Tutoring Program

 
0
  #4
Nov 28th, 2006
*sigh*

Maybe time will teach you or tell you the reason why the professionals are not in favor of posting entire solutions.

And just one more thing which I picked from the google groups:
"Anyone can write a program, but to help somone in understanding a program is what makes a real programmer"

Try to walk through the newbies and then you will realize how difficult it is.

Anyways I havent got anything more to say. Glad you replied.
I don't accept change; I don't deserve to live.
Reply With Quote Quick reply to this message  
Join Date: Apr 2006
Posts: 5,051
Reputation: John A is a splendid one to behold John A is a splendid one to behold John A is a splendid one to behold John A is a splendid one to behold John A is a splendid one to behold John A is a splendid one to behold John A is a splendid one to behold John A is a splendid one to behold 
Solved Threads: 332
Team Colleague
John A's Avatar
John A John A is offline Offline
Vampirical Lurker

Re: Math Tutoring Program

 
0
  #5
Nov 28th, 2006
Originally Posted by may4life View Post
As for "spoiling" newbies, I too am quite new at this stuff (i've only been learning C++ for nearly 3 months now) and I got as far as I have by studying other people's examples and solutions, in the same way that I am helping others in here now.
Hmm, so if you're a newbie, you hand them some code that may not necessarily be correct or using proper coding practices, and say "here, learn from this," what do you think that is going to teach them, even if they do study and try to learn from it?

As I also mentioned in that, there are many ways to solve a problem, I just give one which i believe is best. Now, if the person that gets this code decides to simply take it, copy it and give it in as his/her own work without at least making the effort of understanding it, that's their problem in the sense that they will most likely fail their written exam or get caught in the act. I have absolutely nothing to lose;
Yes, you have nothing to lose, but what about the newbies? Do you think if we handed code to every single person that was having trouble, they would study it? If we actually try to explain things to them and not simply say "learn my example", they will perhaps learn how the code works, and then when a test or exam comes, they will do well!

instead I like not only taking these programs and solving them as a test to myself, but I also like making other people happy and calming them down after the agonizing hours they've already spent trying to solve their problem.
Which do you think will help them remember better: if they've spent agnoizing hours on it until someone finally explains it and it makes sense, or if they've just been dumped a pile of code and said "here, have fun"?

I, for one when learning, almost never forget the stupid mistakes that I make at first if I spend a while trying to solve them. When programming in C++ now, it's very rare that I mistakenly forget to put a semicolon at the end of my sentance.
I just want to make it clear that I am not trying to give people easy solutions to their homework, I am not trying to get anyone in trouble.. I just give them a method for easier studying (if they want it).
Programming boils down to 2 things: experience and discipline. These 2 can only be gained by actually doing the work, and not studying someone else's code. By giving them complete, working examples, you keep them from doing these things. For example, if you had never coded before, but had seen and studied C++ for several years, would you recognize compiler errors?

Probably not. They can be somewhat cryptic and confusing, and it takes experience to know what each message means and what is wrong with your code. Also, coding experience helps you prevent errors from happening, as you get into a routine of placing a semicolon at the end of each statement, etc, etc.

So, although someone *might* actually try to learn from the code you give them, why not actually explain what it does? Coding books are not made entirely out of code; they have text to explain what the code does. And although you say "the student can do what he wants with the code," the disappointing fact is that it's almost like placing a little kid next to a cookie jar and saying "don't eat the cookies inside". Take away the temptation, and the student won't do it. You may actually be saving them from failing the class by not handing them their assignments.

I'm with Mr. ~s.o.s~ on this one.
"Technological progress is like an axe in the hands of a pathological criminal."

All my posts may be freely redistributed under the terms of the MIT license.
Reply With Quote Quick reply to this message  
Join Date: May 2006
Posts: 3,114
Reputation: WaltP has much to be proud of WaltP has much to be proud of WaltP has much to be proud of WaltP has much to be proud of WaltP has much to be proud of WaltP has much to be proud of WaltP has much to be proud of WaltP has much to be proud of WaltP has much to be proud of 
Solved Threads: 281
Moderator
WaltP's Avatar
WaltP WaltP is offline Offline
Posting Sensei

Re: Math Tutoring Program

 
0
  #6
Nov 29th, 2006
Originally Posted by joeprogrammer View Post
I'm with Mr. ~s.o.s~ on this one.
Interesting. That's at least 3 that think your analysis does not help new programmers. What is it you understand that seasoned professionals (at least one of which has experience as a teacher) are missing? Especially being new yourself?
The 3 Laws of the Procrastination Society:
1) Never do today that which can be put off until tomorrow
2) Tomorrow never comes
Reply With Quote Quick reply to this message  
Join Date: Oct 2006
Posts: 57
Reputation: may4life is an unknown quantity at this point 
Solved Threads: 2
may4life may4life is offline Offline
Junior Poster in Training

Re: Math Tutoring Program

 
0
  #7
Nov 29th, 2006
Hmm, so if you're a newbie, you hand them some code that may not necessarily be correct or using proper coding practices, and say "here, learn from this," what do you think that is going to teach them, even if they do study and try to learn from it?
I am not a newbie, i've been programming for years. I've recently got into C++! That's a big difference. I know my code is correct and I aways post it without warnings or errors.

Yes, you have nothing to lose, but what about the newbies? Do you think if we handed code to every single person that was having trouble, they would study it? If we actually try to explain things to them and not simply say "learn my example", they will perhaps learn how the code works, and then when a test or exam comes, they will do well!
Which do you think will help them remember better: if they've spent agnoizing hours on it until someone finally explains it and it makes sense, or if they've just been dumped a pile of code and said "here, have fun"?
Lets get this clear, I DO agree with you all. The best way to remember and learn something is by yourself and spending a lot of time doing it. Having a program to look upon is not a problem. For example, if the person doesn't understand switch statements and i have one in the code i wrote, the responsible thing to do is go look it up, learn how it works and compare it to the code. I mention these things in PMs i get to everyone i speak to.
The general idea i'm trying to get across is that i am giving out my idea of how I would solve that problem (and also giving the code of how to do it). I urge people to look at my code (to understand how i thought of overcoming the problem) and then give it a go with their own ideas. A lot of people here are vert smart, they are just confused or stuck on an idea or concept. By seeing how I overcame that specific point in the program clears these thoughts out and lets them continue onwards from there. That's what I mean when i say they have spent hours trying to solve their problem.
So, although someone *might* actually try to learn from the code you give them, why not actually explain what it does? Coding books are not made entirely out of code; they have text to explain what the code does. And although you say "the student can do what he wants with the code," the disappointing fact is that it's almost like placing a little kid next to a cookie jar and saying "don't eat the cookies inside". Take away the temptation, and the student won't do it. You may actually be saving them from failing the class by not handing them their assignments.
What makes you think if someone doesnt give them some help with the code, everyone WILL learn by themselves? If someone is in a really hopeless state and cant do anything about it, giving them code will actually boost them into the learning process. For example, i wanted to make a 3D game in openGL but couldn't find code anywhere! It was my final year project at uni so i didnt have time to learn openGL from scratch. I had to find some sort of code, learn it fast and continue from there. I did finally find some and finished on time! That was the best thing that ever happend to me

What is it you understand that seasoned professionals (at least one of which has experience as a teacher) are missing? Especially being new yourself?
I never said i was smarter than anyone else or that i know anything more than anyone in here. As far as the being new yourself, i covered that at the beginning of this message. Being a teacher, you too should know that a lot of teachers teaching the same subject have different methods. Same syllabus, different ways of communicating. Imagine if you never gave any code in the class, just teached theory and told the students to go out and google "linked lists".. How many would come back knowing how they work with a coded example of their own? 1? 2 the most? Only the ones who really really really care. By giving them a working example of one though, gives the basis and makes things a whole lot easier.
Reply With Quote Quick reply to this message  
Join Date: Jun 2006
Posts: 7,619
Reputation: ~s.o.s~ has much to be proud of ~s.o.s~ has much to be proud of ~s.o.s~ has much to be proud of ~s.o.s~ has much to be proud of ~s.o.s~ has much to be proud of ~s.o.s~ has much to be proud of ~s.o.s~ has much to be proud of ~s.o.s~ has much to be proud of ~s.o.s~ has much to be proud of 
Solved Threads: 468
Super Moderator
Featured Poster
~s.o.s~'s Avatar
~s.o.s~ ~s.o.s~ is offline Offline
Failure as a human

Re: Math Tutoring Program

 
0
  #8
Nov 29th, 2006
Originally Posted by joeprogrammer View Post
Do you think if we handed code to every single person that was having trouble, they would study it?

Which do you think will help them remember better: if they've spent agnoizing hours on it until someone finally explains it and it makes sense, or if they've just been dumped a pile of code and said "here, have fun"?

Programming boils down to 2 things: experience and discipline.

Also, coding experience helps you prevent errors from happening, as you get into a routine of placing a semicolon at the end of each statement, etc, etc.

Coding books are not made entirely out of code; they have text to explain what the code does.
Ah..what a thing to say...couldn't have put it better. Kudos to you

Originally Posted by may4life View Post
Being a teacher, you too should know that a lot of teachers teaching the same subject have different methods. Same syllabus, different ways of communicating. Imagine if you never gave any code in the class, just teached theory and told the students to go out and google "linked lists"..
Have you ever seen Mr. WaltP's replies or the answers he gives to people? Probably not. Because if you had, you would have know that he always gives the links and the algorithm which can be used to solve the problem, guides them step by step and helps in the way which helps in developing their programming sense.

Dont you ever wonder why the people at Google Groups( one of the finest C++ message board on earth) never hand out complete solutions to people unless they see an atttempt ? There must be something that you are missing and they have understood quite well.

Try to guide a newbie through his question and you will know how difficult it is. Finallly I will go out to be euphemistic and say that *you are killing the programming spirit*.

Thank you.
I don't accept change; I don't deserve to live.
Reply With Quote Quick reply to this message  
Join Date: Aug 2005
Posts: 5,266
Reputation: iamthwee is a splendid one to behold iamthwee is a splendid one to behold iamthwee is a splendid one to behold iamthwee is a splendid one to behold iamthwee is a splendid one to behold iamthwee is a splendid one to behold iamthwee is a splendid one to behold iamthwee is a splendid one to behold 
Solved Threads: 377
Featured Poster
iamthwee's Avatar
iamthwee iamthwee is offline Offline
Posting Expert

Re: Giving code to posters rather than helping them

 
0
  #9
Nov 29th, 2006
It's fine to write code for people, as long as you charge a good price. I see it as a win win situation. Keep doing your stuff may4life, it's good experience for any newbie like yourself.
*Voted best profile in the world*
Reply With Quote Quick reply to this message  
Join Date: Oct 2006
Posts: 9
Reputation: confused! is an unknown quantity at this point 
Solved Threads: 0
confused! confused! is offline Offline
Newbie Poster

Re: Giving code to posters rather than helping them

 
0
  #10
Nov 29th, 2006
Is there possibly a happy medium?

I am a "newbie" - I am as new as they come, taking my very first ever programming class which happens to focus on C++. There were no prerequisites for this class but the teacher I have seems to assume that everyone in the class has had some experience with programming. In many cases, he is right, but there are some of us that have had no experience at all.

I have posted for help a couple of times and have gotten some help, or have gotten absolutely no response and sometimes I just get personal messages telling me to put my code in tags. It was may4life that has helped me the most. First of all, may4life explained to me what it meant to put my code in tags, since I am a newbie who truly doesn't know anything about programming for the life of me couldn't figure out what that even meant. Second of all, I don't think it's fair to assume that all the students out there just post their problems wanting someone else to do the work. I, myself, have spent countless hours reading my assignments, going through my class notes, I even bought a book at Barnes and Noble called "Teach yourself C++ in 24 hours", still I can spend 10-12 hours in front of the computer on a Sunday afternoon and not be able to figure out where to begin with a program. I can write out in English what I want the program to do, but sometimes can't come up with any code to get myself started. may4life has helped me out, given me code, which I then studied and played with to figure out what the purpose of each line of the code was for.

To me, it's kind of like learning a foreign language, sometimes you can't come up with words on your own, but you can read it and translate it in your head, and this helps you learn the language. That is exactly where I am with this C++ programming. So, though I understand that a small percentage of people could be posting just to get out of doing their homework, please don't assume that all of us are doing that. I, myself, wouldn't dream of turning in someone else's work without understanding each piece of it and modifying it to make it my own.

This website is fantastic and I appreciate the fact that you all are out there to help, but please understand that some of us are so new at this that we need a push, and without help we don't even know where to start with the code.

Just wanted to let you know where a true "newbie" is coming from.

Thanks,
confused!
Reply With Quote Quick reply to this message  
Reply

This thread is more than three months old.
Perhaps start a new thread instead?
Message:


Thread Tools Search this Thread



About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC