Jump to content
  • Advertisement
Sign in to follow this  
  • entries
  • comments
  • views

My Reign of Mischief on Kasamba

Sign in to follow this  


I joined Kasamba a while ago, and immediately noticed a few things:

1) Most of the questions on the public forum concerning programming were people who wanted to pay others to do their homework for them.

2) Most of the folks responding to these queries are from India and other similar places.

This bothers me because if the folks who are learning to program don't learn to program, it further justifies the outsourcing of programming jobs to India. This also bothers me because the kids aren't doing their own homework assignments, thus reinforcing the idea that americans are lazy.

So, I decided to declare a personal war on the programmers of India, and this is my call to arms.

What I do is find one of these homework questions, and I provide the answer to it. One example is the "calculate the area of a triangle" example I did a while back.

A new example was in response to the following question:

Write a program that asks the user to input the name, age, and sex of each of three employees. The text file output will be a table formatted as follows.
Name age sex
Doe, Jane 25 F
Smith, Raoul 31 M
Moore, Mary Lou 19 F
This is using string data type.i.e. String last_name;

And my response:


class PersonRecord
enum gender_t
typedef std::string name_t;
typedef unsigned short age_t;
name_t firstName;
name_t lastName;
age_t age;
gender_t gender;
PersonRecord(const PersonRecord& personRecord):firstName(personRecord.getFirstName()),lastName(personRecord.getLastName()),age(personRecord.getAge()),gender(personRecord.getGender()){}

void setFirstName(const name_t& firstName){this->firstName=firstName;}
void setLastName(const name_t& lastName){this->lastName=lastName;}
void setAge(age_t age){this->age=age;}
void setGender(gender_t gender){this->gender=gender;}

const name_t& getFirstName()const{return(firstName);}
const name_t& getLastName()const{return(lastName);}
age_t getAge()const{return(age);}
gender_t getGender()const{return(gender);}

void read(std::istream& inputStream){inputStream>>lastName>>firstName>>age;char c;inputStream>>c;if(c=='m'||c=='M'){setGender(gender_male);}else if(c=='f'||c=='F'){setGender(gender_female);}else {setGender(gender_unspecified);}}
void write(std::ostream& outputStream)const{outputStream<};

record_count = 3

int main(int argc,char* argv[])
std::vector Records;
PersonRecord record;
for(std::vector::iterator iter=Records.begin();iter!=Records.end();iter++)

(forgive the formatting, I'm cutting and pasting what was actually on the website)

Now, this is a valid solution to the problem, and I purposely made the code too advanced for the kid to actually turn it in (his teacher/prof would never believe he wrote it himself).

But I got a response today:

Ernest, I really appreciate you giving me the code like that but the code you gave me is much more complicated then I am doing right now. I need a code using string data type and using simple C++, like cin>> and c<< out and setw.

So, chances are, he'll go and hire one of the Indians anyway, but I've made my point.
Sign in to follow this  


Recommended Comments

It amazes me that people are actually like that, as if programming is something you don't have to learn. I wonder how they'd solve a problem at zero hour with a $3Million deadline looming above them.

Share this comment

Link to comment
So store the values in a char array in reverse order, then use cout to print the values from end-to-beginning.

Or just re-suggest the following program. . .

cout << "please do my homework for me";

Share this comment

Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Advertisement

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!