{"id":5,"date":"2021-05-22T05:36:15","date_gmt":"2021-05-22T05:36:15","guid":{"rendered":"https:\/\/blogs.scummvm.org\/twan\/?p=5"},"modified":"2021-06-06T13:28:14","modified_gmt":"2021-06-06T13:28:14","slug":"general-the-important-small-things","status":"publish","type":"post","link":"https:\/\/blogs.scummvm.org\/twan\/2021\/05\/22\/general-the-important-small-things\/","title":{"rendered":"GENERAL: The important small things"},"content":{"rendered":"\n<p>Here are some useful guidelines<\/p>\n\n\n\n<ol class=\"wp-block-list\"><li>Coding format<br>Although the comprehensive guideline is available in the official wiki, here is a high light for what to be mindful in this project, with my own interpretation:<br>a. #ifdef USE_TTS and #endif should be aligned with column zero<br>b. Operators should have a white space separating. Operators include % and =<br>c. Curly brackets should come after an extra white space<br>d. Give the statement that follows the if condition a brand new line with indentation, even if there is only one line (which in this case, one should avoid curly brackets)<br><\/li><li>Share messages. Not screenshots.<br>a. use git diff to indicate the code difference without having to commit every time (p.s. quit the git diff view by pressing q)<br><\/li><\/ol>\n\n\n\n<p>Here are useful settings\/tools for people new to developing<\/p>\n\n\n\n<ol class=\"wp-block-list\"><li>Multiple cursor editing<br>Can be practiced in the playground provided in VScode<\/li><li>Print the debug message in the terminal by using debug(&#8220;Message: %d&#8221;, variable) or warning(&#8220;Message: %d&#8221;, variable)<\/li><li>Use the terminal to commit git messages<br>git status &#8211; see the files you have made changes<br>git add \/path\/to\/file &#8211; to specify the files you want to commit, the path can be copied by the message from git status<br>git commit -m &#8220;ENGINENAME: Commit message&#8221; &#8211; make sure all commit messages start with the same initials in all caps (e.g. GRIFFON: )<br>git push: to finish the commit<br><\/li><\/ol>\n","protected":false},"excerpt":{"rendered":"<p>Here are some useful guidelines Coding formatAlthough the comprehensive guideline is available in the official wiki, here is a high light for what to be mindful in this project, with my own interpretation:a. #ifdef USE_TTS and #endif should be aligned with column zerob. Operators should have a white space separating. Operators include % and =c. &#8230; <a title=\"GENERAL: The important small things\" class=\"read-more\" href=\"https:\/\/blogs.scummvm.org\/twan\/2021\/05\/22\/general-the-important-small-things\/\">Read more<span class=\"screen-reader-text\">GENERAL: The important small things<\/span><\/a><\/p>\n","protected":false},"author":9,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[3],"tags":[5],"class_list":["post-5","post","type-post","status-publish","format-standard","hentry","category-moreorganized","tag-griffon"],"_links":{"self":[{"href":"https:\/\/blogs.scummvm.org\/twan\/wp-json\/wp\/v2\/posts\/5","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/blogs.scummvm.org\/twan\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blogs.scummvm.org\/twan\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blogs.scummvm.org\/twan\/wp-json\/wp\/v2\/users\/9"}],"replies":[{"embeddable":true,"href":"https:\/\/blogs.scummvm.org\/twan\/wp-json\/wp\/v2\/comments?post=5"}],"version-history":[{"count":2,"href":"https:\/\/blogs.scummvm.org\/twan\/wp-json\/wp\/v2\/posts\/5\/revisions"}],"predecessor-version":[{"id":7,"href":"https:\/\/blogs.scummvm.org\/twan\/wp-json\/wp\/v2\/posts\/5\/revisions\/7"}],"wp:attachment":[{"href":"https:\/\/blogs.scummvm.org\/twan\/wp-json\/wp\/v2\/media?parent=5"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blogs.scummvm.org\/twan\/wp-json\/wp\/v2\/categories?post=5"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blogs.scummvm.org\/twan\/wp-json\/wp\/v2\/tags?post=5"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}