{"id":113,"date":"2015-07-20T10:42:00","date_gmt":"2015-07-20T10:42:00","guid":{"rendered":"http:\/\/waynenguyen.org\/dev\/2015\/07\/20\/tips-for-debugging-and-fixing-code\/"},"modified":"2016-05-21T03:15:55","modified_gmt":"2016-05-21T03:15:55","slug":"tips-for-debugging-and-fixing-code","status":"publish","type":"post","link":"https:\/\/bruceng.com\/dev\/?p=113","title":{"rendered":"tips for debugging and fixing code"},"content":{"rendered":"<div dir=\"ltr\" style=\"text-align: left;\" trbidi=\"on\">\n<div dir=\"ltr\" style=\"line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;\">\nExceptions! enable checking of clr exceptions<\/div>\n<div dir=\"ltr\" style=\"line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;\">\nMake use of your debugger, and sometimes it\u2019s better to fix the symtoms, save time if you can.<\/div>\n<div dir=\"ltr\" style=\"line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;\">\nupgrade your hardware to make debugging smoothly, it\u2019s frustrating if everything is slowww<\/div>\n<div dir=\"ltr\" style=\"line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;\">\nalways refactor the code first, break it into smaller pieces and rename variables, don\u2019t stress your brain<\/div>\n<div dir=\"ltr\" style=\"line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;\">\nprint out exceptions and errors, don\u2019t rely too much on the debugger, those are unreliable at times.<\/div>\n<div dir=\"ltr\" style=\"line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;\">\nmake small changes one at a time, dont make too many changes unless you are sure.<\/div>\n<div dir=\"ltr\" style=\"line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;\">\nlearn SQL, group by, join, etc. It helps to fix performance problems, also review your algorithm complexity theories.<\/div>\n<p>Use WinMerge to check for differences in pieces of code when trying to eliminate duplicates of code<\/div>\n","protected":false},"excerpt":{"rendered":"<p>Exceptions! enable checking of clr exceptions Make use of your debugger, and sometimes it\u2019s better to fix the symtoms, save time if you can. upgrade your hardware to make debugging smoothly, it\u2019s frustrating if everything is slowww always refactor the code first, break it into smaller pieces and rename variables, don\u2019t stress your brain print &hellip; <a href=\"https:\/\/bruceng.com\/dev\/?p=113\" class=\"more-link\">Continue reading<span class=\"screen-reader-text\"> &#8220;tips for debugging and fixing code&#8221;<\/span><\/a><\/p>\n","protected":false},"author":3,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-113","post","type-post","status-publish","format-standard","hentry","category-uncategorized"],"_links":{"self":[{"href":"https:\/\/bruceng.com\/dev\/index.php?rest_route=\/wp\/v2\/posts\/113","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/bruceng.com\/dev\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/bruceng.com\/dev\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/bruceng.com\/dev\/index.php?rest_route=\/wp\/v2\/users\/3"}],"replies":[{"embeddable":true,"href":"https:\/\/bruceng.com\/dev\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=113"}],"version-history":[{"count":1,"href":"https:\/\/bruceng.com\/dev\/index.php?rest_route=\/wp\/v2\/posts\/113\/revisions"}],"predecessor-version":[{"id":233,"href":"https:\/\/bruceng.com\/dev\/index.php?rest_route=\/wp\/v2\/posts\/113\/revisions\/233"}],"wp:attachment":[{"href":"https:\/\/bruceng.com\/dev\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=113"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/bruceng.com\/dev\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=113"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/bruceng.com\/dev\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=113"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}