Danielle Pham

Computer Science & Biology student
& current Hacker Schooler (S'14)

Day 43 - 47

The last day of Hacker School has arrived.

  • I added more features to Asteroids. The ship accelerates and decelerates, so it feels a little more like space. The small alien can now shoot toward the ship. I cleaned up the documentation and added a proper README. I’m pretty happy with the result!
  • Just for fun, I wanted to try making a steroid for AH-STEROIDS. Specifically, testosterone.
  • I’ve been working on ML Week 9: Anomaly Detection & Recommender Systems. I’m hoping to finish the homework today before I have to worry about moving back to Montreal and into a new apartment.

Coming soon: a post about my experience at Hacker School!

Asteroids

An Atari Asteroids clone written in JavaScript

Day 40 - 42

Oh no! The end of Hacker School is nearing…

  • On Sunday night, Alex Coco and I merged my pull request to fix schedule parsing issues in Martlet.
  • On Monday, I finished Coursera ML Week 8: Dimensionality Reduction using Principal Component Analysis. I honestly wish there were optional linear algebra videos to explain why we’re computing eigenvectors. Asteroids: added bonus lives for every 10,000 points. Tic tac toe: added caching to minimax, and a cheat function to the tic tac toe game that uses minimax.
  • Yesterday, I worked on Rosalind's Algorithmic Heights problem set. I completed Fibonacci, Binary Search, and Degree Array. I also started working on counting the number of swaps in Insertion Sort, and did some research on how to do it in O(n log(n)) time using an order statistic tree. I implemented the order statistic tree, which is a modified binary search tree that keeps track of subtree size and can return the rank of a number in the tree, or find the kth smallest number. I've also found it to be very inconvenient to do these problems in JavaScript. Sonali nudged me to update my résumé, so I worked on that for the rest of the day. At game night, I played Johann Sebastian Joust, and Coup!
  • Today, I continued working on my résumé and sent it to a few people for feedback. I completed the Insertion Sort and Double Degree Array problems on Rosalind. I went to José Valim’s great seminar on functional programming collections, specifically iterators, reducers, and reducees in Elixir! That was fun, and I’m looking forward to the continuation either tomorrow or Monday. I also replaced my website temporarily.

I’m going to try to wrap up/document existing projects this week.

Day 39

  • Added lots of features to Asteroids with Marisa this morning! We added lives/scores/levels, drew the lives/score/level on the screen, and added a cute colour scheme. It’s a fun game now! We’d like to add sound effects. There are a lot of nice-to-have features we could implement, but it looks like we have the interesting parts of the game done!
  • After lunch, I worked on my local version control system, added log dates and messages. I still have diffs and branches to do! I also finished a quiz for Coursera ML Week 8: Clustering.
  • Alex Coco is arriving today! I honestly hope we can ship the calendar export feature of Martlet this weekend, but I understand if we don’t want to do that during his vacation…

Day 34 - 38

I’ve been a little busy, and haven’t posted updates for a week.

  • Last Wednesday, I implemented minimax in my tic tac toe game in case players want to cheat and play the most optimal move. I was frustrated at first, because I tried to do too many things at once (minimax with alpha-beta pruning, and caching results). Note to self: start simple and work up.
  • On Thursday, I worked on my local version control system and added a current command to check which backup is currently being used. I took another look at what else I wanted to work on, as I wasn’t feeling very motivated by my projects. I had a revelation that I wanted to export McGill’s course schedules as iCalendar files, and started reading about the iCalendar specification and thinking about what information I wanted to retreive.
  • On Saturday, I watched Boyhood with a group of Hacker Schoolers. It was intense, personal, and nostalgic. I’m glad I went!
  • On Sunday, I watched Coursera Week 7 videos on Support Vector Machines (SVMs) and did the quiz.
  • On Monday, I finished the Coursera Week 7 homework. I familiarized myself with Alex Coco’s Martlet app, which already authenticates with Minerva (McGill’s student portal) and parses the schedule information for courses. I was able to export a basic calendar with the course events for the first day of the course’s date range. However, this exposed a problem Martlet was having. Some of the course schedules had extra information about the last day of class, and this was running into the following course.
  • Yesterday, I separated the schedule information by course, and worked with Alex Coco on the pull request until it was good enough to be merged into master. I worked on the iCalendar RRULE for repeating events, and was able to generate a valid calendar with the courses repeating on the correct days, except for the first and last day of school.
  • This morning, I fixed the first day of classes by excluding the first day of the semester if it’s not a day on which the class occurs. I then worked on Asteroids with Marisa. We added some small features, ensuring that the random asteroid angles weren’t too straight, making smaller asteroids faster, and adding lives to the ship. We’re planning to improve the way the game is checking pairs of bodies for collisions. It’s still suuuper fun and motivating to work on the game together! For the rest of the day, I’d like to refactor my calendar code. Soon, I’d like to incorporate the information from the last day of classes that’s currently being ignored.
  • This afternoon, I fixed the last day of classes problem! Hopefully I’ll get a couple of pull requests merged after some refactoring. I’m excited to get calendar export shipped before the school year starts. I’d love to save people hours of needless data entry!

Day 32-33

  • I’ve been pairing with Marisa every morning on Asteroids. I can’t believe how much fun we’re having. These bugs are ridiculous. We implemented asteroids breaking up into smaller asteroids when they die, but we spent a lot of time debugging some strange behaviour. We showed Mary the problem, who immediately pointed out the problem. Those darn references keep placing bugs in my code, but they just want to be understood.
  • I was tired after lunch, so I watched Coursera ML videos for Week 6: Advice for Applying Machine Learning. I did the homework for this week, which was on bias and variance problems, cross validation, and learning/validation curves.
  • I’ve been reading about TCP sockets and streams in Node, so I’m making a TCP terminal tic tac toe game (ttttt) before I attempt to complete the web version. So far, I have a server and clients that can pipe messages from stdin to their sockets. I’ve worked on the tic tac toe game, and am planning to combine those two pieces soon.
  • I just signed up for Stanford’s 6 week Automata class in September. I’m not required to take COMP 330 (Theory of Computation) at McGill, but I think the information is useful. I won’t prioritize this over my other courses, but I’ll try to follow along.

Day 31

  • Spent the morning pairing with Marisa to debug bullet/asteroid collisions in the Asteroids game! It was sooooo fun! We ended up realizing exactly what was wrong after simplifying the game (using one asteroid with a simpler shape, logging coordinates, and ending the game at convenient times). The bullets are discretely moving at 5px/frame, so it makes complete sense that the collisions weren’t occurring frequently! I definitely have a renewed sense of excitement for this game!
  • I had another one-on-one with Mary over lunch. We talked about what I’m working on and why, how to evaluate progress, why I shouldn’t be concerned about some things, and that I should do more of what I enjoy than what I think I should do for some hypothetical company.
  • In the afternoon, I read about HTTP! I want to make some kind of fun HTTP server, but I haven’t decided what I’d like to do yet. Reading the specs made this project seem much less daunting.

Day 30

  • Talked to Marisa about goals for the Asteroids game. I tried to figure out why my bullet/asteroid collision detection isn’t working, with limited success. I hope she’ll have some insights into why the math isn’t quite right!
  • Took notes on HTML/CSS things I thought I understood but didn’t (mostly related to positioning, box-sizing, specificity). I’m thinking about how I want to redo my personal website.
  • Went to Gayle Laakmann McDowell’s talk on Cracking the Coding Interview. She has a lot of interesting tips about the interview process. I feel better about knowing what to expect and how I should break down technical questions. Takeaways: remember that everyone is supposed to struggle through the problem-solving process, work with a good example to develop the algorithm, you can’t possibly know how you did because evaluation is based on how you did relative to other candidates on the same question.

Day 29

  • Attempted to implement backpropagation for ML Week 5 Neural Networks: Learning homework, looping through the m training examples as suggested by Andrew Ng. The math wasn’t working out quite right, as gradient checking showed.
  • Met with Jessica McKellar, who explained sockets and gave suggestions on what kinds of projects would help with understanding them (TCP server & client, HTTP server & client, ping, traceroute, looking at strace). I feel a bit constrained while trying to exclusively write JavaScript, but I’ll look into these projects and see what would be most useful to attempt.
  • Reattempted the backpropagation algorithm in vectorized form as suggested by a TA on the discussion board. This worked fine. It seems like looping through each example would work too, just that each operation would be done on a vector instead of a matrix with m rows. Finally done the homework!
  • Worked on tic tac toe a bit so clicking on a square emits a ’click’ event, which is received by the server over the socket. The socket responds to ‘click’ events by playing a piece in the corresponding square of the game, and emits a ‘played’ event that sends the game as data. The client socket logs the game to the console on a ‘played’ event. I haven’t decided how I want to rerender the game onto the page yet. The socket stuff is experimental while I consider how I want to organize my application.

Day 28

  • Mary and I went over how I might abstract the traversal logic from my local version control system (VCS) into higher-order functions. I currently have two similar functions for copying a directory, and for clearing a directory. I didn’t do this yet, mostly because the way I’ve done part 1 of the VCS may be affected when I write part 2 on metadata.
  • I spent some time talking to people I’d like to work with. Marisa and I are going to continue the JavaScript Asteroids game, which is super exciting! I hope she can help me fix the bullet collisions. I’m hoping to understand sockets better with Alex Jose and Jessica McKellar. Costa may be able to help us out as well.
  • Most of my afternoon was focused on the Coursera ML Week 5 videos on Neural Networks: Learning and the backpropagation algorithm. I’ve done the quiz and homework up to backpropagation, and I think I’ll try to work on the rest throughout the week.