Ranter
Join devRant
Do all the things like
++ or -- rants, post your own rants, comment on others' rants and build your customized dev avatar
Sign Up
Pipeless API
From the creators of devRant, Pipeless lets you power real-time personalized recommendations and activity feeds using a simple API
Learn More
Comments
-
hitko31483yUsing the same pattern everywhere ensures every developer knows where to look for something and how to add/remove/change features.
What you're talking about can be quite precarious: I might believe that converting between RGB and HSL could be done with a simple utility function since it's just a formula with one input and one output, but someone who worked with different colour spaces a lot would argue we should use a class to provide the service, so we can easily swap sRGB for ROMM RGB through the entire app if needed.
If we sit around and discuss it, we'll waste more time than either implementation would take, and if we don't discuss it, we might each implement it our way. Neither of these options is good, so it's better for the codebase and developer efficiency to stick with a set of fixed architecture rules even if it initially takes more time to do it. -
Theory vs Practice.
You can turn any project into a nightmare when you overthink problems and overengineer.
If you just do what's necessary this shouldn't be a problem.
What @hitko said - if you discuss things, gather perspective and then decide in a team, you find the best solution. -
All for keeping it simple but most of the time people are under pressure and either can’t go back and refactor or don’t realise it’s time to.
Small simple or short lifespan stuff has a tendency to grow.
So I prefer using the patterns like dependency injection from the start.
That and it makes doing TDD easier. -
I see a lot of comments about how common patterns make sense, and they do.
But this isnt that case, see https://devrant.com/rants/4497101/...
Related Rants
That this one component being object orientated is necessary and good design.
We have uh interfaces, theyre contracts.
Spoiler: it wasn't, I could have written it in half the code and half the time. But no, we gotta have those patterns, can't miss on dependency injection!
rant
wk274