{"id":24424,"date":"2021-04-09T23:10:06","date_gmt":"2021-04-10T03:10:06","guid":{"rendered":"http:\/\/bangla.salearningschool.com\/recent-posts\/some-random-information-regarding-commenting-your-code-root\/"},"modified":"2021-04-09T23:10:06","modified_gmt":"2021-04-10T03:10:06","slug":"some-random-information-regarding-commenting-your-code-root","status":"publish","type":"post","link":"http:\/\/bangla.sitestree.com\/?p=24424","title":{"rendered":"Some random information regarding commenting your code #Root"},"content":{"rendered":"<p>Some random information regarding commenting your code<\/p>\n<pre>Is commenting required? or suggested?\r\nSimply yes. Always comment your code.\r\n\r\nNote: Commenting is always useful only when it is done right. \r\nBad commenting is worse than not commenting.\r\n\r\n<strong>What should you write in the comment?<\/strong>\r\n--------------------------------------\r\nWrite why the section of the code is required.\r\nwrite-What does the code section do.\r\nWrite it in plain english. Don't use any language syntax.\r\nIf you do not find what to write...then better check did you understand the \r\nrequirements of the assignment\/section? \r\nAlso check, are you sure your design\/logic will work? \r\nAlso, why your design\/code will work -- did you really understand. \r\nDo not write how the code works in comments but write why and what it does.\r\n\r\n<strong>Why commenting is useful?<\/strong>\r\n-------------------------\r\nCommenting will make your code more readable to others.\r\nCommenting will help others to find out the right section of code to edit\/modify. \r\nAlso, understand the purpose of the program as well as sequence of the logic.\r\nIt will also help you to review\/(work on) your own code later\r\nIn many or most companies, you will hardly write codes from scratch, you have to \r\nwork on others' code. Hence, commenting is important\r\n\r\n\r\n<strong>Random:<\/strong>\r\n--------\r\nUse a clear commenting style - easy to edit\r\nComment as you go\/code - do not leave commenting until the end of writing code\r\nIf you are worried that commenting will reduce performance...rather comment and \r\nuse tools to create release codes without comments\r\ncomment above the code -- not at the right\r\nvariable declaration may have comment at the right\r\nif you use any special trick that is not obvious from the code -- write it in \r\ncomments [a trick:we can do a right shift for divide by 2]\r\n\r\n<strong>Comments and Pseudocode Programming Practice (PPP)<\/strong>\r\n----------------------------------------------------\r\nComments and Pseudocode Programming Practice (PPP) go hand in hand.\r\nwhat is Pseudocode Programming Practice (PPP)?\r\n1. Write your logic in plain english may be as a paragraph\r\n2. Decompose it step by step into as fine grained that it can not be decomposed \r\nfurther. (The paragraph will be converted to lines of steps)\r\n3. comment each line\/step (use comment sign like \/\/)\r\n4. After each line\/comment write the corresponding code.<\/pre>\n<p> From: http:\/\/sitestree.com\/?p=3537<br \/> Categories:Root<br \/>Tags:<br \/> Post Data:2016-07-08 16:05:38<\/p>\n<p>\t\tShop Online: <a href='https:\/\/www.ShopForSoul.com\/' target='new' rel=\"noopener\">https:\/\/www.ShopForSoul.com\/<\/a><br \/>\n\t\t(Big Data, Cloud, Security, Machine Learning): Courses: <a href='http:\/\/Training.SitesTree.com' target='new' rel=\"noopener\"> http:\/\/Training.SitesTree.com<\/a><br \/>\n\t\tIn Bengali: <a href='http:\/\/Bangla.SaLearningSchool.com' target='new' rel=\"noopener\">http:\/\/Bangla.SaLearningSchool.com<\/a><br \/>\n\t\t<a href='http:\/\/SitesTree.com' target='new' rel=\"noopener\">http:\/\/SitesTree.com<\/a><br \/>\n\t\t8112223 Canada Inc.\/JustEtc: <a href='http:\/\/JustEtc.net' target='new' rel=\"noopener\">http:\/\/JustEtc.net (Software\/Web\/Mobile\/Big-Data\/Machine Learning) <\/a><br \/>\n\t\tShop Online: <a href='https:\/\/www.ShopForSoul.com'> https:\/\/www.ShopForSoul.com\/<\/a><br \/>\n\t\tMedium: <a href='https:\/\/medium.com\/@SayedAhmedCanada' target='new' rel=\"noopener\"> https:\/\/medium.com\/@SayedAhmedCanada <\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>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? &#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 &hellip; <\/p>\n<p><a class=\"more-link btn\" href=\"http:\/\/bangla.sitestree.com\/?p=24424\">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_memberships_contains_paid_content":false,"footnotes":""},"categories":[1917],"tags":[],"class_list":["post-24424","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":70113,"url":"http:\/\/bangla.sitestree.com\/?p=70113","url_meta":{"origin":24424,"position":0},"title":"Some random information regarding commenting your code #15","author":"Author-Check- Article-or-Video","date":"August 26, 2021","format":false,"excerpt":"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\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":24424,"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":24424,"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":24424,"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":24424,"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":24424,"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\/24424","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=24424"}],"version-history":[{"count":0,"href":"http:\/\/bangla.sitestree.com\/index.php?rest_route=\/wp\/v2\/posts\/24424\/revisions"}],"wp:attachment":[{"href":"http:\/\/bangla.sitestree.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=24424"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/bangla.sitestree.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=24424"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/bangla.sitestree.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=24424"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}