Home Cite your source
Post
Cancel

Cite your source

Whenever you copy code from others,  you have to cite the source ! For details, please go to: MIT Code Writing Handbook.

What should be provided

  1. URL
  2. Date of retrieval
  3. ( If you adapted the code ) Add “Adapted from..” or “Based on..”
  4. ( If you use open source software ) Copyright ( in your code ) + License ( in your workspace folder )

Format of citing code sources

1
2
3
4
5
6
7
8
9
/**
 * A utility class.
 * Adapted from [xxxx, source name] on [YYYYMMDD, date of retrieval]
 * Source: [URL]
 * [..., Other introduction]
 */
class Util{
    // Insert your code here...
}
1
2
3
// Adapted from [xxxx, source name]:
// [URL, where you find it]
// (Source: [URL, source code] retrieved in [YYYY MM DD]

Example 3 ( Open source software )

1
2
3
// Copyright (c) YYYY ........
// ....
// (You can just copy the copyright from git)
This post is licensed under CC BY 4.0 by the author.

Usage of Ubuntu on PC installed Windows Before

Bugs I Encountered (Week 1)