## Posts

• ### Modeling Number of Coronavirus Cases with Logistic Growth

If you have been following the news recently, you may have heard of the spread of the Novel coronavirus 2019-nCoV. The growth in the number of cases poses some open questions: how many cases will we expect in the future, and at what point can we expect the number of new infections to plateau? In this post, I’ll attempt to answer these questions with mathematical modeling. With only a basic understanding of calculus and some calculations easily done in a spreadsheet, we can perform very accurate modeling of a very complicated natural phenomenon!

• ### 197,717 Lines of Code Later...

After taking 18 computer science classes at Harvard (17 in CS, 1 in EE), I was curious to see exactly how many lines of code I have written for assignments these past four years. I was also curious what the breakdown would be for the different programming languages I’ve learned over the years.

After looking through the archives of my computer, I calculated that I wrote 197,717 lines of code (141,008 insertions, 56,709 deletions) for my classes in the past four years! In fact, I believe this is actually an underestimate. In this post, I’ll talk about how I calculated this number, and assumptions I made when calculating this number.

• ### Reflecting on 3 Years of Teaching

I taught my last section as an undergraduate today. I’ve been a teaching fellow for a computer science class every semester for the past three years, teaching:

• CS50 (Intro to Computer Science), Fall 2011
• CS51 (Abstraction and Design), Spring 2012 and Spring 2013
• CS61 (Systems Programming and Machine Organization), Fall 2012 and Fall 2013
• CS161 (Operating Systems), Spring 2014

At Harvard, a “Teaching Fellow” is the equivalent of teaching assistants at most other universities. Technically, I’m a “Course Assistant” as the title “Teaching Fellow” is reserved for graduate students, but in many of the classes that I’ve taught, the undergraduates have the same (if not more) responsibilities than the graduate students. These typically include teaching section, holding office hours, and grading.

Over the past three years, I’ve attempted to have an impact in all of the classes I’ve taught, and hopefully that impact will last after I graduate. Also, I’ve learned several lessons about teaching computer science classes, and I have advice for current or future undergraduates considering teaching.

• ### Writing Synchronization Problems for OS161

This semester, I have the privilege of being a teaching fellow for Harvard’s legendary operating systems class, and I was tasked with writing the synchronization problems for this year’s synchprobs assignment! The goal of these problems is to get students to think carefully about the synchronization primitives and data structures needed to solve highly concurrent problems, avoiding the usual problems that come with concurrency: race conditions, deadlock, starvation, etc.

I remember how fun these problems were last year (forming little fellowships of the ring and piazza posts, meant to mimic creating barriers and reader-writer locks), and I wanted to make sure the problems were just as fun this year. I was tasked specifically to write problems to mimic the synchronization one would use to implement waitpid()/exit() (how would you do it?) and the synchronization needed between address spaces and the coremap when implementing a virtual memory system in the third assignment. Given these specifications, I came up with Singing Cows and Hunger Deletion Games synchprobs!

• ### C Error Handling

After taking an operating systems class last year and taking a data systems class this semester, I’ve picked up a few patterns to make it easier to handle error conditions in C.

Consider the following example from my data systems class, where I initialize a directory to act as persistent storage for my database.

• ### Learning Through Bootcamps

This semester, I’ve been writing and leading bootcamps as the Harvard Computer Society Bootcamp Manager. In the past, HCS has had bootcamps on various topics including python, javascript, and git. Bootcamps are typically targetted for students just starting computer science (fresh{wo}men, sophomores).

My goal this smester was to restart the bootcamps and to revamp the curriculum. In this post, I’ll talk about:

1. The bootcamp curriculum I designed
2. The typical workflow for a bootcamp
3. The design decisions that went into writing these bootcamps
4. Some high level results (pull request numbers and summary of testimonials)
5. Unedited testimonials from students in the bootcamps

• ### Java Flag Command Line Library

Inspired by other commmand line libraries, I decided to make my own Java flag command line library here. It makes use of Java’s Reflection capabilities to fill in the values of flags at runtime. The library is fairly simple to use–it requires only declaring a static field, and one invocation to Flags.parse in the main method of the application. The library offers support for various wrapper types as well as collection types.

• ### Coupling and the Coupon Collector

In the fall semester last year, I took Stat 110, an introductory statistics course focusing on probability. I had done probability in contest math from high school, but this course was my first real rigorous treatment of probability.

• ### A Twist on Binary Search

This past semester, I took a graduate course, CS 207 - Systems Development in Computational Science. In the course, we talked about good software engineering practices in C++ (but the lessons span beyond C++), in particular representation invariants, abstraction functions, and writing solid code specifications so that one could even prove things about code. The professor made a couple of blog entries for some of the lectures, explaining cool tricks with iterators and bits.

• ### New Layout, LaTeX, and Tag Clouds!

I got a new octopress layout using Melandri’s layout here. I also discovered how to make cool striped backgrounds with StripeGenerator, use cool new fonts from The League of Movable Type, and use cool pre-made icons with Double-J Design. Hopefully the layout will encourage me to actually keep up with my tech blog!