Hey friends,

After compiling all these great twitter bot resources I’ve been on a bot kick, creating two new ones in the past few days. I should probably diversify my projects some more, but in the meantime it’s such a great way to learn and practice code, git, and tools to deploy.

CHALLENGE #1: Can you do it in JavaScript?

answer = #achievementunlocked

Darius Kazemi is something of a legend in botland (he’s the creator of the Harry Potter sorting bot, among others), and has posted a tutorial for a simple example bot that re-tweets a hashtag once an hour.  I have, in my pile of unfinished projects, big plans for the twitter handle *unlock achievemt* but I got stuck awhile back when I couldn’t figure out how to auto upload pictures. So in the meantime, I’ve set it to re-tweet something from the #achievementunlocked hashtag once an hour, with pretty great results:

Screen Shot 2015-04-18 at 12.36.49 AM

 

Yay! So, that’s fun. In putting this bot together I learned about .json files, Node, and how Heroku interfaces with JavaScript (this was very helpful). More info and credits in the repo if you’re interested.

CHALLENGE #2: OK, but can you generate new content?

answer = mission aligned

So far all these bots are just publishing existing content, so I wanted to see if I could make something like Creature List that generates new material. Sam B.  has generous posted the source code (sort of) for Creature List on github, so I used that as a jumping-off point to create *new and delightful* non-profit mission statements. I pulled a list of 100 organizations from Charity Navigator, and then manually entered in a bunch of mission statement words, like “conserve” “build” “protect” “empower” etc., and then replaced “habitat” and “size” etc. to make sense for an organization. Here’s a small sampling of what it produces:

  • DEFENDERS OF TO READ is a nonprofit startup with a mission to decrease and honor immediate medical aid for wounded warriors.
  • BOYS & FOREIGN RELATIONS is a think tank with a mission to inform and find immediate alleviation of poverty for vulnerable communities.
  • GIRL SCOUTS CAT RESCUE is a research center with a mission to provide and help temporary change for kids.
  • NATIONAL PUBLIC WIKILEAKS is a private foundation with a mission to increase and inspire continuing change for people.
  • UNITED NATIONS OF ART is a grassroots organization with a mission to lead and build temporary safe spaces for future generations.

Not too shabby, eh? I think I can make it more interesting, but we’re off to a good start! Some of these organizations sound pretty great, actually…

THE MORAL IS

just kidding, I don’t have a moral. But, I think you should follow the fun. And for me, building bots (and building off of other people’s code) is fun and it gets easier each time, even as I’m building knowledge and learning new skills. If you are a teacher, I don’t think you should shy away from showing people code that works. Give the people answers! Of course, once you’ve given someone the answer, change the question. 🙂 That is sort of what I’m doing on my own by finding projects I admire and then following the code trail.

Happy weekends, all!