DEV Community

Discussion on: Revisit old materials with new perspectives

Collapse
 
tanepiper profile image
Tane Piper

Through my work I attended a TDD and agile course, from that I ended up choosing an old library I released for node that had some issues on Github.

It's the node bitly library and from that I ended up refactoring it from spaghetti code into clear async/await JavaScript with clear error handing. On top of that I built a nice CI/CD pipeline with testing for 3 node versions (and this blog post details how I achieved it).

I intend to revisit it again soon as I want to release the source as TypeScript, the pipeline already uses the TypeScript compiler but the code is not, it just provides an easy way to output async/await code back to ES5 support.

From this open source code, I of course improve my work code too so it really benefits to go back and refactor old code.