Back to Parent

Outcome


Alfred the Botler

Who is Alfred?

Alfred the Botler is based on Batman's British butler Alfred Pennyworth. He is highly educated, but as a bot can be a bit simple. He's learning his new role and soon will be up to tip top shape.

What can he do?

Alfred knows you're very busy and in high demand, which is why he's offered to keep track of your contacts. He's still new to all of this, but eventually he'll be able to automatically store new contacts and start writing an email for you! Sadly, at the moment he's only able to take down your contact's name, email, and phone number, show you your list of contacts, and delete a contact from that list.

What's he like?

He is extremely polished and well behaved, but at times can become quite snarky and his remarks may get a bit off colored. You'll have to watch out for him, especially when you dismiss him. Most of the time, though, he's quite the gentleman.

Sample interaction
Show Advanced Options

Prototype Workflow

For the experience prototype, I focused on manually manipulating a database. Below is the primary workflow of adding and viewing a list of contacts. In addition to these features, the final prototype was also able to delete a specific contact or clear the entire contact database.

Workflow
Show Advanced Options

Contact DB Data Schema

Screen shot 2016 12 15 at 2.03.11 pm
Show Advanced Options

Alfred's Code

Ruby Gem’s Used

From the app's Gemfile

Show Advanced Options

Current Commands

The following commands are built into the experience prototype. See helper files below for the specific code used.

Screen shot 2016 12 15 at 1.17.46 pm
Show Advanced Options

Hardcoded Commands

The following commands are hard coded and must be typed exactly as they appear below. These were built into the prototype to simulate the automated features that will be built into the next iteration of the app.

Screen shot 2016 12 15 at 1.17.54 pm
Show Advanced Options

Working with Helper Files

I was working with helper files to keep my code organized, but I ran into an issue where my bot would repeat himself. This was a bit of an annoying character trait and I needed to teach Alfred better communication skills.

At the end of each snippet of code listed below, you’ll notice `return true` or `return false`. There was  logic added to the main app.rb file that tells code to run through all 4 helper files before returning an error message and it solved the problem. 

Show Advanced Options

Below: example helper file 1  (helpers Sinatra::CommandsCreateContact)

Show Advanced Options

Next Steps

Currently, Alfred is only able to manually add, display, and delete contacts from the table migrations, but with the context.io and Google APIs it’s possible to automatically track and store

context.io API

For the automated email integration functionality, I'm looking into using the context.io (https://context.io/) API. Examples of functionality from that API that might be used by Alfred in the future are listed below. See GitHub documentation listed below for more details. https://github.com/contextio/contextio-ruby

Screen shot 2016 12 15 at 1.17.30 pm
Show Advanced Options
Show Advanced Options

Learnings: Start Simple, Go Deep

The biggest learning from this project was the importance of simplicity. My original bot was going to be a research assistant that would monitor Twitter, Google research publications, and news headlines to help my team stay up to date with information related to our area of interest. After thinking through the integrations and use cases, however, I realized nothing I was designing would be better than setting up a Google Alert or following specific accounts on Twitter.

One of my teammates approached me asking for help managing and organizing all our contacts and I realized creating a collaborative CRM built right into our communication tool, Slack, would solve a huge need and could be prototype within the time frame.

I know conceptually that it’s important to build a product that does one thing really well, but I enjoyed the process of appropriately matching problem to technology and then simplifying features to build a working “experience prototype”.

Resources

Bot Workflows

https://daraghbyrne.github.io/onlineprototypes2016/deliverables/project-workflow/

Character Development

https://daraghbyrne.github.io/onlineprototypes2016/in-class/in-class-2/

Email Validation

http://stackoverflow.com/questions/22993545/ruby-email-validation-with-regex

Phone Validation

Regex: http://www.regexlib.com/Search.aspx?k=phone

Gem: https://github.com/travisjeffery/validates_phone_number

https://rubygems.org/gems/validates_phone_number

Thank You’s

I want to recognize our course instructor, Daragh Byrne, for the detailed resources and extra office hours. Resources from week 4 and 6 were particularly useful with regard to product conceptualization.

https://daraghbyrne.github.io/onlineprototypes2016/in-class/in-class-2/

https://daraghbyrne.github.io/onlineprototypes2016/deliverables/project-workflow/

I also want to thank my classmates Sharon for her guidance on proper file setup, Swarna for her help writing code that edits past database entries, and Elijah for his suggestion to add “return true” and “return false” to each line of my helper code - Now Alfred doesn’t keep repeating himself! Such a relief. 

Drop files here or click to select

You can upload files of up to 20MB using this form.