A few years ago I had the idea of creating a Twitterbot that could make recommendations. If someone were to tweet “Recommend a movie” it could randomly reply with a classic movie. This idea was interesting, but wasn’t very funny. I eventually decided that a better idea would be to reply to any “Recommend me music” tweets with incredibly old big band leaders (Glenn Miller and Benny Goodman) and jazz crooners (Bing Crosby and Frank Sinatra). In July of 2015, I made FogeyBot:

I eventually expanded the oldies that it would recommend, but tried to limit it to pre-1970’s music:

"oldmusic":["Glenn Miller","Benny Goodman","Mitch Miller","Lawrence Welk","Perry Como","Henry Mancini","Pat Boone","Duke Ellington","Cab Calloway","Count Basie","Louis Armstrong","Dean Martin","Bobby Darin","Billie Holiday","Ella Fitzgerald","Robert Goulet","Nat King Cole","Andy Williams","Mel Tormé","Frank Sinatra","Liza Minnelli","Tony Bennett","Bing Crosby","Johnny Mathis","Tom Jones","Jimmie Rodgers","Roy Rogers","Merle Travis","Merle Haggard","Hank Snow","Gene Autry","The Carter Family","Hank Williams","Flatt & Scruggs","Bill Monroe","Ralph Stanley","Buck Owens","Bob Wills and His Texas Playboys","Conway Twitty","Chet Atkins","Roger Miller","Elvis Presley","Doris Day","The Everly Brothers","The Weavers","Pete Seeger","Fats Domino","Neil Diamond","Ricky Nelson","Paul Anka","Dionne Warwick","Brenda Lee","Kenny Rogers","Sam Cooke","Jackie Wilson","Chubby Checker","Roy Orbison","Neil Sedaka","Herb Alpert & The Tijuana Brass","Tommy James & The Shondells","Wilson Pickett","Chuck Berry","The Righteous Brothers","Marty Robbins","Petula Clark","Jan & Dean","The Sons of the Pioneers","Cliff Edwards","Hoagy Carmichael","Les Paul & Mary Ford","Sister Rosetta Tharpe","Ernest Tubb","Miles Davis","John Lee Hooker","Lionel Hampton","Peggy Lee","Buddy Holly","Dinah Shore","Muddy Waters","T-Bone Walker","Woody Guthrie","Rose Murphy","Raymond Scott","Fred Astaire","The Dave Brubeck Quartet","Tennessee Ernie Ford","The Kingston Trio","Jim Reeves","Frankie Avalon","Screamin' Jay Hawkins","Nina Simone","George Jones","Little Richard","Harry Belafonte","Wanda Jackson","The Coasters","Jerry Lee Lewis","B.B. King","Howlin' Wolf","Bo Diddley","Ray Charles","Bill Haley and His Comets","Johnny Cash"]

I originally coded the bot to run on an hourly basis. Eventually enough people complained and the bot was in “Twitter jail” for sending spam. I rewrote the bot so that it replied to tweets directed at it. Send a tweet such as “@fogeybot what music do you like?” Or “@fogeybot what should I listen to?” You will get a random reply such as:

  • Nothin’ beats John Lee Hooker… except maybe Howlin’ Wolf
  • Hows about Tony Bennett?
  • There’s this hot new act called Henry Mancini
  • Wanna borrow my Dean Martin 8-track?

Next, I added some old fogey ramblings. This was a lot of fun to write. Create a huge list of “good” old things, a huge list of “bad” new things, list of synonyms for “kids”, list of synonyms for “trash”, list of positive adjectives and another list of negative adjectives. Once a week, fogeybot will tweet out a random rant:

  • Back when I was a youngen, there was no filthy Myspace Top 8 and I turned out fine
  • Parents these days should give their youngens Upton Sinclair’s ‘The Jungle’ not annoying Apple dongle
  • Girl Ghostbusters?!! Pedestrian diddly!!!!!!!1
  • Does anyone else remember back when the Lindbergh Baby used to be good?
  • Is it just me or is terrible Selfie Stick literally the worst thing ever?
  • Comparing Tsar Nicholas the 2nd to irresponsible Facebook account for your cat is like comparing apples to dirt-impropriety!
  • Wish I was born before all this senseless emoticon foolishness balderdash
  • When I was a pubescent with big bands vs moppets nowadays with their hideous Gangnam Style shenanigans

At one point I figured out how to use the giphy.com API to automatically search for a random phrase and generate a tweet with GIF that matched that search. IIRC, the search phrases included 1950s, 1940s, jazz, big band, and silent movie. It worked pretty well, until GIPHY changed their API.

I eventually re-added the ability for fogeybot to search all of Twitter and reply to strangers that tweet “recommend me music.” There have been some really amusing conversations between FogeyBot and people that don’t realize that they are talking to a bot.


This afternoon I was working on a Markov chain project that would build n-grams from movie and tv show synopses and then generate “crossover” texts that combine the movies/tv shows. Most of the summary texts came from IMDb and I would simply have to remove the names of actors from within the texts. For example…

Nick Fury issues a state of emergency, telling his top agents Phil Coulson (Clark Gregg), Natasha Romanoff (Scarlett Johansson), and Maria Hill (Cobie Smulders), that they are completely out of options.

Removing these actor name is the first bit of regex: /\(.*?\)/

Include the white space before the first parenthesis like this: /\s\(.*?\)/

To build the Markov chain, I followed this Coding Train tutorial video. Here is an example of some output using summary texts of Star Wars, MCU films, Harry Potter, Frozen, Shrek, and Batman.

Luke returns to Queens to await another visions, and he is saved from Vader’s gunfire and doesn’t like hats because Snape killed him” (referring to a kiss she gave him in return Strange studies under the influence the next movie. Luke and the Tesseract, an energy source of a Jedi. Later, Obi-Wan explains that Gotham with her own life at stake, Anna rushes in front of them, grieving as Ginny comforts him with his best friends and Asgard’s forces. Spending time with Yoda. They fight guards on the night in the Darkhold also comes to Elsa’s curse. Anna, however, is captured for the Yellowjacket suit and unlock some advanced technology by using Vibranium comes from 1940. Escaping its collapse. Dried lava and brimstone are everywhere. In a stunning everyone into the minds of every person in the library guarded by a dozen inmates focus their parents and they concoct a plan to eliminate the agency’s enemies broken out of Arkham. He even gives Batman throws the bomb was molded from. Fox explains to Han that R2 is carrying the throne of Asgard, Odin, and with the halves of a broken, sharp pool stick and no choice but to run away, so he tracks down through a window. Donkey tells Shrek that Fiona doesn’t realise what’s been happening in his name. Tony is doing a display of his weapons manufacturing company, Stark Industries.

The text is fun and rambling, but it might be easier to read if it were separated into paragraphs. To do this, simply split the text into an array with the separator “. “ and then form paragraphs of 2-4 sentences. Right? There is an immediate problem. The code thinks that “Dr. “ is a complete sentence. Anagrams such as S.H.I.E.L.D. sometimes have similar issues.

Google searches turn up long lines of regex that seem to always fail when I test them at regex101.com. After a bit of trial and error, I end up using the following regex:

var myarray = result.match(/(((Mr|Ms|Mrs|Dr|Capt|Col)\.\s+[A-Z])|["’“A-Z]).*?((Mr|Ms|Mrs|Dr|Capt|Col)\.\s+[A-Z].*?)?[.?!]+["’”]?(\s(?=[A-Z"])|$)/g);

A sentence starts with either a title (Mr, Ms, Mrs, Dr, Capt, Col), a quotation mark, or a capital letter. A sentence might contain a title. A sentence ends with punctuation (period, question mark, or exclamation mark), possibly followed by a quotation mark, followed by a space, and then either a capital letter, quotation mark, or the end of the string. I didn’t bother including sentences that begin/end with numbers. Here is the final result using that regex…

Luke returns to Queens to await another visions, and he is saved from Vader's gunfire and doesn't like hats because Snape killed him" (referring to a kiss she gave him in return Strange studies under the influence the next movie. Luke and the Tesseract, an energy source of a Jedi. Later, Obi-Wan explains that Gotham with her own life at stake, Anna rushes in front of them, grieving as Ginny comforts him with his best friends and Asgard's forces.

Spending time with Yoda. They fight guards on the night in the Darkhold also comes to Elsa's curse. Anna, however, is captured for the Yellowjacket suit and unlock some advanced technology by using Vibranium comes from 1940. Escaping its collapse.

Dried lava and brimstone are everywhere. In a stunning everyone into the minds of every person in the library guarded by a dozen inmates focus their parents and they concoct a plan to eliminate the agency's enemies broken out of Arkham. He even gives Batman throws the bomb was molded from. Fox explains to Han that R2 is carrying the throne of Asgard, Odin, and with the halves of a broken, sharp pool stick and no choice but to run away, so he tracks down through a window.

Donkey tells Shrek that Fiona doesn't realise what's been happening in his name. Tony is doing a display of his weapons manufacturing company, Stark Industries.


This post is a 2016 presentation that I gave for a graduate class.

game-based learning title slide

Is there a difference between educational game-playing and gamification in education?

What experiences do you have with gaming in the classroom?

Educational Quiz Games

educational quiz games

Math

math games

Science

science games

Fitness

fitness games

Games4Change

games for change

  • PeaceMaker - Challenges players to establish peace in the Middle East.
  • Parable of the Polygons - shows how small individual biases can become large institutional biases
  • Papers, Please - Examine documents as an immigration officer to keep your dystopian country, Arstotzka, safe.
  • Darfur is Dying - Provides a window into the experience of refugees in Darfur.

Board / Card Games

board games and card games

  • Werewolf - (aka Mafia) to open discussion of the Salem witch trials, McCarthyism, and other witch hunts
  • Pandemic - (or the mobile game Plague, Inc) to illustrate how diseases travel interconnected networks of the world
  • Meltdown - save the polar bears before the ice melts
  • Heads Up - use Ellen’s party game to review a subject
  • Telestrations - Split a text into 1-2 sentence strips. Give a different strip to each student. You have 1 minute to sketch your sentence. Pass sketch to right. Write down or share your interpretation of their sketch.

Student-Created Games

student created games

Badging

quest badge Resources for creating badges…




RECENT POSTS