cm0002@suppo.fi to Programmer Humor@programming.dev · 11 hours agoSenior devs...suppo.fiimagemessage-square61fedilinkarrow-up1538arrow-down118
arrow-up1520arrow-down1imageSenior devs...suppo.ficm0002@suppo.fi to Programmer Humor@programming.dev · 11 hours agomessage-square61fedilink
minus-squarethedeadwalking4242@lemmy.worldlinkfedilinkarrow-up46·7 hours agoJunior devs not abstracting anything and now the app is unmaintainable
minus-squareTamo240@programming.devlinkfedilinkarrow-up14·5 hours agoExactly, have fun trying to get test coverage without dependency injection
minus-squarejjjalljs@ttrpg.networklinkfedilinkarrow-up7·4 hours ago with patch("some_file.requests.get", side_effect=SomeException("oh no")): result = func_using_requests() Though not every language makes mocking as easy, and multiple responsibilities in a single function can quickly get messy.
minus-squareTamo240@programming.devlinkfedilinkarrow-up4·2 hours agoOh I’m fully aware that python lets you cheat dependency injection with patch, its one of the many things python teaches developers to do wrong, which leads them to be unable to use any other language.
minus-squarepalordrolap@fedia.iolinkfedilinkarrow-up8arrow-down1·6 hours agoIs it any more maintainable with four levels of abstraction?
minus-squarered_tomato@lemmy.worldlinkfedilinkarrow-up4·4 hours ago2 layers of abstraction is the gold standard
Junior devs not abstracting anything and now the app is unmaintainable
Exactly, have fun trying to get test coverage without dependency injection
with patch("some_file.requests.get", side_effect=SomeException("oh no")): result = func_using_requests()Though not every language makes mocking as easy, and multiple responsibilities in a single function can quickly get messy.
Oh I’m fully aware that python lets you cheat dependency injection with patch, its one of the many things python teaches developers to do wrong, which leads them to be unable to use any other language.
Is it any more maintainable with four levels of abstraction?
There’s a middle ground
2 layers of abstraction is the gold standard
Depends on the abstractions