Academic Dishonesty-When Is It REALLY Cheating?
ConcernedStudent asks: "Recently, 10 of my fellow classmates have been brought up on academic dishonesty charges in a senior level engineering class concerning a recent programming project. Granted, some copied other code verbatim and deserve to be caught, probably moreso for just being that stupid. However, there are those who have been implicated because they referenced code of somewhat dissimilar projects from previous semesters at some point during their design process. As long as the old code was not passed off as their own work for a grade and does not appear in the final draft of the code, is this really considered dishonest? How is this different than referencing a book on the language or some other "legitimate" source? At what point does referencing outside sources become dishonest? Is it just to review historical copies of code (using JFS) which were not submitted for grading to see if questionable code exists in these intermedite draft copies of the program? As this is a somewhat grey area, hopefully someone out there has comments which may help to clarify some of the uncertainty."
For it to be dishonest you must be misleading someone. If you make explicitly false claims, that's obviously dishonest. Further, there are some implied claims (such as that work with your name on it is your own) which you have a responsibility to explicitly contradict if they're false.
As long as you give proper attribution anywhere you use or reference others' work, that's honest. In some cases, the requirements of the assignment may require that you not use certain sorts of sources. If you fail to comply with that restriction, but give proper attribution, then you're not being dishonest, you're just failing to do the assigment as specified. This would be grounds for a poor grade, but not for academic dishonesty charges.
Wasn't that C/PM (or CP/M) that IBM wanted from Kildall but he was out flying his plane and they wouldn't tell his wife who they were for corporate security reasons?
I see even classic Slashdot is now pretty much unusable on dial up anymore.
As a former junior faculty member, I always strove to keep assignments different enough between years and between students that collaboration couldn't be cheating (at least in my mind.) Finding out how someone else solved a previous problem is learning. Passing this off as original doesn't merit a higher grade.
In all fairness, I was the exception with changing my assignments from year to year and giving different students different assignments for each and every mark. Most faculty just don't want to work that hard at teaching.
So long and thanks for all the fish . . . !!!
Classes are not meant to duplicate the real world. If they were, there would not be any purpose to them; we would all just need to go straight into the real world.
Well, yes, but classes should prepare students for the real world, albeit in part by giving them experiences they won't get in the real world.
For one thing, in the real world you don't always have the luxury of solving a problem in an intesting way.
For simple kinds of things (insertion sort) that you learn at a lower level, tests can sort this problem out. For advanced projects, I think that the issue of peeking at earlier solutions can be handled by the provision that a working solution only gets you 75% of your grade. The rest should go to factors like organization, documentation, clarity, and originality.
A good designer and a poor designer may both be able to solve certain kinds of problems, but the good designer will deliver a better overall package.
Post may contain irony: discontinue use if experiencing mood swings, nausea or elevated blood pressure.
While I am by no means an engineering student, I do have a passing knowledge of projects and the like(CS majors rule! :). However, it would seem to me that if a major part of the project is to figure out how to do X, and you look at code that tells you how to do X, then you are indeed guilty of cheating. Without more information about what the goals of the project were, it's hard to say.
Visit the
Let's think about this:
If you're working on a project and you get stuck, will you release a product with chunks missing because you hit a wall or will you reference another project for ideas/code to get around your obstacle?
This is precisely why I think some college professors are useless. They aren't training you for real life. We don't go through our lives without learning from someone. They can teach basicsand theory, but basics only take you so far. You have to learn with help from peers before your work can truly be useful.
I know they're trying to encourage creativity here, but pure creativity doesn't work all the time.
So, don't try to convince the world that Bill Gates got where he is now by "paying his dues", because it's simply not true.
Yep. That's right. :-)
She refused to let them in.
And yes, CP/M, not DR-DOS.
My duh.
I can only assume that you have never taken a computer science class. What do you think you do? You think you try to solve some problem that has never been solved before? No, you solve the same damn problem everyone else in the class is solving, and it's probably the same problem the whole class solved last semester.
By your theory, there is also no reason for me to write an analysis of Macbeth's "Tomorrow" speech, since there's plenty already written on it.
You say "if it was stated or implied that all code should be the students work." Let me quote from the policy on cheating that I am currently a TA for:
The punishments for a first offense range from failing the assignment and having your grade in the class reduced by one letter grade to just failing the class outright. For a second offense, you might get thrown out of the university.
I would make the important distinction between, for example, a solution to an earlier assignment that had been posted by the professor to the web, and a solution to last semester's project that you got from your friend's roommate.
It's one thing to say, "I needed a priority queue, so I implemented the pseudo code in CLR's intro to Algorithms". It's entirely another to get solutions from earlier semesters of the same class and use them and never acknowledge that fact. If a professor publishes solutions for one semester, does that mean the next semester can just resubmit those solutions instead of doing the project?
Key points:
1. Is the copied code part of what the assignment is designed to solve, or is it in generic support code.
2. Is the copied code from some publshed source (book, website, examples in lecture notes), or is it from somewhere that anyone would know is off limits (student from last semester, professor's solutions to last semester's projects).
In this case, it turned out that the graduate student had faked his data to fit with his theory. The professor -- who had been the first name on the paper -- excused himself by saying that he had not even read the paper in question.
/. question, acknowledge your sources, always. You will NEVER get in academic difficulty if all sources are respectfully cited. The worst form of offense is passing off someone else's work as your own - a copyright violation.
All authors share responsibility and copyright for published works - the first author more so than the others, in general. If someone had incurred enormous fiscal loss that was critically dependent on your copyrighted (but false) work, you and the other authors would bear some liability.
Besides that, in general, you ought to be able to competently discuss papers on which you are an author. When I ask someone about a paper on which they are an author and they cannot answer even a simple question, it is really quite bad. For them.
In science, your reputation among your peers is one critical aspect of your career. People still cheat in various ways, but their reputation suffers.
In any case, cheating is generally a personal choice. I can tell you from teaching college courses that people cheat. We would sometimes release test and homework solution sets with arbitrary and funny silly errors such as "2 + 2 = -4" - these errors were not on the conceptual sort we were testing, merely really stupid errors we inserted to test people.
It was surprising how often these showed up in subsequent years on tests and homeworks. People REALLY do not care, and cheating is generally not treated NEARLY seriously enough. And as a result, LOTS of people cheat.
With respect to the ask
And wrt cheating, some people do it and benefit. It is a personal choice as to the potential costs and risks. I like being able to look my self in the mirror and say with confidence that anyone with reasonable skills that tries to replicate my work will find the same answers I gave. If that is not the case you are blocking science, instead of advancing it. But I guess there is the question of whether you are advancing science or your career...
About choosing another school, thats just not an option for alot of people ...
The honor system looks like a good idea, but if you read between the lines, my thesis was that cheating is a supply and demand situation ... University policies, bad instuction, and bad students create a demand for cheating. And as wel all learned in econ 10a, demand creates supply ... Now granted a school will never do away with cheating completley, but I argue they are in control of atleast two of the demand components, bad policy and bad instruction.
In the end it's much easier to insist amoral students are cheating then to realize you yourself were part of the problem ...
College is a contest to see who gets thru, not who gets thru witout cheating.
Free Techno/Jazz/DNB/MI Music by guys obsessed with monkeys!
Its supposed to be pretty sophisticated stuff -- they share it among the other UC's (I goto UCR). They're fairly secretive to, only a couple people on campus are allowed to administer it. Its all automated from the TA's perspective, it just spits out a report of what similarities it found.
Free Techno/Jazz/DNB/MI Music by guys obsessed with monkeys!
Many many years ago, i had a friend in the same CS program as myself. We tooka few classes together and, as I had a computer and he didn't (this was 20 years ago) we did our assignments on my machine.
This naturally led to designing the code together and, in afct, if you mapped variable names you'd fidn our assignments looekd rather similar.
Was this bad? i don't think so. I learend valuable thinsg about team projects. Years later my friedn told me he learned as much about engineering from me as he did from our professors.
Ultimately the goal of an educational institution shoudl be education and anything that enriches a student's education shoudl be good. While I don't support people riding along on others work and doign ntohing, the afct of the matter is that thsoe people aren't learnign anything the world will bite them in the ass soon enough.
My guess is your school is a big state school. Big state schoosl have a way of forgetting that the structure exists for education and start valuing the structure above all else. I fell for your fellow students. If I wer them, I'd try ot get a pro-bono attorney and fight back.
(I actually DID sue my school eventually over the administration taking an unreasonable action that hurt my transcript. It was avery diffrent sort of manner. They lied to me then told me I was responsible for knowing they were lying.)
If the course was about building complex systems, then borrowing other code would probably be OK.. As long as you make it clear what's you're code, and what came from elsewhere. If the course was about learning how to write programs, then 'borrowing' someone elses' code would be against the purpose of the course.
Think about it for a second. Just about any problem simple enough for a beginner programer to solve already has a solution written. Bubble sort? No problem. Quick sort? Right here!. You can get a garbage collector from this page. (none of these took me more than a minute to find with google).
So how are you going to actually learn how to program if all you're doing is stealing other people's code. More importantly: How do you learn how to fix problems with code if you're doing this?
Of course, it would be hell for an instructor. If you wanted to force your students to write their own code, the only problems that you could give them would be problems that even the best experts hadn't been able to solve.
--
Free Software: Like love, it grows best when given away.
I once held an informal poll among the undergrads and concluded that almost all of them chose courses they could get high marks in, and almost all of them would opt to get a high mark than to focus on learning
I think that is an obvious statement. If you take classes that you think that you will enjoy the subject matter, you are more likely to spend more time studying it, which means you are far more likely to do well in it.
Cheating happened lots in my school, but I'm glad to say that I was able to graduate without cheating, as it has helped me greatly. It's much harder to cheat in the industry!
Doh!
If you steal from one source
it's plagairism. If you steal
from many sources, it's research.
Amazing magic tricks
Allow me to re-phrase my statement. Projects teach students to develop their problem-solving skills. I had not intended my statement to mean that the projects teach them how to solve specific problems, but rather how to work on problems in general. Instruction teaches the theory behind the implementation, while the project gives the student a chance to figure out how to implement that theory. Both aspects are important in teaching people how to be engineers.
Academic Dishonesty-When Is It REALLY Cheating?
Duh. If it wasn't cheating, it wouldn't be dishonest.
The real question is this: Were the students supposed to demonstrate that they had learned how to write their own good code?
Since most student's natural state and abilities seem to lie in the area of using other people's work, I'm guessing they don't need to be taught how to do that!
Of course the real world works on the principle of code-reuse! But that doesn't exempt programmers from being able to write good code of their own when pressed. What these students have shown is that, when pressed, they can't (or won't) write good code. They cheated, and they deserve to fail. They haven't demonstrated the required level of learning.
Any sufficiently well-organized community is indistinguishable from Government.
Am I missing something here? I know copying outright is wrong but if I wrote code for programming 101 I should be free to use the code I wrote in 102 and beyond. The purpose of education is to build on what you learn so that when you get to CSC400 courses you can look back and really understand what you did in CSC101
I don't think so. The purpose of education is to build on what you learn, not build on what you've produced already.
--
When I was in a graphics class, we had to put together a renderer from scratch (no OpenGL for us). Needless to say, it took weeks of labor to get something that raytraced some lousy planes and spheres. Not too hot.
But three guys in the class treated it like a job, and shared their code. They were working without advanced libraries just like the rest of us, but because they worked together, they modeled a whole room, with textures and other spiff doodads, and it was definitely the highlight of the class.
Of course they practically failed the course because of their actions. They failed to understand that the class was NOT about the product, but the process. It's about the skills, not a cool demo. Well, ok, it sucks if the teacher is teaching a bad process...
---------
It is easy to control all that you see,
However, as this was a senior level CS class, I find myself asking why the profs were assigning problems for which solutions could already easilly be found?
Shouldn't senior programming students be expected to be capable of solving new problems? Shouldn't the profs be working a little harder to find new knots for the students to untie? If the instructor is just assigning programs out of the back of some textbook, he/she is short-changing those students.
Information wants to be anthropomorphized.
One way I used to stimy dumpster-divers is I would a lines or a few lines in the code that really didn't do anything. Most of my professors would ask me about it, and I would explain that is was just a 'fingerprint' or 'signature' I put in the program. They didn't have any problem with it and most of the dumpster-divers weren't intelligent enough to notice the dead code. So, if I got pulled in with some other people for turning in similar code, I could always reference the 'fingerprint' without even seeing the code. This was usually enough proof to the Professor ( along with the fact they might have asked about it on a previous assignment ) that I wrote the program. Another tactic is to obfusticate a part of the code to the point, only you can explain it and the only other people that can figure it out are the other good students ( that don't cheat ) and the professor.
The students who outright copied others' code into their projects deserved to get caught, and they deserve whatever consequences they get. When you copy someone else's (work|answers) instead of coming up with it yourself, that's cheating, plain and simple.
I can't possibly imagine how looking at someone else's code - for a different project - could be considered "academic dishonesty." I'm not taking any engineering courses, I have a concentration in C, but in all the courses I've taken so far, collaboration has been encouraged.
My instructors have all been very open-door, they give out their phone numbers and email addresses on the syllabus. Working outside of class is not only permitted, it's encouraged - I've never coded a single lab in class; I do it all at home where I'm comfortable and in my own environment. As for in-class activities, if you can't figure something out, you can look in the book; if that doesn't help, you can ask the guy next to you. And if he's clueless, you can look it up on the web. I tend to go for the latter solution as finding other peoples' example code has worked wonders for me.
Put simply, I would not be the programmer I am today had I never looked at or used someone else's code. Granted, I don't use other peoples' code verbatim in my own class projects; again that's cheating and nothing more. But I don't see anything wrong with looking at someone else's example, seeing how they did it, and then using that knowledge to do it again yourself. Many people - myself included - learn best not by lecture, but by example. Looking up some former student's code from a different project is no different than picking up my copy of the C++ Bible. And neither are dishonest practices, IMO.
I don't know anything about the instructors/professors involved here, but during my "college career" I've learned at least one important thing about instructors. The ones with a lot of cheaters or failing students in their class are the ones who aren't teaching the material well enough, and they often know it. In fact my C++ class just had 6 people transfer in from another instructor's class. Both instructors are using the same syllabus and book, but these folks all failed her first test. One of them told me he learned more from my instructor in one session than he'd learned from the other one in a month of classes.
An instructor who's there to teach and is willing to help students learn - as opposed to the batty old tenured guy who's just there to draw a salary - does not often need to worry about cheating.
Shaun
Thanks to the War on Drugs, it's easier to buy meth than it is to buy cold medicine!
True in the real world. However, the purpose of the real world is to get work done efficiently, and the purpose of academia is to educate students.
If the referenced code was the core of the problem to be solved, and therefore the lesson to be learned, it's a problem. If it was just generic support code that the students could have written after their third semester in CS, it shouldn't matter.
Where the motto is: "Unfortunately, half of you are below average, for the first time in your life!"
Collaboration is encouraged, for the most part!
Of course, I never saw the dark seamy side of student life. What dark seamy side? I don't know, I never saw it!
Geek dating!
GPL Deconstructed
Don't sell yourself so tall.
Your friend has the jobs lined up because he is diligent, hardworking, and effective. It's not because of his grades.
Look around you. There are plenty of people who get A's and yet are fundamentally useless.
If you're not getting hired it's because you (pick any one or more):
"Patriotism is your conviction that this country is superior to all other countries because you were born in it." -- GBS
Why not just allow it? I mean, half the people here seem to think all intellectual properties should be banned and that "information wants to be free". So why not? Where do you draw the line? It's just a whole bunch of letters and code strung together right? Hey it gets the job done right?
Socialist pigs roam everywhere!
---------
Did you just fart? Or do you always smell like that?
eTrade SUCKS
Blatant cheating is rather unheard of in science circles in academia; important results are almost always confirmed with other expirments or calculations, and given that an erroneous result is enough to sink one's academic reputation, there is very little incentive to publish fradulent results. Slopiness and carelessness (like any other endeavor) are however common, and scientists with poor research quality often suffer damaged reputations as well.
Although the author is a bit vague on details, the example sounds very similar to the David Baltimore Case, which was the subject of much investigation and a recent book by noted science historian Daniel Kevles (author of science history classic "The Physicists"). Baltimore himself is a very well known scientist (he won the Nobel prize in medicine in 1975, and is currently the President of Caltech), which accounts for the attention the case received.
However, there is a key difference between the Baltimore case and that described by the author. A scientist named O'Toole trying to reproduce their experiments failed, and accused Baltimore and his student of fraud, with very little evidence to back up the claim. Baltimore and his graduate student were exhonerated, and most people believe it was O'Toole's race to brand Baltimore which lies at the root of the problem.
Baltimore may have read the papers in great detail (as the peer reviewers of the published publications certainly did), but the truth of the matter is that without having redone the experiment oneself, no one can spot every subtle flaw in another's work. That is a fact of life, and is a key reason why scientific results must be reproducible. In the end, quite unlike the teetering house of cards which the author alludes to, the scientific enterpise has been enormusly successful across the board, precisely because it builds on solid foundations which are checked and tested carefully.
Science, like Nature, must also be tamed, with a view turned towards its preservation.
I have TAed a couple of courses here at CMU, and I have to let you know that on coding assignments catching cheaters is really easy. Why? There are two reasons:
The typical way of cheating on a programming assignment is to copy someone elses solution and modify it. Perhaps you will rename the variables, change the comments, rewrite a function or two. These changes are on the surface only, and do not change the functional decomposition you used, the algorithms you chose -- in short, these changes do not change the aspects that a good grader is actually concentrating on. (And a good cheating detection tool ignores comments, variable names, etc.) Often you will find that the only person you fool is yourself.
So what is the end result? It is often easier to do the assignment without cheating than it is to cheat and get away with it.
I've been a student for quite some time -- and I'll tell you exactly what causes cheating at aleast one university ... the quarter system
My university (www.ucr.edu) is on the quarter system that means *10 weeks* for a course (10 weeks instruction, 1 week finals, one week break). They teach courses they have no business teaching in 10 weeks, ie: Compiler design, 10 week course, final project? a compiler! EE120b -- logic design -- final project? a cpu! all in 10 weeks ... only the extrodinary students get thru it, which is why our graduation rate is 30%.
However, all courses are curved -- which means you have to compete on a curve, with accelerated curiculium, with students who are cheating!
Now if you think about how the standard curve is calculated, you find the average score, then the std deviation and set your "grade" levels. BY DEFINITION of the curve, your failing the lowest x% of your students ... no professor I've ever met would let a curve ride higher then the 60D, 70C, 80B, 90A. But with the acelerated coursework, its routine for good marks like A's and B's to hover in the 30 - 60% range, because students can't possibly keep up with the courses. I recall once in physics getting a 26 out of 100 on a midterm and having a very solid C. The worst thing I ever heard of was an upper level chemistry course having an average score of 1, yes 1 point.
The awfull thing about this is, if some students aren't failing completley, then none of the class can pass!
So I argue here that cheating in large quantities is infact encouraged by some university policies, and is usually an indicator something is terribly wrong with the academics of the college.
Free Techno/Jazz/DNB/MI Music by guys obsessed with monkeys!
I've studied CS in a collegiate environment (right now I'm a computational chemistry major, due to graduate RSN). I've also written code for a living in a corporate environment, working on some reasonably large projects.
Non-collaboration policies always struck me as really dumb becuase in the "real" world you don't take a dump without a) a plan, and b) at least one partner, much less write a line of code. Yes, I can see the educational value of learning to do something from scratch by yourself, but I also very strongly feel that collaboration should be an integral part of the learning experience, not a forbidden zone. The most frequent complaint I've heard about fresh CS/eng graduates is that they don't know how to work in a team, because their whole educational experience has been conducted in an environment that discouraged this.
If Brown has one of the top CS departments, I sincerely doubt it has anything to do with this policy, but rather with the caliber of faculty they attract (which is pretty much a function of how much they pay and how liberal they are with tenure). (I say if not becuase I doubt they're good, I just don't keep up on rankings. :^) )
--
News for geeks in Austin: www.geekaustin.org
News for Geeks in Austin, TX
...because the goals are different. if you get an assignment from your CS class to write an tree optimizer or something, and you just reference a bunch of open-source stuff, you are not earning a good grade, even though this would be a perfectly legitimate (and encouraged) solution in the workplace.
CS is supposed to teach you to solve these problems, not just implement someone else's solution.
Contrary to popular belief (where i am, anyways), the point of a CS assignment is not to get a working program. It's to learn the techniques for yourself, and see what works, what doesn't, and why.
This may be contrary to what you'd do in the "real -world", but if you have a problem with it, go to college. Undergrad is for trying, not doing :)
/bluesninja
If the projects were very dissimilar, yet they were still able to graft code from project A to project B, then there may be a pretty good understanding of the code itself in order to affect a transformation without changing correctness!
Geek dating!
GPL Deconstructed
I'm going to let you in on a secret from the Real World.
Once you graduate, nobody gives a shit what your GPA was.
Unless you're applying for graduate school, or some horrid cookie-cutter cubicle farm job (i.e., Accenture) where the HR dept processes so many people that they have no human methods of screening out the duds, nobody will even so much as look at your GPA ever again until you die.
I'm not sure why this continues to be such a revelation for people. You'd think they would have learned it after junior high. Remember how the guidance counselor told you that class you were messing up in 7th grade was going to dog you for the rest of your life, and that you were going to have to be a ditch digger if you didn't straighten up, and fast? Notice how once you hit 9th grade it was never spoken of again? That you were never required to provide your junior high transcript to anyone, anywhere, ever? There's a trend there.
You just have to do as well as necessary to make it to the next step. Just make sure the steps you're taking are leading you somewhere you want to be, because one day you're going to have to park it there. All the rest is for your benefit: learn what you can, try things, explore, meet people, make friends. It's how you did on those fronts that's going to determine how successful you are.
"Patriotism is your conviction that this country is superior to all other countries because you were born in it." -- GBS
Yes, software gets re-used in the real world. But, when we look to hire a programmer we aren't looking for someone who can use a library. We want people who can code. We've had entirely too many hours wasted interviewing people straight out of school who can't program worth crap.
High school diplomas used to mean something. You had lower graduation rates because the requirements meant something. Now getting high school diploma means you attended more classes than you didn't, you can write your own name without making more than a couple mistakes, and you didn't shoot anyone. It's beginning to occur in univerities now and to be an impressive candidate in a lot of industries you have to have your masters degree.
Collabortion is great. OOP is fantastic. Trained monkeys who can sniff out and find somebody else's work are useless. School is for learning and copying work, rather than creating it, is detrimental to the student and to the school's reputation.
Take pride in your work, fulfill the requirements, and you'll understand why it's important.
In academia (especially undergraduate) the focus is to expose the student to subject at hand so that they know where they have to look when they really have to do something. If one really wanted them to learn to do things one wouldn't throw a half dozen new subjects at them every 4 months.
Using someone else's code, even if only for a portion of the code, is having someone else do it for them. Thus, it is considered cheating.
Usually, even in accademia knowing who to ask and what to ask are just as (if not more) important than being able to do it yourself. The fact is that every prof/t.a./lab tech assumes his course is the only one in the curriculum, and you as the student should have more than enough time to gain the same level of understanding as he has after 20 years of teaching the course. Of course if he's a prof he'd rather be doing research anyway so you (as a student) are just an inconvenience.
--locust
The reuse of previous solutions should be ENCOURAGED. However, it must be fully documented as to the source. This is how the real world works. If someone has engineered a solution, it is almost always cheaper to utilize that solution and pay the licensing fees or purchase rights to the code.
If it was cited works, tell the professors to step out of acadamia and get in the REAL WORLD. The only way they have grounds is if it was stated or implied that all code should be the students work.
In my job, I try to produce as many common function code sections as possible. I then add these to a common database for others to use and modify to their needs. Re-inventing the wheel is not only stupid, it is in efficient. Engineers are lazy. Efficiency is king.
CS at Brown University follows a strict non-collaboration policy. It is much more rigid than any other department at the school. If caught, all incidents are forwarded directly to a dean for disciplinary action. In the engineering department, the rules are much less harsh, and collaboration often takes place.
This non-collaboration policy actually works, as Brown has one of the top cs programs in the nation. However, at times it is a bit excessive. Personally, I think that whether or not your case is truly academic dishonesty depends on the guidlines for the assignment. If they strictly said that all work should be your own, then referencing other work probably should be considered cheating.
True, when writing a paper for say, Political Science, you are referencing outside sources constantly, perhaps even quoting. However, you do this to build your own argument, and only do it to support what you are writing. Copying a whole chapter for a paper without citing references is obviously plagiarism, however even with a reference the work isn't your own, and the problems here are quite obvious. Truthfully, it depends on how much code was used, and in what manner. I don't think there is any cut and dry or black and white answer to this question.
-Brian Singer
I learned two rules for avoiding charges of cheating in my CS department, both of which strike me as pretty sound:
1 - You can't be punished for citing references.
If you get code from some source and you document it, you say so when you turn it in, it isn't cheating. You may not get a very good grade and your prof may not be pleased, but you can't be brought up on charges of cheating.
2 - The Gilligan's Island rule
If you look at someone else's code, then go watch an episode of Gilligan's Island. Anything you can still remember afterwards is fair use. This was treated as a way of defining the line between copying someone else's code and learning from it. As rule, it won't save you in a court of law, but unless you have superhuman memory, you will be hard pressed to remember enough detail about someone else's work to be demonstrably cheating from it.
I have never heard of a student using these policies ever having been charged with academic improprieties. They are much, much easier to follow than the rules for when you can and can't sleep with profs and TA's.
I appreciate the fact that one is supposed to work out their own solution to problem posed in class or on assignments. However, there is a form of academic cheating that is rampant throughout the university world.
A little more than a year ago, the pages of Science where alive with the debate over whether a certain professor had published erroneous results or not. The case was as follows: his graduate student had been doing a series of experiments, and published a couple of papers on this -- with the professor as the first author. Some of you may not know this, but the tradition is that the person responsible for most of the work is cited first, followed by others, and, sometimes, followed by the professor (or other 'grey eminence') last.
In this case, it turned out that the graduate student had faked his data to fit with his theory. The professor -- who had been the first name on the paper -- excused himself by saying that he had not even read the paper in question.
So, either he did read the paper, examined the results, and published anyway, and is guilty of fraud; or he had his name as the first author of a paper he didn't even read until it blew up in his face.
This _really_ makes you wonder about scientinsts that have hundreds of papers to their name -- papers that are really the basis of their careers...
Trust the Computer. The Computer is your friend.
Academics is filled with research, including computer science. Your question didn't tell whether you gave a full and clear attribution of where you found the code.
If you did, then at a hearing, bring in just about any academic journal, and show how every paper references at least five other papers.
Never play leapfrog with a unicorn. Or a juggernaut.
I once held an informal poll among the undergrads and concluded that almost all of them chose courses they could get high marks in, and almost all of them would opt to get a high mark than to focus on learning.
As for cheating - what do you expect? The whole educational experience is driven by marks, so cheating is a natural by-product. Some schools try to get around this by focusing on examinations instead of assignments for the bulk of the course marks, but it has been demonstrated again and again that exams only teach one thing - how to do well on exams.
The only way to get technical education back on track is to make co-operative/work terms mandatory, even for students who wish to pursue theoretical avenues.