Programming Tips πŸ’‘
51.7K subscribers
67 photos
10 videos
30 files
354 links
Programming & AI:
Tips πŸ’‘
Articles πŸ“•
Resources πŸ‘Ύ
Design Patterns πŸ’Ž
Software Principles βœ…

πŸ‡³πŸ‡± Contact: @MoienTajik

🎯 Buy ads: https://telega.io/c/ProgrammingTip
Download Telegram
Never commit code that’s been commented out 🚫

I’ve never understood the reasoning behind committing code that’s been commented out. πŸ€”

I assume it’s to keep old versions of the code around just in case the new code doesn’t work, but that’s just bizarre. ⚠️

Keeping track of old versions is the reason we use a version control system in the first place❗️

Why was the code commented out❔
Does it work❔
Should it work❔
Has it ever worked❔
Is it something we should strive towards or run away from❔

Code that’s been commented out is worse than useless, because every time it’s read, it raises questions like these without providing any answers. ❌

It only serves to confuse and distract from the code in use. 🀯


https://t.me/pgimg/134

γ€°γ€°γ€°γ€°γ€°γ€°
#Tips #Git
@ProgrammingTip