Home For Fiction – Blog

for thinking people

There are no ads, nor any corporate masters
How to show support


December 6, 2021

A JavaScript Demotivational Quote Generator

Programming

creativity, javascript, programming, quote generator

2 comments

There’s a lot to like on the internet, and a lot to hate. To be fair, this is more of a pet peeve of mine (there are far more annoying and dangerous things out there), but I hate it still. I’m talking about those inspiring quotes, complete with images of butterflies and dramatic skies and believe-in-yourself-you-can-do-its. That’s why I thought to make this little JavaScript Demotivational Quote Generator.

I guess the reason I hate such designs is because they summarize some of the things I truly loathe, such as hypocrisy and the scourge that is simple answers to complex questions. Everything today, every experience and every instance of thought seems to be condensable into a neatly packaged, context-free sentence. It’s truly disgusting, and I mean that the same way Slavoj Žižek expertly expressed:

Click to display the embedded YouTube video

facade placeholder

And so, I decided to do something about it. It seems any idiot can pair together some fancy words and some nice images, so why not this one. The whole thing is a bit like making up a horoscope, truly. So, with these in mind, let me show you what I made.

JavaScript Demotivational Quote Generator
No JavaScript Demotivational Quote Generator is complete without cats!

Making a JavaScript Demotivational Quote Generator

Quite often, humor and irony are a result of incongruous juxtaposition. Therefore, I knew I needed to pair together semi-random things.

The code combines famous quotations to create a new “quote”, then pairs it with a photo retrieved from Pixabay, using the Pixabay API, and based on keywords from the quote. To combine the quotations, the program implements the RiTa library – you might remember it from some other projects of mine – generating new text via Markov chains.

The process is randomized, which makes it quite crazy in terms of what kind of image (and quote!) might pop up. If for whatever reason it fails to find a match, it defaults to cats (see example photo) – because we all need more cats in our lives.

Here’s another example, showcasing what kind of wise-ass quotes the program generates:

JavaScript Demotivational Quote Generator
Pretty deep!

Where to Find

You can try the program following this link. For a full list of my available programs, see the relevant page on the main site.

Like all my apps, this too is free and ad-free. Please consider dedicating a few minutes of your time to read about the ways you could support my work and why this is important for both of us. Thanks!

2 Comments

  1. Jolene Jolene

    I just stumbled upon your blog via a sarcastic Google search regarding hypocrisy. I scrolled through a couple posts and poked around a bit. Intrigued, I bookmarked your page; however, opted not to receive email notifications. This is always my ‘go-to’ non-committal strategy. Seconds later, I was reading, not skimming, more posts. Astonishing, I entered my email for future content notifications, Then, I take time to write this rather lengthy comment, and now I’m considering supporting your page as a patron. Refreshing and excellent writing!

    1. Chris🚩 Chris

      I humbly thank you, and I’m really glad to hear you’ve found the content useful! 🙂


Punning Walrus shrugging

Comments are closed for posts older than 90 days