My experience in KHARAGPUR WINTER OF CODE

Hi, I am Amrish Kumar. I came to know about KWOC and was happy to contribute yet another project to the open source community. Among KWOC projects Sheldonisms impressed me. This blog post is all about my contributions and progress made in the winter of coding. Thanks to my mentor Avijit Ghosh for the help and support throughout this program.

What is Sheldonisms ?

Sheldonisms is an AI chat bot featuring the character Dr. Sheldon Cooper from the TV show The Big Bang Theory. The TV show is all about nerd humor filled valuable science facts. Our messenger bot replies with nerd humor and memes made from the show. I thought this to be an elite way a spreading common science while still having fun.
Click here to chat with our bot.

My Progress and Contributions:

I was new to Python, it was easy and the learning was quick. I went through the basic tutorials of Facebook Messenger Bot and had setup my own simple bot to my test page. I worked on setting up the working environment – Github, Python, Heroku and some other add-ons.

I had cloned Sheldonisms to my local repository, attached Sheldonisms to my test page and understood the basic working of the app. Then, I went through the issues specified on the Github Sheldonisms repository. I planned to work with Meme Support Issue.

Pull Request #1

               I added Meme support (issues #2) to Sheldonisms(Local). The bot should reply with memes from the show was the issue. I used Python to scrap meme images from websites and the bot replies a random meme to the user when the meme feature is invoked. The below is the working of scraper.

pr1

My test page worked good sending memes. I had some minor bugs. I was not available to fix them at time. At the same time we had another Bug Free Pull Request on the same issue, we had that merged.

Hence this is Pull request was closed.

Pull Request #2

               I added Database to store and fetch Memes ( Issue #8  ) and wrote a separate app to update the database using a Cron Job ( Issue #1 ) . Cron Job is code which runs the script in particular interval of time. We needed it to update our meme database and deliver the latest meme from the show.

Cron Job was tested successfully by scheduling the Job (Update Database) to run every minute.

cron

Then the Cron job was set to update the database every day at 00:00 AM.

croncode

My pull request was reviewed by my mentor. My mentor had few suggestions, I fixed them.

Pull Request was successfully merged 🙂

pr2merged

Pull Request #3

                I added Database support for quotes (Again issue #8). We initially thought that updating quotes in database would be a tedious process, because there are thousands of records and it would take around 30 minutes to finish the query. Yet, I came with a good algorithm to run the same query within a second.

thegoodalgorithm

My pull request was reviewed by my mentor and was found to be good.

Pull Request was successfully merged 🙂

pr3merged

Pull Request #4

There were some minor fixes in database and the working of Cron Job was updated. This is the log of our Cron job working tirelessly.

cronjobtirelesswork

Pull Request was successfully merged 🙂
Below are my list of contributions made to the repository.

allpr

top4

I am happy that I made fourth on the leader board 🙂 Thanks to KWOC for this opportunity, it was a great coding experience and thanks to my mentor who made this all a great success.

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s