Posts

Performance Engineering

Image
This past term, I've been spending most of my time on MIT's Performance Engineering class . It's a project based class, and since your code can always be faster, people often spend around 40 hours a week! To get an idea of the areas the class covers, I'm linking my study sheet for the second exam, which I just had today. However, I learn the most from the projects. Here are some thoughts on concepts applied and lessons learned from each project (each of which I coded with a different partner): Project 1: Bit Rotation Final writeup here The first project was mostly about bit hacks. The instructors gave us a reference implementation, that rotated the bit array by k bits by shifting the whole array one position at a time. This was very slow - running on AWS, the job didn't even finish because of the 20-second timeout! However, we were able to cut the time down to 44 microseconds (median of 5 runtimes on AWS). The first trick is to change the algorithm . ...

Mavo framework

Mavo's launch It's hard to believe sophomore year is over! One of my favorite parts of this year was working on the Mavo framework , a project from the Haystack group (MIT CSAIL), with Lea Verou . Mavo is a web framework for creating dynamic web applications using only HTML. It enables data binding using just HTML expressions, and is an alternative to other frameworks, like AngularJS from Google and React.js from Facebook. Although non-programmers and designers can create static web pages easily with a basic knowledge of HTML and CSS, it's still fairly difficult to build interactive views. Current tools have steep learning curves. Some frameworks have poor performance, especially when users don't know how to use them optimally. Even creating simple web applications requires at least a couple hundred lines and knowledge of JavaScript. Mavo aims to solve these problems by being a WYSIWYG tool, where users can describe complex data schemas by adding HTML attributes. ...

PlanForMe | iOS app

Image
PlanForMe, the iOS app I've been developing for the past few weeks, is now available on the app store!  The official description is: PlanForMe is an automated assistant that optimizes and organizes your schedule for you. It makes planning your day quick and easy, whether you have a lot of overlapping events or just want to prioritize your meetings and activities.   You can:    Order your events by priority    Sort events into "Must do", "Would like to do", and "Don't want to do" categories    PlanForMe:    Integrates with your calendars   Creates your plan for the day, taking into account each event's category and priority     Just tap a button to add the plan to your calendar! I've wanted to create an app like this ever since the start of last fall semester, when my calendar was double, triple, and quadruple booked with meetings, events, classes, parties...

Firebase Presentation

Posting the slides from my presentation about Firebase to the Haystack Group here!

iMessage bug fixed!

Image
This post is just a quick update on the bug I found in iMessage during WWDC a few weeks ago. (UIViews were disappearing in my iMessage app when a user cancels sending a message and transitions back into the expanded view. An Apple engineer told me this was because they were doing some hacky things with Auto Layout and view controllers.) The issue's now fixed in the latest version of iOS 10 beta! (You can find iOS 10 beta 2 at https://developer.apple.com/download/ ) Status: Closed :) 

LevelDB

I've been playing with the LevelDB library recently, so I took some time digging around its source code (https://github.com/google/leveldb) and reading articles/papers. In this post, I’m going to share some things related to LevelDB that I most enjoyed learning about. If you don’t know much about LevelDB, here’s a quick overview: LevelDB is a C++ library that stores key value pairs of byte arrays sorted by key. Operations include Put(key, value), Get(key) and Delete(key). It’s called LevelDB because it is arranged by levels: cache, log, level 0, level 1, level 2 … In general, after Level x reaches a limit of 10^x MB, one of its files gets compacted (merged periodically) into Level x+1. Level 0 is a special level: when it hits its limit of 4 files, at least one of its file gets compacted into Level 1. Furthermore, the files in Level 0 can contain overlapping keys, whereas the keys in the files in the other levels cannot. One of the things that interested me was the underlying d...

iMessage Apps: A More In-Depth Look

Image
This post includes some FAQs about iMessage and tips for developers who are interested in building interactive iMessages and iMessage apps. Click here for an overview of the additions to the iMessage app and WWDC 2016 in general. What does using an iMessage app look like?  Users get to your app by swiping through their Messages App Drawer   They can see both compact and expanded views of your app, and have the ability to switch between the two whenever they want. (You are provided with willTransition and didTransition methods, which you can override to be prepared when users switch between the presentation styles.) Compact view Expanded view How can people get my iMessage app? From the app store dedicated to iMessage apps - your iMessage app doesn't need to be attached to a separate full app.  If someone's friend sends them an iMessage through your app, they will see a link at the bottom of the iMessage where they can download your app.  ...