Home For Fiction – Blog

for thinking people

New post every MondayHow not to miss one

javascript

An Iambic Pentameter Checker in JavaScript

January 15, 2024

My iambic pentameter generator has been one of the most popular posts of the blog. To be honest, I’m not sure if that’s still the case or not. Since I completely revamped the blog (actually even earlier), I removed Google and Jetpack analytics. In any case, today we’ll be looking at, essentially, the reverse scenario: We’re making a very simple iambic pentameter checker.

Just in case you need a reminder, an iambic pentameter line consists of ten syllables, of which every other is stressed. For instance, “And you, my sinews, grow not instant old” (from Hamlet).

So, how can we create a JavaScript iambic pentameter checker that tells us if a line is an iambic pentameter or not?

iambic pentameter checker, AI render of Shakespeare using a computer
I couldn’t resist using AI to generate this image of Shakespeare using a laptop. Like all tools, AI tools can be fun and useful, if one understands their limitations…
(more…)

Let’s Make a JavaScript App with ChatGPT

April 3, 2023

You might remember a recent post on asking ChatGPT about the Gothic. I there mentioned how ChatGPT is a tool and, like every tool, its successful use depends on the user and scope. I also mentioned how, in my opinion, the most intriguing application of ChatGPT is as a programming helper. Well, that’s what I decided to try in this post: Let’s make a JavaScript app with ChatGPT!

Obviously, starting this mini project I had to establish certain methodological factors. That is, I had to decide on how to do certain things.

The main one was what the app would be about. For simplicity’s sake – both in terms of the confines of the post and the amount of effort I was willing to put in programmatically – I decided that the JavaScript app ChatGPT would make had to be a simple one. No need to create any full-fledged adventure game here.

I also had to decide whether I would only get help for this JavaScript app from ChatGPT, e.g. for certain functions, or I’d ask it to generate the code in its entirety. I quickly realized that, even if I’d have to do at least some of the mixing-and-matching, for the purposes of this experiment I should let ChatGPT to do most of the work.

As for what program to make, I thought the best idea would be to make something I’ve already made myself, for comparison. I opted for my Poem Shuffler. The results were very intriguing, to say the least!

JavaScript App ChatGPT
The image superimposed on the stock programming image represents a ZX Spectrum +2 – my very first computer. Younger audiences may not understand this is a computer, because of the tape recorder – hang on; do younger audiences know what that is? – which was used to read/write data. We’ve come a long, long way since 48k games.
(more…)

Conceptualizer: a Free Story Planning Program

January 23, 2023

There are fiction authors who need to plan every, single, detail in advance – they’re called “plotters”. Then there are writers who write by their seat of their pants – hence they’re called “pantsers”. In reality, most authors fall somewhere in-between. The truth is, we all need some degree of planning for most works (except perhaps stream-of-consciousness or heavily experimental). And so, we could all benefit from a story planning program.

As with everything I make – programs, books, or blog posts – the intended audience of Conceptualizer, my free story planning program, was first and foremost myself. That is, I started to make a story planner because I felt I could benefit from one. I’m certainly not a plotter (though not a pantser either), but I like to keep some sort of notes regarding what will happen when.

And so, perhaps ironically, this sort of selfishness can be very useful to you, too! Let’s take a look at Conceptualizer, what it does and how it works, and at the end of this post I’ll include a link for you so that you can try it for free.

story planning program
Here’s the Display Mode of this story planning program I made – showing the demo story it “ships” with, which is none other than The Perfect Gray. The idea is to have a structured flow that shows how one piece of the story leads to checkpoints that come together to form the bigger picture.
(more…)