Top 45 Best Comments In Source Code I Ever Encountered

In computer programming, a comment is a programmer-readable explanation or annotation in the source code of a computer program.

They are added with the purpose of making the source code easier for humans to understand, and are generally ignored by compilers and interpreters.

The syntax of comments in various programming languages varies considerably.

Comments are sometimes processed in various ways to generate software documentation external to the source code itself by documentation generators.

Featured Download: Are you struggling to launch a successful software career in 2018? Click here to download my 52 page eBook on How to Become a $50/Hour Software Developer in 7 Simple Steps and jump-start your software development career today.

They can also be used for integration with source code management systems and other kinds of external programming tools.

In my life as a developer, here are some of the 45 funniest source code comments I encountered.

Have fun and feel free to add yours in the comments section.

1.

2.

3.

4.

5.

6.

7.

8.

9.

10.

11.

12.

13.

14.

15.

16.

17.

18.

19.

20.

21.

22.

23.

24.

25.

26.

27.

28.

29.

30.

31.

32.

33.

34.

35.

36.

37.

38.

39.

40.

41.

42.

43.

44.

45.

Did you like this list of source code comments?

Please share.

Featured Download: Are you struggling to launch a successful software career in 2018? Click here to download my 52 page eBook on How to Become a $50/Hour Software Developer in 7 Simple Steps and jump-start your software development career today.

About the Author Geoffrey Barnes

Geoffrey is an experienced software developer and open source evangelist. When not coding he writes and talks about current technology trends, small business tips and developer productivity hacks. He is no coffee addict.

follow me on:

Leave a Comment:

6 comments
marlon says May 9, 2017

Sir, I can’t download your free ebook about How to Become a $50/Hour Software Developer. that’s why?

Reply
Dvious says June 10, 2017

Number 2 – Autogenerated, do NOT edit. All changes will be undone. – appears in linux config files just, all of the time!

Reply
Dvious says June 10, 2017

Number 2 – Autogenerated, do NOT edit. All changes will be undone. – appears in linux config files, just, all of the time!

Reply
Zuris says May 14, 2018

#11 – “#define TRUE FALSE”

You made a mistake here: this is not a ‘comment’ in the term that it is used in.

This is a preprocessor statement, that tells the compiler to replace all instances of “TRUE” it encounters in that file with “FALSE” if that compiler has a preprocessor implementation (a lot of C compilers have one, IIRC).

Reply
    Geoffrey Barnes says May 15, 2018

    It is because for most programming languages a line starting in a #(hash) symbol denotes a comment and so is not executed by the compiler or interpreter.

    Reply
Add Your Reply