{"id":269,"date":"2010-05-24T09:43:25","date_gmt":"2010-05-24T16:43:25","guid":{"rendered":"http:\/\/www.jusquici.org\/blog\/?p=269"},"modified":"2010-05-24T10:28:39","modified_gmt":"2010-05-24T17:28:39","slug":"writing-good-commit-messages","status":"publish","type":"post","link":"https:\/\/www.jusquici.org\/blog\/?p=269","title":{"rendered":"writing good commit messages"},"content":{"rendered":"<p><a href=\"https:\/\/www.jusquici.org\/blog\/?p=255\">Last time<\/a>, I talked about how svn log (or similar) can be a key team communication tool.  Let&#8217;s examine how individual commit messages play a role in that.<\/p>\n<p>It&#8217;s time for a classic good-bad-ugly demonstration.<\/p>\n<h2>bad<\/h2>\n<blockquote><p>worked some more on module x.<\/p><\/blockquote>\n<p>Cool.  So apparently we already knew you were working on module x.  Is there some method holding you back?  Did you finish it?  Which files are you working in?<\/p>\n<blockquote><p>Checking in WidgetFactoryEnablerUtility.java.<\/p><\/blockquote>\n<p>What does it do?  What code will it affect?  Does it belong to a module of some sort?<\/p>\n<h2>good<\/h2>\n<blockquote><p>Continued work on Module X in DatabaseConnector.java.  Having difficulty properly escaping input, so interaction with Module Y will work with correct input, but not input requiring escaping.<br \/>\nFinished:  open() and disconnect() methods.<br \/>\nTODO:  Error checking and input escaping.<br \/>\nKnown bugs:  inputting &#8220;; DROP TABLE ;&#8221; for name drops the table.\n<\/p><\/blockquote>\n<p>Specific about the file, how changes affect interactions with other areas of the project, and specific about the effects of known bugs.  <\/p>\n<h3>aside: Should you commit with bugs?<\/h3>\n<p>Do the bugs break the build?  If so, don&#8217;t commit.<br \/>\nWill committing the bugs confuse someone?  If so, don&#8217;t commit.<br \/>\nDoes everyone know the bug exists and how it affects their code?  Committing the bug with documentation in the commit message is probably a better choice than waiting until it&#8217;s fixed (or forgetting it&#8217;s not fixed).<\/p>\n<blockquote><p>Added WidgetFactoryEnablerUtility.java for use in the WidgetFactory module.  Provides enabler methods for non-standard Java implementations.<\/p><\/blockquote>\n<p>Specific about which file, what was done with it, what it&#8217;s associated with, and what it does.<\/p>\n<blockquote><p>Added several .png files to the images folder &#8211; new icons for the toolbar.<\/p><\/blockquote>\n<p>There&#8217;s little to no benefit of saying exactly which .pngs were added, but definitely give a purpose.<\/p>\n<h2>ugly<\/h2>\n<blockquote><p>IT&#8217;S WORRRKINGNGGGGGGGGGGGG!!!!<\/p><\/blockquote>\n<p>or<\/p>\n<blockquote><p>fixed it<\/p><\/blockquote>\n<p>I probably did the former a dozen times this year.  Sometimes you get caught in the moment.  Be excited, do some high fives, but be a bit more descriptive about what &#8220;it&#8221; is and why it wasn&#8217;t considered working before so we know what working means now.<\/p>\n<blockquote><p>[comments about 60 files that have changed]<\/p><\/blockquote>\n<p>You might want to commit more often.<\/p>\n<blockquote><p>Deleting file SomeClass.m &#8211; don&#8217;t know why it&#8217;s there.<\/p><\/blockquote>\n<p>It might be time for a code review.<\/p>\n<blockquote><p>Adding GiganticBinaryFile.mp4 &#8211; used in testing.<\/p><\/blockquote>\n<p>This will likely be an unpleasant surprise on everyone&#8217;s next update.  It may be better to include in the test script a command to fetch the file from an HTTP server if it doesn&#8217;t already exist in the test folders.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Last time, I talked about how svn log (or similar) can be a key team communication tool. Let&#8217;s examine how individual commit messages play a role in that. It&#8217;s time for a classic good-bad-ugly demonstration. bad worked some more on module x. Cool. So apparently we already knew you were working on module x. Is &hellip; <a href=\"https:\/\/www.jusquici.org\/blog\/?p=269\" class=\"more-link\">Continue reading <span class=\"screen-reader-text\">writing good commit messages<\/span> <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_markdown_editor_remember":false,"footnotes":""},"categories":[33,31,34],"tags":[],"_links":{"self":[{"href":"https:\/\/www.jusquici.org\/blog\/index.php?rest_route=\/wp\/v2\/posts\/269"}],"collection":[{"href":"https:\/\/www.jusquici.org\/blog\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.jusquici.org\/blog\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.jusquici.org\/blog\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.jusquici.org\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=269"}],"version-history":[{"count":7,"href":"https:\/\/www.jusquici.org\/blog\/index.php?rest_route=\/wp\/v2\/posts\/269\/revisions"}],"predecessor-version":[{"id":283,"href":"https:\/\/www.jusquici.org\/blog\/index.php?rest_route=\/wp\/v2\/posts\/269\/revisions\/283"}],"wp:attachment":[{"href":"https:\/\/www.jusquici.org\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=269"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.jusquici.org\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=269"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.jusquici.org\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=269"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}