Home For Fiction – Blog

for thinking people

Patreon LogoPatreon

computer

Making a Rhyming JavaScript Shakespearean Sonnet Mixer

January 13, 2020

My JavaScript iambic pentameter generator is among the most popular programming posts on Home for Fiction. It’s a really “alpha” piece of code which I haven’t worked on since I made that first version. But here’s a little something to compensate: let’s make a rhyming JavaScript Shakespearean sonnet mixer!

Unlike the iambic pentameter generator, this JavaScript Shakespearean sonnet mixer returns much more coherent results. After all, the code doesn’t need to generate any random text. It simply shuffles the Bard’s own production.

For a relevant project, also take a look at my poem shuffler.

To keep things simple, I decided to have it generate only two rhyming lines. The more the lines, the slower it would get – and the more likely it would not find any rhyming pairs.

JavaScript Shakespearean sonnet
To code or not to code?
(more…)

How to Make a Random Quote Generator

June 5, 2019

Although today’s topic doesn’t have to do with literature, society, the Gothic, or writings tips, in some abstract way, it does. Although this post is a technical step-by-step guide on how to make a JavaScript random quote generator, it’s also yet another reminder that creativity (like knowledge) is a holistic process.

In other words, there aren’t “areas” of creativity, neatly isolated from one another. There isn’t a creativity related to fiction writing, another related to academic writing, and yet another related to developing Android apps. There is only one form of creativity, and the more efficiently you can combine its different facets, the better.

make a random quote generator
To “outsiders” code appears as something akin to witchcraft. Things are stunningly simpler once you get past the surface

Chances are, if you found this post you care more about the JavaScript code, so I won’t tire you with theorizing – if you’re interested in philosophy, feel free to take a look at the many posts dealing with philosophical musings.

Having said that, this post still wants to make a more theoretical point, namely that what appears difficult and incomprehensible (like coding) can be very simple. Therefore, I will be a bit… verbose in my explanations, trying to help beginners keep up.

So, let’s get to the details of how to make a random quote generator written in JavaScript.

(more…)

Character Nods: a Development Tool for Fiction Writers

April 18, 2019

Please note that none of my Android apps is any longer maintained – and they’re not even available on Google Play anymore – for reasons you can read about here. If you still have any of the Home for Fiction Android apps installed on your phone, you’re advised to uninstall them. The post below should be seen purely as a snapshot of history.

My plot development tool, Narrative Nods is by far the most downloaded of my apps on Google Play. A lot of people have told me it’s helped them a lot. And so, I made another similar app, Character Nods, which is based on character narrative theory.

character nods
Character Nods analyzes a great number of variables to detect psychological patterns, that can help you design realistic, engaging characters.

How Character Nods Helps You Design Better Novels

If you haven’t read my article on fiction character types, I really suggest that you do. It gives a lot of information of various character types you can implement in your plot.

However, the focus of Character Nods is on your protagonist and your antagonist. They are by far the most important characters of your book. As a result, it’s them you should make sure to develop properly. The reason? The interaction between protagonist and antagonist is what creates the narrative tension of your story.

If you recall my article on narrative antagonists, this tension is an absolutely critical aspect of story-telling.

(more…)