MadLib Writer’s Prompt

Let’s write some Javascript to generate a writer’s prompt from a list of nouns, verbs, adjectives, and adverbs, etc.

First, we’ll add some loading code. This code gets invoked two ways: first, we run it when the window is finished loading, so we get can update the DOM and give the user something to look at. We’ll also add a button to generate a new MadLib on demand.

window.onload = generate_prompt();

This is our workhorse right here, but it’s pretty simple. We have a bunch of arrays and we’re going to pick from them a random element and add it to the string.

function generate_prompt() {
	
     prompt_string = adjective1[random_0_to(adjective1.length)] + " " + 
          media[random_0_to(media.length)] + " " + 
          adjective2[random_0_to(adjective2.length)] + " " + 
          noun[random_0_to(noun.length)] + " " +
          action[random_0_to(action.length)] + " " +
          venue[random_0_to(venue.length)] + " ";
	
	if (random_0_to(10) == 0)
		prompt_string += ", in Latin."
		else  
		prompt_string += "."

	display_prompt(prompt_string);		
	}

Here are some sample arrays to get you going. You can add as many elements as you’d like to the arrays, just make sure they’re all separated by a comma.

var prompt_string = ""

var adjective1 = [
	"A gripping",
	"a frivolous"
]

var media = [
	"novel starring",
	"short story about"
]

var adjective2 = [
	"an anxious",
	"a pretentious"
]
var noun = [
	"duck",
	"bunny"
]

var action = [
	"dancing",
	"flying"
]

var venue = [
	"on the moon",
	"in my imagination"
]

We’re going to need a function to generate those random numbers.

function random_0_to(n) {
	return Math.floor(Math.random() * n);
	}

And lastly, a function to update the DOM.

function display_prompt(s) {
	document.getElementById("prompt").innerHTML = s;
	}

Cool, all done with the .js file.

This is from the HTML file that I use here at www.floatingpoint.pub. It defines the area in the DOM where the prompt gets updated by the display_prompt(s) function and contains a little self-contained javascript to update the prompt when someone clicks the (new) link.

		<p class=prompt><strong>PROMPT:</strong>
		<a id="prompt"></a>
		<a href="javascript:generate_prompt()" style="text-decoration:none !important;">(new)</a>
		</p>

That’s it! Have fun with it and be sure to email me to show off how you’ve used it to do something really cool on your own.

I wrote “Vacuum” from The Onion, November 15, 1988

Under the byline Mike Evans, because we used a lot of fake names back in those days instead of the current “no bylines” policy. The first year of The Onion had a lot more “creative writing” in it. Only the front page story was a “fake news” article. Inside, the stories varied stylistically, and sometimes not even “funny”, but often just plain weird, and occasionally unsettling. Important caveat: I’m 90% certain I wrote this, but my memory of things from thirty years ago isn’t perfect and we used fake names for our bylines, which in retrospect seems to have been a bad idea.

When I’d finished with work that night, I headed home to cook myself dinner, toting the shop’s vacuum cleaner with me. It was an Eureka Deluxe Vibra-beat, model number 842, built low to the ground and saucer shaped with wheels and a metallic extension hose four feet long. The main body of the machine was turquoise. It was a majestic beast, and just what I needed to sweep up my dusty studio.

I walked home briskly, with a spring in my step, tilted just slightly to the left under the weight of my borrowed burden. The sun, just beginning to set, painted the sky ablaze in autumn splendor.

Turning up State Street towards the capitol, I felt a surge of fear, as if all eyes were upon me. I looked around. They were. Everyone had stopped going about their business and had turned to stare at me and my borrowed turquoise Eureka.

I flipped the selector to Dusting/Upholstery and held the extension hose like a weapon, tightly gripped in my hand, held ready to strike. The crowd in front of me moved backwards, keeping just out of my reach.

Behind me I heard, “He won’t do it. Let’s rush him.”

I swung around in time to glare at the heckler. I flipped the selectgor to Curtains/Draperies and engaged the Vibra-beat. He turned pale, spun, and disappeared into the crowd.

“Let’s not anyone try any heroics,” I said loudly to the gathering throng. “I’m gonna pass through, now, so keep your distance and no one gets hurt.” I made sure that everyone close enough saw the Dust Bag Indicator and knew I meant business.

The crowd parted and I made my way up the street, slowly, keeping my eyes on any potential assailants. The crowd was made up of gawkers who shrank away at first sight of my fearsome weapon. No one here actually meant any harm. I was feeling safer and safer.

The crowd opened up on Gorham Street to reveal a lone man — a behemoth — standing in the intersection. Traffic had stopped. The lights changed from red to green to yellow to red, subserviently, recursively, unaware they were no longer being regarded. More important events were afoot here.

The stranger was tall and heavy. Most of his frame was made up of ages of American beer, dorm living and meatball sandwiches. His arms were like tree trunks. His neck was the symptom of some horrible thyroid disease: thick and bulging. It came up from a torso of sickening proportions.

He looked down at me and my Eureka, model number 842, with that horrible visage, slandering my character ina number of different ways and describing the things he’d do with my severed limbs. I could see he’d never eaten a good breakfast in his entire life; it showed in his attitude. He looked like a combination of every person who had ever beaten me up in high school.

This was it. This was the final confrontation.

I checked the settings on my Eureka. I notched the selector up to Rugs/Floors and sent maximum power to the Vibra-beat. I took a deep breath and tightened the fittings on the extension rod. I took a step forward.

“I’m gonna rip your head off, pull out your throat and blow smoke into your lungs, you hippy!” he screamed. Each step he took mauled the street; cracks exploded out from his feet as they bludgeoned the ground beneath him.

I held my ground. Tightly gripping the extension rod with one hand, I waited for him to come a little bit closer.

When he reached the end of my shadow, I threw the Eureka’s switch. I let him have it. The deadly beam of energy hit him full in the chest. He screamed agonizingly and melted horribly into the pavement, clawing at my shadow, reaching for me, still trying to rip my kidneys out through my ears.

I powered down the Eureka. I took a deep breath to settle my adrenaline level to something that resembled normal.

The crowd was beginning to disperse as the sun went down behind me.

I went home and fed the cats.

The Benzobuddies Chronicles

For three and a half years, I wrote updates on my recovery and posted them on the website Benzobuddies.org, mostly in the “Birthdays and Celebrations” sub-forum, but a few times in the “Exercise Support Group”. I was out of my mind a great deal of the time, but there was some beautiful writing that came out of it. It’s reproduced here, lightly edited.

First Post

October 22, 2014

Hello. 

Been reading this forum since I stared tapering off 4mg Klonopin (since 2003/2004, I think) a day in March/April of 2014. Last 1/4th of a 5mg of Diazepam was July 2nd and have been in Withdrawal Syndrome since then. I guess it’s been a almost four months and three weeks now. Over the time, everyone here has given me a great deal of strength and helpful information, so thank you all for that.

Most of the I’m Losing My Marbles Help Me feeling is down to a somewhat manageable level, so I hope I won’t be a huge burden. I suppose I want to help, if I can. I guess I’m one of the types of people who are strongest for themselves when I feel I’m helping someone else.

Thank you for your time.


A Short Story

October 22, 2014

So, I wrote a little bit today a bit of a Halloween story I wanted to write because I thought of how scary what I’ve been though (and still am going through) is and I thought I’d share with my Buddies. Like every good Halloween story it’s a little bit scary and a little bit funny. Hopefully just scary enough to give one goosebumps. Hopefully the funny parts are actually funny. Anyhow, not finished. Also, super first-drafty. While the spelling is as impeccable as modern computer technology can assure, please forgive the errors both in syntax and in judgment.

“A Mouse In The House”

A mouse ran into my apartment, twice.

Early evening, August, dank and rainy. One of those nights that makes people disbelieve global climate change. It should just be miserable. Instead, it’s miserable and wet and cold. 

This gives me the perfect opportunity to splay myself in the beanbag. To read. Perhaps have an apple later. The Honeycrisps are on sale and I have a fridge full of them. Four of them, but they’re very large. And sweet. So sweet. Each bite is a melted liquor mouthful of cotton candy; the kind that comes in the paper foil bag, always slightly stale and firm but almost painfully sugary.

On the radio — except it’s not a radio, it’s digital, delivered over the internet instead of the airwaves, though in one of those ironic twists that spice up daily life, the internet is delivered through radio waves now — through the speakers of my ancient, analog stereo system that once complained of being overdriven to distortion in the neighbor-disturbing amplification of Paradise Theatre or possibly The Rise and Fall of Ziggy Stardust and the Spiders from Mars painstakingly distorted clicks and bleeps tumble out into the room, clip about like ponies in a clover field, then reassemble about the beanbag with smirks on their faces to assure me they mean business and what would I think if they clawed about the labyrinth for a while and upset some grocery carts and possibly put the compost in with the recycling. How would I feel about that?

Continue reading “The Benzobuddies Chronicles”

The Politics of Tom Clancy’s: The Division 2

The author as a rough man; sleep well, sweet dreams. White House for scale.

© 2019 Jonnie Wilder

“People sleep peacefully in their beds at night only because rough men stand ready to do violence on their behalf” — Richard Grenier paraphrasing George Orwell

In the fictional near-future, I’m standing overwatch on the wall of the Haunted House Control Point near the present-day Octagon Museum, about two blocks from the White House, watching a group of men burn to death in a fire I set with a portable flame-thrower turret. It’s a beautiful sight. 

Some of them drop their weapons and I walk in to take them for myself as the fire dies out, then I roll behind a jersey barrier and fire off a few rounds of suppressive fire toward a heavily-armored man weilding a chainsaw. He’s barely phased by the bullets that pancake on his ballistic armor and he revs the chainsaw menacingly as he runs at me.

I’m rebuilding society in the shadow of a biological terror attack, making America great again. I’m playing Tom Clancy’s The Division 2, a video game about killing people who kill people and take their stuff, and then taking their stuff so you can kill even more-well-armed people and take their stuff too. I kill people to show that killing people is wrong.

Much has been written about the ham-handed politics of violent video games and simultaneously, the timidity of game publishers to take what might be seen as political stances in their video games

Continue reading “The Politics of Tom Clancy’s: The Division 2”