{"id":149,"date":"2021-01-11T13:42:22","date_gmt":"2021-01-11T05:42:22","guid":{"rendered":"https:\/\/www.tonghin.com.my\/blog\/?p=149"},"modified":"2021-01-11T13:42:23","modified_gmt":"2021-01-11T05:42:23","slug":"row-version-update-upon-saving-the-importance-of-clean-code","status":"publish","type":"post","link":"https:\/\/www.tonghin.com.my\/blog\/2021\/01\/11\/row-version-update-upon-saving-the-importance-of-clean-code\/","title":{"rendered":"Row Version Update Upon Saving &amp; The Importance of Clean Code"},"content":{"rendered":"\n<p>As my supervisor plan to print details in the system, I am required to and in new attribute in my current context. This attribute would actually be printed and customizable according to liking.<br><br>Next, <code><sub><sup>rowVersion <\/sup><\/sub><\/code>of current context won&#8217;t update whenever the changes is made in sub attribute. Therefore, I am required to add attribute &#8220;<code><sub><sup>ModifiedDateTime<\/sup><\/sub><\/code>&#8221; with attribute type of datetime. This attribute is used upon save button been clicked. Whenever a new\/existing set of data is updated, <sup><sub><code>ModifiedDateTime<\/code><\/sub><\/sup> would update the latest date and time to the database, thus update the <code><sub><sup>rowVersion<\/sup><\/sub><\/code>.<br><br>Alongside of these implementation, I by accident altered my code. Which the alteration cause failure of updating <code><sub><sup>ReadyToPick<\/sup><\/sub><\/code> in my context. Thankfully I did commit my code frequently, hence, I am able to track my changes and revert it to working implementation. <br><br>I read through a few pages of Clean Code by Robert C. Martin. I found one interesting topic that more or less related to me which is about Bad Code. Many implemented application\/system went down due to bad code. Bugs appears all over the system, crashed the system or even load time kept on increases as the system is not repaired. Major factor is mainly due to Rush, thus making big mess in code. As these mess builds, it may drag the productivity of one team. Eventually, it may cause the need of having more staff to help increase the productivity to its original phase. Which also may result more and more mess towards the project, as everyone trying to increase their productivity under pressured environment. <br><br>As the conclusion, I shall make sure my code is clean and easy to understand by others. It will bring benefit towards future me or other team member that is working on the same project. Therefore, Repairing, maintaining or adding implementation can be a lot more efficient.<br><\/p>\n","protected":false},"excerpt":{"rendered":"<p>As my supervisor plan to print details in the system, I am required to and in new attribute in my current context. This attribute would actually be printed and customizable according to liking. Next, rowVersion of current context won&#8217;t update whenever the changes is made in sub attribute. Therefore, I am required to add attribute &hellip; <\/p>\n<p class=\"link-more\"><a href=\"https:\/\/www.tonghin.com.my\/blog\/2021\/01\/11\/row-version-update-upon-saving-the-importance-of-clean-code\/\" class=\"more-link\">Continue reading<span class=\"screen-reader-text\"> &#8220;Row Version Update Upon Saving &amp; The Importance of Clean Code&#8221;<\/span><\/a><\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[5],"tags":[47],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v15.7 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>Row Version Update Upon Saving &amp; The Importance of Clean Code | Tong Hin&#039;s Blog<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.tonghin.com.my\/blog\/2021\/01\/11\/row-version-update-upon-saving-the-importance-of-clean-code\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Row Version Update Upon Saving &amp; The Importance of Clean Code | Tong Hin&#039;s Blog\" \/>\n<meta property=\"og:description\" content=\"As my supervisor plan to print details in the system, I am required to and in new attribute in my current context. This attribute would actually be printed and customizable according to liking. Next, rowVersion of current context won&#8217;t update whenever the changes is made in sub attribute. Therefore, I am required to add attribute &hellip; Continue reading &quot;Row Version Update Upon Saving &amp; The Importance of Clean Code&quot;\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.tonghin.com.my\/blog\/2021\/01\/11\/row-version-update-upon-saving-the-importance-of-clean-code\/\" \/>\n<meta property=\"og:site_name\" content=\"Tong Hin&#039;s Blog\" \/>\n<meta property=\"article:published_time\" content=\"2021-01-11T05:42:22+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2021-01-11T05:42:23+00:00\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Est. reading time\">\n\t<meta name=\"twitter:data1\" content=\"2 minutes\">\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Organization\",\"@id\":\"https:\/\/www.tonghin.com.my\/blog\/#organization\",\"name\":\"TONG HIN MACHINERY\",\"url\":\"https:\/\/www.tonghin.com.my\/blog\/\",\"sameAs\":[\"https:\/\/www.youtube.com\/channel\/UC60EoxJMNbu8mV0LuEGfrBg\"],\"logo\":{\"@type\":\"ImageObject\",\"@id\":\"https:\/\/www.tonghin.com.my\/blog\/#logo\",\"inLanguage\":\"en-US\",\"url\":\"https:\/\/www.tonghin.com.my\/blog\/wp-content\/uploads\/2020\/10\/web_logo_180_180.jpg\",\"width\":180,\"height\":180,\"caption\":\"TONG HIN MACHINERY\"},\"image\":{\"@id\":\"https:\/\/www.tonghin.com.my\/blog\/#logo\"}},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/www.tonghin.com.my\/blog\/#website\",\"url\":\"https:\/\/www.tonghin.com.my\/blog\/\",\"name\":\"Tong Hin&#039;s Blog\",\"description\":\"Sharing About Technology\",\"publisher\":{\"@id\":\"https:\/\/www.tonghin.com.my\/blog\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":\"https:\/\/www.tonghin.com.my\/blog\/?s={search_term_string}\",\"query-input\":\"required name=search_term_string\"}],\"inLanguage\":\"en-US\"},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.tonghin.com.my\/blog\/2021\/01\/11\/row-version-update-upon-saving-the-importance-of-clean-code\/#webpage\",\"url\":\"https:\/\/www.tonghin.com.my\/blog\/2021\/01\/11\/row-version-update-upon-saving-the-importance-of-clean-code\/\",\"name\":\"Row Version Update Upon Saving &amp; The Importance of Clean Code | Tong Hin&#039;s Blog\",\"isPartOf\":{\"@id\":\"https:\/\/www.tonghin.com.my\/blog\/#website\"},\"datePublished\":\"2021-01-11T05:42:22+00:00\",\"dateModified\":\"2021-01-11T05:42:23+00:00\",\"breadcrumb\":{\"@id\":\"https:\/\/www.tonghin.com.my\/blog\/2021\/01\/11\/row-version-update-upon-saving-the-importance-of-clean-code\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.tonghin.com.my\/blog\/2021\/01\/11\/row-version-update-upon-saving-the-importance-of-clean-code\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.tonghin.com.my\/blog\/2021\/01\/11\/row-version-update-upon-saving-the-importance-of-clean-code\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"item\":{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.tonghin.com.my\/blog\/\",\"url\":\"https:\/\/www.tonghin.com.my\/blog\/\",\"name\":\"Home\"}},{\"@type\":\"ListItem\",\"position\":2,\"item\":{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.tonghin.com.my\/blog\/2021\/01\/11\/row-version-update-upon-saving-the-importance-of-clean-code\/\",\"url\":\"https:\/\/www.tonghin.com.my\/blog\/2021\/01\/11\/row-version-update-upon-saving-the-importance-of-clean-code\/\",\"name\":\"Row Version Update Upon Saving &amp; The Importance of Clean Code\"}}]},{\"@type\":\"Article\",\"@id\":\"https:\/\/www.tonghin.com.my\/blog\/2021\/01\/11\/row-version-update-upon-saving-the-importance-of-clean-code\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/www.tonghin.com.my\/blog\/2021\/01\/11\/row-version-update-upon-saving-the-importance-of-clean-code\/#webpage\"},\"author\":{\"@id\":\"https:\/\/www.tonghin.com.my\/blog\/#\/schema\/person\/5c3ea1c3869fc5aace6be92e60cb5daa\"},\"headline\":\"Row Version Update Upon Saving &amp; The Importance of Clean Code\",\"datePublished\":\"2021-01-11T05:42:22+00:00\",\"dateModified\":\"2021-01-11T05:42:23+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/www.tonghin.com.my\/blog\/2021\/01\/11\/row-version-update-upon-saving-the-importance-of-clean-code\/#webpage\"},\"commentCount\":0,\"publisher\":{\"@id\":\"https:\/\/www.tonghin.com.my\/blog\/#organization\"},\"keywords\":\"cleancode\",\"articleSection\":\"Experiential\",\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\/\/www.tonghin.com.my\/blog\/2021\/01\/11\/row-version-update-upon-saving-the-importance-of-clean-code\/#respond\"]}]},{\"@type\":\"Person\",\"@id\":\"https:\/\/www.tonghin.com.my\/blog\/#\/schema\/person\/5c3ea1c3869fc5aace6be92e60cb5daa\",\"name\":\"Ng Ching Onn\",\"image\":{\"@type\":\"ImageObject\",\"@id\":\"https:\/\/www.tonghin.com.my\/blog\/#personlogo\",\"inLanguage\":\"en-US\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/5124ba2323631ad4d512f46bd9c04829?s=96&d=mm&r=g\",\"caption\":\"Ng Ching Onn\"}}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","_links":{"self":[{"href":"https:\/\/www.tonghin.com.my\/blog\/wp-json\/wp\/v2\/posts\/149"}],"collection":[{"href":"https:\/\/www.tonghin.com.my\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.tonghin.com.my\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.tonghin.com.my\/blog\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/www.tonghin.com.my\/blog\/wp-json\/wp\/v2\/comments?post=149"}],"version-history":[{"count":3,"href":"https:\/\/www.tonghin.com.my\/blog\/wp-json\/wp\/v2\/posts\/149\/revisions"}],"predecessor-version":[{"id":156,"href":"https:\/\/www.tonghin.com.my\/blog\/wp-json\/wp\/v2\/posts\/149\/revisions\/156"}],"wp:attachment":[{"href":"https:\/\/www.tonghin.com.my\/blog\/wp-json\/wp\/v2\/media?parent=149"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.tonghin.com.my\/blog\/wp-json\/wp\/v2\/categories?post=149"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.tonghin.com.my\/blog\/wp-json\/wp\/v2\/tags?post=149"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}