Path: csiph.com!x330-a1.tempe.blueboxinc.net!newsfeed.hal-mli.net!feeder3.hal-mli.net!newsfeed.hal-mli.net!feeder1.hal-mli.net!npeer02.iad.highwinds-media.com!news.highwinds-media.com!feed-me.highwinds-media.com!nx01.iad01.newshosting.com!newshosting.com!novia!news-out.readnews.com!news-xxxfer.readnews.com!postnews.google.com!glegroupsg2000goo.googlegroups.com!not-for-mail From: Lew Newsgroups: comp.lang.java.programmer Subject: Re: "Borrowing" code Date: Fri, 17 Feb 2012 01:57:11 -0800 (PST) Organization: http://groups.google.com Lines: 28 Message-ID: <11812328.4.1329472631072.JavaMail.geo-discussion-forums@pbhp10> References: NNTP-Posting-Host: 173.164.137.214 Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 X-Trace: posting.google.com 1329472752 17780 127.0.0.1 (17 Feb 2012 09:59:12 GMT) X-Complaints-To: groups-abuse@google.com NNTP-Posting-Date: Fri, 17 Feb 2012 09:59:12 +0000 (UTC) In-Reply-To: Complaints-To: groups-abuse@google.com Injection-Info: glegroupsg2000goo.googlegroups.com; posting-host=173.164.137.214; posting-account=CP-lKQoAAAAGtB5diOuGlDQk0jIwmH0T User-Agent: G2/1.0 X-Google-Web-Client: true X-Received-Bytes: 2251 Xref: x330-a1.tempe.blueboxinc.net comp.lang.java.programmer:12115 Novice wrote: > Exactly! This is why it seemed to me that it might be okay to "borrow" > such examples. It seemed self-evident that someone writing a tutorial > meant for it to be used in developing code. On the contrary, it is obvious that that is not the intention. A tutorial by definition is meant for use in learning how to develop code. It is almost certainly not meant for use in developing code. > I wasn't contemplating stealing the full source code for Windows here, > just using a small class or two that someone had figured out and > displayed publicly. Public display does not confer right to use! Besides, Arved's advice really, really applies here. So what if you *can* copy some code into yours? The question you should ask yourself is if you *should*. The term for copying code snippets from outside sources (like tutorials on the Web) into your code is "cargo-cult programming". I have seen many tragically laughable results in real-life projects from this style of coding. Now, CPE (copy-paste-edit) is a different matter, properly employed. -- Lew