Until not so long ago, every new project of mine always started with a copy/paste of some utils.js file I made in the past.
I'm sure I'm not the only one, and I'm sure most of you are lazy enough (like I was) to keep doing that instead of what you should do: putting that code in a standalone library.
First of all, code evolves during time
Sometimes I needed to update that code I just copied to take care of a new edge case, and at the end I found myself having multiple versions of the same functions.
And this without even considering bug fixes...
Second, this made me a better developer
Knowing that those functions could eventually evolve in the future inside other projects, I never took the time to rewrite them in typescript or write for them a good documentation.
Third, I learned something new during the process
This was my first Npm Package. I learned something new doing it. Isn't this always a win?
So better code, new skills, and why not a new line to put on the cv.
I'm almost proud of the documentation I've put together for my code, so I'm sharing it with you guys:
Npm: https://www.npmjs.com/package/js-math-and-ui-utils
GitHub: https://github.com/AlessandroCipolletti/my-js-math-and-ui-utils
PS: I'm not putting here any tutorial link. I bet you all know how to use google.
Top comments (0)