- Feature Articles
- CodeSOD
- Error'd
-
Forums
-
Other Articles
- Random Article
- Other Series
- Alex's Soapbox
- Announcements
- Best of…
- Best of Email
- Best of the Sidebar
- Bring Your Own Code
- Coded Smorgasbord
- Mandatory Fun Day
- Off Topic
- Representative Line
- News Roundup
- Editor's Soapbox
- Software on the Rocks
- Souvenir Potpourri
- Sponsor Post
- Tales from the Interview
- The Daily WTF: Live
- Virtudyne
Edit Admin
I've worked at a place which, even though they used source control for the database, demanded that we include a "change log" at the top of the stored proc because it was "easier to see when working on it". The same place also forbade formatting the document because it messed up the Diff.
Admin
I have to deliver source to a customer that has no access to our source control. So this is a requirement. I have to nag people to do it, it's a pain.
Edit Admin
I'm sure there are constraints around why you can't use it, but this is 100% what Git is good at. Internal remote for development, external facing remote for your customers.
Edit Admin
If the customer needs source history, they should get source history. There's no guarantee that the comments accurately reflect the source history.
As Remy said, Git is really good for this. But you don't necessarily need an externally-accessible repository. If you have to deliver history along with the source code, just deliver a Git bundle file.
Edit Admin
Is no one going to mention Remy's typo in the title? Or am I TRWTF because it was intended irony?
Admin
Git didn't exist when the project started and I'm not sure anyone wants to make the transition from Clearcase exactly for fear of losing that history.
Admin
Okay, so swearing goes in the Git commit message, not in the source code comments. Got it.
Edit Admin
Look, the change log had a lot to do with not everyone who worked on the procedures being included in the licensing when we finally got tooling set up to source-control the database, and the original idea was supposed to be that formatting should always be its own commit, but then we couldn't get the senior dev to fix his line ending settings or everyone to standardize on tabs or spaces plus we had to keep dealing with formatting changes from the folks who didn't have the source control tooling and...
uh...
ok you probably didn't really work with me before, but yeah, definitely hits close to home.
Admin
Sooner or later someone will use calculateMassGrossPay() to write the checks and everyone will have to track down the reason no one was paid.
Admin
A nice thing about compiled languages is that the compiler will tell you in no uncertain terms if you try calling a non-existent function.
Admin
I was on a call recently where our internal auditors wanted to know why the control developers hadn't removed the line of code from their script that they'd been told to remove a few years ago.
Turns out they had "removed" it, it's just the auditors didn't know what "--" means in SQL ... which has taught me a new reason why you should actually delete code instead of commenting it out
Admin
This is something that AI is really good at. Have the AI generate the comment from the diff, and include it as a comment at the top of the source file as it is bundled up to deliver to the customer. And if the comment REALLY needs to be in the source file permanently, have AI generate that comment and insert it before committing the code to the repo. And, you might as well have the AI write the commit message too, while you're at it.
Admin
Maybe we'll have AI tools in a couple decades, and I am not exaggerating. We don't even have widely available tools like Jira, etc.
Edit Admin
"VSS was terrible" is wrong. It's "VSS is terrible". Everyone moves off VSS as soon as they learn of better systems. There are way too many problems with VSS including the inability to make change sets so if you modify multiple files someone else can get a copy of the code that doesn't build because someone was halfway through checking in code.
As for change logs in file headers, most source control systems support adding it automatically - just read how you can put a tag and the source control system will automatically add the commit header to your file. And ones that don't I'm sure there's extensions/hooks/etc that can add them automatically.