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
-
Crost40743ySome of that makes sense. If you don't need to use the template method pattern ie mostly the same behaviour but some steps not known ahead of time, interface makes more sense.
Some don't make sense. -
@Hazarth well, you're right.
it's just.. so many times I was thinking "we wouldn't need to do so much bullshit if we have just a function". But then, we would have toons of "we wouldnt need to do so much bs if we have just a class". neither OOP nor FP is perfect. so, yeah, it's just my team. -
@craig939393 unfortunately I can't show the code. but the thing was, that the abstract had a partial implementation, and one abstract method, for child classes to implement some object creation, which is, afaik called "factory method" pattern. the boyz didn't like it, and asked me to move the common part of code into a static method and switch to interface...
-
Crost40743y@ShmarKusKus yeah they're very similar patterns, only the intent differs - actual code could be practically the same.
Static method xD I guess they don't write tests then. -
Crost40743y@ShmarKusKus they write tests and can't figure out why you would want an abstraction for a factory... Smh
Good luck -
Crost40743yDon't let them kill your quality. Argue the points, but at the end of the day until you're in charge there's only so much you can do.
I was where you are for a few years. I have progressed to architect because I kept trying anyway and just changed jobs with a nice GitHub full of well designed side projects.
If you aren't doing your best (their best instead) then you aren't improving. -
Crost40743yI recommend clean architecture, head first design patterns and Eric Evans DDD.
Can't really go wrong with those. If what they say contradicts your boss, your boss is probably wrong. But at least now you know because it isn't you Vs them, it's the top highly respected industry leaders Vs them. -
h3rp1d3v5193yI would avoid using any inheritance in a team. If you open the door to inheritance, people will just pull all kinds of stupid shit.
-
"Head first: design patterns" is the best brain friendly book to get them (all the OOP good practices are understood there as bonus thorough the book)
Related Rants
I'm so fucking tired of OOP.
This bullshit never ends. Everyone treats OOP in their own, proper (of course) way. You read tons of those fashion books, like uncle bob and shit. and then comes a dumb asshole that starts reviewing your code, and tells you doing it wrong. FUCK. and you can't tell anything to your TL or PM cuz they are same dumb asholes. Because after you fix all the bullshit from the first asshole, those more responsible assholes come and tell you that you still doing it wrong.
- uh.. bruh, why don't you make interface for everything? that' S.O.L.I.D, you know.. it just right thing.
- bruh, why don't you use enum and switch case. we need a factory.
- bruh, we don't use abstract classes, use interface
- could you rewrite your linq/stream thing into a class and a method. it's just simpler for us. foreach loop is something everyone knows.
well,then go and LEARN the tool you're dealing with, coderfucker.
FUUUUCK.
devrant
oop