August 29, 2017

Collaborative Text Editor for the Web

Interview season is coming around, which means phone interviews using CoderPad and the like. I wanted to do some interview prep, so I asked my buddy to call me. The problem is, I wanted to simulate the environment the best I could. I could use Google Docs or a free trial of CoderPad, but I can barely live without keyboard shortcuts, and I didn’t want to use a free trial.

So I built my own collaborative text editor over the weekend, using Node, Mongo, and WebSockets.

You can see that project here, and the live version of the app is hosted on Heroku here.

I decided to migrate the server to Go, since fast updates on the client and synchronicity on the server could potentially lead to concurrency issues. Go is designed to handle concurrency, which is pretty cool. I also switched from native WebSockets to It’s a good thing that there’s a Go implementation of that I could use, too.

You can find the Go project here and the live version, also hosted on Heroku, is here.

July 23, 2017

Collaborative Radios

I’m writing a React Native app to create collaborative radios, so that people can listen to music in real time together, while not in the same room. Useful if you want to bond with some friends during work, while working in different places.

I’m using the Spotify API, WebSockets, Redux, Facebook SDK, Node-Cron, Node, Mongo, and Express.

For this project, I’m focusing a lot on structuring it rather professionally - it’s more slow going, but definitely good in the long run. You can check out the project here.

July 13, 2017

Fake news detector

For the one day intern hackathon at MathWorks, we took on a rather nebulous project, one that Facebook’s been working on for a while now: detecting fake news. With a couple of Google searches, we found the Fake News Challenge, which focuses on categorizing pairs of articles and headlines.

Using MATLAB’s machine learning toolbox (specifically, a Naive Bayesian classifier), and some naive sentiment analysis, we were able to categorize 80% of the test cases correctly.

Of course, our project was far from state-of-the-art, but it was still pretty cool to see what we could do. You can check out the project here.

March 29, 2017

Latex Renderer

I really like Sublime Text. These days, I get annoyed at Microsoft Word because I cant use Cmd-Ctrl-up to move a line up or down.

Anyhow, I wrote about ten lines of shell script because I wanted to use Sublime to edit my LaTeX, and I couldn’t find anything suitable that wasn’t super verbose. I did all my math and computer science assignments using this last semester. Takes a little configuration, but here it is.

August 1, 2016

Itinerary builder

At Polyhack this year at Tufts, I worked on a team to build a web app for event-based trip planning. The idea is, when travelling/exploring/going out, you want to participate in events in the area, and plan trips around those events. We utilized the TripAdvisor and TicketLeap API’s for the project, as well as the Google Maps API. We also used frameworks including Node, Bootstrap, and Express for the app.

Check the code for the project here

August 1, 2016

Tufts meal exchange

I started working on a project so that students at the end of each semester could exchange the leftover meals on their plans for money. I’m using a MEAN stack to build the marketplace. This is a very similar structure to the project I worked on at Embark this summer.

The code can be found on Github

April 18, 2016

Universal Machine

For COMP 40 (Machine Structure and Assembly Language), I built a universal machine abstraction on top of the existing machine that parses and executes fourteen unique instructions. After working with x86 assembly language, the natural next step was to create a machine for our own 14-instruction assembly language, complete with 8 32-bit ‘registers’ and segmented memory allocation. The program takes a program file (with the extension ‘.um’), parses the instructions, and executes them in a cycle.

My partner and I completed this assignment in the hopes of improving the performance of the machine later.

Current status: Complete.

March 21, 2016

Tufts Dining API

I built a Heroku-hosted RESTful API that tranformed menu information scraped from Tufts Dining into JSON. Using Flask and MongoDB, I built the site for fast and easy retrieval of Tufts menu data.

Mongo acts as a cache for dining data, storing all of the menus that have previously been accessed.

Why did I do this in the first place? For my web programming class, my group is building a dining hall comparison application. Given a certain point in time, I want to be able to retrieve the menu, look at all of the items in the menu, and compile a cumulative score for the dining hall. Furthermore, the theme of this semester’s group projects is food, so I expect many groups to want to use the API instead of directly scraping the menu from the Tufts Dining website.

You can check out the code on Github, or check out the actual API. Thanks to Serafeim Papastefanos for an awesome tutorial on building a REST API on Heroku.

Status: Complete. I want to add scraping for nutrition information and ingredients, but this will prove to be more difficult, because the URL’s for these pages are not obvious. We’ll see what I can do. In the meantime, I’ll be building DiningDuel.

Update: I have added ingredients information to the API through a brute-force search of all the possible food item pages.

March 18, 2016

Tufts Dining Duel

A Comp 20: Web Programming project to compare the quality of the food at the dining halls on a given day.

Tufts students often have trouble deciding whether to eat at Carmichael or Dewick-Macphie dining hall. Dining Duel makes the choice easy, with a compiled cumulative score for each dining hall.

We make it easy to decide on the right place to go, by compiling a cumulative score for each dining hall at a specific meal. We will use a database and server-side score-compilation algorithms to create scores between Tufts’ two dining halls.

Geolocation, which will factor into the calculation for a cumulative score Server-side database (MongoDB), to keep track of food items, the photo, the number of upvotes/downvotes, and the date on which the votes were made. A front-end web framework (Bootstrap), in order to make our site mobile-friendly Screen scraping, in order to collect menu items for the day in order to compile our score. Features Vegetarian popup option on page load. Displays weight bar for quality of food in either dining hall Upvoting and downvoting for each food item, which is then saved to our database Displays current vote totals for each food item

Unfortunately, the code is hosted in a private Github repo right now. Please email me if you would like access to the code.

Status: In development.

March 15, 2016

Lossy Image Compression

For COMP 40, Machine Learning and Assembly Language, we are taking a deep dive down to the metal with the C programming language. Lots of people have said its the hardest class at Tufts; these same people say that its the best class they have taken. I can see both sides of the story, as I am learning a lot while also meeting great new people in the struggles to complete projects on time.

The first third of the semester consisted of familiarizing myself with C on a deep level, and finally fully understanding the implementations behind some of the abstractions that C++ provides for programmers (for example, how a class in C is actually just implemented as an incomplete structure in C). At each step in the process, we built a tiny piece of our most recent project. The project involved compressing PNM image files to a format 3 times smaller, by grouping pixels together, using component video representation, and performing matrix calculations on sets of 4 pixels. I worked alongside a partner to build this project, and it turned out to be pretty cool.

The code is not on Github, because of plagiarism concerns, but if you are interested in seeing the code, simply contact me and I can share it with you.

Status: complete, contact me for the code.

January 20, 2016

My site

A website for people to get to know a little more about me. You’re probably looking at it right now. To look at the code, check it out on Github.

November 17, 2015

Roommate Communication Tool

A tool for college roommates to communicate using the simplest UI in the world During Tufts Polyhack in November 2015, I collaborated on a project utilizing several different API’s to facilitate roommate communication. We utilized the to create a simple way to communicate with your college roommate. At the press of a button, you can send an SMS to your roommate, suggesting that he/she take a night out, giving TripAdvisor suggestions for things to do based on their location.

Status: Though we managed to put together all the individual pieces for the project, we still have work left to do integrating the pieces together. We did not host our website, and the bttn had a limited number of uses. I think the bttn is a very interesting tool, and I would like to explore more uses of it later. Check out my project on Github

August 22, 2015

Image Compression with Neural Nets

So I am actually writing this in March 2016, but the actual work was done in summer of last year. I worked in the lab at the University of Rhode Island, learning about artificial intelligence and machine learning algorithms. To be honest, the experience was basically an overarching survey of a lot of complex algorithms involving linear algebra and statistics. Luckily for me, I had taken linear the semester before my summer at URI, but I still had to play a lot of catch-up while I was there.

At the very start of the summer, I built an algorithm that could win or tie at tic-tac-toe against any human player, using reinforcement learning. I then wanted to spend some time working with neural networks, a very hot topic right now in machine learning. So I spent some time building sign-recognition algorithms with single-layer perceptrons, followed my more complicated multilayer neural networks.

So it actually turns out that there are more uses to neural networks than meets the eye. Neural networks essentially take very high-dimensional data and break things down to several features that may or may not be recognizable by a human. For example, run a million 200x200 pixel faces through a neural network properly, with twenty output nodes, and one of the output nodes might be the relative size of a person’s nose compared to the other 999,999 people that were run through the network, while another might be the precise tone of the person’s skin.

And just as you can reduce a person’s face to 20 numbers, you can turn 20 numbers into a person’s face, with the same weights, going backwards. And this is the concept behind neural network image compression. As long as we know what sort of thing an image is of (a face, a tree, a sign), we can compress it into a simple, relatively small vector, as long as we store the structure and the weights in the connections of our neural network.

So I built a multilayer neural network image compressor using RBM’s to compress and decompress an image. Classifying each image into its own category, my computer was able to compress and decompress faces into vectors only 20 numbers long, significantly smaller than the input image.