|
It's more like this conversation, which I've had several times: User: "Hey, X no longer does Y when you Z. Why did that change?" Me: "I'm not really familiar with X... Let me check and get back to you." *looks through code, finds a point in time when X did Y when you Z'd* *looks for commit when that change occurred, finds it, reads check-in message by a developer who's long gone* "Changed X to no longer Y when you Z" No context, no explanation for why the change was made. It's less of a big deal if the check-in is tied to a work item, and the change is relevant to the work item, but sometimes you just get a change that's totally devoid of context. Then you have to go back to someone and say "I don't know, <former developer> made that change," which leads to having to figure out why the change was made and whether the change needs to be undone. If the message was "Changed X to no longer Y when you Z because of A, B, and C", then you have a reasonable basis for evaluating the ramifications of changing it back.
|
# ? Jan 3, 2013 19:45 |
|
|
# ? May 14, 2024 21:07 |
|
Ithaqua posted:It's more like this conversation, which I've had several times: This too. It leads to poo poo like "Well, we don't know why X no longer does Y. We'll change it back." and then two months later "Hey, so X can't do Y when you Z because blah blah blah" and the change echos back and forth, forever, wasting hours and hours of dev and QA time.
|
# ? Jan 3, 2013 19:48 |
|
Ithaqua posted:It's more like this conversation, which I've had several times: This can tie in pretty well if you have an issue tracker and tie commits to it, even by just putting the issue number you're working on in the commit message. "#47 Changing foo to bar" and "#47 Changing baz to bar" (in addition to grouping by being on a separate branch) can really help with the digging. E: This is basically what you're saying Zamujasa fucked around with this message at 19:55 on Jan 3, 2013 |
# ? Jan 3, 2013 19:48 |
|
Zamujasa posted:This can tie in pretty well if you have an issue tracker and tie commits to it, even by just putting the issue number you're working on in the commit message. "#47 Changing foo to bar" and "#47 Changing baz to bar" (in addition to grouping by being on a separate branch) can really help with the digging. most of my commits are just that: "fixed #45 - Customers can't checkout", let the ticketing system provide context, which is what its good at and easily (hopefully) searchable, and let source control be good at controlling source.
|
# ? Jan 3, 2013 19:52 |
|
http://who-t.blogspot.com/2009/12/on-commit-messages.html
|
# ? Jan 3, 2013 19:54 |
|
Bunny Cuddlin posted:This too. It leads to poo poo like "Well, we don't know why X no longer does Y. We'll change it back." and then two months later "Hey, so X can't do Y when you Z because blah blah blah" and the change echos back and forth, forever, wasting hours and hours of dev and QA time. That seems like an argument in favor of documentation. Documentation should go in the code, not in the commit history.
|
# ? Jan 3, 2013 20:08 |
|
how!! posted:That seems like an argument in favor of documentation. instead of deleting lines, comment them out and add a 2-3 sentence comment above explaining why it was deleted
|
# ? Jan 3, 2013 20:10 |
|
how!! posted:That seems like an argument in favor of documentation. What about my previous post? What is the argument against writing two sentence commit messages? It seems to just be "I don't want to"
|
# ? Jan 3, 2013 20:10 |
|
how!! posted:That seems like an argument in favor of documentation. You think documentation of changes made to code should go in the code? edit: Deus Ex said it in a much better, snarky fashion.
|
# ? Jan 3, 2013 20:10 |
|
Zamujasa posted:This can tie in pretty well if you have an issue tracker and tie commits to it, even by just putting the issue number you're working on in the commit message. "#47 Changing foo to bar" and "#47 Changing baz to bar" (in addition to grouping by being on a separate branch) can really help with the digging. This is pretty much how it worked at the last place I worked, and in fact version control wouldn't let you make a commit without one or more associated issue numbers. It'd automatically add links to the issue(s) to the commit message, and the issue tracker itself would link back all of the relevant commits. It was pretty nice.
|
# ? Jan 3, 2013 20:14 |
|
how!! posted:why would you need to look through commit history to fix a bug? Just fix the bug. I've fixed many bugs, and can't tell you of a single time where I had to look through the history in order to fix it. Have you never been in an accidental commit war, or tried to look up an old implementation you deleted? A basic commit message makes navigating your VCS way easier. Maybe two sentences is a bit overboard, but at least knock out a quick phrase to describe why you changed something. If you don't have a clear enough idea of why you made the change that you can punch in a few words, don't make the change.
|
# ? Jan 3, 2013 20:15 |
|
ToxicFrog posted:This is pretty much how it worked at the last place I worked, and in fact version control wouldn't let you make a commit without one or more associated issue numbers. It'd automatically add links to the issue(s) to the commit message, and the issue tracker itself would link back all of the relevant commits. It was pretty nice. Github works like this if you use their issue tracker. You can have a commit message with "Closes #128" in it and it automatically links to the issue, closes it, and links from the issue to the commit.
|
# ? Jan 3, 2013 20:16 |
|
TFS allows easy linking/transitioning work items on commits too if you're in Microsoftland
|
# ? Jan 3, 2013 20:17 |
|
Thermopyle posted:Github works like this if you use their issue tracker. You can have a commit message with "Closes #128" in it and it automatically links to the issue, closes it, and links from the issue to the commit. Ours was close-by-default on every commit. You had to put "B#1234 noresolve" if you wanted it to update the issue without changing its status. I accidentally closed a lot of bugs my first month there.
|
# ? Jan 3, 2013 20:21 |
|
how!! posted:why would you need to look through commit history to fix a bug? Just fix the bug. I've fixed many bugs, and can't tell you of a single time where I had to look through the history in order to fix it. Tell me this again after working for a manufacturer of devices that are subject to FDA regulation "Oh, you found this rare but very serious bug that can destroy patient data? Who introduced it at what time, and what was the next released version that contains the bug?" Management would then talk to the sales team to find all affected customers (since not all of them upgraded the devices' software for every minor version) and we'd cut a hotfix release that was immediately distributed to whoever it affects.
|
# ? Jan 3, 2013 20:31 |
|
how!! posted:why would you need to look through commit history to fix a bug? Just fix the bug. I've fixed many bugs, and can't tell you of a single time where I had to look through the history in order to fix it. For example, if you want to find out which commit put your AWS keys in your public github repo so you can find out which commits you need to purge/how long it's been visible to the public. git blame config.py Python code:
code:
|
# ? Jan 3, 2013 20:41 |
|
Couldn't some enterprising individual spin up a bunch of instances and cost someone a lot of money that way? I sure hope that doesn't happen...
|
# ? Jan 3, 2013 20:46 |
|
Bunny Cuddlin posted:the change echos back and forth, forever, wasting hours and hours of dev and QA time. Great, now you've given him something to masturbate to later I wish I wasn't the only one who used commit messages where I work
|
# ? Jan 3, 2013 20:50 |
|
b0lt posted:For example, if you want to find out which commit put your AWS keys in your public github repo so you can find out which commits you need to purge/how long it's been visible to the public. Nothing like a practical example
|
# ? Jan 3, 2013 20:51 |
|
Bunny Cuddlin posted:TFS allows easy linking/transitioning work items on commits too if you're in Microsoftland TFS really is a wonderful product for those of us who are Microsoft-centric. I want to learn git better, but all of the commands are scary and obtuse.
|
# ? Jan 3, 2013 21:23 |
|
how!! makes changes to his repo, and doesn't even credit us for finding his security vulnerabilities. That's pretty damned rude, if you ask me.
|
# ? Jan 3, 2013 21:30 |
|
lol at a mod editing his name out it's on github, pretty sure it's meant to be public
|
# ? Jan 3, 2013 21:39 |
|
Lol at the fact the AWS KEYS ARE STILL IN THE DIFF OF THE LATEST COMMIT. Learn how to use git.
|
# ? Jan 3, 2013 21:47 |
|
how!! posted:I'm not a CS guy. I'm self taught. The only problem I have as far as a programmer is passing interviews. I can write code better than anyone in this thread, as long as I have time to research solutions and think my way through. Yeah I guess that makes me cocky, but so be it. TOTALLY SURPRISING. It's really fitting this happened in the horrors thread, because we're completely on topic too!
|
# ? Jan 3, 2013 21:51 |
|
WHOIS John Galt posted:Lol at the fact the AWS KEYS ARE STILL IN THE DIFF OF THE LATEST COMMIT. Learn how to use git. He should filter-branch that history and push -f it. Sadly, the damage has probably been done.
|
# ? Jan 3, 2013 21:52 |
|
Doctor w-rw-rw- posted:He should filter-branch that history and push -f it. Sadly, the damage has probably been done. Apparently 'preserving the integrity of the servers I pay money for' isn't a solution worth researching and thinking through. Now replace 'I' with 'my employer'.
|
# ? Jan 3, 2013 21:55 |
|
Cocky Self-Taught Computer Programmer's Meticulously Crafted Github Resume Under Attack By Elitist CS Guy Illuminati
|
# ? Jan 3, 2013 21:55 |
|
WHOIS John Galt posted:Lol at the fact the AWS KEYS ARE STILL IN THE DIFF OF THE LATEST COMMIT. Learn how to use git. The damage was already done, as long as the key is invalidated, it doesn't matter. The true horror is this:
|
# ? Jan 3, 2013 22:00 |
|
Wait until he blames git for keeping the history around and that means that the old keys are still there.
|
# ? Jan 3, 2013 22:03 |
|
http://lists.cairographics.org/archives/cairo/2008-September/015092.html
|
# ? Jan 3, 2013 22:04 |
|
Transprofessional Programmer Mercilessly Othered By Ciseducated Goon Squad
|
# ? Jan 3, 2013 22:04 |
|
b0lt posted:The damage was already done, as long as the key is invalidated, it doesn't matter. Oh, what? After all this, you really expected him to make a commit that *only* made changes relating to the commit message? "git commit -am" for life, rite guys?
|
# ? Jan 3, 2013 22:09 |
|
ultramiraculous posted:Oh, what? After all this, you really expected him to make a commit that *only* made changes relating to the commit message? "git commit -am" for life, rite guys? I think he redefined the debug module as the sort-of-built-in object True before trying to import it, but I'm not sure what order Django evaluates those files in.
|
# ? Jan 3, 2013 22:19 |
|
Munkeymon posted:I think he redefined the debug module as the sort-of-built-in object True before trying to import it, but I'm not sure what order Django evaluates those files in. ``import debug`` is this: https://github.com/narfdotpl/debug its a fancy way of doing ``from ipdb import set_trace; set_trace()`` plus is has some other things. I spend my days writing code and fixing bugs. I don't sperg about pristine commit history.
|
# ? Jan 3, 2013 22:33 |
|
Deus Rex posted:instead of deleting lines, comment them out and add a 2-3 sentence comment above explaining why it was deleted Are you advocating this seriously, or are you ironically suggesting it and assuming it as implicit that it is bad practice? (This is not a sarcastic enquiry. I genuinely do not know.) If the latter, is it not appropriate to add a comment explaining why a particular approach is not used, if an alternate approach exists which might easily occur to someone reading the code but which has non-obvious deficiencies? (This need not involve including commented-out program code.)
|
# ? Jan 3, 2013 22:37 |
|
That's great. Please keep working by yourself where you don't understand the concept of tradeoffs or design decisions that you have to defend later, and please don't work on a team where you have to actually communicate about these things to other people, especially ours.
|
# ? Jan 3, 2013 22:37 |
|
how!! posted:I spend my days writing code and fixing bugs. I don't sperg about pristine commit history. And yet how!! posted:So you're saying speed is all that matters? The advice is that I should not care about code being readable and elegant? A good programmer fixes everything in the quickest manner possible? If a problem can be fixed in 5 minutes, then spending 6 minutes is wasting time? I don't know, in my experience that line of thinking leads to really really complex code that becomes really unmaintainable really quickly. Its what I call "crap piled on top of crap, piled on top of crap, piled on top of crap" how!! posted:The way I measure 'goodness' of code is by the amount of time it would take to fix a bug if one were to emerge. Even my code could have a bug in it, but it would be faster to find in my code than yours. I'm biased though. how!! posted:You don't spend the extra time just to make it more extendable. You do it to make the code more understandable. Understandable code is not only more easily extendable, it is also more easily fixable and more easily changeable. Code is always broken and code is always in need of changing/improving.
|
# ? Jan 3, 2013 22:51 |
|
Commented-out code gets deleted on sight.
|
# ? Jan 3, 2013 22:58 |
|
Just ignore how!! and be done with it. He's clearly trolling; don't let his shitposts derail the thread any further.
|
# ? Jan 3, 2013 23:01 |
|
|
# ? May 14, 2024 21:07 |
|
how!! posted:I spend my days writing code and fixing bugs. I don't sperg about pristine commit history. Go back to GBS.
|
# ? Jan 3, 2013 23:02 |