What's that text box over there?



  • So I was checking in code today (we use TFS) while the project manager was behind me explaining my task. Then he saw my typing something in a textbox he's never noticed before. He asked me what it does. It was the "commit message" field.

    I give you today's changesets. Usernames (and project name) were anonymized, as well as parts of messages. Guess which commits are mine.


  • Impossible Mission - B

    I like how Git will reject commits with an empty message unless you specify --allow-empty-message (which doesn't have a short form so it's actually more typing than -m "Fixes 1473").



  • Does your project manager (and colleagues) put comments inside the code to explain the changes that have been made?



  • Just FYI the style="width:500px;" on image tags works in CS, although I don't blame you one bit for assuming it wouldn't.



  • Man, who pays to have source control in 2013? That's more lame than not adding comments to commits.



  • @configurator said:

    He asked me what it does. It was the "commit message" field.

    And you just realised that coworkers weren't using it?  Never have to back out to a previous commit before?



  • @joe.edwards said:

    I like how Git will reject commits with an empty message unless you specify --allow-empty-message (which doesn't have a short form so it's actually more typing than -m "Fixes 1473").

    But of course, "Fixes 1473" requires them to remember which issue they were working on, so you're more likely to get, "bug fix". And usually the bug won't be fixed, so it's probably just as well.



  • On my "Check In" box in TFS, the "Comment" field is at the top of the screen; and the cursor is positioned in the Comment field.  Maybe your boss does not understand the word "Comment"???



  • @configurator said:

    It was the "commit message" field.
     

    I'm guessing this is the "Comments" field?

    Without any further guidance, I could imagined a box marked "commit message" is where feedback from the commit process is due to appear.

    I suppose a side-WTF is that if this field is optional, then leaving it blank is permissible. Make it mandatory if you want it to contain something (like a single space from those too lazy to add any other comment).



  • @Cassidy said:

    Make it mandatory if you want it to contain something

    Making things like the commit message mandatory is not enough. It's usage has to be mandatory and relevant. And the only way you are going to get relevant is through education and training - otherwise you end up with hundreds of comments that say "fixed stuff". But if you have education and training then you don't need to the software to require a non-blank message - so it's basically a people problem all the way down.



  • @OzPeter said:

    it's basically a people problem all the way down

    And the bad kind where if you use the emotionally appropriate response then you won't get anything done and will be beat at the end of the day from beating your coworkers.



  • @joe.edwards said:

    I like how Git will reject commits with an empty message unless you specify --allow-empty-message (which doesn't have a short form so it's actually more typing than -m "Fixes 1473").

    TFS has check-in policies you can use to mandate the entry of a commit message.

    It has policies for many other things as well, such as forcing you to attach the commit to a valid work item in the integrated issue tracker. (Policies are just classes written against a .NET API, so you can also program your own and plug them into the system.) It also includes the option to override policies in case of specific commits that should break the norm and then offers room for an explanation to be entered, which can be used as a reference if/when commits are audited at some time in the future.

    If you're using TFS in a corporate environment but are not using any of these tools, then I dare say you're not using TFS correctly...



  • @OzPeter said:

    so it's basically a people problem all the way down.
     

    That.

    Just for a change...



  • @blakeyrat said:

    Just FYI the style="width:500px;" on image tags works in CS, although I don't blame you one bit for assuming it wouldn't


    I know, and I thought of that about 2 seconds after posting - as well as about the fact I could just make a smaller image. For some reason, I can't edit the post though.

    @ubersoldat said:

    Man, who pays to have source control in 2013? That's more lame than not adding comments to commits.


    We get it for free, like all Microsoft product. Any MS startup gets it for free and I'm quite confident that's the only reason anyone uses it - much like VS Ultimate, which is awesome but so ridiculously overpriced I can't even begin to justify it.

    @locallunatic said:

    And you just realised that coworkers weren't using it? Never have to back out to a previous commit before?


    I did back out once, but it was my last commit I had done seconds earlier (knowing I'd back out immediately) so I didn't have to actually look at the source control.


    I've been here less than a week.

    @Cassidy said:

    I'm guessing this is the "Comments" field?


    Yes, I keep confusing normal source control terminology with TFS's.

    @OzPeter said:

    it's basically a people problem all the way down


    Indeed, and this isn't the first thing I'll change around here - education needs to come in small doses.

    @Ragnax said:

    If you're using TFS in a corporate environment but are not using any of these tools, then I dare say you're not using TFS correctly...


    Agreed. But we're only using TFS because it's a convenient default to fall back onto and nobody here knows anything better - before that they used SourceSafe.


  • Discourse touched me in a no-no place

     @ubersoldat said:

    Man, who pays to have source control in 2013? That's more lame than not adding comments to commits.

    Government agencies for one.  Or at least the Microsoft side of our office does.



  • @configurator said:

    @OzPeter said:
    it's basically a people problem all the way down

    Indeed, and this isn't the first thing I'll change around here - education needs to come in small doses.
     

    .. or hard objects:

    *thock*thock*thock*



  • @Cassidy said:

    .. or hard objects:

    *thock*thock*thock*

    A Mirrored clue bat?



  • @Zemm said:

    A Mirrored clue bat?
     

    ... so that the words read correctly upon the medium once pecussive delivery is complete.



  • @Ragnax said:

    TFS has check-in policies you can use to mandate the entry of a commit message.
     

    Might I suggest the following policy?

    if (SwearCount(CommitMessage) >= WTF_THRESHOLD)
    {
        SubmitCodeSOD(Username, CommitMessage, Diffs.ToString());
    }


Log in to reply

Looks like your connection to What the Daily WTF? was lost, please wait while we try to reconnect.