News for hackers. Stuff that matters.
Re:There’s No Such Thing as Clean Code by dtech on Friday January 28, 2022 @04:32AM (#30112523)
Seems garbage advice to me. Now you've polluted your production code, likely forever. I don't see a situation where using an issue tracker + good commits - e.g. 1 commit for the 1 PR linked to the ticket that removes the feature - won't result in a superior situation from a maintenance and traceability perspective.
Re:There’s No Such Thing as Clean Code by serial_dev on Friday January 28, 2022 @05:07AM (#30112747)
Yes, I agree with you. Another thing is how do you know which of the removed features will be asked to be put back? You can't really know.

You can guess, but that will leave you with many classes/functions commented out only in the hope that one day one of them will be requested to be put back. This leads to nobody daring to remove old code for months/years.

Then, one day, a new coder on the team just ask WTF is this here, realize it's outdated and not running anymore, and will remove the whole thing. Then, the "senior" guy on the team comes shouting at him/her: "We might need it one day, what do you know about our team, bla bla bla, we had a feature 4 years ago that was removed and we had to add back, so now we have the rule of commenting things out". Yuck, what a nightmare.

Just create good commit messages, don't group irrelevant changes together, and you'll be able to find the commit if you really have to. And even if you can't, you know you can still just develop that thing again, right?

Re:There’s No Such Thing as Clean Code by RMPR on Thursday February 03, 2022 @11:14AM (#30194272)
One solution might be to create a separate branch with the feature still available. With time, you kind of get the gut feeling of what could be useful later and what could not.
Re:There’s No Such Thing as Clean Code by zozbot234 on Friday January 28, 2022 @06:53AM (#30113517)
I thought the best practice for "keeping stuff around just in case" was an attic/ directory in the source repo. That way you're still benefiting from version control, but it's also clear that the code is totally untested and might bitrot at any time.
Re:There’s No Such Thing as Clean Code by dtech on Friday January 28, 2022 @08:19AM (#30114194)
There's little advantage over that vs looking up the old files in source control.
Re:There’s No Such Thing as Clean Code by dt3ft on Friday January 28, 2022 @05:18AM (#30112824)
Sure, in a normal world. But with 2 devs in team, handling a clinical information system in very rapidly changing environment (new features), there is no time to document things in this way.
Re:There’s No Such Thing as Clean Code by qayxc on Friday January 28, 2022 @06:24AM (#30113301)
Jump ship then.

This sounds like you're travelling towards burnout at supersonic speed.

Rapidly changing environment/features is just newspeak for customer has no idea what they even want in the first place and project management is non-existent.

Re:There’s No Such Thing as Clean Code by dt3ft on Friday January 28, 2022 @06:38AM (#30113403)
I agree and did jump ship. This was in Switzerland, by the way.
Re:There’s No Such Thing as Clean Code by dtech on Friday January 28, 2022 @08:17AM (#30114179)
OK, but that doesn't make it right or good advice. It's just one type of of technical debt due to too much workload.