this post was submitted on 01 Mar 2024
18 points (95.0% liked)

Programming

17279 readers
425 users here now

Welcome to the main community in programming.dev! Feel free to post anything relating to programming here!

Cross posting is strongly encouraged in the instance. If you feel your post or another person's post makes sense in another community cross post into it.

Hope you enjoy the instance!

Rules

Rules

  • Follow the programming.dev instance rules
  • Keep content related to programming in some way
  • If you're posting long videos try to add in some form of tldr for those who don't want to watch videos

Wormhole

Follow the wormhole through a path of communities [email protected]



founded 1 year ago
MODERATORS
you are viewing a single comment's thread
view the rest of the comments
[–] [email protected] 4 points 8 months ago (2 children)

Let's say you currently have an overloaded "god method" that is used for twenty different things. The proper thing to do would be to create twenty different interfaces that each do one specific thing and then call the syscall behind the scenes. That allows you to update and modernize your apps, allows for better testing of specific use cases, etc.

The original exposed syscall is deprecated and then eventually you force all the reliant code to adopt the proper new interface. The original overloaded code is still there, but locked up in a black box where no one has to worry about it.

[–] [email protected] 4 points 8 months ago

Yeah, but people don't like change, and I'd expect low level engineers to like it even less.

And looking at Linux, that shit still supports ancient hardware, being able to actually get rid of old code (that now has to be maintained alongside the new code) is gonna be a PITA.

[–] [email protected] 2 points 7 months ago (1 children)

And then those methods grow and grow, or stop making sense, or start meaning something else, and you would have to go through the same abstract-deprecate-remove again. Rinse and repeat and if you do this regularly enough you have web development where you get your feet swept from under you every couple of years.

It's a bit of a pick your poison situation, for me the backwards compatibility path is the right call here though.

[–] [email protected] 2 points 7 months ago

I know where you're coming from here. All I can say is there is something else wrong in this case and this is how it's being expressed. I've seen it several times myself and sometimes no amount of good coding can fix bad architecture.

But I will say that if the twenty use cases all grow to the point of needing their own abstraction, I think you'd be damn glad there was at least a point of separation instead of having to maintain all possible permutations in a single method signature.