Author Topic: The importance of small, well-commented commits and inline code commenting  (Read 4396 times)

micah

  • A real person, on the Internet.
  • Ass Wipe
  • Posts: 6915
  • Karma: +58/-55
  • Truth cannot contradict truth.
    • micahj.com
A project manager just asked me to find out why a "JD Power" callout box was missing from certain pages of a website.  While it should have been his job to know why, it sure as hell helped that I write useful comments on everything I do and make source control commits often.  I was able to quickly find both *when* the change was made and more importantly, jog my memory as to *why.*
"I possess a device, in my pocket, that is capable of accessing the entirety of information known to man.  I use it to look at pictures of cats and get in arguments with strangers."

Mike

  • Jackass In Charge
  • Posts: 11248
  • Karma: +168/-32
  • Ex Asshole - a better and more caring person.
I like to link people to this blog post about git commit messages: http://tbaggery.com/2008/04/19/a-note-about-git-commit-messages.html

ober

  • Ashton Shagger
  • Ass Wipe
  • Posts: 14305
  • Karma: +73/-790
  • mini-ober is taking over
    • Windy Hill Web Solutions
What is a jd power callout anyways?  I saw a reference to that in some code once and didn't understand the reference.

charlie

  • Jackass In Charge
  • Posts: 7896
  • Karma: +84/-53
A project manager just asked me to find out why a "JD Power" callout box was missing from certain pages of a website.  While it should have been his job to know why, it sure as hell helped that I write useful comments on everything I do and make source control commits often.  I was able to quickly find both *when* the change was made and more importantly, jog my memory as to *why.*

Love that stuff...

Boss: Why did you make that change to the application? It doesn't make sense!
Employee: I've attached the email thread you sent me last month where you asked me to make that change. It also happens to include the part where I told you it doesn't make sense.

I also have co-workers who are constantly worried about making mistakes. Then they'll message me about something they're fixing and comment about how somebody made some dumb mistake. I look up what happened and I see it was that person who made the mistake, but I don't say anything because I don't want to make them feel bad (and I don't care who messed up). The best part is later in the day they'll send a message, "doh! that was me." Good times.

Mike

  • Jackass In Charge
  • Posts: 11248
  • Karma: +168/-32
  • Ex Asshole - a better and more caring person.
If you know how to ask it git will tell you all the dirty secrets.  But seriously, having some sort of paper trail is a must.

kermi3

  • ?
  • Ass Wipe
  • Posts: 5513
  • Karma: +56/-22
"doh! that was me." Good times.

Sign of a good co-worker
govtcheez03:  i kind of look for it - i seek out stupidity and annoy it until it either gets better, gets banned, or goes away on its own

Mike

  • Jackass In Charge
  • Posts: 11248
  • Karma: +168/-32
  • Ex Asshole - a better and more caring person.
When I got back to VIE I was like "Who wrote this crappy code? <git blame> Damn it, it is my crappy code!"

charlie

  • Jackass In Charge
  • Posts: 7896
  • Karma: +84/-53
One drag about working in the same code for 15 years is that you see your shit from 15 years ago that still has your name on it.

ober

  • Ashton Shagger
  • Ass Wipe
  • Posts: 14305
  • Karma: +73/-790
  • mini-ober is taking over
    • Windy Hill Web Solutions
Yeah, commit histories are both a godsend and an annoyance depending on the situation.