So why the long backstory? Well, before remaking the plugin myself, I tried to see if maybe someone had made a better one. I’d of liked to see because there’s no use reinventing the wheel, even if you were one of the first ones to make it. Searching yielded one result above others: ScriptCraft. I’m not here to demean the quality of the product that was made here, as it’s definitely good. But in my eyes, it’s something that is not quite…kosher. An example is the modules folder in ScriptCraft. Where some are described as proper modules directories like NodeJS, others are just individual files. So while some may be comfortable with that, I’m not. My OCD leads me to organize in a much more definite pattern. And while this is one example, I see it way too commonly in projects like this.
console object within JS. It doesn’t exist in Nashorn, so you have to create a custom StreamWriter to write to the default output stream then tie those functions to a global console object, but ScriptCraft is the only one I’ve seen do this. Module loading also is not built into Nashorn. Both my require library and ScriptCraft’s follow CommonJS’s standards, but no other libraries I’ve found do the same. People simply create the engine to run the code on, but not the environment, and it doesn’t seem to be stopping anytime soon. The only way I see to curb this is for developers learn more about the goal they’re trying to achieve. Coding isn’t just about writing the code. It’s about planning it out, making use of each and every function to finish the product.
So there goes my rant for today. Maybe it was too long, maybe it was too short, but it for sure let off some steam.
console.log('Until next time,'); console.log('Justin Cox'); let nextPost = await writer.getPost();