Live data from Hacker News

Designing a New Rust Class at Stanford: Safety in Systems Programming

reberhardt.com

21–30 of 53 posts

Re: Designing a New Rust Class at Stanford: Safety in Systems Programming

#21
post #20

Teaching a class about safety in systems code seems like a great idea, and at first glance the class content here seems useful and interesting. I do a lot of OS-level stuff at work (especially around virtualization and Firecracker), and while safety (and security) are obviously a critical topic for industrial systems, they don't tend to be things that new grads have thought about at all. Great to see that changing (e…

I'm also biased here, but it seems like Firecracker (https://github.com/firecracker-microvm/firecracker) and rust-vmm (https://github.com/rust-vmm) would be great things to use as examples in a course like this. Not because it has space to explain the whole virtualization stack (it doesn't), but because things like virtualized devices are both fairly simple (at least at the simple end) and really safety critical.

Re: Designing a New Rust Class at Stanford: Safety in Systems Programming

#22

I wonder if either of the two teachers have actually worked on a large system before.

This comes across as really harsh. Did you mean to come across that way?

I would be very nervous about the integrity of a bridge designed by engineers whose sole source of knowledge was a teacher who has no experience in construction or design of bridges. That’s even considering the engineers may rely on industry standards bodies like AASHTO that prescribe much of the particulars of a design.

To my knowledge, no such standards bodies exist for software, making the designs of pure theorists all the more concerning. Maybe FRAMA-C? I’m not sure if that’s equivalent to AASHTO LRFD. Given that end users have almost no way of evaluating the safety or quality of software, similar to medical or legal counsel, I would think that there is an obvious need for some kind of regulatory body. Celebrity-bloggers seems like all too common a source of best practices.

Re: Designing a New Rust Class at Stanford: Safety in Systems Programming

#24
post #19
post #16

Earlier quoted context omitted.

I don't think it's harsh. It is a reasonable question to ask. Academia is rife with people who have never worked in the industry, completely disconnected from reality.

From what I understand reading the course outline, this is an introductory class. Foundational material in a subject is often "completely disconnected" from the reality of the discipline. If I was an engineer taking a first course in integral calculus, should I worry that my teacher may not be a seasoned practitioner, or should I worry that they are good at getting me to understand the fundamentals? I can definitely…

I think you should worry. One of my math professors taught us how factoring to a(x+b(x+c*(...))) is a great optimization in an introductory class, because he had no idea about CPU pipelines for example.

Re: Designing a New Rust Class at Stanford: Safety in Systems Programming

#25
post #2

Hi HN, I spent last spring working on a new class at Stanford that's focused on common pitfalls in systems programming and how to avoid them. You can check out all the lecture materials (including recorded lecture videos) and assignments available here: http://cs110l.stanford.edu/ I'm planning on teaching this class again in the winter or spring and am looking for any feedback to improve it. I would love to hear your…

I may be misunderstanding, but it appears that the code for the assignments is in a private GitHub repo that students of the class are invited to. Is there any other way to gain access?

I'm happy to email it to you! My email's at the bottom of the blog post. I'm also working on getting that starter code posted publicly.

EDIT: the code is now posted here: https://github.com/reberhardt7/cs110l-spr-2020-starter-code

Re: Designing a New Rust Class at Stanford: Safety in Systems Programming

#26
post #13
post #2

Hi HN, I spent last spring working on a new class at Stanford that's focused on common pitfalls in systems programming and how to avoid them. You can check out all the lecture materials (including recorded lecture videos) and assignments available here: http://cs110l.stanford.edu/ I'm planning on teaching this class again in the winter or spring and am looking for any feedback to improve it. I would love to hear your…

One aspect of systems programming that doesn't get enough attention involves tracing memory leaks (with valgrind, massif, etc). While it may be challenging for you to create realistic examples, doing so would help expose students to challenges they'll face in the real world.

That's a great suggestion! I'll try to design some exercises for the next time we teach this.

Re: Designing a New Rust Class at Stanford: Safety in Systems Programming

#27
post #2

Hi HN, I spent last spring working on a new class at Stanford that's focused on common pitfalls in systems programming and how to avoid them. You can check out all the lecture materials (including recorded lecture videos) and assignments available here: http://cs110l.stanford.edu/ I'm planning on teaching this class again in the winter or spring and am looking for any feedback to improve it. I would love to hear your…

This looks really cool! I especially love the assignments and I'd definitely take a crack at them. Thanks again!

Thanks for checking it out! I'd love to hear any feedback once you look through them

Re: Designing a New Rust Class at Stanford: Safety in Systems Programming

#28
post #23

There's more to safety in system programming than "use Rust".. What about Ada/Spark ? Fuzzing?

That's true, but we only have 10 weeks in a quarter, and this class isn't many units so there isn't much time in every week. In the blog post, I explain our rationale for focusing on Rust even though I'm aware there are many other things we could talk about. Primarily, I think Rust encourages good programming practices, and, by working through practical assignments, students are able to develop better habits and have a more cohesive experience than they would if we just gave them an assorted list of technologies to know. That being said, I do wish we had spent more time giving students a better awareness of what's out there and talking about useful tools such as fuzzers.

Re: Designing a New Rust Class at Stanford: Safety in Systems Programming

#29

I wonder if either of the two teachers have actually worked on a large system before.

As I say in the blog post, I'm just a grad student, but I have worked in many different places in industry, and from my own experience as well as what I know from others, there is a big need for better awareness of these kinds of issues. We wanted to start doing something to fill that need. I'm certainly not the most qualified person to teach this class, but that's why I wrote the blog post and am soliciting feedback here. Anyways, better to have something than nothing, right?

Re: Designing a New Rust Class at Stanford: Safety in Systems Programming

#30
post #5

This is a fine article but not a Show HN, so I've taken that out of the title. Please see https://news.ycombinator.com/showhn.html .

I read that and wasn't sure if it counted, but I added "Show HN" because I uploaded all the course materials for people to "play with," and I'm mainly posting to get feedback from the community. Thanks for re-tagging it.
Post reply on HN