Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #64262 > unrolled thread

Can post a code but afraid of plagiarism

Started byindar kumar <indarkumar59@gmail.com>
First post2014-01-18 14:21 -0800
Last post2014-01-24 19:42 -0500
Articles 20 on this page of 62 — 21 participants

Back to article view | Back to comp.lang.python


Contents

  Can post a code but afraid of plagiarism indar kumar <indarkumar59@gmail.com> - 2014-01-18 14:21 -0800
    Re: Can post a code but afraid of plagiarism Roy Smith <roy@panix.com> - 2014-01-18 17:27 -0500
    Re: Can post a code but afraid of plagiarism indar kumar <indarkumar59@gmail.com> - 2014-01-18 14:32 -0800
      Re: Can post a code but afraid of plagiarism Roy Smith <roy@panix.com> - 2014-01-18 17:35 -0500
      Re: Can post a code but afraid of plagiarism Chris Angelico <rosuav@gmail.com> - 2014-01-19 09:42 +1100
      Re: Can post a code but afraid of plagiarism Ben Finney <ben+python@benfinney.id.au> - 2014-01-19 09:59 +1100
      Re: Can post a code but afraid of plagiarism Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2014-01-19 06:31 +0000
        Re: Can post a code but afraid of plagiarism Devin Jeanpierre <jeanpierreda@gmail.com> - 2014-01-18 22:45 -0800
        Re: Can post a code but afraid of plagiarism Dan Stromberg <drsalists@gmail.com> - 2014-01-19 21:21 -0800
        Re: Can post a code but afraid of plagiarism Chris Angelico <rosuav@gmail.com> - 2014-01-20 17:21 +1100
          Re: Can post a code but afraid of plagiarism Roy Smith <roy@panix.com> - 2014-01-20 09:08 -0500
            Re: Can post a code but afraid of plagiarism Rustom Mody <rustompmody@gmail.com> - 2014-01-20 08:11 -0800
            Re: Can post a code but afraid of plagiarism Terry Reedy <tjreedy@udel.edu> - 2014-01-20 16:56 -0500
            Re: Can post a code but afraid of plagiarism Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2014-01-21 00:47 +0000
              Re: Can post a code but afraid of plagiarism Oscar Benjamin <oscar.j.benjamin@gmail.com> - 2014-01-21 10:32 +0000
                Re: Can post a code but afraid of plagiarism Dan Sommers <dan@tombstonezero.net> - 2014-01-21 13:49 +0000
        Re: Can post a code but afraid of plagiarism Ben Finney <ben+python@benfinney.id.au> - 2014-01-20 18:39 +1100
          Re: Can post a code but afraid of plagiarism indar kumar <indarkumar59@gmail.com> - 2014-01-19 23:55 -0800
            Re: Can post a code but afraid of plagiarism Ben Finney <ben+python@benfinney.id.au> - 2014-01-20 19:17 +1100
              Re: Can post a code but afraid of plagiarism Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2014-01-22 00:51 +0000
                Re: Can post a code but afraid of plagiarism Rustom Mody <rustompmody@gmail.com> - 2014-01-21 19:01 -0800
                  Re: Can post a code but afraid of plagiarism Roy Smith <roy@panix.com> - 2014-01-21 22:46 -0500
            Re: Can post a code but afraid of plagiarism Chris Angelico <rosuav@gmail.com> - 2014-01-20 19:48 +1100
            Re: Can post a code but afraid of plagiarism bryan rasmussen <rasmussen.bryan@gmail.com> - 2014-01-20 10:19 +0100
            Re: Can post a code but afraid of plagiarism Alister <alister.ware@ntlworld.com> - 2014-01-20 09:36 +0000
            Re: Can post a code but afraid of plagiarism Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2014-01-22 00:01 +0000
          Re: Can post a code but afraid of plagiarism Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2014-01-22 00:51 +0000
            Re: Can post a code but afraid of plagiarism Neil Cerutti <neilc@norwich.edu> - 2014-01-22 13:34 +0000
        Re: Can post a code but afraid of plagiarism Chris Angelico <rosuav@gmail.com> - 2014-01-20 18:59 +1100
        Re: Can post a code but afraid of plagiarism Ben Finney <ben+python@benfinney.id.au> - 2014-01-20 19:10 +1100
    Re: Can post a code but afraid of plagiarism Ben Finney <ben+python@benfinney.id.au> - 2014-01-19 09:57 +1100
    Re: Can post a code but afraid of plagiarism Grant Edwards <invalid@invalid.invalid> - 2014-01-19 16:22 +0000
    Re: Can post a code but afraid of plagiarism indar kumar <indarkumar59@gmail.com> - 2014-01-22 00:36 -0800
      Re: Can post a code but afraid of plagiarism Dennis Lee Bieber <wlfraed@ix.netcom.com> - 2014-01-22 08:53 -0500
      Re: Can post a code but afraid of plagiarism Rustom Mody <rustompmody@gmail.com> - 2014-01-22 08:48 -0800
      Re: Can post a code but afraid of plagiarism Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2014-01-23 00:01 +0000
    Re: Can post a code but afraid of plagiarism indar kumar <indarkumar59@gmail.com> - 2014-01-22 00:39 -0800
    Re: Can post a code but afraid of plagiarism indar kumar <indarkumar59@gmail.com> - 2014-01-22 08:33 -0800
      Re: Can post a code but afraid of plagiarism Dennis Lee Bieber <wlfraed@ix.netcom.com> - 2014-01-22 22:36 -0500
    Re: Can post a code but afraid of plagiarism indar kumar <indarkumar59@gmail.com> - 2014-01-22 08:46 -0800
    Re: Can post a code but afraid of plagiarism indar kumar <indarkumar59@gmail.com> - 2014-01-22 08:50 -0800
    Re: Can post a code but afraid of plagiarism indar kumar <indarkumar59@gmail.com> - 2014-01-22 08:53 -0800
    Re: Can post a code but afraid of plagiarism indar kumar <indarkumar59@gmail.com> - 2014-01-22 09:09 -0800
      Re: Can post a code but afraid of plagiarism Ned Batchelder <ned@nedbatchelder.com> - 2014-01-22 14:19 -0500
    Re: Can post a code but afraid of plagiarism indar kumar <indarkumar59@gmail.com> - 2014-01-22 23:46 -0800
      Re: Can post a code but afraid of plagiarism Dennis Lee Bieber <wlfraed@ix.netcom.com> - 2014-01-23 20:26 -0500
    Re: Can post a code but afraid of plagiarism indar kumar <indarkumar59@gmail.com> - 2014-01-22 23:57 -0800
      Re: Can post a code but afraid of plagiarism Asaf Las <roegltd@gmail.com> - 2014-01-23 01:46 -0800
    Re: Can post a code but afraid of plagiarism indar kumar <indarkumar59@gmail.com> - 2014-01-23 02:10 -0800
    Re: Can post a code but afraid of plagiarism indar kumar <indarkumar59@gmail.com> - 2014-01-23 13:15 -0800
      Re: Can post a code but afraid of plagiarism Emile van Sebille <emile@fenx.com> - 2014-01-23 13:28 -0800
    Re: Can post a code but afraid of plagiarism indar kumar <indarkumar59@gmail.com> - 2014-01-23 13:34 -0800
      Re: Can post a code but afraid of plagiarism Emile van Sebille <emile@fenx.com> - 2014-01-23 13:49 -0800
    Re: Can post a code but afraid of plagiarism indar kumar <indarkumar59@gmail.com> - 2014-01-23 13:56 -0800
      Re: Can post a code but afraid of plagiarism Piet van Oostrum <piet@vanoostrum.org> - 2014-01-24 15:13 +0100
    Re: Can post a code but afraid of plagiarism indar kumar <indarkumar59@gmail.com> - 2014-01-23 19:15 -0800
      Re: Can post a code but afraid of plagiarism Rustom Mody <rustompmody@gmail.com> - 2014-01-23 21:57 -0800
      Re: Can post a code but afraid of plagiarism Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2014-01-24 08:13 +0000
    Re: Can post a code but afraid of plagiarism indar kumar <indarkumar59@gmail.com> - 2014-01-23 23:14 -0800
      Re: Can post a code but afraid of plagiarism Dennis Lee Bieber <wlfraed@ix.netcom.com> - 2014-01-24 09:01 -0500
      Re: Can post a code but afraid of plagiarism bob gailer <bgailer@gmail.com> - 2014-01-24 18:42 -0500
      Re: Can post a code but afraid of plagiarism Dennis Lee Bieber <wlfraed@ix.netcom.com> - 2014-01-24 19:42 -0500

Page 2 of 4 — ← Prev page 1 [2] 3 4  Next page →


#64476

FromRustom Mody <rustompmody@gmail.com>
Date2014-01-21 19:01 -0800
Message-ID<c8157920-dca7-4049-b677-56178d2590ba@googlegroups.com>
In reply to#64470
On Wednesday, January 22, 2014 6:21:37 AM UTC+5:30, Steven D'Aprano wrote:
> On Mon, 20 Jan 2014 19:17:35 +1100, Ben Finney wrote:

> > indar kumar writes:
> >> Hint would have been enough but I was strictly discouraged.
> > You asked for private help, specifically to subvert the rules against
> > plagiarism you're subject to.
> > So no, I don't believe this modification of your request to be sincere.
> > You asked for help cheating, and you were refused. Please take a hint,
> > and do your assignment under the terms your teacher has set.

> That is the harshest, least "good faith" interpretation of the OP's post 
> I have ever read. It doesn't look to me like that attitude is intended to 
> be welcoming to students who are trying to walk the narrow tightrope of 
> being part of a community of programmers who value sharing and 
> collaboration while avoiding running foul of overly strict academic rules 
> about so-called plagiarism.

I was working in a large sw-development company some years ago.
One day unexpectedly I found I could not download any more the FOSS sw
I regularly use.  What happened??

Evidently a programmer had copied GPL code off the net, passed it off
as his own, it had gone past the local company'a managers and been
detected by the off-shore client-company.  Evidently a dose of GPLd
code is as salutary for the health of commercial sw companies as a
polonium capsule is for humans.  Hence the chaos.

So treating Ben's strictures as *purely* academic is at least as harsh
as the strictures themselves

IOW plagiarism is not about some kind of morality but about following
some rules -- which are usually quite arbitrary.

Heck even different free licenses quarrel about what constitutes right
and wrong.  And as a consequence of all this, courses and entire
degrees in IP are becoming fashionable

[toc] | [prev] | [next] | [standalone]


#64479

FromRoy Smith <roy@panix.com>
Date2014-01-21 22:46 -0500
Message-ID<roy-81F689.22465221012014@news.panix.com>
In reply to#64476
In article <c8157920-dca7-4049-b677-56178d2590ba@googlegroups.com>,
 Rustom Mody <rustompmody@gmail.com> wrote:

> I was working in a large sw-development company some years ago.
> One day unexpectedly I found I could not download any more the FOSS sw
> I regularly use.  What happened??
> 
> Evidently a programmer had copied GPL code off the net, passed it off
> as his own, it had gone past the local company'a managers and been
> detected by the off-shore client-company.  Evidently a dose of GPLd
> code is as salutary for the health of commercial sw companies as a
> polonium capsule is for humans.

Absolutely.  Most open-source code comes with license restrictions.  
"You are free to use this, but if you do, you are obligated to do these 
things..."  Certainly, GPL comes with obligations.  If one of your 
employees grabs some GPL stuff off the net and puts it into your 
product, you are now obligated to do those things.  Those may be 
obligations you're not willing to commit to.

[toc] | [prev] | [next] | [standalone]


#64348

FromChris Angelico <rosuav@gmail.com>
Date2014-01-20 19:48 +1100
Message-ID<mailman.5741.1390208178.18130.python-list@python.org>
In reply to#64344
On Mon, Jan 20, 2014 at 6:55 PM, indar kumar <indarkumar59@gmail.com> wrote:
> Actually, I tried to ask some questions but I was discouraged to do so saying that I was working on a project or some assignment. Truth be told I am stuck at one point and since I don't have experience with programming language, I have been working for it for two days but couldn't come up with some idea so posted some questions of the same format just to know whether there is particular method etc to do so. Hint would have been enough but I was strictly discouraged.
>

Here's my policy on homework. Others may vary, but you'll find a lot
will be broadly similar.

When you take a course, you should be learning, not just passing. That
means that getting someone else to do your work for you is completely
wrong, so I won't help you. But if you've put down some code and it's
not working, then by all means, ask for help with the details; it's
easy if you have an error message you don't understand (you might be
able to get that by Googling it), but a lot harder if you're getting
output you don't understand, and then it can help a LOT to have an
expert look at your code. You would need to post your code and exactly
what you're seeing as wrong (exception traceback, or "expected this
output, got this instead"); and if you make it clear up-front that
it's homework and you're looking for hints rather than an
answer-on-a-plate, I'm happy to help.

What you will find, though, is that most requests are more of the
nature of "please do my homework for me", so people are more likely to
be annoyed than helpful when they see what's obviously homework. So
you have a bit of an uphill battle just to get heard. But if you can
show that you're here to learn - and showing that you've already
written most of the code is a good way to do that - you can get help,
and often a lot of it.

ChrisA

[toc] | [prev] | [next] | [standalone]


#64350

Frombryan rasmussen <rasmussen.bryan@gmail.com>
Date2014-01-20 10:19 +0100
Message-ID<mailman.5742.1390209602.18130.python-list@python.org>
In reply to#64344

[Multipart message — attachments visible in raw view] — view raw

>When you take a course, you should be learning, not just passing. That
>means that getting someone else to do your work for you is completely
>wrong, so I won't help you.

I have decided to become an MBA.



On Mon, Jan 20, 2014 at 9:48 AM, Chris Angelico <rosuav@gmail.com> wrote:

> On Mon, Jan 20, 2014 at 6:55 PM, indar kumar <indarkumar59@gmail.com>
> wrote:
> > Actually, I tried to ask some questions but I was discouraged to do so
> saying that I was working on a project or some assignment. Truth be told I
> am stuck at one point and since I don't have experience with programming
> language, I have been working for it for two days but couldn't come up with
> some idea so posted some questions of the same format just to know whether
> there is particular method etc to do so. Hint would have been enough but I
> was strictly discouraged.
> >
>
> Here's my policy on homework. Others may vary, but you'll find a lot
> will be broadly similar.
>
> When you take a course, you should be learning, not just passing. That
> means that getting someone else to do your work for you is completely
> wrong, so I won't help you. But if you've put down some code and it's
> not working, then by all means, ask for help with the details; it's
> easy if you have an error message you don't understand (you might be
> able to get that by Googling it), but a lot harder if you're getting
> output you don't understand, and then it can help a LOT to have an
> expert look at your code. You would need to post your code and exactly
> what you're seeing as wrong (exception traceback, or "expected this
> output, got this instead"); and if you make it clear up-front that
> it's homework and you're looking for hints rather than an
> answer-on-a-plate, I'm happy to help.
>
> What you will find, though, is that most requests are more of the
> nature of "please do my homework for me", so people are more likely to
> be annoyed than helpful when they see what's obviously homework. So
> you have a bit of an uphill battle just to get heard. But if you can
> show that you're here to learn - and showing that you've already
> written most of the code is a good way to do that - you can get help,
> and often a lot of it.
>
> ChrisA
> --
> https://mail.python.org/mailman/listinfo/python-list
>

[toc] | [prev] | [next] | [standalone]


#64351

FromAlister <alister.ware@ntlworld.com>
Date2014-01-20 09:36 +0000
Message-ID<G66Du.9709$AP7.14@fx27.am4>
In reply to#64344
On Sun, 19 Jan 2014 23:55:59 -0800, indar kumar wrote:

> Thanks all for help and positive comments. Actually, I tried to ask some
> questions but I was discouraged to do so saying that I was working on a
> project or some assignment. Truth be told I am stuck at one point and
> since I don't have experience with programming language, I have been
> working for it for two days but couldn't come up with some idea so
> posted some questions of the same format just to know whether there is
> particular method etc to do so. Hint would have been enough but I was
> strictly discouraged. You know the pain of working on assignment related
> to areas like socket programming and you even don't know how to use
> dictionaries and you are given only a week. Atleast I am trying to
> learn. The things that I am asking here are just basics on which my
> whole code would be building upon. But, as I said time is very less and
> have other courses also so wanted to know just the manipulation of
> dictionaries.
> 
> If you allow me I can post a small part of that assignment, it just
> requires the manipulation with dictionary which I am not getting. I am
> not asking to write a code for me. But a small hint would get me out of
> trouble.

General advise is post the smallest section of code that demonstrates 
your problem (It does not even have to be you actual code if it 
demonstrates the same issue).

It is also important to post the full trace back of any errors.
you should also try to understand these trace backs yourself they will 
become easier as you progress with the language
 



-- 
Your business will assume vast proportions.

[toc] | [prev] | [next] | [standalone]


#64464

FromSteven D'Aprano <steve+comp.lang.python@pearwood.info>
Date2014-01-22 00:01 +0000
Message-ID<52df0a68$0$29999$c3e8da3$5496439d@news.astraweb.com>
In reply to#64344
Hi Indar,

On Sun, 19 Jan 2014 23:55:59 -0800, indar kumar wrote:

> If you allow me I can post a small part of that assignment, it just
> requires the manipulation with dictionary which I am not getting. I am
> not asking to write a code for me. But a small hint would get me out of
> trouble.


In all this discussion about plagiarism, we seem to have forgotten about 
you! Sorry about that.


Yes, feel free to ask your question about manipulating dictionaries, and 
we will try to answer. The more general your question (in the sense of 
not being specific to your project), the less you need to worry about 
plagiarism.


-- 
Steven

[toc] | [prev] | [next] | [standalone]


#64469

FromSteven D'Aprano <steve+comp.lang.python@pearwood.info>
Date2014-01-22 00:51 +0000
Message-ID<52df15ff$0$29999$c3e8da3$5496439d@news.astraweb.com>
In reply to#64342
On Mon, 20 Jan 2014 18:39:44 +1100, Ben Finney wrote:

> But sometimes different skills are being examined, and the student
> should be exercising skills on their own without basing it directly on
> the work of others. In these cases, penalties for plagiarism are
> appropriate, would you agree?

How can anyone possibly agree without knowing what those penalties are, 
what the definition of plagiarism being used is, and how guilt or 
innocence is determined?

According to some people in a much better position to judge, significant 
parts of academia has collectively gone mad over so-called plagiarism.

    "I started off researching the subject of plagiarism thinking that
    sensitivity on the issue was getting a little bit out of hand. What
    I found when I viewed actual guidelines and articles on the subject
    was just plain appalling. Academia has simply gone crazy on this
    subject; not figuratively crazy, but certifiably, clinically,
    sociopathically insane. I'm talking delusional, loss of contact 
    with reality insanity."
    -- Professor Steven Dutch, University of Wisconsin

http://www.uwgb.edu/dutchs/PSEUDOSC/PlagShame.HTM

More here:

http://www.uwgb.edu/dutchs/PSEUDOSC/PlagiarNonsense.HTM

According to Dutch, the University of Phoenix academic guidelines 
includes *failing to give a page number* of an otherwise fully cited 
source as plagiarism.

If you read nothing else, read the second link, as Dutch gives practical 
guidelines for distinguishing significant and unethical plagiarism from 
insignificant and normal borrowing and sharing.


Let's take this word of advice from "Plagiarism Today":

   [quote]
   In the end, it comes down to the same tried and true system of 
   always attributing any content that you use, no matter how small, 
   and always showing respect for the words of others, even if you 
   have permission to use them.
   [end quote]

http://www.plagiarismtoday.com/2008/02/20/the-obama-plagiarism-scandal/


Do you notice the assumption made? Let me highlight it for you:

   THE WORDS OF OTHERS


The hidden assumption here is that *words are property*, that they belong 
to whomever first publishes them. Having now written those few words, 
nobody else is permitted to use those same words in the same order 
without crediting me. Failure to credit me is a sin of the highest order, 
enough to get you kicked out of your university, your name blackened. 
Unless, of course, somebody else wrote those words before me, in which 
case *my ignorance* of that earlier usage does not diminish the magnitude 
of my sin. In that regard, plagiarism is rather like patent infringement.

This attitude is part of the compartmentalisation of culture into walled 
gardens, where nothing can be done without the permission of the 
"intellectual property owner". This is dangerous enough when it comes to 
ordinary, regular language, but it is astonishingly harmful if applied to 
code. It goes against the principles of openness and freedom which the 
FOSS movement stands for.

Code, for the most part, is extremely cliched. Very little code is 
original, and none of it is created in isolation. There are only so many 
ways to walk a list, or search a body of text for a word, or calculate 
the cosine of a float. You sometimes have the option of shuffling the 
order of operations around a bit, or changing variable names, or slight 
modifications of some algorithm. As a community, programmers may not 
always share code, but they share ideas, coding idioms and algorithms. 
The academic definition of plagiarism, if applied in its full and 
strictest form, would essentially make coding impossible.

We do not know how strict the OP's college is about so-called plagiarism, 
whether they only intend to come down on outright copying of significant 
bodies of code, or whether they have a tendency to go after trivial 
borrowing of simple idioms or minor duplication of insignificant portions 
of the program. (If I walk a linked list using mynode = mynode.next, and 
you use the same variable names, is that an indication of copying?) 
Without knowing what the OP's college considers plagiarism, how can judge 
the OP's reaction to it?



-- 
Steven

[toc] | [prev] | [next] | [standalone]


#64495

FromNeil Cerutti <neilc@norwich.edu>
Date2014-01-22 13:34 +0000
Message-ID<mailman.5838.1390397693.18130.python-list@python.org>
In reply to#64469
On 2014-01-22, Steven D'Aprano
<steve+comp.lang.python@pearwood.info> wrote:
> Do you notice the assumption made? Let me highlight it for you:
>
>    THE WORDS OF OTHERS
>
> The hidden assumption here is that *words are property*, that
> they belong to whomever first publishes them. Having now
> written those few words, nobody else is permitted to use those
> same words in the same order without crediting me. Failure to
> credit me is a sin of the highest order, enough to get you
> kicked out of your university, your name blackened. Unless, of
> course, somebody else wrote those words before me, in which
> case *my ignorance* of that earlier usage does not diminish the
> magnitude of my sin. In that regard, plagiarism is rather like
> patent infringement.

>From The Cemetery Gates, The Smiths:

  You say, "Ere thrice the sun done salutation to to the dawn,"
  and you claim these words as your own. But I've read well and
  I've heard them said one hundred times maybe less maybe more.
  [...]
  You say, "Ere long done do does did;" words which could only be
  your own, and then produce a text from whence it was ripped [...]

When grading essays my wife is far more likely to detect the
first case.

> We do not know how strict the OP's college is about so-called
> plagiarism, whether they only intend to come down on outright
> copying of significant bodies of code, or whether they have a
> tendency to go after trivial borrowing of simple idioms or
> minor duplication of insignificant portions of the program. (If
> I walk a linked list using mynode = mynode.next, and you use
> the same variable names, is that an indication of copying?)
> Without knowing what the OP's college considers plagiarism, how
> can judge the OP's reaction to it?

Obvious copying of another person's program, nearly verbatim, is
most likely to be detected. Well, that and submitting one of the
entrapment-purposed answers that are sometimes made availalbe
here and elsewhere. 

-- 
Neil Cerutti

[toc] | [prev] | [next] | [standalone]


#64345

FromChris Angelico <rosuav@gmail.com>
Date2014-01-20 18:59 +1100
Message-ID<mailman.5738.1390204758.18130.python-list@python.org>
In reply to#64283
On Mon, Jan 20, 2014 at 6:39 PM, Ben Finney <ben+python@benfinney.id.au> wrote:
> But sometimes different skills are being examined, and the student
> should be exercising skills on their own without basing it directly on
> the work of others. In these cases, penalties for plagiarism are
> appropriate, would you agree?

If Fred writes something and Bill copies it without acknowledging
Fred's work, then Bill should be penalized. That much is clear. That
aligns well with the requirement to see what each student can
accomplish, and with standard copyright law (including open source,
where requirement-to-acknowledge is a common part of both licensing
and courtesy). But why should Fred be punished? What has he done
wrong? If it can be proven that Fred wrote the code (granted, that's
hard to prove, but providing each student with a git/hg repo to push
code to every day would make it easier), he should be graded on that
code and not on the fact that someone else ripped it off.

When it's less clear who copied from whom, I can understand issuing
across-the-board penalties in the interests of fairness (and because
the effort of figuring out who wrote what isn't worth it), but I'd say
it's a compromise for simplicity rather than justifiable punishment on
someone who published code.

ChrisA

[toc] | [prev] | [next] | [standalone]


#64346

FromBen Finney <ben+python@benfinney.id.au>
Date2014-01-20 19:10 +1100
Message-ID<mailman.5739.1390205457.18130.python-list@python.org>
In reply to#64283
Chris Angelico <rosuav@gmail.com> writes:

> If Fred writes something and Bill copies it without acknowledging
> Fred's work, then Bill should be penalized. That much is clear.

The situation is where a student is being examined for skills where it's
appropriate to test the student's own skill with a reasonable level of
isolation from the relevant work of others.

So questions of plagiarism aren't relevant to that aspect.

> But why should Fred be punished? What has he done wrong?

Fred has, in your example, ignored the requirements to keep his own work
on the assignment isolated from Bill.

This is harmful to the assessment of both Bill and Fred, since the
teacher has a severely lessened ability to determine both Bill's and
Fred's individual competence levels at the skill being examined.

So, to encourage both Bill and Fred to keep their work isolated and
allow their levels of competence to be assessed with confidence, they
both need to have disincentive to both copy work and allow their work to
be copied.

> When it's less clear who copied from whom, I can understand issuing
> across-the-board penalties in the interests of fairness (and because
> the effort of figuring out who wrote what isn't worth it), but I'd say
> it's a compromise for simplicity rather than justifiable punishment on
> someone who published code.

Sure. Penalising both students – or, more precisely, advertising such
penalties from the start – seems like a much more fair and effective
measure than relying on the teacher to both detect the machinations of
ingenious students and to determine who copied from whom.

-- 
 \        “Read not to contradict and confute, nor to believe and take |
  `\          for granted … but to weigh and consider.” —Francis Bacon |
_o__)                                                                  |
Ben Finney

[toc] | [prev] | [next] | [standalone]


#64269

FromBen Finney <ben+python@benfinney.id.au>
Date2014-01-19 09:57 +1100
Message-ID<mailman.5694.1390085885.18130.python-list@python.org>
In reply to#64262
indar kumar <indarkumar59@gmail.com> writes:

> I want to show a code for review but afraid of plagiarism issues.

Why? What solid basis do you have to fear someone plagiarising code that
you want reviewed?

There is already a vast amount of code licensed freely for anyone to use
and derive from. What would make yours especially susceptible to
copying?

As you can tell, I strongly suspect your fears are ungrounded. You will
benefit greatly by sharing your code here and likewise benefiting from
others sharing here.

> Kindly, suggest how can I post it for review here without masking it
> visible for public

No. This forum is for the benefit of everyone who reads it, and we all
contribute on that basis.

If you want private help, you'll need to find, and provide appropriate
compensation to, someone who is willing to benefit only you.

-- 
 \        “No matter how cynical you become, it's never enough to keep |
  `\                                up.” —Jane Wagner, via Lily Tomlin |
_o__)                                                                  |
Ben Finney

[toc] | [prev] | [next] | [standalone]


#64297

FromGrant Edwards <invalid@invalid.invalid>
Date2014-01-19 16:22 +0000
Message-ID<lbgu4p$87i$2@reader1.panix.com>
In reply to#64262
On 2014-01-18, indar kumar <indarkumar59@gmail.com> wrote:

> I want to show a code for review but afraid of plagiarism issues.
> Kindly, suggest how can I post it for review here without masking it
> visible for public

http://www.python.org/community/jobs/

I'm sure once you've agreed on contract and payment terms with whoever
you hire to do your private code review they will arrange a private
communications channel.


[toc] | [prev] | [next] | [standalone]


#64484

Fromindar kumar <indarkumar59@gmail.com>
Date2014-01-22 00:36 -0800
Message-ID<e5499fc4-9c96-4e69-9401-49db60783856@googlegroups.com>
In reply to#64262
So my question is if I am giving multiple inputs(a new device say for example) in a loop and creating a database(dictionary) for each new devices for example. I want subsequent devices to save their data(values only not keys) to the database of each of the already existing devices. How can I do that? Any hint?I have been stuck here for 3 days.

[toc] | [prev] | [next] | [standalone]


#64498

FromDennis Lee Bieber <wlfraed@ix.netcom.com>
Date2014-01-22 08:53 -0500
Message-ID<mailman.5841.1390398823.18130.python-list@python.org>
In reply to#64484
On Wed, 22 Jan 2014 00:36:17 -0800 (PST), indar kumar
<indarkumar59@gmail.com> declaimed the following:

>So my question is if I am giving multiple inputs(a new device say for example) in a loop and creating a database(dictionary) for each new devices for example. I want subsequent devices to save their data(values only not keys) to the database of each of the already existing devices. How can I do that? Any hint?I have been stuck here for 3 days.

	It would really help to see samples of what you input looks like (it
doesn't have to match your assignment test data, but should be something
similar in shape and usage), and what you visualize the end result should
look like.

	And you linking of "database" to "dictionary" is not helping -- not
when you then state "the database of each of"... "database", in the least
precise usage, tends to refer to the overall collection of persisted
(something in files) data used by an application (under this usage, an .INI
file is a "database" of configuration data). In the more restricted usage,
a database is a collection of (multiple sets of) similar records of data
accessed by some sort of key, with linkages between sets.

	I can't tell, from your description, if you are using
"database(dictionary)" in terms of a simple BDB structure (unique key :
data /record/), where each record would be one of your "devices", or if you
mean that the record itself is a dictionary structure with (fieldID :
value) pairs, and you want to create a linear list of these items (in which
case you have to search the whole list to find a particular record), or
maybe a dictionary of dictionaries... Or maybe you are trying to create a
tree in which subsequent "devices" are linked to various previous device
nodes.

	Code for any of those forms is not overly difficult, but one must lock
down the data structures before creating the code.
-- 
	Wulfraed                 Dennis Lee Bieber         AF6VN
    wlfraed@ix.netcom.com    HTTP://wlfraed.home.netcom.com/

[toc] | [prev] | [next] | [standalone]


#64512

FromRustom Mody <rustompmody@gmail.com>
Date2014-01-22 08:48 -0800
Message-ID<0c2bb189-d031-45ac-9e98-d864cebdc57c@googlegroups.com>
In reply to#64484
On Wednesday, January 22, 2014 2:06:17 PM UTC+5:30, indar kumar wrote:
> So my question is if I am giving multiple inputs(a new device say
> for example) in a loop and creating a database(dictionary) for each
> new devices for example. I want subsequent devices to save their
> data(values only not keys) to the database of each of the already
> existing devices. How can I do that? Any hint?I have been stuck here
> for 3 days.

I suggest that for starters you forget about (real) DBMSes and just use
some lightweight data storage. Some examples of these:
1. json
2. yaml
3. pickle
4. ini file

[I like yaml best but it needs to be installed]

Second I suggest you forget about your assignment/problem, and just
practice getting python data structures -- mainly lists and dicts into
your chosen format.

Third forget about the above and just solve the problem with internal
python data structures.

Then come back here and ask!

[toc] | [prev] | [next] | [standalone]


#64543

FromSteven D'Aprano <steve+comp.lang.python@pearwood.info>
Date2014-01-23 00:01 +0000
Message-ID<52e05bd0$0$29999$c3e8da3$5496439d@news.astraweb.com>
In reply to#64484
On Wed, 22 Jan 2014 00:36:17 -0800, indar kumar wrote:

> So my question is if I am giving multiple inputs(a new device say for
> example) in a loop and creating a database(dictionary) for each new
> devices for example. I want subsequent devices to save their data(values
> only not keys) to the database of each of the already existing devices.
> How can I do that? Any hint?I have been stuck here for 3 days.

Short version: 

in your dict (database), instead of storing the value alone, store a list 
containing each of the values.


Longer version:

Here you have a dict as database:


db = {}

Here you get a key and value, and you add then to the db:

# key is 23, value is "hello"
if 23 in db:
    db[23].append("hello")
else:
    db[23] = ["hello"]


Later, you can see if the key already exists:

if 23 in db:
    print("Key 23 already exists")


Or you can add a second value value to the same key:

if 23 in db:
    db[23].append("goodbye")
else:
    db[23] = ["goodbye"]


which can be written more succinctly as:


db.setdefault(23, []).append("goodbye")


Now you can check whether the key has been seen once or twice:

if len(db[23]) == 1:
    print("key 23 has been seen only once")
else:
    print("key 23 has been seen twice or more times")


Does this answer your question?



-- 
Steven

[toc] | [prev] | [next] | [standalone]


#64485

Fromindar kumar <indarkumar59@gmail.com>
Date2014-01-22 00:39 -0800
Message-ID<87b41752-af6e-4785-ad01-6749cff10edf@googlegroups.com>
In reply to#64262
On Saturday, January 18, 2014 3:21:42 PM UTC-7, indar kumar wrote:
> Hi,
> 
> 
> 
> I want to show a code for review but afraid of plagiarism issues. Kindly, suggest how can I post it for review here without masking it visible for public

Pleae give example also. I will be thankful.

[toc] | [prev] | [next] | [standalone]


#64509

Fromindar kumar <indarkumar59@gmail.com>
Date2014-01-22 08:33 -0800
Message-ID<fb92f347-183c-452a-95f0-24cd9370852a@googlegroups.com>
In reply to#64262
On Saturday, January 18, 2014 3:21:42 PM UTC-7, indar kumar wrote:
> Hi,
> 
> 
> 
> I want to show a code for review but afraid of plagiarism issues. Kindly, suggest how can I post it for review here without masking it visible for public

Description of each of the commands:
• config

◦ Parameters: <host_id> <mac addr> <ip addr> <cache timeout>
▪ <cache timeout> is the host's ARP cache timeout, in seconds
◦ Actions:
▪ Update simulator's configuration database.
• If <host_id> already exists, its information should be updated. Otherwise, it should
be added.
▪ Print “<host_id> connected.”
▪ Have the host send a gratuitous ARP request .
• If any other hosts have an outdated entry for the MAC or IP address, they should
update their caches.
• If there are any responses to that request, that means that somebody else has this IP
address. If that is the case, you should print:
Error: <host_id> detected IP address conflict. It will be disconnected.
Then, you should “disconnect” the host from the simulated network, in order to
prevent further problems. You can implement this by removing it from the
configuration database.
◦ Note: any ARP packets generated by the command should be printed in the previously
specified format


Sample Output:

config
Please enter <host_id> <mac addr> <ip addr> <cache timeout>
PC1 01:01:01:01:01:01 192.168.0.1 200
PC1 connected.
ARP request 01:01:01:01:01:01 FF:FF:FF:FF:FF:FF 192.168.0.1 192.168.0.1

[toc] | [prev] | [next] | [standalone]


#64562

FromDennis Lee Bieber <wlfraed@ix.netcom.com>
Date2014-01-22 22:36 -0500
Message-ID<mailman.5865.1390448199.18130.python-list@python.org>
In reply to#64509
On Wed, 22 Jan 2014 08:33:30 -0800 (PST), indar kumar
<indarkumar59@gmail.com> declaimed the following:

>On Saturday, January 18, 2014 3:21:42 PM UTC-7, indar kumar wrote:
>> Hi,
>> 
>> 
>> 
>> I want to show a code for review but afraid of plagiarism issues. Kindly, suggest how can I post it for review here without masking it visible for public
>
>Description of each of the commands:

	The following appears to be only ONE "command"

>• config
>
>? Parameters: <host_id> <mac addr> <ip addr> <cache timeout>
>? <cache timeout> is the host's ARP cache timeout, in seconds
>? Actions:
>? Update simulator's configuration database.
>• If <host_id> already exists, its information should be updated. Otherwise, it should
>be added.
>? Print “<host_id> connected.”
>? Have the host send a gratuitous ARP request .

http://en.wikipedia.org/wiki/Address_Resolution_Protocol#ARP_announcements


>• If any other hosts have an outdated entry for the MAC or IP address, they should
>update their caches.
>• If there are any responses to that request, that means that somebody else has this IP
>address. If that is the case, you should print:
>Error: <host_id> detected IP address conflict. It will be disconnected.

	That does not follow ARP protocol... BEFORE claiming the IP address,
the "new host" is supposed to send an ARP Probe

http://en.wikipedia.org/wiki/Address_Resolution_Protocol#ARP_probe


	Sending the probe (using a local "IP" address of 0.0.0.0, but with the
correct hardware MAC address) asking if anyone is using the IP address the
local configuration is claiming is supposed to be the test to confirm no
one else has the same IP.

	If no one responds with the configuration IP address, THEN the local
host can send an ARP announcement claiming the IP address, which other
nodes then use to update their cache lists. Note that an ARP announcement
is used to provide the local MAC/IP pair to OTHER nodes. It does not answer
how the local node obtains the information of the other nodes. It may be
possible to have the nodes receiving a broadcast ARP announcement respond
with a direct (that is, TO the original sender only) -- but that could
result in an infinite loop if the original then tries to respond back...


	Note that "host id" is NOT part of the ARP protocol. I'm going to
presume that no actual network traffic (or even interprocess communication)
is being used here -- just a simple single threaded program. If so, "host
id" would probably be used as a dictionary key to identify the ARP cache
for that simulated host. The data value (nothing currently seems to be
using the cache timeout value so I'm going to ignore it) would be, itself,
a dictionary using IP values as keys, with the corresponding MAC address as
the data value. OTOH: since you do need to keep the IP and MAC of the
host... The structure is probably going to look like:

{ hostid : (hostMAC, hostIP, hostTimeout, { otherIP : otherMAC, ...}), ...}

Pseudo-code (and not even using Python syntax <evil grin> [not validated
REXX either])

do forever
	parse pull host MAC IP timeout
	simulation.host.cache = {}		#create/reset this host's cache
	say "sending ARP probe" MAC ff:ff:ff:ff:ff:ff 0.0.0.0 IP
	foreach node in simulation
		if node.hostid = host
			continue	#skip ourselves
		else
			if node.hostIP = IP
				#this IP is assigned elsewhere
				say "sending ARP response" node.MAC MAC node.hostIP IP
				say "error"
				simulation.host = ""	#delete the config host, invalid
	if host in simulation
		#it didn't get deleted, so the IP must be available
		say "sendign ARP announcement" MAC 0:0:0:0:0:0  IP IP
		foreach node in simulation
			if node.hostid = host
				continue
			else
				#update cache with new MAC/IP pair

	Of course, if the IP changed, but not the MAC, the old IP with the MAC
will be left behind... This is where the timeout would come into play, if
each entry had a time-to-purge entry (clock time when entered + timeout
value); then whenever the cache was checked/updated you'd delete any entry
that had a purge time lower than the current clock time.

-- 
	Wulfraed                 Dennis Lee Bieber         AF6VN
    wlfraed@ix.netcom.com    HTTP://wlfraed.home.netcom.com/

[toc] | [prev] | [next] | [standalone]


#64511

Fromindar kumar <indarkumar59@gmail.com>
Date2014-01-22 08:46 -0800
Message-ID<9f32fbc3-63f2-4b0f-b9b1-f25511be98b5@googlegroups.com>
In reply to#64262
On Saturday, January 18, 2014 3:21:42 PM UTC-7, indar kumar wrote:
> Hi,
> 
> 
> 
> I want to show a code for review but afraid of plagiarism issues. Kindly, suggest how can I post it for review here without masking it visible for public

This is a gratuitous arp request
http://wiki.wireshark.org/Gratuitous_ARP
sent by PC1 is informing other hosts of its MAC and IP addresses.

Any hosts already in existence have their caches updated as needed.

The first config call has no other hosts to update, so all it does is create a dictionary entry with its host id as the key. Its cache table is created as an empty dictionary.

Subsequent config call update all other hosts' cache tables.


Each host has its own ARP cache table.

[toc] | [prev] | [next] | [standalone]


Page 2 of 4 — ← Prev page 1 [2] 3 4  Next page →

Back to top | Article view | comp.lang.python


csiph-web