The company I work for uses SVN, with full control over backups on other servers and strict access restrictions. Consequently, my interaction with Git, and GitHub specifically, has been primarily as a user or consumer. Over the years, I have created many things that could be packaged as plugins in various languages. However, especially for JavaScript, which I know best, there was always a language barrier and a reluctance on my part to write documentation as typically proposed (I only write docs and comments when something isn't obvious from the code). So, now with the help of AI, I had a few days where I could steal some hours from work, a ready-made plugin, and I thought I'd give it a shot.
The code was ready and functional, but I wanted to rewrite it as a JavaScript class. I used four AI models for this: ChatGPT-4, DeepSeek, Qwen Code, and Kimi. ChatGPT was often the worst, but it was the best on rare occasions. The other three each had their own strengths, which I can now recognize, allowing me to direct the appropriate question to the right model (though, of course, that could change with the next version).
They were very helpful, especially in adding JSDoc comments and creating GitHub files like README.md. Their initial content wasn't great, but I corrected it while keeping their formatting. When the time came to create a TypeScript version, they were all terrible. I had never written TypeScript in my life, but I understood what it was and how it worked from reading some articles back when it was a hype. I knew more than the AIs did and had to point out every single issue.
They weren't much better at transforming my JavaScript "function" class object into an actual ES2022 class. The errors were sometimes hilarious, but they still helped me write the code 30% to 50% faster, as I only had to fix the parts they couldn't understand or review and point out the logical errors.
The real gain is that I previously knew nothing about all those specific GitHub files (like .gitignore, .gitattributes, etc.). I had probably seen them as a consumer but never paid any attention. Now I know what they are. I also now know how to write TypeScript, as most of the rewriting in that area was done by me because the bots couldn't grasp the newer versions of the language.
Well, without further ado, here is the link, and I await your comments:
https://github.com/ej-kon/DoubleRange