News for hackers. Stuff that matters.
Re:The Wrong Abstraction (2016) by Gibbon1 on Friday July 20, 2018 @09:43PM (#17580284)
> They see a handful of functions that are duplicated across a few (unrelated) projects and they want to create a new repo/library and share it

He is what I think you do when you do that.

You just created yet another internal API. Designing, creating and _documenting_ good API's is _hard_. The most likely result is an undocumented dodgy half finished API that doesn't fully encapsulate the thing it's supposed to deal with. So you end up with code that both uses and bypasses the API you just wrote.

If you do that and later decide that you want to move some functionality from one side of the API to the other you've just set yourself up for a hella lot of work.

The other thing is, you want to make changes to duplicated code. You can limit the risk to code base you're actually working on and not a bunch of unrelated programs.

There are no comments on this comment yet.