Soopbot, a Facebook chatbot demo

I made a simple Facebook chatbot demo. You can message it at its Facebook page and your email and message will be saved to this website. To check out the source code, just go to my github.

I decided to build this because I think it might be easier to demo the link between Facebook messenger to rails server to Api.ai. If you would like to see more of what Api.ai can do, maybe you can check out Rem, the mood-journaling chatbot I did with my project mates in Alpha Camp. There’s more conversation design there.

I used facebook-messenger gem and api-ai gem to link the backend with both facebook and api.ai. I think tinkerbox has a message-quickly gem that allows your rails app to integrate with Facebook messenger too for chatbot functions, it looks quite nifty,  i’ll try it out some time. Maybe after I try building a webscraper with rails (following an online tutorial). I’ve always wanted to build a webscraper, it’ll help me extract and save my diaryland postings. 🙂

 

 

Advertisements

Rem – AI Chatbot for mental wellness

Tonight was the night of our Alpha Camp project presentation. It marks the end of our 12 week web development course and we will soon be embarking on the next chapter of our life – back to work and reality! (More coding and learning.)

So, me, Nathan and Evan, we worked on a chatbot called Rem for our capstone project. Rem is supposed to provide a listening ear for users and comfort them when they feel depressed. Besides this, Rem also incorporates techniques from CBT (cognitive behavioural therapy) – the two techniques are Mood Journaling and Gratitude Journaling. Users will be encouraged by Rem to record down their moods throughout the day, and also record down what/who they are thankful for.  These techniques have been proven to work by the way.

So yeah, we bought a domain name and are running a hobby server at heroku for this. We’ll see how it goes. You can check it out at https://remchat.herokuapp.com

Just sign up for an account, check your email for a confirmation link. And then you can enter our site to start chatting.

Also, after you have signed up, you can also go to facebook messenger https://www.facebook.com/remjournal and find Rem to chat. It will prompt you to link your fb account to the heyrem site, so just do that and you’ll be fine.

The digital marketing girls (Hui Sze and Desiree) have made a nice digital marketing landing page for Rem at http://remmoodjournal.strikingly.com/  You can check it out for more details regarding Rem.

For Rem, we used ruby on rails to communicate with FB’s webhook for the messenger integration. And for the AI language processing, we used API.ai from Google. It’s a free service at the moment. I think it really helped that we approached the project together and supplied each other’s knowledge with our own learning at the same time. So that a daunting (and unknown) task eventually became more manageable.

Zolada online bookstore

An online bookstore website done with project mate Evan; includes Braintree online payment system, Facebook login via Oauth, carrierwave & AWS image storage. Try out the site here.

Users can sign up using their Facebook accounts to buy books. (But please note, we haven’t submitted it for review with Facebook, so you can’t actually sign in using your FB account unless you’re the site’s developer like us, so you’ll have to sign in using your email.) When the customer buys a book, the stock quantity will decrease. And when the customer successfully pays for the book, he/she will receive an email notification.

 

If you are an admin, you could also sign in to upload books, a book image, descriptions, and stock quantity. Admins can also view orders and change order statuses, for example,  ‘shipped’ status.

The layout (navbar) is similar to twitter 2.0, because we used bootstrap and this navbar again. This site could be improved with a better grid layout, and functions like a book title and author search.

Twitter 2.0

Twitter2

A twitter clone website done during Alpha Camp coding bootcamp with my project mate, Ash. Visit it here

Signed-in users can follow other users and see their feeds populated by those they follow. Has a search function to search user names and posts.

Just a simple site, could do with more code refactoring so that there’s less requests on the database, and better rspec tests coverage. Images are also missing because I didn’t use AWS to host the user-uploaded images, the images are on Heroku and Heroku stops and reruns its dynos from time to time, so the images are gone now.

You have to register for an account, sign-in, and follow other users to see their posts.

This website mainly demonstrates our knowledge of ORM (object-relational-mapping), and model associations/relationships.

 

Reflections #Rails, Quality Code

Today we learnt about what constitutes Quality Code:

  • understandable
  • readable
  • tested
  • working
  • clear
  • changeable
  • discoverability
  • documented

We also learnt about rails model associations, how a join table helps join two tables/models’ data for a many-to-many relationship. In teams of two, we drew a diagram called an entity relationship diagram and also used Trello (an online kan ban board) to plot our user stories/app features. We will be working on a twitter app for the next 2-3 weeks.

One of our assignments was to do a kata at Code Wars – Sum with Highest and Lowest .

I tried it and although i passed the tests, i couldn’t pass the null/empty? test. I was annoyed because I just couldn’t figure out what was wrong when i clearly wrote it correctly (if .null? or .empty?) but then in a fit of what-the-heck, I took out the .empty? method, and rerun the tests again, and this time, the code passed. I guessed the question was worded wrongly, It should just be null, not empty, since null != empty.

So lesson here – just write enough to pass the test. And sometimes the questions are wrong. And i nearly gave up actually, I thought there’s no way to pass even if you got the code correct, but then yeah, I guess I got to keep trying.

Reflections 

This week, we learnt to do a forum. We were split into teams of two to work on a forum together, using the kanban method. I think it’s a better method than scrum because it communicates clearly what’s in progress, what’s done, and what needs to be done. I don’t really like scrum because the daily meetings and sprints remind me of my time in an advertising firm and at the tv company. 

At the ad firm, we had daily meetings to talk abt the work, but it didn’t help if the problem wasn’t a lack of communication. The problem was poor sales. And the tv company, the problem was the workload/project was too much for an inexperienced team to handle and the main decision maker or client wasn’t regularly involved in the work progress. These led to tight crunches/many late nights as immovable deadlines loom and staff turnover was high. 

Anyway, we also learnt paired programming – how you work as a pair over a single computer, the driver verbalising his intentions and what he’s doing as he types his code and the observer checks and serves to improve the code through questions and suggestions. 

I want to improve my communication and my understanding of the rails and ruby code and architecture/system.