Shreya Shankar

Why you should major in systems

April 03, 2019 in #systems · 5 min read

A lot of people have asked me why I chose to study computer systems for my undergrad. To be quite honest, I first declared artificial intelligence, like every other Stanford CS major. When I applied to the masters program my junior year, I realized that it would be too much work to get a second degree in AI. Given all the classes I had taken, the easiest way for me to leave Stanford with two CS degrees was for me to do a systems undergrad and AI masters. Thus, at the end of my junior year, I became an “accidental” systems major.

Looking back on my years as an undergrad, I’m extremely thankful that I ended up majoring in systems. Now, I actually recommend that younger students pursue this path. Why? Here are some reasons:

  1. Most people don’t learn about computer systems on their own. After school, CS graduates are probably far more likely to experiment with neural networks or read books on algorithms than they are to write an operating system from scratch. Anyone can take the course on their own. Not everyone has the grit and enthusiasm for building a scaled-down version of the Internet to learn about networking.
  2. You don’t get attached to your code. When I took operating systems, sometimes it was nearly impossible to sift through thousands of lines of code I had written to figure out what my bug was. Other times I had just designed the subsystem poorly. In such cases, I learned that rewriting my code from scratch was actually faster than debugging my issue, and my code was always better the second time around. Writing code a second time takes nowhere near as much effort as writing code the first time. Computer science classes place more of an emphasis on debugging skills rather than code refactoring skills; thus many computer scientists are hesitant to scrap their code and start again.
  3. Your code quality improves greatly. The more you do something, the better you get at it. The more lines of code you write, the better you get at coding. Coding in C might seem tedious because there isn’t a plethora of existing libraries to use. But when you build large systems in C or C++, you’re forced to learn how to write clean, reusable, and fast code. Had I just been taking AI classes all day long, I would be very good at writing hacky scripts to inefficiently manipulate large arrays in neural networks. I’ve never taken an AI class in which the teaching staff actually reads my code.
  4. Systems are the backbone for every new technology. A lot of subfields of computer science are (over)hyped at certain points in the timeline. Deep learning and blockchain technologies are current fads. They may be very relevant for the rest of our lives, but they aren’t guaranteed to be used in every single new computer technology created in the future. However, every new computer system will have an operating system. Any time someone writes code, a compiler will be used. Even though you might not be a systems programmer after college, the knowledge you gain will help you grasp how new technologies work.
  5. You’re less afraid to dive into the stack. Before I took systems classes my junior year, I’d get super frustrated when my code didn’t work and it wasn’t easy to figure out why. Although I was taught how to use a debugger in the intro classes, the debugger felt like a “last resort” for me — for when I had truly, miserably failed and had no other choice. I used to hate parsing through the stack trace when my neural networks didn’t work. In systems classes, when my code didn’t work, the only way for me to figure out the issue was to use GDB (a debugger used for C)! With practice, I gained confidence in using low-level debugging tools. Now, when my friends have issues with their deep learning code, I frequently use PDB (the Python debugger) to isolate the problem quickly. I’ve gotten a lot better at understanding stack traces. When I have issues with my code, I’m not afraid to put in a lot of energy to make it work.

I don’t want to be a systems programmer after graduation. I don’t learn about systems in my own time or talk excitedly about ARM processors, like many stereotypical systems programmers do, but I’m so thankful I gained the skills. Systems has made me better at not just AI, but learning new technologies. For example, I recently learned how to build a website and deploy it. This year, I want to learn how to develop phone applications. Even if you don’t want to concentrate in systems, you should at least take a few more systems classes than are required for you to graduate.

While I am not the best programmer by any means, I know I developed skills that only systems classes could have taught me. It’s been a challenging experience, but definitely worth it.

Thanks to Kate Stowell and Brad Ross for feedback on this post.

Shreya Shankar likes systems and machine learning.