Let's say my language's standard library does not include
TrickyFunction(). Since implementation seems quite trivial for me, I decide to create
utils in the project and add such function, for others to use.
Next month another programmer requires
TrickyFunction. He doesn't expect it to exist, so instead he downloads and installs a library.
Year later, I require this function once again. However, I forget about the utils I've created and I instinctively google it. Unfortunately, positioning in google has changed and now another library is on top spot, introducing
FunctionTricky which I install without a doubt.
Is there any way to signal to future self and other programmers: "In this project, we handle this problem with such solution"?
Things to consider:
- This issue can overlooked even during a code review, if I forget that I've added this function a year ago.
- Functions can be named differently in alternative libraries
- Utils folder can grow large, especially when working with new frameworks, where extra libraries does not exist yet.