{"id":70113,"date":"2021-08-26T04:10:05","date_gmt":"2021-08-26T08:10:05","guid":{"rendered":"http:\/\/bangla.salearningschool.com\/recent-posts\/some-random-information-regarding-commenting-your-code-15\/"},"modified":"2021-08-26T04:10:05","modified_gmt":"2021-08-26T08:10:05","slug":"some-random-information-regarding-commenting-your-code-15","status":"publish","type":"post","link":"http:\/\/bangla.sitestree.com\/?p=70113","title":{"rendered":"Some random information regarding commenting your code #15"},"content":{"rendered":"<pre style='padding-left:5px;padding-right:5px'>Some random information regarding commenting your codeIs commenting required? or suggested?Simply yes. Always comment your code.Note: Commenting is always useful only when it is done right. Bad commenting is worse than not commenting.What should you write in the comment?--------------------------------------Write why the section of the code is required.write-What does the code section do.Write it in plain english. Don't use any language syntax.If you do not find what to write...then better check did you understand the requirements of the assignment\/section? Also check, are you sure your design\/logic will work? Also, why your design\/code will work -- did you really understand. Do not write how the code works in comments but write why and what it does.Why commenting is useful?-------------------------Commenting will make your code more readable to others.Commenting will help others to find out the right section of code to edit\/modify. Also, understand the purpose of the program as well as sequence of the logic.It will also help you to review\/(work on) your own code laterIn many or most companies, you will hardly write codes from scratch, you have to work on others' code. So commenting is required.Random:--------Use a clear commenting style - easy to editComment as you go\/code - do not leave commenting until the end of writing codeIf you are worried that commenting will reduce performance...rather comment and use tools to create release codes without commentscomment above the code -- not at the rightvariable declaration may have comment at the rightif you use any special trick that is not ovbious from the code -- write it in comments [a trick:we can do a right shift for divide by 2]Comments and Pseudocode Programming Practice (PPP)----------------------------------------------------Comments and Pseudocode Programming Practice (PPP) go hand in hand.what is Pseudocode Programming Practice (PPP)?1. Write your logic in plain english may be as a paragraph2. Decompose it step by step into as fine grained that it can not be decomposed further. (The paragraph will be converted to lines of steps)3. comment each line\/step (use comment sign like \/\/)4. After each line\/comment write the corresponding code.<\/pre>\n<p>From: http:\/\/sitestree.com\/?p=4786<br \/> Categories:15<br \/>Tags:<br \/> Post Data:2011-10-01 17:18:46<\/p>\n<pre><code>    Shop Online: &lt;a href='https:\/\/www.ShopForSoul.com\/' target='new' rel=\"noopener\"&gt;https:\/\/www.ShopForSoul.com\/&lt;\/a&gt;\n    (Big Data, Cloud, Security, Machine Learning): Courses: &lt;a href='http:\/\/Training.SitesTree.com' target='new' rel=\"noopener\"&gt; http:\/\/Training.SitesTree.com&lt;\/a&gt; \n    In Bengali: &lt;a href='http:\/\/Bangla.SaLearningSchool.com' target='new' rel=\"noopener\"&gt;http:\/\/Bangla.SaLearningSchool.com&lt;\/a&gt;\n    &lt;a href='http:\/\/SitesTree.com' target='new' rel=\"noopener\"&gt;http:\/\/SitesTree.com&lt;\/a&gt;\n    8112223 Canada Inc.\/JustEtc: &lt;a href='http:\/\/JustEtc.net' target='new' rel=\"noopener\"&gt;http:\/\/JustEtc.net (Software\/Web\/Mobile\/Big-Data\/Machine Learning) &lt;\/a&gt;\n    Shop Online: &lt;a href='https:\/\/www.ShopForSoul.com'&gt; https:\/\/www.ShopForSoul.com\/&lt;\/a&gt;\n    Medium: &lt;a href='https:\/\/medium.com\/@SayedAhmedCanada' target='new' rel=\"noopener\"&gt; https:\/\/medium.com\/@SayedAhmedCanada &lt;\/a&gt;\n<\/code><\/pre>\n","protected":false},"excerpt":{"rendered":"<p>Some random information regarding commenting your codeIs commenting required? or suggested?Simply yes. Always comment your code.Note: Commenting is always useful only when it is done right. Bad commenting is worse than not commenting.What should you write in the comment?&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8211;Write why the section of the code is required.write-What does the code section do.Write it in plain &hellip; <\/p>\n<p><a class=\"more-link btn\" href=\"http:\/\/bangla.sitestree.com\/?p=70113\">Continue reading<\/a><\/p>\n","protected":false},"author":8,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_jetpack_feature_clip_id":0,"_jetpack_memberships_contains_paid_content":false,"footnotes":"","jetpack_post_was_ever_published":false},"categories":[1917],"tags":[],"class_list":["post-70113","post","type-post","status-publish","format-standard","hentry","category-fromsitestree-com","item-wrap"],"jetpack_featured_media_url":"","jetpack_sharing_enabled":true,"jetpack-related-posts":[{"id":24424,"url":"http:\/\/bangla.sitestree.com\/?p=24424","url_meta":{"origin":70113,"position":0},"title":"Some random information regarding commenting your code #Root","author":"Author-Check- Article-or-Video","date":"April 9, 2021","format":false,"excerpt":"Some random information regarding commenting your code Is commenting required? or suggested? Simply yes. Always comment your code. Note: Commenting is always useful only when it is done right. Bad commenting is worse than not commenting. What should you write in the comment? -------------------------------------- Write why the section of the\u2026","rel":"","context":"In &quot;FromSitesTree.com&quot;","block_context":{"text":"FromSitesTree.com","link":"http:\/\/bangla.sitestree.com\/?cat=1917"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":13624,"url":"http:\/\/bangla.sitestree.com\/?p=13624","url_meta":{"origin":70113,"position":1},"title":"CS207 &#8211; Clean Code &#8211; Code Commenting (2\/2)","author":"Author-Check- Article-or-Video","date":"October 29, 2017","format":false,"excerpt":"Unit 02 - Comments, Objects & Data Structures Lecture 02 - Code Commenting (2\/2) Clean Code Online Course Dimik Computing For the full course visit ...","rel":"","context":"In &quot;Misc Computing&quot;","block_context":{"text":"Misc Computing","link":"http:\/\/bangla.sitestree.com\/?cat=1884"},"img":{"alt_text":"","src":"https:\/\/i0.wp.com\/bangla.sitestree.com\/wp-content\/uploads\/2017\/10\/hqdefault-30.jpg?fit=480%2C360&resize=350%2C200","width":350,"height":200},"classes":[]},{"id":13626,"url":"http:\/\/bangla.sitestree.com\/?p=13626","url_meta":{"origin":70113,"position":2},"title":"CS207 &#8211; Clean Code &#8211; Code Commenting (1\/2)","author":"Author-Check- Article-or-Video","date":"October 29, 2017","format":false,"excerpt":"Unit 02 - Comments, Objects & Data Structures Lecture 01 - Code Commenting (1\/2) Clean Code Online Course Dimik Computing For the full course visit ...","rel":"","context":"In &quot;Misc Computing&quot;","block_context":{"text":"Misc Computing","link":"http:\/\/bangla.sitestree.com\/?cat=1884"},"img":{"alt_text":"","src":"https:\/\/i0.wp.com\/bangla.sitestree.com\/wp-content\/uploads\/2017\/10\/hqdefault-31.jpg?fit=480%2C360&resize=350%2C200","width":350,"height":200},"classes":[]},{"id":68576,"url":"http:\/\/bangla.sitestree.com\/?p=68576","url_meta":{"origin":70113,"position":3},"title":"Lesson 1: Short Notes on C++ #77","author":"Author-Check- Article-or-Video","date":"August 5, 2021","format":false,"excerpt":"This short note is for those who already know C++ and want to refresh their memory. Beginners can still take a look to get an overall idea. Three pillars of object-oriented development: encapsulation, inheritance, and polymorphism. C++ supports encapsulation through (user-defined) classes. Class properties and internal workings can be hidden\u2026","rel":"","context":"In &quot;FromSitesTree.com&quot;","block_context":{"text":"FromSitesTree.com","link":"http:\/\/bangla.sitestree.com\/?cat=1917"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":26483,"url":"http:\/\/bangla.sitestree.com\/?p=26483","url_meta":{"origin":70113,"position":4},"title":"Lesson 1: Short Notes on C++ #Programming #C++","author":"Author-Check- Article-or-Video","date":"April 26, 2021","format":false,"excerpt":"This short note is for those who already know C++ and want to refresh their memory. Starters can still take a look to get an overall idea. Three pillars of object-oriented development: encapsulation, inheritance, and polymorphism. C++ supports encapsulation through (user-defined) classes. Class properties and internal workings can be hidden\u2026","rel":"","context":"In &quot;FromSitesTree.com&quot;","block_context":{"text":"FromSitesTree.com","link":"http:\/\/bangla.sitestree.com\/?cat=1917"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":68483,"url":"http:\/\/bangla.sitestree.com\/?p=68483","url_meta":{"origin":70113,"position":5},"title":"Access 2007: How to #90","author":"Author-Check- Article-or-Video","date":"August 4, 2021","format":false,"excerpt":"Access 2007: How toHow to compact and repair database?File menu (Alt+F) -> Manage -> Compact and Repair Database. Why? To reduce file\/database size. Helpful - when you want to upload to a remote server. Compacting and Repairing databases many times can solve many database issues. Use the feature once in\u2026","rel":"","context":"In &quot;FromSitesTree.com&quot;","block_context":{"text":"FromSitesTree.com","link":"http:\/\/bangla.sitestree.com\/?cat=1917"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]}],"_links":{"self":[{"href":"http:\/\/bangla.sitestree.com\/index.php?rest_route=\/wp\/v2\/posts\/70113","targetHints":{"allow":["GET"]}}],"collection":[{"href":"http:\/\/bangla.sitestree.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/bangla.sitestree.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/bangla.sitestree.com\/index.php?rest_route=\/wp\/v2\/users\/8"}],"replies":[{"embeddable":true,"href":"http:\/\/bangla.sitestree.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=70113"}],"version-history":[{"count":0,"href":"http:\/\/bangla.sitestree.com\/index.php?rest_route=\/wp\/v2\/posts\/70113\/revisions"}],"wp:attachment":[{"href":"http:\/\/bangla.sitestree.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=70113"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/bangla.sitestree.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=70113"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/bangla.sitestree.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=70113"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}