CS371p Fall 2019: Xiang Gu

Xiang Gu
Xiang Gu
Nov 3 · 3 min read

Blogs: Week of 28 Oct — 3 Nov

Hey y’all, this is Xiang.

(Now you know Xiang’s face. Why don’t you come and say hi in class?)
  1. What did you do this past week?

I had a very special week in the sense that I tried to do a few things that I won’t usually do. I watched a horror movie and attended a grad-student Halloween party. I met many new people, most of who are graduate students as well. I tried to keep myself busy and it turns out to be pretty helpful for me to get out of the low mood.

Coursework-wise, I finished a midterm for one course. I also finished the weekly assignment for another course. I also spent some time working with my partner on the Darwin project of this course. We have made some progress on this project.

2. What’s in your way?

One problem we had is the Darwin project where we managed to pass test 0 but failed the remaining tests. Since those tests are hidden, we don’t know which part of our code went wrong. Since the Darwin project is a little complicated — multiple classes and communication b/t classes — it is hard for us to pinpoint where the bug is.

3. What will you do next week?

First of all, I will try to work with my partner to find out where the bug is that causes our solution to fail on the HackerRank tests, and finish it before the deadline.

Secondly, I need to prepare for two upcoming interviews next next week. Those two interviews might be the only remaining two interviews I can get for the summer internship so I’d better prepare well for them.

4. What was your experience of the vector implementation?

My experience of the vector implement is that I feel like there are two levels of implementation: the first level is to make it work. Namely, the professor gave us some ideas and let us implement a working vector class. Then he asked a few questions to raise our awareness of the possible scenarios where our implementation might be disadvantageous. He then showed us how the industrial-strength vector class will behave and contrast it with our “naive” implementation through a quiz. I realized that for a class as simple as vectors, it takes a lot of considerations into the design and implementation to make it truly efficient and robust. At the same time, I also regret to see that sometimes a clean, clear solution might end up looking pretty ugly and complicated in code because there are certain special cases that we need to deal with slightly differently. We make modifications to the code to either exploit the special case to improve performance, or avoid undesired behavior in those special cases. It will be much better if we can manage this in a hierarchical way.

5. What’s your pick-of-the-week or tip-of-the-week?

I guess one thing I learned in the past week is that I got the chance to spend a considerable amount of time in design via the Darwin project, so, I’d like to tell people who are interested in software engineering to try to spend some time in the design process. One good example is that try to really develop the solution in an object-oriented way where we can try not to use getters and setters.

Welcome to a place where words matter. On Medium, smart voices and original ideas take center stage - with no ads in sight. Watch
Follow all the topics you care about, and we’ll deliver the best stories for you to your homepage and inbox. Explore
Get unlimited access to the best stories on Medium — and support writers while you’re at it. Just $5/month. Upgrade