| ▲ | SketchySeaBeast 2 days ago | |||||||||||||
I'm not sure how to interpret someone saying they don't follow DRY. Do you meant taking it to the Zealous extreme, or do you abhor helper functions? Is this a "No True Scottsman" thing? | ||||||||||||||
| ▲ | airstrike 2 days ago | parent | next [-] | |||||||||||||
I just think DRY is overblown. I just let code grow. When parts of it become obvious to abstract, I refactor them into something self contained. I learned this from an ice wizard. When I was younger, writing Python rather than Rust, I used to go out of my way to make everything DRY, DRY, DRY everywhere from the outset. Class-based views in Django come to mind. Today, I just write code, and after it's working I go back and clean things up where applicable. Not because I'm "following a principle", but because it's what makes sense in that specific instance. | ||||||||||||||
| ||||||||||||||
| ▲ | Pannoniae 2 days ago | parent | prev [-] | |||||||||||||
Not GP but I can strongly relate to it. Most of the programming I do is related to me making a game. I follow WET principles (write everything twice at least) because the abstraction penalty is huge, both in terms of performance and design, a bad abstraction causes all subsequent content to be made much slower. Which I can't afford as a small developer. Same with most other "clean code" principles. My codebase is ~70K LoC right now, and I can keep most of it in my head. I used to try to make more functional, more isolated and encapsulated code, but it was hard to work with and most importantly, hard to modify. I replaced most of it with global variables, shit works so much better. I do use partial classes pretty heavily though - helps LLMs not go batshit insane from context overload whenever they try to read "the entire file". Models sometimes try to institute these clean code practices but it almost always just makes things worse. | ||||||||||||||
| ||||||||||||||