Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

RFC: Switch from Modern C to Dive into Systems for OSTEP Base Approach #1134

Open
Alaharon123 opened this issue Feb 5, 2023 · 4 comments
Open

Comments

@Alaharon123
Copy link
Contributor

Alaharon123 commented Feb 5, 2023

Problem:
OSSU recommends Modern C in the OSTEP page for learning C for the Base Approach. Modern C is a 325 page book, which is overkill for the base approach, and assumes more knowledge than students will have at that point, which causes problems. eg

Discord Message 1pen:

Is modern C really that good ? I am currently reading it and I barely get anything.

Discord Message 2 nigaleto:

Guys I'm going through that modern C book and they just dropped this bombshell on me. I know that there is no way I am missing something!!! First off there's 3 exercises:

  1. Add a printf statement to see values of x. He didn't explain printf very well but I was able to figure it out externally
  2. Explain the parameters of main. The only main parameter seen so far in the book is void. Never explained. I mean argc is simple enough, but what the heck is argv? It has char* (hasn't been talked about so far) and this weird array looking thing. And I didn't know how to execute the program with parameters (it was simple enough just put a number after the exe file, but for some reason I don't have to add the second parameter?)
  3. Change values of eps1m01 and see what happens. I played around with it and I see the values changing and idk what to make of it.

I mean, I figured maybe it's their style and ur not supposed to understand the inner workings of the code, maybe just the structure. But how are you supposed to do the exercises without understanding the inner code? I mean, maybe it's simple to others, but I just can't see why the author would use such a convoluted math example using this thing called heron approximation in just the 3rd chapter (which is really where the book starts).

I know I'm ranting but could someone just tell me that I'm wrong? Like am I supposed to know how these things work? Because they haven't been explained in the previous chapters, and the only prerequisites are somewhat knowing variables, conditionals, and iteration.

And the challenge problem. I know it's a challenge problem and you're supposed to do research and figure it out, but aren't challenge problems supposed to be hard applications of what you already know? Why are sort keys and arrays being talked about if they haven't been taught yet? Am I missing something? I find it hard to imagine that you're supposed to move on and come back to the challenge problems later.

Duration:
Until March 5 unless more time is needed

Background:
I think Modern C is recommended because it is what is recommended in the Extended Approach, which needs the depth that it provides. However, for the Base Approach, only a shallow understanding of C is needed. Thus I propose switching to Chapters 1 and 2 of Dive into Systems, which is what I used when I learned C for a Systems course in college that used OSTEP as a textbook. There are very few exercises in Dive into Systems, and they are quite simple, so I propose following this up by the reverse project from OSTEP, which is a fairly simple project that will get students coding in C, reading man pages, whatever they need to be comfortable enough in C to complete it, which I believe is also the level of comfort students should have in order to go through OSTEP.

Advantage of this approach:

  • It's fairly short, simple, and straightforward.

Disadvantages of this approach:

  1. Dive into Systems is rather dry, so it's still a fair amount of reading dry material to get through
  2. Some might say this is still too much work before OSTEP, and you don't need to actually be able to write C code, only read it. I think this is mistaken, because the only way to gain enough familiarity to read code is to write some. Additionally, there are exercises in OSTEP that require writing C code.
  3. There is a small mistake in the instructions for reverse, as mentioned in OSSU's OSTEP page, and fixed in the unmerged pull request reverse: Make README instructions match tests remzi-arpacidusseau/ostep-projects#10. This can be fixed by linking to billmei's fork, creating a new fork, or just sticking with the note on the current OSTEP page

Proposal:
Replace Modern C in coursepages/ostep#base-approach with

  1. Dive into Systems Chapter 1
  2. Dive into Systems Chapter 2
  3. Reverse Project

Alternatives:

  1. Keep Modern C in the Base Approach (and maybe move Core Tools/Systems to after Core Theory since Modern C expects you to already know sorting algorithms?)
  2. Switch to a different alternate resource for learning C
  3. Get rid of any recommendation at all to learn C
@riceeatingmachine
Copy link
Contributor

Would you be in the favour of bringing back the C portions of CS50?

From the base approach:

You'll need to read and understand some C code in this book. You'll need basic understanding of arrays, pointers and print formatting.

All of this is covered, along with ample practice and some additional topics that aren't covered elsewhere in the OSSU.,

@Alaharon123
Copy link
Contributor Author

Would you be in the favour of bringing back the C portions of CS50?

It seems like overkill to me. 12 hours of lecture aimed at beginner programmers, 5 labs, and 5 problem sets. If a student has taken CS50 already, they should be ready C-wise for OSTEP from the glances I've taken at CS50, but if they haven't, that seems really tedious to go through. At this stage, I don't think students need all that, they already know how to program. Dive Into Systems Chapters 1-2 is also tedious, but it's less to get through, and it's written for this sort of audience that already knows Python and is learning C for a Systems course

@waciumawanjohi
Copy link
Member

The comment period for this RFC has completed. There are thumbs up from multiple involved OSSU contributors. We should consider this RFC accepted. @Alaharon123 can you create a PR with the changes you detail above?

@aayushsinha0706
Copy link
Member

Having recently finished the C Programming chapters in the "Dive into Systems" book, I found myself struggling with "KN King Book C" and subsequently attempted to delve into "Modern C." However, I encountered significant difficulties with the latter due to its complexity, especially for someone new to learning C.

While C Programming serves as a prerequisite for "Operating Systems: Three Easy Pieces" (OSTEP), the prolonged duration required to work through KN King's material seemed impractical.

In contrast, the initial chapters of "Dive into Systems" provided just the right balance of content and practical application for beginners to grasp C programming concepts efficiently. It is reasonable to expect that completing the C chapters in "Dive into Systems" should not take more than two weeks on average.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants