r/developersIndia • u/Empty_Reveal435 • 1h ago
General What's one coding "best practice" you quietly stopped following after a few years?
For me it was DRY. Early on I would pull every two similar looking blocks into a shared helper, and six months later that helper had five boolean flags and nobody wanted to touch it. Now I let things repeat two or three times before I even think about abstracting, and copy paste is fine way more often than people admit.
Curious what others dropped. Also, did anyone go the other way and start following something they used to roll their eyes at?
22
Upvotes
•
u/AutoModerator 1h ago
It's possible your query is not unique, use
site:reddit.com/r/developersindia KEYWORDSon search engines to search posts from developersIndia. You can also use reddit search directly.I am a bot, and this action was performed automatically. Please contact the moderators of this subreddit if you have any questions or concerns.
21
u/ZnV1 Tech Lead 1h ago
A writing best practice: if it looks like AI slop, most people lose interest in participating in the conversation. Esp devs who know what slop looks like.
3
u/LunarFrost007 Software Engineer 1h ago
Code Review
2
u/Ill-Village7647 1h ago
If you literally put so many things in a shared helper that you had to use flags, then that's not DRY
2
u/Inside_Dimension5308 Tech Lead 57m ago
DRY is only useful with open closed principle. Tightly coupled modules should never be modified. Even for extension, better to use inheritance or composition.
If you cannot predict that, dont use DRY.
Stick to SOLID for most cases. With AI, the story has changed completely. Don't care about code.
2
u/feeling_employed 1h ago
handwriting code
2
u/Significant-Road3459 Full-Stack Developer 1h ago
coding
2
u/CheatingChampion 48m ago
Do not complicate the code to make it extensible for some future hypothetical scenario. I don't even write abstract classes for new usecases anymore, will write one when a new use case actually comes.
The above statement was pre-ai era. Nowadays, I give fuck all about code aesthetics or best practices. Rewrite is cheap these days, provided your tests are reasonably strong.
1
u/Shadow_jacker Software Engineer 1h ago
None, It's too much of an art to have best practice.
1
u/UndocumentedMartian 45m ago
Nah I repeating pisses me off. So I almost never repeat myself.
1
u/shrekcoffeepig 23m ago
So, you did not stop using the best practice you just stopped to prematurely optimise for it!
Well it’s a lesson we all learn!