Ours isn’t much better.
Each commit message has a mandatory ticket number you have to enter.
So for details you need to jump to the ticket.
The tickets often don’t have meaningful information in them apart from ‚for details see the attachments‘
Attachments are often either not uploaded or nowadays we do not have read access as they were created by a different team working for a different customer but forwarded to the ‚central backend team’ and for know how protection purposes we are not even allowed to see the attachments.
Effectively resulting in the information that is available telling us: ‚we did stuff‘
I don't know about at your workplace, but in our (non-git) repo the intent of the ticket number isn't so you can enter details about the commit in the ticket. It's to link tickets to particular work items being tracked in the ticket system. You should still add as much detail as possible about what the commit is doing in the commit itself. If anyone really wants to, they can always aggregate all commits against a ticket to get an overall idea of the flow for that task, which might span branches or repos, and of course the tickets can be linked to higher ones tying that commit into the larger plan.
But none of that is as important as explaining exactly what the commit's code changes did. So yeah, I would never use the ticket system as a replacement for commit comments.
We've migrated our ticket management system to a few vendors. So a ticket number might come from the system 3 iterations ago... and of course migration wasn't perfect. Because that's the one ticket that didn't get migrated.
> Ours isn’t much better. Each commit message has a mandatory ticket number you have to enter. So for details you need to jump to the ticket.
In my perfect world people would write self-contained commit messages. Links to non-essential elaborations is fine.
But what we have is often (ticket + some bare-bones explanation of what the code change does without explaining why). Okay, so that’s annoying that I have to click through to a slow issue tracker instance for every commit.
But maybe people just want an easily changeable (unlike immutable commits) place to write down what this is about. Is the issue tracker that? Ideally (or second-to-ideally; see first paragraph) the title and description explain what the problem is. If this was a long back and forth issue then hopefully someone has updated the description to point to exactly what the PR/commits are supposed to do. More likely though is that the issue is a stream of consciousness:
- Naive title
- Naive description
- Back and forth troubleshooting in the comments
- The tech lead shoots in with “so, i guess <discard everything> and do X”
And that’s the average good case. I’ve been complaining recently (maybe on two occasions) that I as a secondary (to the tech lead) PR reviewer can’t even easily figure out what the PR is supposed to do based on the issue.
So there is no curation or editing. Even though the issue tracker is elevated to be the source of code change truth by mandating that commits need to have the issue id in the title but almost nothing else is demanded of the commit message.
Now compare all of that to—no matter what is in the issue tracker, no matter if it has good or bad information—taking five minutes in order to write a commit message (or just a PR description which you can use in the merge commit) on a change which took in total three hours to work on with all the back and forth and testing and debugging. Now the snapshot of your understanding of the issue at the time of writing the commit/PR stays there forever, without any need for hyperlinks or external tools.
Same here and tickets most of the time come from bugs so the title and discussion (if any) there are about the problem. The commit message should be about the cause and the solution. Instead people just copy and paste bug title into the message.
It might not help you today with your immediate problem but think about it this way:
You become the boss or responsible for some product.
If you decide at the beginning to start off using Rust or rewrite some ancient, unmaintained library using Rust, then you prevent people like your cowboy developer to mess stuff up with this category of faults.
Either you would not hire him in the first place because he never came to grips with Rust so you only end up with developers on your team that understand and actively chose the tradeoffs that Rust offers.
If the cowboy developer is the boss they can still just wrap everything in unsafe blocks. But I think I'd take that over the C++ new/delete/malloc/free salad.
At least `unsafe` blocks tend to raise other people's eyebrows rather quickly. The word itself is telling you to take a double take after all.
Some rather "questionable" C/C++ code can, and are missed during code review sessions. One could put the blame on code reviewers, but let's be honest, code reviewing is a mindnumbing task for many of us.
Solve a leetcode easy and leetcode medium problem in the morning before starting my dayjob.
I wanted to prepare for the next interviews sometime mid last year but lost the motivation. It is very easy to skip the interview-prep after a full working day.
Best to do a short programming riddle after waking up when the mind is still fresh.
1.) Force other competitors to go belly-up or buy them to create a Monopoy or if the authorities don‘t let you do that, try to end up in a duopoly situation where you and your competitor come to some silent agreement to not overly compete.
2.)
Raise the regulatory bar to prevent startups from entering your field.
Milk whatever half dead infrastructure you have and people depend on.
Oh and raise prices every odd year while still not investing in the rotten infrastructure.
Somehow investors need to see growth and dividend payments.
Due to 1.) there is no competitor left that could offer a better service. People cannot simply switch.
Die to 2.) you are not in danger of ever having to face situation 1.) again.
Job of the government is to not let 1. and 2. happen.
They go the boring path.
Work together with regulators.
Prove to them that whatever they are doing is actually save to use.
Don’t oversell to their customers.
They go the way of building and retaining trust - with customers and regulation bodies.
Doing something cheaper than competitors is a good thing when you’re achieving the same goal. Doing something cheaper than competitors when there’s a trade-off to the buyer fills out options in the market. Doing something cheaper than competitors when there’s an externality (e.g. a self-driving car that fails to recognize pedestrians) is morally condemnable.
It’s definitely out there and in productive use.