Javascript made easy with ChatGPT

This blog post has been long overdue, and I’m excited to finally share my experiences since discovering the amazing capabilities of WordPress’s network feature, allowing me to set up multiple blogs. I’ve been on a quest to bring all my scattered online presence together onto my personal blog, for now up to 2015. However, this post is not about that blog, but rather about my exploration of the indie web and how I’ve been utilizing ChatGPT to achieve some fantastic results.

First and foremost, the indie web that I longed for exists out there, and it’s been a delightful journey to explore it and make it my online home. I’m working diligently to build my online playground, which is still under construction, and I intend to keep it separate from this blog.

One of the things I’ve been enjoying has been using ChatGPT to generate PHP and JS scripts that perfectly suit my content needs. For instance, I’ve been able to leverage my book list in JSON format, hosted on GitHub, and turn it into a powerful API. This allows me to organize and collect my book data exactly the way I want. I still need to add data from 2020 and older (it was around 2014 when I began reading more). So it will take a while to consolidate all reviews and data into one place. But I’m getting there.

Here’s an example of the script I’ve been using:

I admit, my JavaScript skills are limited (around 0.1% proficiency), but with the help of ChatGPT, I’ve overcome my frustrations and made the seemingly impossible possible. No longer do I need to worry about searching for databases, as ChatGPT has enabled me to create the form to generate a JSON object for each new book I read.

The experience has been incredibly fun, and I find myself enjoying, almost, every moment with ChatGPT’s assistance, especially in dealing with plain JavaScript. While I have to be specific about wanting vanilla JS, it gets the job done effectively.

Recently, I’ve even explored building my own WordPress plugins, but I realized it might be redundant since I can use JavaScript within an HTML block. Nevertheless, I’m considering doing it later for more automation and improved browser accessibility.

Here’s an idea that has crossed my mind: a plugin to read and write the JSON file for my books, with an included form to append data to the JSON and fields to save the API token. It could be a handy addition to my toolkit, though I should probably focus on finishing my Java projects first!

In conclusion, the journey to streamline my online presence and delve into the indie web has been exhilarating, thanks in no small part to ChatGPT’s invaluable support. I’m eager to explore more possibilities and continue to make my mark in the online world, step by step.

Leave a Reply

Your email address will not be published. Required fields are marked *