I don't think anyone was suggesting adhering to "arbitrary" patterns. I think the implication was that an appropriate pattern could be used to solve a particular problem at hand. Do you think Inny's suggestion to use ECS would kill creativity or damage productivity? If used properly, I think it would do just the opposite.raidho36 wrote:Adhering to some arbitrary programming patterns just kills creativity and damages productivity.
Who ever says that? What does that even mean? If your code follows (for example) an OOP paradigm, nobody is going to tell you you're breaking some other paradigm, because it's clear that your code was never intended to be written in that style. In a multi-paradigm language, I really have trouble imagining who would even care. Use whatever paradigm best fits your design, nobody's going to complain. The only time I can ever imagine "some jackass" telling you this is if you're committing code to a project that explicitly follows a particular paradigm by convention and you're going in some completely different direction with your contribution (and if that happens, they're right to tell you that).some jackass says this breaks a paradigm
Who ever said the point of "elegant code" was to "redeem a situation" where the end user experiences poor performance? It's about avoiding maintenance nightmares, not about performance / user experience (and, of course, these things are not mutually exclusive). Of course the end user doesn't care, but you and the rest of your team should care, unless you're just writing tiny things you throw away after the latest LD.End user would be the last person on the planet to care about proper use of patterns, but you can bet your ass he'd be the first to care if it runs poorly, and no amount of "code elegance" will redeem the situation.
So you've never commented a line of code, or named a variable in a descriptive and meaningful way, or written a commit message? If you have, I suspect you care about more than you say. If you haven't, be ready when the guy who inherits your code comes for your head.When I code, I just concentrate on getting it to work properly, and then on getting it to work faster. That's all the end user would care for, and so it's all what I care for.
And in your mind, what constitutes over-engineering? Does employing a design pattern to solve a problem constitute over-engineering? Does sticking to one paradigm in a particular section of code for the sake of uniformity and "least surprise" constitute over-engineering? Or were you referring to something else?Keep in mind that overengineering is a bad thing. In physical hardware it just leads to expensive items with poor reliability outside of test conditions that are so complicated it's impossible to fix them. In programming it has similar effect.
But you do realize, it's pretty widely accepted that properly written code should achieve a high level of reuse, right? If you don't understand the relationship between "properly written code" and code reuse, maybe it would make sense to inform yourself rather than stating that "you don't know why anyone would suggest that." Being informed, at least you'll know why anyone would suggest that, even in the unlikely case that you disagree for some reason.Also, I don't know why would anyone suggest that "properly written" code is reusable, as opposed to other code like it isn't.
It is an example of one kind of code reuse. There are many more kinds, and from what I've seen, people who are educated about them generally don't make statements vaguely implying that reuse is not an important factor in "properly written" code.Just a reminder, using libraries = code reuse. Do you care what's in the library? Pretty sure not. Chances are you never looked into sources.
I don't know if that was a troll post or what, but if it wasn't, I'd seriously consider some further reflection on your strange notions about software design.